add templates for host specific and global overlays
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# 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 = [
|
||||
@@ -32,7 +32,6 @@
|
||||
sbctl
|
||||
ausweisapp
|
||||
e2fsprogs
|
||||
] ++ (with pkgs-stable; [
|
||||
orca-slicer
|
||||
]);
|
||||
|
||||
|
||||
@@ -21,21 +21,23 @@ let
|
||||
|
||||
system = "x86_64-linux";
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
pkgs-unstable = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
pkgs-stable = pkgs;
|
||||
|
||||
pkgs-kabbone = import ../packages {
|
||||
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.
|
||||
@@ -55,7 +57,7 @@ in
|
||||
{
|
||||
hades = lib.nixosSystem { # Desktop profile
|
||||
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 = [
|
||||
agenix.nixosModules.default
|
||||
microvm.nixosModules.host
|
||||
@@ -71,7 +73,7 @@ in
|
||||
|
||||
lifebook = lib.nixosSystem { # Laptop profile
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs pkgs-stable user location nixos-hardware agenix lanzaboote; };
|
||||
specialArgs = { inherit inputs user location nixos-hardware agenix lanzaboote; };
|
||||
modules = [
|
||||
agenix.nixosModules.default
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
@@ -84,7 +86,7 @@ in
|
||||
|
||||
steamdeck = nixpkgs-unstable.lib.nixosSystem { # steamdeck profile
|
||||
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 = [
|
||||
agenix.nixosModules.default
|
||||
jovian-nixos.nixosModules.default
|
||||
@@ -121,7 +123,7 @@ in
|
||||
|
||||
jupiter = lib.nixosSystem { # Server profile
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs user location nixos-hardware agenix pkgs-kabbone; };
|
||||
specialArgs = { inherit inputs user location nixos-hardware agenix; };
|
||||
modules = [
|
||||
agenix.nixosModules.default
|
||||
./jupiter
|
||||
|
||||
@@ -2,9 +2,19 @@
|
||||
# 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 = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/desktop
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
# └─ default.nix
|
||||
#
|
||||
|
||||
{ config, lib, pkgs, user, pkgs-stable, ... }:
|
||||
{ config, lib, pkgs, user, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# └─ default.nix
|
||||
#
|
||||
|
||||
{ config, pkgs, user, pkgs-kabbone, ... }:
|
||||
{ config, pkgs, inputs, user, ... }:
|
||||
|
||||
{
|
||||
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 = {
|
||||
# systemPackages = with pkgs-kabbone; [
|
||||
# systemPackages = with pkgs; [
|
||||
# corosync-qdevice
|
||||
### simple-scan
|
||||
### intel-media-driver
|
||||
### alacritty
|
||||
# ];
|
||||
# };
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# └─ default.nix
|
||||
#
|
||||
|
||||
{ config, pkgs, pkgs-unstable, user, agenix, impermanence, ... }:
|
||||
{ config, pkgs, user, agenix, impermanence, ... }:
|
||||
|
||||
{
|
||||
imports = # For now, if applying to other system, swap files
|
||||
|
||||
Reference in New Issue
Block a user