initial commit

This commit is contained in:
2026-05-14 13:39:10 +02:00
commit 7e444146d2
37 changed files with 1537 additions and 0 deletions

48
flake.nix Normal file
View File

@@ -0,0 +1,48 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
systems.url = "github:nix-systems/default";
flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, nixos-generators, ... }@inputs:
inputs.flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
user = "admin";
self = inputs.self.packages.${system};
in
{
packages = {
nixosConfigurations = builtins.mapAttrs (name: modules:
nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs self user system; };
inherit system modules;
}
) self.nixosModules;
nixosModules = (builtins.mapAttrs (name: modules: [ ./configuration ./host/${name} ] ++ modules) {
server = [ ] ;
});
image = nixos-generators.nixosGenerate {
system = "x86_64-linux";
format = "qcow-efi";
specialArgs = { inherit inputs self user system; };
modules = self.nixosModules.server;
};
};
});
}