Commit 4767d88 1 parent 37d9b4e commit 4767d88 Copy full SHA for 4767d88
File tree 2 files changed +20
-4
lines changed
nixosConfigurations/tejingdesk
2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change
1
+ { lib , pkgs , ... } :
2
+ let
3
+ inherit ( builtins ) concatMap attrValues concatStringsSep ;
4
+ inherit ( lib ) unique ;
5
+
6
+ flakesClosure = flakes : if flakes == [ ] then [ ] else unique ( flakes ++ flakesClosure ( concatMap ( flake : if flake ? inputs then attrValues flake . inputs else [ ] ) flakes ) ) ;
7
+ flakeClosureRef = flake : pkgs . writeText "flake-closure" ( concatStringsSep "\n " ( flakesClosure [ flake ] ) + "\n " ) ;
8
+ in flakeClosureRef
Original file line number Diff line number Diff line change 4
4
inherit ( inputs ) nixpkgs home-manager self ;
5
5
inherit ( lib ) mkIf ;
6
6
inherit ( lib . strings ) escapeNixIdentifier ;
7
- inherit ( my . lib ) mkFlake repoLockedTestResult ;
7
+ inherit ( my . lib ) mkFlake repoLockedTestResult flakeClosureRef ;
8
8
in
9
9
{
10
10
# Let 'nixos-version --json' know about the Git revision
11
11
# of this flake.
12
12
system . configurationRevision = mkIf ( self ? rev ) self . rev ;
13
13
14
- # Save our single IFD derivation so we don't usually have to rebuild
15
- # it
16
- system . extraDependencies = [ repoLockedTestResult ] ;
14
+ system . extraDependencies = [
15
+
16
+ # Save our single IFD derivation so we don't usually have to
17
+ # rebuild it
18
+ repoLockedTestResult
19
+
20
+ # Save the whole input closure of this flake, so we have all the
21
+ # nix code necessary to rebuild this system
22
+ ( flakeClosureRef self )
23
+
24
+ ] ;
17
25
18
26
# Indirect our NIX_PATH through /etc so that it updates without a
19
27
# relog
You can’t perform that action at this time.
0 commit comments