{ description = "Nixos config flake"; inputs = { nixpkgs.url = "nixpkgs/nixos-25.05"; unstable.url = "nixpkgs/nixos-unstable"; nid.url = "github:nix-community/nix-index-database"; nid.inputs.nixpkgs.follows = "nixpkgs"; sops-nix.url = "github:Mic92/sops-nix"; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; declarative-jellyfin.url = "github:Sveske-Juice/declarative-jellyfin"; declarative-jellyfin.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, nixpkgs, unstable, ... }@inputs: let base = [ # I've put these all here so that it's easier to see what's being # imported by default ./modules/os.nix ./modules/server.nix ./modules/ssh.nix ./modules/time.nix ./modules/pkgs.nix ./modules/unstable.nix ./modules/zmotd.nix ./modules/sops.nix ./modules/users/admin.nix ./overlays { services.zmotd.enable = true; } # enable my motd service { programs.nix-ld.enable = true; } # use nix-ld cause nixos is a bit dumb inputs.declarative-jellyfin.nixosModules.default # jellyfin :) # use comma just in case I need to do some sysadmin stuff inputs.nid.nixosModules.nix-index { programs.nix-index-database.comma.enable = true; } ]; # ts so DRY it makes me wanna cry mkHosts = hosts: (builtins.mapAttrs (name: modules: nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; modules = base ++ [ { networking.hostName = name; } ./hosts/${name} # just specifying a directory uses default.nix ] ++ modules; } )) <| hosts; in { # define all of my machines nixosConfigurations = mkHosts { blobercraft = []; crayon = []; }; }; }