add templates for host specific and global overlays

This commit is contained in:
2026-04-25 10:59:21 +02:00
parent 6ce78e164c
commit c8806e3676
6 changed files with 38 additions and 22 deletions

View File

@@ -3,7 +3,7 @@
# Host-specific window manager and hardware configs are imported per-host. # Host-specific window manager and hardware configs are imported per-host.
# #
{ config, lib, pkgs, pkgs-stable, inputs, user, location, agenix, ... }: { config, lib, pkgs, inputs, user, location, agenix, ... }:
{ {
imports = [ imports = [
@@ -32,7 +32,6 @@
sbctl sbctl
ausweisapp ausweisapp
e2fsprogs e2fsprogs
] ++ (with pkgs-stable; [
orca-slicer orca-slicer
]); ]);

View File

@@ -21,21 +21,23 @@ let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
pkgs-unstable = import nixpkgs-unstable { pkgs-unstable = import nixpkgs-unstable {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
}; };
pkgs-stable = pkgs;
pkgs-kabbone = import ../packages { pkgs-kabbone = import ../packages {
inherit system; inherit system;
inherit pkgs; pkgs = import nixpkgs { inherit system; config.allowUnfree = true; };
};
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
# Prefer host-specific overlays over a global one here.
# Set nixpkgs.overlays inside the host's own module (e.g. hosts/desktop/default.nix)
# so only that host's pkgs is affected. Packages can be imported inline —
# no specialArgs needed. See hosts/desktop/default.nix for an example.
}; };
# Helper: returns [hm-module, config-attrset] for the modules list. # Helper: returns [hm-module, config-attrset] for the modules list.
@@ -55,7 +57,7 @@ in
{ {
hades = lib.nixosSystem { # Desktop profile hades = lib.nixosSystem { # Desktop profile
inherit system; inherit system;
specialArgs = { inherit inputs pkgs-stable user location nixos-hardware agenix microvm nixpkgs lanzaboote pkgs-kabbone; }; specialArgs = { inherit inputs user location nixos-hardware agenix microvm nixpkgs lanzaboote; };
modules = [ modules = [
agenix.nixosModules.default agenix.nixosModules.default
microvm.nixosModules.host microvm.nixosModules.host
@@ -71,7 +73,7 @@ in
lifebook = lib.nixosSystem { # Laptop profile lifebook = lib.nixosSystem { # Laptop profile
inherit system; inherit system;
specialArgs = { inherit inputs pkgs-stable user location nixos-hardware agenix lanzaboote; }; specialArgs = { inherit inputs user location nixos-hardware agenix lanzaboote; };
modules = [ modules = [
agenix.nixosModules.default agenix.nixosModules.default
lanzaboote.nixosModules.lanzaboote lanzaboote.nixosModules.lanzaboote
@@ -84,7 +86,7 @@ in
steamdeck = nixpkgs-unstable.lib.nixosSystem { # steamdeck profile steamdeck = nixpkgs-unstable.lib.nixosSystem { # steamdeck profile
inherit system; inherit system;
specialArgs = { inherit inputs pkgs-stable user location nixos-hardware agenix jovian-nixos lanzaboote; }; specialArgs = { inherit inputs pkgs user location nixos-hardware agenix jovian-nixos lanzaboote; };
modules = [ modules = [
agenix.nixosModules.default agenix.nixosModules.default
jovian-nixos.nixosModules.default jovian-nixos.nixosModules.default
@@ -121,7 +123,7 @@ in
jupiter = lib.nixosSystem { # Server profile jupiter = lib.nixosSystem { # Server profile
inherit system; inherit system;
specialArgs = { inherit inputs user location nixos-hardware agenix pkgs-kabbone; }; specialArgs = { inherit inputs user location nixos-hardware agenix; };
modules = [ modules = [
agenix.nixosModules.default agenix.nixosModules.default
./jupiter ./jupiter

View File

@@ -2,9 +2,19 @@
# Hades desktop — system configuration # Hades desktop — system configuration
# #
{ lib, pkgs, pkgs-kabbone, ... }: { lib, pkgs, inputs, ... }:
{ {
# Example: host-specific overlays — only hades gets these packages in its pkgs.
# nixpkgs.overlays = [
# (final: prev: {
# # pull a single package from unstable (no specialArgs needed)
# firefox = inputs.nixpkgs-unstable.legacyPackages.${prev.system}.firefox;
# # pull a package from pkgs-kabbone (inline import, no specialArgs needed)
# corosync-qdevice = (import ../../packages { pkgs = prev; }).corosync-qdevice;
# })
# ];
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../modules/desktop ../../modules/desktop

View File

@@ -15,7 +15,7 @@
# └─ default.nix # └─ default.nix
# #
{ config, lib, pkgs, user, pkgs-stable, ... }: { config, lib, pkgs, user, ... }:
{ {
imports = imports =

View File

@@ -17,7 +17,7 @@
# └─ default.nix # └─ default.nix
# #
{ config, pkgs, user, pkgs-kabbone, ... }: { config, pkgs, inputs, user, ... }:
{ {
imports = # For now, if applying to other ssystem, swap files imports = # For now, if applying to other ssystem, swap files
@@ -39,12 +39,17 @@
}; };
}; };
# Example: host-specific overlay — only jupiter gets these packages in its pkgs.
# nixpkgs.overlays = [
# (final: prev: {
# corosync-qdevice = (import ../../packages { pkgs = prev; }).corosync-qdevice;
# firefox = inputs.nixpkgs-unstable.legacyPackages.${prev.system}.firefox;
# })
# ];
#
# environment = { # environment = {
# systemPackages = with pkgs-kabbone; [ # systemPackages = with pkgs; [
# corosync-qdevice # corosync-qdevice
### simple-scan
### intel-media-driver
### alacritty
# ]; # ];
# }; # };

View File

@@ -17,7 +17,7 @@
# └─ default.nix # └─ default.nix
# #
{ config, pkgs, pkgs-unstable, user, agenix, impermanence, ... }: { config, pkgs, user, agenix, impermanence, ... }:
{ {
imports = # For now, if applying to other system, swap files imports = # For now, if applying to other system, swap files