nixos-config/flake.nix
2025-06-09 16:23:54 -04:00

113 lines
2.7 KiB
Nix

{
inputs = {
# General inputs
stable.url = "nixpkgs/nixos-25.05";
unstable.url = "nixpkgs/nixos-unstable";
# Flake helpers
flake-utils.url = "github:numtide/flake-utils";
# System inputs
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "stable";
};
impermanence.url = "github:nix-community/impermanence";
lanzaboote = {
url = "github:nix-community/lanzaboote";
inputs.nixpkgs.follows = "stable";
};
# Hardware specific
jovian = {
url = "github:Jovian-Experiments/Jovian-NixOS";
inputs.nixpkgs.follows = "unstable";
};
# Service inputs
mailserver = {
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-25.05";
inputs.nixpkgs.follows = "stable";
};
minecraft = {
url = "github:Infinidoge/nix-minecraft";
inputs.nixpkgs.follows = "stable";
};
# Home inputs
hm = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "stable";
};
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "unstable";
};
# Specific apps
blender = {
url = "github:edolstra/nix-warez?dir=blender";
inputs.nixpkgs.follows = "unstable";
};
};
outputs = inputs: with inputs;
{
colmena = {
meta = {
# Info
description = "The Bun Hive";
name = "bunhive";
# NixPKGs
nixpkgs = import stable { system = "x86_64-linux"; };
specialArgs = inputs;
# Remote builds
machinesFile = ./machines.txt;
# Use a different Nixpkgs import on some systems
nodeNixpkgs.jupiter = import unstable { system = "x86_64-linux"; };
};
# Import the default config to all hosts
defaults.imports = [ ./modules/system ];
# Desktops
tower.imports = [ ./hosts/tower ];
hidden.imports = [ ./hosts/hidden ];
# Laptops
intuos.imports = [ ./hosts/intuos ];
jupiter.imports = [ ./hosts/jupiter ];
# Servers
midas.imports = [ ./hosts/midas ];
kitty.imports = [ ./hosts/kitty ];
detritus.imports = [ ./hosts/detritus ];
elder.imports = [ ./hosts/elder ];
prophet.imports = [ ./hosts/prophet ];
};
}
// flake-utils.lib.eachDefaultSystemPassThrough (system: let
mkHome = extraModules: hm.lib.homeManagerConfiguration {
modules = [
./modules/home
{ targets.genericLinux.enable = true; }
] ++ extraModules;
extraSpecialArgs = inputs;
pkgs = builtins.getAttr system stable.legacyPackages;
};
in {
homeConfigurations = {
default = mkHome [ ];
desktop = mkHome [{ home.guifull.enable = true; }];
};
});
}