2023-06-10 10:50:53 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
nix-writers = {
|
|
|
|
url = "git+https://cgit.krebsco.de/nix-writers";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
# disko.url = "github:nix-community/disko";
|
|
|
|
# disko.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
description = "stockholm";
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, nix-writers }: {
|
2023-11-07 19:27:19 +00:00
|
|
|
nixosConfigurations = nixpkgs.lib.mapAttrs (machineName: _: nixpkgs.lib.nixosSystem {
|
2023-06-10 10:50:53 +00:00
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs.stockholm = self;
|
|
|
|
specialArgs.nix-writers = nix-writers;
|
2023-11-07 19:27:19 +00:00
|
|
|
specialArgs.secrets = nixpkgs.lib.mkDefault (toString ./krebs/0tests/data/secrets);
|
2023-06-10 10:50:53 +00:00
|
|
|
modules = [
|
2023-11-07 19:27:19 +00:00
|
|
|
./krebs/1systems/${machineName}/config.nix
|
2023-06-10 10:50:53 +00:00
|
|
|
];
|
2023-11-07 19:27:19 +00:00
|
|
|
}) (builtins.readDir ./krebs/1systems);
|
2023-06-09 11:37:20 +00:00
|
|
|
|
|
|
|
nixosModules =
|
|
|
|
let
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
in builtins.listToAttrs
|
|
|
|
(map
|
|
|
|
(name: {name = lib.removeSuffix ".nix" name; value = import (./krebs/3modules + "/${name}");})
|
|
|
|
(lib.filter
|
|
|
|
(name: name != "default.nix" && !lib.hasPrefix "." name)
|
|
|
|
(lib.attrNames (builtins.readDir ./krebs/3modules))));
|
|
|
|
|
2023-06-10 10:50:53 +00:00
|
|
|
kartei = {
|
|
|
|
hosts = self.nixosConfigurations.hotdog.config.krebs.hosts;
|
|
|
|
users = self.nixosConfigurations.hotdog.config.krebs.users;
|
|
|
|
};
|
2023-07-06 18:52:10 +00:00
|
|
|
overlays.default = import ./krebs/5pkgs/default.nix;
|
2023-06-10 10:50:53 +00:00
|
|
|
lib = import (self.outPath + "/lib/pure.nix") { lib = nixpkgs.lib; };
|
|
|
|
};
|
|
|
|
}
|