From fb2bc6ceba885133f6b2bd5d4a8d06fddf26eb15 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 15 May 2024 10:04:11 +0200 Subject: make it easier to avoid downgrading servers during deployment --- flake.lock | 17 +++++++++++++++++ flake.nix | 6 ++++-- system/linde.nix | 7 +++---- system/nanopi.nix | 5 ++--- 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index ffb15d36..e5c3a716 100644 --- a/flake.lock +++ b/flake.lock @@ -315,6 +315,22 @@ "type": "github" } }, + "nixpkgs-small": { + "locked": { + "lastModified": 1715724059, + "narHash": "sha256-SxGSovGOHR+5XUZN/U7J5vMwrNjhhy4vWg22+gX47VY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "342e8db923162ef6783dd3c8181b8d346857280c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1715218190, @@ -430,6 +446,7 @@ "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", + "nixpkgs-small": "nixpkgs-small", "searchix": "searchix", "secrets": "secrets", "utils": "utils_2" diff --git a/flake.nix b/flake.nix index 491ae0ab..459d2202 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,7 @@ { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-small.url = "github:NixOS/nixpkgs/nixos-unstable-small"; nixos-hardware.url = "github:NixOS/nixos-hardware"; nix-index-database.url = "github:Mic92/nix-index-database"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; @@ -25,6 +26,7 @@ { self , utils , nixpkgs + , nixpkgs-small , nixos-hardware , home-manager , darwin @@ -74,7 +76,7 @@ common-gpu-nvidia-nonprime ]); }; - nixosConfigurations.nanopi = nixpkgs.lib.nixosSystem { + nixosConfigurations.nanopi = nixpkgs-small.lib.nixosSystem { system = utils.lib.system.aarch64-linux; specialArgs = { inherit inputs; }; modules = [ @@ -82,7 +84,7 @@ ./system/nanopi.nix ]; }; - nixosConfigurations.linde = nixpkgs.lib.nixosSystem { + nixosConfigurations.linde = nixpkgs-small.lib.nixosSystem { system = utils.lib.system.aarch64-linux; specialArgs = { inherit inputs; }; modules = [ diff --git a/system/linde.nix b/system/linde.nix index a39d7182..a6bfefb4 100644 --- a/system/linde.nix +++ b/system/linde.nix @@ -132,10 +132,9 @@ in flake = "git+file://${config.services.gitolite.dataDir}/repositories/nixfiles.git"; flags = [ "--no-write-lock-file" - "--override-input" - "nixpkgs" - "github:NixOS/nixpkgs/nixos-unstable-small" - "--override-input" + "--update-input" + "nixpkgs-small" + "--update-input" "searchix" "git+https://git.alanpearce.eu/searchix" ]; diff --git a/system/nanopi.nix b/system/nanopi.nix index 0e45bd91..90f44ff1 100755 --- a/system/nanopi.nix +++ b/system/nanopi.nix @@ -627,9 +627,8 @@ in }; flags = [ "--no-write-lock-file" - "--override-input" - "nixpkgs" - "github:NixOS/nixpkgs/nixos-unstable-small" + "--update-input" + "nixpkgs-small" ]; }; -- cgit 1.4.1