From 3cec90e553b8b48292c4379f15c30bfd4151f27b Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Thu, 22 Apr 2021 09:59:33 +0200 Subject: [PATCH] Pin hosts on urithiru for less building --- flake.lock | 6 +++--- flake.nix | 1 + machines/urithiru/default.nix | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 7d087186..7110e192 100644 --- a/flake.lock +++ b/flake.lock @@ -53,11 +53,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1618967915, - "narHash": "sha256-+BYz6ihIzBDcXFTrPxBibQX0PYXjK42JX5XA6SFMxiI=", + "lastModified": 1619060385, + "narHash": "sha256-4y/QSlmyIsMYP+g1mnZaBUTDED07wHPhtBdCjEnk0/A=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5bc2962319ca6ccbd0033c95d3e00c9fde1b67ff", + "rev": "f2a3a0edab77d4c5cf67436912970e85a5c77b19", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 144bba03..41f5fe4a 100644 --- a/flake.nix +++ b/flake.nix @@ -30,6 +30,7 @@ home-manager.nixosModules.home-manager ./modules ]; + extraArgs = { nixosConfigurations = self.nixosConfigurations; }; }; hosts = { kharbranth.modules = [ ./machines/kharbranth ]; diff --git a/machines/urithiru/default.nix b/machines/urithiru/default.nix index 9ed4e4b6..1c375c6a 100644 --- a/machines/urithiru/default.nix +++ b/machines/urithiru/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ lib, pkgs, nixosConfigurations, ... }: { imports = [ @@ -11,6 +11,9 @@ networking.hostId = "079e60ba"; + environment.etc = lib.mapAttrs' (n: v: { name = "pinned-hosts/${n}"; value = { source = v.config.system.build.toplevel.outPath; }; }) + (lib.filterAttrs (n: _: n != "urithiru") nixosConfigurations); + chvp = { stateVersion = "20.09"; accentor.enable = true;