2023-06-10 20:53:47 +02:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
|
|
|
|
|
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
|
|
|
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
sops-nix.inputs.nixpkgs-stable.follows = "";
|
|
|
|
|
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
|
|
|
|
|
|
|
home-manager.url = "github:nix-community/home-manager";
|
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
disko.url = "github:nix-community/disko";
|
|
|
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
|
|
|
|
|
|
|
nix-ld.url = "github:Mic92/nix-ld";
|
|
|
|
nix-ld.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
2023-07-08 18:08:49 +02:00
|
|
|
stockholm.url = "git+https://cgit.euer.krebsco.de/stockholm";
|
|
|
|
#stockholm.url = "path:///home/makefu/stockholm-flakes";
|
2023-06-10 20:53:47 +02:00
|
|
|
stockholm.inputs.nixpkgs.follows = "nixpkgs";
|
2023-07-02 16:18:47 +02:00
|
|
|
stockholm.inputs.nix-writers.follows = "nix-writers";
|
2023-06-10 20:53:47 +02:00
|
|
|
|
2023-07-02 16:18:47 +02:00
|
|
|
nix-writers.url = "git+https://cgit.krebsco.de/nix-writers";
|
2023-06-30 10:00:32 +02:00
|
|
|
nix-writers.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
2023-06-10 20:53:47 +02:00
|
|
|
};
|
|
|
|
description = "Flakes of makefu";
|
|
|
|
|
2023-06-30 10:00:32 +02:00
|
|
|
outputs = { self, nixpkgs, disko, nixos-hardware, nix-ld, sops-nix, stockholm, home-manager, nix-writers, ...}@inputs: let
|
2023-06-12 21:43:34 +02:00
|
|
|
inherit (nixpkgs) lib;
|
2023-06-10 20:53:47 +02:00
|
|
|
in {
|
|
|
|
nixosModules =
|
2023-06-12 21:43:34 +02:00
|
|
|
builtins.listToAttrs
|
2023-06-10 20:53:47 +02:00
|
|
|
(map
|
|
|
|
(name: {name = lib.removeSuffix ".nix" name; value = import (./3modules + "/${name}");})
|
|
|
|
(lib.filter
|
2023-06-12 21:43:34 +02:00
|
|
|
(name: !lib.hasPrefix "." name)
|
2023-06-10 20:53:47 +02:00
|
|
|
(lib.attrNames (builtins.readDir ./3modules))));
|
|
|
|
|
2023-06-14 23:37:38 +02:00
|
|
|
overlays.default = import ./5pkgs/default.nix;
|
2023-07-05 15:27:44 +02:00
|
|
|
nixosConfigurations = lib.genAttrs ["x" "cake" "tsp" "wbob" "omo" "gum"] (host: nixpkgs.lib.nixosSystem rec {
|
|
|
|
# TODO inject the system somewhere else
|
|
|
|
system = if host == "cake" then "aarch64-linux" else "x86_64-linux";
|
2023-06-10 20:53:47 +02:00
|
|
|
specialArgs = {
|
2023-06-11 00:34:33 +02:00
|
|
|
inherit (inputs) nixos-hardware self stockholm nixpkgs;
|
2023-06-10 20:53:47 +02:00
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
config.allowUnfree = true;
|
2023-06-30 10:00:32 +02:00
|
|
|
overlays = [
|
|
|
|
(self: super: { inherit (self.writers) writeDash writeDashBin; stockholm.lib = stockholm.lib; })
|
|
|
|
self.overlays.default
|
|
|
|
stockholm.overlays.default
|
|
|
|
nix-writers.overlays.default
|
|
|
|
] ;
|
2023-06-10 20:53:47 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
modules = [
|
|
|
|
disko.nixosModules.disko
|
|
|
|
nix-ld.nixosModules.nix-ld
|
|
|
|
sops-nix.nixosModules.sops
|
2023-06-12 21:43:34 +02:00
|
|
|
home-manager.nixosModules.default
|
2023-06-10 20:53:47 +02:00
|
|
|
|
2023-07-02 16:18:47 +02:00
|
|
|
stockholm.nixosModules.brockman
|
|
|
|
|
|
|
|
stockholm.nixosModules.exim-retiolum
|
|
|
|
stockholm.nixosModules.exim
|
|
|
|
|
2023-06-10 20:53:47 +02:00
|
|
|
stockholm.nixosModules.krebs
|
|
|
|
stockholm.nixosModules.hosts
|
|
|
|
stockholm.nixosModules.users
|
|
|
|
stockholm.nixosModules.build
|
|
|
|
stockholm.nixosModules.dns
|
|
|
|
stockholm.nixosModules.kartei
|
|
|
|
stockholm.nixosModules.sitemap
|
2023-06-12 21:43:34 +02:00
|
|
|
stockholm.nixosModules.fetchWallpaper
|
|
|
|
stockholm.nixosModules.git
|
2023-06-30 10:00:32 +02:00
|
|
|
stockholm.nixosModules.tinc
|
|
|
|
stockholm.nixosModules.systemd
|
2023-07-02 16:18:47 +02:00
|
|
|
stockholm.nixosModules.setuid
|
|
|
|
stockholm.nixosModules.urlwatch
|
2023-06-10 20:53:47 +02:00
|
|
|
|
2023-06-12 21:43:34 +02:00
|
|
|
self.nixosModules.default
|
2023-06-10 20:53:47 +02:00
|
|
|
#self.nixosModules.krebs
|
2023-06-12 21:43:34 +02:00
|
|
|
(./1systems + "/${host}/config.nix")
|
2023-06-10 20:53:47 +02:00
|
|
|
];
|
|
|
|
|
2023-06-12 21:43:34 +02:00
|
|
|
});
|
2023-06-10 20:53:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|