mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2025-01-08 17:11:02 +00:00
systemd.services.nixos-upgrade.serviceConfig.ExecStartPre
This commit is contained in:
parent
efc703bf0c
commit
be45d3ed52
|
@ -86,7 +86,18 @@
|
||||||
system.autoUpgrade = {
|
system.autoUpgrade = {
|
||||||
enable = config.selfprivacy.autoUpgrade.enable;
|
enable = config.selfprivacy.autoUpgrade.enable;
|
||||||
allowReboot = config.selfprivacy.autoUpgrade.allowReboot;
|
allowReboot = config.selfprivacy.autoUpgrade.allowReboot;
|
||||||
|
# TODO get attribute name from selfprivacy options
|
||||||
|
flake = "/etc/nixos#default";
|
||||||
};
|
};
|
||||||
|
# TODO parameterize URL somehow; run nix flake update as non-root user
|
||||||
|
systemd.services.nixos-upgrade.serviceConfig.ExecStartPre =
|
||||||
|
lib.trivial.throwIf
|
||||||
|
(lib.strings.versionAtLeast config.nix.package.version "2.19")
|
||||||
|
"nix flake update usage is not updated to breaking 2.19"
|
||||||
|
''
|
||||||
|
${config.nix.package.out}/bin/nix flake update /etc/nixos \
|
||||||
|
--override-input selfprivacy-nixos-config git+https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git?ref=flakes
|
||||||
|
'';
|
||||||
nix = {
|
nix = {
|
||||||
channel.enable = false;
|
channel.enable = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue