summaryrefslogtreecommitdiff
path: root/system-profiles/rebuild-machines
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-03-13 10:55:05 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-03-13 10:55:05 +0100
commitfa246cd520aa2f2b369e8cb60a926f4d3844f942 (patch)
tree067d08a24147234d042070b7c5e2d07f91d4d94b /system-profiles/rebuild-machines
parent46152e140fe428538a562dcfd1627a88a02dcc09 (diff)
downloadnixos-fa246cd520aa2f2b369e8cb60a926f4d3844f942.tar
nixos-fa246cd520aa2f2b369e8cb60a926f4d3844f942.tar.gz
nixos-fa246cd520aa2f2b369e8cb60a926f4d3844f942.tar.bz2
nixos-fa246cd520aa2f2b369e8cb60a926f4d3844f942.tar.xz
nixos-fa246cd520aa2f2b369e8cb60a926f4d3844f942.zip
rebuild-machines: machines flake
Diffstat (limited to 'system-profiles/rebuild-machines')
-rw-r--r--system-profiles/rebuild-machines/default.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/system-profiles/rebuild-machines/default.nix b/system-profiles/rebuild-machines/default.nix
index fe9a5f14..e434d2e4 100644
--- a/system-profiles/rebuild-machines/default.nix
+++ b/system-profiles/rebuild-machines/default.nix
@@ -68,7 +68,7 @@ in {
68 }; 68 };
69 }; 69 };
70 }; 70 };
71 default = { flake.url = "git+ssh://${cfg.repoHost}/nixos?ref=flakes"; flakeOutput = hostName; }; 71 default = { flake = { type = "git"; url = "ssh://${cfg.repoHost}/nixos"; ref = "flakes"; } flakeOutput = hostName; };
72 description = '' 72 description = ''
73 The Flake URI of the NixOS configuration to build. 73 The Flake URI of the NixOS configuration to build.
74 ''; 74 '';
@@ -122,15 +122,15 @@ in {
122 } 122 }
123 ]; 123 ];
124 124
125 sops.secrets = lib.mkIf (!(isNull cfg.sopsConfig)) { 125 sops.secrets = mkIf (!(isNull cfg.sopsConfig)) {
126 "${cfg.sopsName}" = { 126 "${cfg.sopsName}" = {
127 sopsFile = cfg.repoPrivkey; 127 sopsFile = cfg.repoPrivkey;
128 } // cfg.sopsConfig; 128 } // cfg.sopsConfig;
129 }; 129 };
130 130
131 environment.systemPackages = [ rebuildScript ]; 131 environment.systemPackages = [rebuildScript];
132 132
133 systemd.services."rebuild-${hostName}" = lib.mkIf (cfg.period != null) { 133 systemd.services."rebuild-${hostName}" = mkIf (cfg.period != null) {
134 description = "Upgrade System on Next Boot"; 134 description = "Upgrade System on Next Boot";
135 requisite = [ "network.target" ]; 135 requisite = [ "network.target" ];
136 after = [ "network.target" ]; 136 after = [ "network.target" ];
@@ -144,7 +144,7 @@ in {
144 }; 144 };
145 }; 145 };
146 146
147 systemd.timers."rebuild-${hostName}" = lib.mkIf (cfg.period != null) { 147 systemd.timers."rebuild-${hostName}" = mkIf (cfg.period != null) {
148 wantedBy = [ "timers.target" ]; 148 wantedBy = [ "timers.target" ];
149 timerConfig = { 149 timerConfig = {
150 OnCalendar = cfg.period; 150 OnCalendar = cfg.period;
@@ -152,7 +152,7 @@ in {
152 }; 152 };
153 }; 153 };
154 154
155 nix.registry = lib.mkIf (cfg.flake != null) { 155 nix.registry = mkIf (cfg.flake != null) {
156 ${cfg.flake.name} = { 156 ${cfg.flake.name} = {
157 exact = false; 157 exact = false;
158 to = cfg.flake.flake; 158 to = cfg.flake.flake;