Compare commits

3 Commits

Author SHA1 Message Date
23155d57b7 update flake
Some checks failed
Update Nix Flake / update-flake (push) Failing after 18s
2025-07-26 08:13:42 +02:00
a9e30bd84b Set fallback for binary caches
This makes builds not fail when my own binary cache is offline for some reason
2025-07-26 08:13:02 +02:00
e62f6e9dce Fix frajul-auto-upgrade git permission issue 2025-07-26 08:12:43 +02:00
4 changed files with 52 additions and 31 deletions

54
flake.lock generated
View File

@@ -58,11 +58,11 @@
]
},
"locked": {
"lastModified": 1752113600,
"narHash": "sha256-7LYDxKxZgBQ8LZUuolAQ8UkIB+jb4A2UmiR+kzY9CLI=",
"lastModified": 1753140376,
"narHash": "sha256-7lrVrE0jSvZHrxEzvnfHFE/Wkk9DDqb+mYCodI5uuB8=",
"owner": "nix-community",
"repo": "disko",
"rev": "79264292b7e3482e5702932949de9cbb69fedf6d",
"rev": "545aba02960caa78a31bd9a8709a0ad4b6320a5c",
"type": "github"
},
"original": {
@@ -111,11 +111,11 @@
]
},
"locked": {
"lastModified": 1751413152,
"narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=",
"lastModified": 1753121425,
"narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "77826244401ea9de6e3bac47c2db46005e1f30b5",
"rev": "644e0fc48951a860279da645ba77fe4a6e814c5e",
"type": "github"
},
"original": {
@@ -203,11 +203,11 @@
]
},
"locked": {
"lastModified": 1752202894,
"narHash": "sha256-knafgng4gCjZIUMyAEWjxxdols6n/swkYnbWr+oF+1w=",
"lastModified": 1753470191,
"narHash": "sha256-hOUWU5L62G9sm8NxdiLWlLIJZz9H52VuFiDllHdwmVA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "fab659b346c0d4252208434c3c4b3983a4b38fec",
"rev": "a1817d1c0e5eabe7dfdfe4caa46c94d9d8f3fdb6",
"type": "github"
},
"original": {
@@ -348,11 +348,11 @@
]
},
"locked": {
"lastModified": 1751986921,
"narHash": "sha256-lRVaL5ZOzg3OJNcp5RgCwgrXi/gdVgYAs9pGJKSenOc=",
"lastModified": 1753455814,
"narHash": "sha256-c78Dm4hxF9z1grjKbkKPvkOccIIxIl+optGRL0UDnf4=",
"owner": "doronbehar",
"repo": "nix-matlab",
"rev": "2b6e33435a188dc8870e420abf4969d2b1b4ee8b",
"rev": "550d8ad0c21c63991e873bf4dcfe3d69adc1a2f1",
"type": "gitlab"
},
"original": {
@@ -363,11 +363,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1752048960,
"narHash": "sha256-gATnkOe37eeVwKKYCsL+OnS2gU4MmLuZFzzWCtaKLI8=",
"lastModified": 1753122741,
"narHash": "sha256-nFxE8lk9JvGelxClCmwuJYftbHqwnc01dRN4DVLUroM=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "7ced9122cff2163c6a0212b8d1ec8c33a1660806",
"rev": "cc66fddc6cb04ab479a1bb062f4d4da27c936a22",
"type": "github"
},
"original": {
@@ -437,11 +437,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1751984180,
"narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=",
"lastModified": 1753250450,
"narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0",
"rev": "fc02ee70efb805d3b2865908a13ddd4474557ecf",
"type": "github"
},
"original": {
@@ -461,11 +461,11 @@
"systems": "systems_5"
},
"locked": {
"lastModified": 1752158208,
"narHash": "sha256-XbXYLUtaB/wHvZYefvaDPbo4eYj27kbtowHfww9bqLw=",
"lastModified": 1753487377,
"narHash": "sha256-dEr3pYtC4/1PhP5ADIV8Fjjmxv6WC6UisQAUqtwdews=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "b728cf43d97814df43f5d9bd9dafac9072ccd9e8",
"rev": "3d09c8eaceb7a78ef9f5568024da1616f00c33e3",
"type": "github"
},
"original": {
@@ -484,11 +484,11 @@
]
},
"locked": {
"lastModified": 1749730855,
"narHash": "sha256-L3x2nSlFkXkM6tQPLJP3oCBMIsRifhIDPMQQdHO5xWo=",
"lastModified": 1753385846,
"narHash": "sha256-XDu9T2o6Rxe0acpchwQ2aXaRfE/uEYALpVbf+9QDEO4=",
"owner": "NuschtOS",
"repo": "search",
"rev": "8dfe5879dd009ff4742b668d9c699bc4b9761742",
"rev": "5c7e4eff303cba8447ffb443522b3c72bc47a9ba",
"type": "github"
},
"original": {
@@ -546,11 +546,11 @@
]
},
"locked": {
"lastModified": 1751606940,
"narHash": "sha256-KrDPXobG7DFKTOteqdSVeL1bMVitDcy7otpVZWDE6MA=",
"lastModified": 1752544651,
"narHash": "sha256-GllP7cmQu7zLZTs9z0J2gIL42IZHa9CBEXwBY9szT0U=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "3633fc4acf03f43b260244d94c71e9e14a2f6e0d",
"rev": "2c8def626f54708a9c38a5861866660395bb3461",
"type": "github"
},
"original": {

View File

@@ -39,5 +39,8 @@
];
# nix.settings. # warn-dirty = false; # TODO: do I want this
#
# Ensure we can still build when missing-server is not accessible
fallback = true;
};
}

View File

@@ -21,5 +21,8 @@
"root"
"@wheel"
]; # needed for devenv to add custom caches
# Ensure we can still build when missing-server is not accessible
fallback = true;
};
}

View File

@@ -64,10 +64,7 @@ in {
exit 1
fi
echo $$ > "$LOCK_FILE"
trap 'rm -f "$LOCK_FILE"' EXIT
if nix flake update --flake "${cfg.flakePath}" && nixos-rebuild switch --flake "${cfg.flakePath}"; then
if /run/current-system/sw/bin/nix flake update --flake "${cfg.flakePath}" && /run/current-system/sw/bin/nixos-rebuild switch --flake "${cfg.flakePath}"; then
echo "success" > "$LAST_STATUS_FILE"
else
echo "failure" > "$LAST_STATUS_FILE"
@@ -131,10 +128,28 @@ in {
'')
];
# Fixes error: repository path '...' is not owned by current user
environment.etc."root/.gitconfig".text = ''
[safe]
directory = ${cfg.flakePath}
'';
systemd.services.frajul-auto-upgrade = {
description = "Frajul's NixOS Auto Upgrade";
after = ["network-online.target"];
wants = ["network-online.target"];
restartIfChanged = false; # Do not start service on nixos switch
path = with pkgs; [
coreutils
gnutar
xz.bin
gzip
gitMinimal
config.nix.package.out
config.programs.ssh.package
];
serviceConfig = {
Type = "oneshot";
User = cfg.user;