From 117010cf5339c81aababaeae61df8cd8af251de7 Mon Sep 17 00:00:00 2001 From: albert Date: Wed, 24 Apr 2024 10:46:03 +0900 Subject: [PATCH] Updates --- flake.nix | 9 +++++---- lib/default.nix | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index fdf2f6b8..1a88a4ae 100644 --- a/flake.nix +++ b/flake.nix @@ -62,9 +62,10 @@ nuc-server = libx.mkHost { hostname = "nuc-server"; }; nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; unfree = true; desktop = "hyprland"; theme = "green"; }; nixos-framework = libx.mkHost { hostname = "nixos-framework"; unfree = true; desktop = "hyprland"; theme = "green"; }; - backups-rpi4 = libx.mkHost { hostname = "backups-rpi4"; system = "aarch64-linux"; type = "small"; }; - piaware-rpi4 = libx.mkHost { hostname = "piaware-rpi4"; system = "aarch64-linux"; type = "small"; }; - quitman-rpi4 = libx.mkHost { hostname = "quitman-rpi4"; system = "aarch64-linux"; type = "small"; }; + backups-rpi4 = libx.mkHost { hostname = "backups-rpi4"; system = "aarch64-linux"; type = "small"; }; + piaware-rpi4 = libx.mkHost { hostname = "piaware-rpi4"; system = "aarch64-linux"; type = "small"; }; + quitman-rpi4 = libx.mkHost { hostname = "quitman-rpi4"; system = "aarch64-linux"; type = "small"; }; + bakersfield-rpi4 = libx.mkHost { hostname = "bakersfield-rpi4"; system = "aarch64-linux"; type = "small"; }; }; homeConfigurations = { "albert@osaka-linode-01" = libx.mkHome { hostname = "osaka-linode-01"; type = "small"; }; @@ -92,7 +93,7 @@ nixos-linode-img = libx.mkMinImage { hostname = "nixos-linode-img"; format = "linode"; }; nixos-rpi4-img = libx.mkImage { hostname = "nixos-rpi4-img"; format = "sd-aarch64"; system = "aarch64-linux"; }; nixos-iso-console = libx.mkImage { hostname = "nixos-iso-console"; format = "iso"; }; - nixos-iso-desktop = libx.mkImage { hostname = "nixos-iso-desktop"; format = "iso"; desktop = "gnome"; }; + nixos-iso-desktop = libx.mkImage { hostname = "nixos-iso-desktop"; format = "iso"; desktop = "plasma6"; unfree = true; repo = "nixpkgs-unstable"; }; }; # Checks for deploy-rs - Makes deploy-rs fail when system evaluations fail diff --git a/lib/default.nix b/lib/default.nix index 2f6d6e14..c94094c7 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -115,9 +115,25 @@ system ? "x86_64-linux", gpu ? null, theme ? "stylix", + repo ? "nixpkgs", + unfree ? false, format }: inputs.nixos-generators.nixosGenerate { - specialArgs = { inherit inputs outputs desktop hostname username stateVersion hmStateVersion gpu system theme format; }; + specialArgs = { + inherit inputs outputs desktop hostname username stateVersion hmStateVersion gpu system theme format; + # Choose whether to pull from stable or unstable + pkgs = import inputs.${repo} { + inherit system; + config.allowUnfree = unfree; + hostPlatform = system; + }; + # Some packages (ie, Vintage Story) I want to keep on unstable no matter what default repo I use + pkgs-unstable = import inputs.nixpkgs-unstable { + inherit system; + config.allowUnfree = unfree; + hostPlatform = system; + }; + }; system = system; format = format;