stockholm/flake.nix

48 lines
1.5 KiB
Nix
Raw Normal View History

2023-06-10 12:50:53 +02: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";
2024-05-31 13:52:04 +02:00
buildbot-nix.url = "github:Mic92/buildbot-nix";
buildbot-nix.inputs.nixpkgs.follows = "nixpkgs";
2023-06-10 12:50:53 +02:00
};
description = "stockholm";
2024-05-31 13:52:04 +02:00
outputs = { self, nixpkgs, nix-writers, buildbot-nix, ... }@inputs: {
2023-11-07 20:27:19 +01:00
nixosConfigurations = nixpkgs.lib.mapAttrs (machineName: _: nixpkgs.lib.nixosSystem {
2023-06-10 12:50:53 +02:00
system = "x86_64-linux";
specialArgs.stockholm = self;
specialArgs.nix-writers = nix-writers;
2024-05-31 13:52:04 +02:00
specialArgs.buildbot-nix = buildbot-nix;
2023-06-10 12:50:53 +02:00
modules = [
2023-11-07 20:27:19 +01:00
./krebs/1systems/${machineName}/config.nix
2023-11-29 19:58:49 +01:00
{
krebs.secret.directory = "/var/src/secrets";
}
2023-06-10 12:50:53 +02:00
];
2023-11-07 20:27:19 +01:00
}) (builtins.readDir ./krebs/1systems);
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 12:50:53 +02:00
kartei = {
hosts = self.nixosConfigurations.hotdog.config.krebs.hosts;
users = self.nixosConfigurations.hotdog.config.krebs.users;
};
2023-07-06 20:52:10 +02:00
overlays.default = import ./krebs/5pkgs/default.nix;
2023-06-10 12:50:53 +02:00
lib = import (self.outPath + "/lib/pure.nix") { lib = nixpkgs.lib; };
};
}