-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
62 lines (53 loc) · 1.64 KB
/
Copy pathflake.nix
File metadata and controls
62 lines (53 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# SPDX-FileCopyrightText: 2026 maximizzar <mail@maximizzar.de>
#
# SPDX-License-Identifier: GPL-3.0-or-later
{
description = "NixOS configuration for my Homelab!";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
# Secrets-Management
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, disko, sops-nix, ... }@inputs: let
system = "x86_64-linux";
lib = nixpkgs.lib;
baseModules = [
./modules/services/common/sshd.nix
./modules/services/common/pki.nix
./modules/users/default.nix
];
in {
# Host Configurations (for deployment)
nixosConfigurations = {
generic-guest = lib.nixosSystem {
inherit system;
modules = baseModules ++ [ ({modulesPath, ...}: {
imports = [ "${modulesPath}/profiles/qcow2.nix" ];
system.stateVersion = "25.11";
}) ];
};
nameserver = lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
./hosts/nameserver/default.nix
disko.nixosModules.disko
sops-nix.nixosModules.sops
];
};
};
# Map images to packages for easy building
packages.${system} = {
vm-image = self.nixosConfigurations.generic-guest.config.system.build.images.qcow2;
proxmox-lxc = self.nixosConfigurations.generic-guest.config.system.build.images.proxmox-lxc;
};
};
}