From c07940e86f5e0dcefc0b2ec462f6bab59712e389 Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sat, 18 Oct 2025 13:44:14 +0200 Subject: [PATCH] [shared] Allow systems to run on unstable --- flake.nix | 7 ++++++- systems.nix | 12 ++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 7f09984..ee99d4e 100644 --- a/flake.nix +++ b/flake.nix @@ -43,6 +43,7 @@ { self, nixpkgs, + nixpkgs-unstable, home-manager, ... }@inputs: @@ -97,10 +98,14 @@ { system, username, + nixos, ... }@systemConfig: - nixpkgs.lib.nixosSystem { + let + pkgs = if nixos.channel == "stable" then nixpkgs else nixpkgs-unstable; + in + pkgs.lib.nixosSystem { inherit system; specialArgs = { inherit diff --git a/systems.nix b/systems.nix index e370b92..8e395b7 100644 --- a/systems.nix +++ b/systems.nix @@ -1,4 +1,5 @@ { common, ... }: +# TODO add type, desktop, server, ...? let defaultConfig = { system = "x86_64-linux"; @@ -6,6 +7,7 @@ let version = common.system.version; wayland.enable = true; nvidia.enable = false; + nixos.channel = "stable"; # stable | unstable }; in builtins.mapAttrs (_hostName: systemConfig: defaultConfig // systemConfig) { @@ -17,6 +19,7 @@ builtins.mapAttrs (_hostName: systemConfig: defaultConfig // systemConfig) { thinkpad = { ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILNlHKE/BD8kKfhJD7GBk1A3whZf3gTjk9VEgGAj3qsH"; git.signing.key = "848D71DE0590C199"; + nixos.channel = "unstable"; }; pi4 = { system = "aarch64-linux"; @@ -35,5 +38,14 @@ builtins.mapAttrs (_hostName: systemConfig: defaultConfig // systemConfig) { ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILw1iNuPnX9NGt+UAvBDzkk26d1e4nF+XX2FMm+IRWtt"; address.private = common.localIpAddr 228; git.signing.key = "4E323F914029E976"; + nixos.channel = "unstable"; + }; + # Samsung S23 FE + localhost-y4maoyqm = { + ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII7SSjiqnjif1Kko60iXVTKJ7a1/lRlR8TFNtoclNcnQ"; + }; + # OnePlus 8 + localhost-4izgka9k = { + ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALtulVgLrUEpKnpfPFQTHjaEXTxs2Q818NC18eLx0bj"; }; }