auto-upgrade: init attempt at auto upgrade

This commit is contained in:
Felix Albrigtsen 2025-04-22 18:33:42 +02:00
parent f2e408c338
commit 93783fe482
4 changed files with 18 additions and 1 deletions

15
common/auto-upgrade.nix Normal file
View File

@ -0,0 +1,15 @@
{ config, pkgs, lib, ... }:
{
system.autoUpgrade = {
enable = true;
flake = "git+https://git.feal.no/felixalb/nixos-config.git";
flags = [
# Override nixpkgs (only). Notably does not include home-manager, sops or other utility/application flake inputs.
"--refresh"
"--override-input" "nixpkgs" "github:NixOS/nixpkgs/nixos-24.11"
"--override-input" "nixpkgs-unstable" "github:nixos/nixpkgs/nixos-unstable"
"--no-write-lock-file"
];
};
}

View File

@ -2,7 +2,7 @@
description = "Felixalb System flake"; description = "Felixalb System flake";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; # Remember to update ./common/auto-upgrade.nix
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-2211.url = "https://github.com/NixOS/nixpkgs/archive/34bfa9403e42eece93d1a3740e9d8a02fceafbca.tar.gz"; # old nixpgks for e.g. remmina nixpkgs-2211.url = "https://github.com/NixOS/nixpkgs/archive/34bfa9403e42eece93d1a3740e9d8a02fceafbca.tar.gz"; # old nixpgks for e.g. remmina

View File

@ -5,6 +5,7 @@
./hardware-configuration.nix ./hardware-configuration.nix
../../base.nix ../../base.nix
../../common/auto-upgrade.nix
../../common/metrics-exporters.nix ../../common/metrics-exporters.nix
./services/mysql.nix ./services/mysql.nix

View File

@ -5,6 +5,7 @@
[ [
../../base.nix ../../base.nix
../../common/metrics-exporters.nix ../../common/metrics-exporters.nix
../../common/auto-upgrade.nix
./hardware-configuration.nix ./hardware-configuration.nix
]; ];