Minimize pkgs use, add stable channel for unstable systems, more separation and such

This commit is contained in:
Bun 2025-03-27 08:53:35 -04:00
parent e2c86171a5
commit 9190e09c93
23 changed files with 112 additions and 93 deletions

View file

@ -1,17 +1,17 @@
{
inputs = {
# System inputs
nixpkgs.url = "nixpkgs/nixos-24.11";
stable.url = "nixpkgs/nixos-24.11";
unstable.url = "nixpkgs/nixos-unstable";
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.1";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "stable";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "stable";
};
impermanence.url = "github:nix-community/impermanence";
@ -19,9 +19,9 @@
minecraft.url = "github:Infinidoge/nix-minecraft";
# Home inputs
home-manager = {
hm = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "stable";
};
nur.url = "github:nix-community/NUR";
@ -29,30 +29,30 @@
};
outputs = {
nixpkgs,
stable,
unstable,
lanzaboote,
disko,
impermanence,
mailserver,
minecraft,
home-manager,
hm,
nur,
blender,
...
}@inputs:
let
mkNix = modules: nixpkgs.lib.nixosSystem {
mkNix = modules: stable.lib.nixosSystem {
inherit modules;
specialArgs = inputs;
};
mkHome = modules: pkgs: home-manager.lib.homeManagerConfiguration {
mkHome = modules: pkgs: hm.lib.homeManagerConfiguration {
inherit modules pkgs;
extraSpecialArgs = inputs;
};
in {
# nixos-rebuild switch --flake /etc/nixos#hostname
# nh os switch /path --hostname=host
nixosConfigurations = {
tower = mkNix [ ./hosts/tower ]; # Main Desktop
qemu = mkNix [ ./hosts/qemu ]; # Virtualization Testing
@ -67,10 +67,10 @@
prophet = mkNix [ ./hosts/prophet ]; # Oracle Neoverse-N1
};
# home-manager switch --flake /etc/nixos#arch
# nh home switch /path -c arch
homeConfigurations = {
x86 = mkHome [ ./modules/home ] nixpkgs.legacyPackages.x86_64-linux;
aarch = mkHome [ ./modules/home ] nixpkgs.legacyPackages.aarch64-linux;
x86 = mkHome [ ./modules/home ] stable.legacyPackages.x86_64-linux;
aarch = mkHome [ ./modules/home ] stable.legacyPackages.aarch64-linux;
};
};
}