Add autoupgrade option, enable in onizuka

This commit is contained in:
Julia Lange 2024-04-13 18:32:38 -07:00
parent 400980e6a0
commit 4135d53c14
3 changed files with 36 additions and 21 deletions

40
flake.lock generated
View file

@ -79,11 +79,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1712635734, "lastModified": 1713050186,
"narHash": "sha256-x4vfyFFVh8X2Y84gKkhUqeM92u/2hpkD8lx9RAscqFw=", "narHash": "sha256-AKdzVa0Zz5PQ1ptQgD0jj8J+UZUW9OeKGZ0mNVnkyI4=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "d0d1ba5918206f16128e56988dd4db5d6d143338", "rev": "0634aaeac6cca12e4f72174c431c2db9da9c0072",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -144,11 +144,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1712439257, "lastModified": 1712791164,
"narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=", "narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599", "rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -159,11 +159,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1712437997, "lastModified": 1712867921,
"narHash": "sha256-g0whLLwRvgO2FsyhY8fNk+TWenS3jg5UdlWL4uqgFeo=", "narHash": "sha256-edTFV4KldkCMdViC/rmpJa7oLIU8SE/S35lh/ukC7bg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e38d7cb66ea4f7a0eb6681920615dfcc30fc2920", "rev": "51651a540816273b67bc4dedea2d37d116c5f7fe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -236,20 +236,18 @@
"wlroots": { "wlroots": {
"flake": false, "flake": false,
"locked": { "locked": {
"host": "gitlab.freedesktop.org", "lastModified": 1712935342,
"lastModified": 1709983277, "narHash": "sha256-zzIbTFNFd/as42jyGx23fil2uBDYYv+8GA5JmRq5y9c=",
"narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=", "owner": "hyprwm",
"owner": "wlroots", "repo": "wlroots-hyprland",
"repo": "wlroots", "rev": "62eeffbe233d199f520a5755c344e85f8eab7940",
"rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", "type": "github"
"type": "gitlab"
}, },
"original": { "original": {
"host": "gitlab.freedesktop.org", "owner": "hyprwm",
"owner": "wlroots", "repo": "wlroots-hyprland",
"repo": "wlroots", "rev": "62eeffbe233d199f520a5755c344e85f8eab7940",
"rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", "type": "github"
"type": "gitlab"
} }
}, },
"xdph": { "xdph": {

View file

@ -5,6 +5,7 @@
user.name = lib.mkOption { default = "pan"; }; user.name = lib.mkOption { default = "pan"; };
user.timezone = lib.mkOption { default = "America/Los_Angeles"; }; user.timezone = lib.mkOption { default = "America/Los_Angeles"; };
system.extraFonts = lib.mkOption { default = []; }; system.extraFonts = lib.mkOption { default = []; };
system.doAutoUpgrade = lib.mkEnableOption "Enable auto upgrading system";
}; };
config = { config = {
@ -58,5 +59,20 @@
source-han-sans # Pan-CJK font source-han-sans # Pan-CJK font
] ++ config.system.extraFonts; ] ++ config.system.extraFonts;
}; };
system.autoUpgrade = lib.mkIf config.system.doAutoUpgrade {
enable = true;
flake = inputs.self.outPath;
flags = [
"--update-input"
"nixpkgs"
"--commit-lock-file"
"-L"
];
operation = "boot";
dates = "22:30";
randomizedDelaySec = "30min";
};
}; };
} }

View file

@ -15,6 +15,7 @@
user.name = "pan"; user.name = "pan";
user.timezone = "America/Los_Angeles"; user.timezone = "America/Los_Angeles";
system.doAutoUpgrade = true;
tuigreet.enable = true; tuigreet.enable = true;
hyprland.enable = true; hyprland.enable = true;