nixos-config/flake.nix

95 lines
3 KiB
Nix
Raw Normal View History

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";
# stockholm.url = "git+https://cgit.lassul.us/stockholm?ref=flakeify";
stockholm.url = "path:///home/makefu/stockholm-flakes";
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
inherit (nixpkgs) lib;
2023-06-10 20:53:47 +02:00
in {
nixosModules =
builtins.listToAttrs
2023-06-10 20:53:47 +02:00
(map
(name: {name = lib.removeSuffix ".nix" name; value = import (./3modules + "/${name}");})
(lib.filter
(name: !lib.hasPrefix "." name)
2023-06-10 20:53:47 +02:00
(lib.attrNames (builtins.readDir ./3modules))));
overlays.default = import ./5pkgs/default.nix;
2023-07-02 16:18:47 +02:00
nixosConfigurations = lib.genAttrs ["x" "tsp" "wbob" "omo" "gum"] (host: nixpkgs.lib.nixosSystem rec {
2023-06-10 20:53:47 +02:00
system = "x86_64-linux";
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
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
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
self.nixosModules.default
2023-06-10 20:53:47 +02:00
#self.nixosModules.krebs
(./1systems + "/${host}/config.nix")
2023-06-10 20:53:47 +02:00
];
});
2023-06-10 20:53:47 +02:00
};
}