From 0bdd004824d62cd373b0c3ed5932eb8330a0239d Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Sat, 7 Feb 2026 03:55:08 +0100 Subject: [PATCH] angrr: add as NixOS and nix-darwin module pulled in as flake because the darwin module has not been upstreamed yet, anf or consistency sake take all modules from the same source then --- common/angrr.nix | 12 ++++ common/default.nix | 1 + darwin/configuration.nix | 9 ++- flake.lock | 124 +++++++++++++++++++++++++++++++++++---- flake.nix | 8 +++ 5 files changed, 143 insertions(+), 11 deletions(-) create mode 100644 common/angrr.nix diff --git a/common/angrr.nix b/common/angrr.nix new file mode 100644 index 0000000..477c241 --- /dev/null +++ b/common/angrr.nix @@ -0,0 +1,12 @@ +{ config, ... }: +{ + services.angrr = { + enable = true; + period = "30d"; + package = config.inputInjection.flake-inputs.angrr.packages.${config.nixpkgs.hostPlatform.system}.angrr; + }; + # angrr.service runs before nix-gc.service by default + nix.gc.automatic = true; + # we use the nix-direnv built-in refresh funtionality, pulled in via home manager + programs.direnv.angrr.enable = false; +} diff --git a/common/default.nix b/common/default.nix index 26bc5c4..29608ca 100644 --- a/common/default.nix +++ b/common/default.nix @@ -17,6 +17,7 @@ in ./upgrade-diff.nix ./guest.nix ./audio-sharing.nix + ./angrr.nix ]; services.davfs2.enable = true; diff --git a/darwin/configuration.nix b/darwin/configuration.nix index 0e0a10a..874c56b 100644 --- a/darwin/configuration.nix +++ b/darwin/configuration.nix @@ -1,7 +1,14 @@ { config, pkgs, ... }: +let + + inputs = config.inputInjection.flake-inputs; +in { - imports = [ ../common/nix-settings.nix ]; + imports = [ + ../common/nix-settings.nix + ../common/angrr.nix + ]; nix = { enable = true; settings = { diff --git a/flake.lock b/flake.lock index fd4cd07..a179c1a 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,29 @@ { "nodes": { + "angrr": { + "inputs": { + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "nix-darwin": "nix-darwin", + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1770395915, + "narHash": "sha256-TEZVaPse17RzzdPtPyzDheFLgoXOAw89AdADDB5hnLU=", + "owner": "linyinfeng", + "repo": "angrr", + "rev": "efe8e391524bceda8820ad0e5607688eda4f3fc6", + "type": "github" + }, + "original": { + "owner": "linyinfeng", + "repo": "angrr", + "type": "github" + } + }, "crane": { "locked": { "lastModified": 1754269165, @@ -16,6 +40,22 @@ } }, "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { "flake": false, "locked": { "lastModified": 1747046372, @@ -32,6 +72,27 @@ } }, "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "angrr", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1769996383, + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { "inputs": { "nixpkgs-lib": [ "lanzaboote", @@ -52,7 +113,7 @@ "type": "github" } }, - "flake-parts_2": { + "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "nix-direnv", @@ -73,7 +134,7 @@ "type": "github" } }, - "flake-parts_3": { + "flake-parts_4": { "inputs": { "nixpkgs-lib": [ "nur", @@ -140,8 +201,8 @@ "lanzaboote": { "inputs": { "crane": "crane", - "flake-compat": "flake-compat", - "flake-parts": "flake-parts", + "flake-compat": "flake-compat_2", + "flake-parts": "flake-parts_2", "nixpkgs": "nixpkgs", "pre-commit-hooks-nix": "pre-commit-hooks-nix", "rust-overlay": "rust-overlay" @@ -178,6 +239,27 @@ } }, "nix-darwin": { + "inputs": { + "nixpkgs": [ + "angrr", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1770184146, + "narHash": "sha256-DsqnN6LvXmohTRaal7tVZO/AKBuZ02kPBiZKSU4qa/k=", + "owner": "nix-darwin", + "repo": "nix-darwin", + "rev": "0d7874ef7e3ba02d58bebb871e6e29da36fa1b37", + "type": "github" + }, + "original": { + "owner": "nix-darwin", + "repo": "nix-darwin", + "type": "github" + } + }, + "nix-darwin_2": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -200,11 +282,11 @@ }, "nix-direnv": { "inputs": { - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts_3", "nixpkgs": [ "nixpkgs" ], - "treefmt-nix": "treefmt-nix" + "treefmt-nix": "treefmt-nix_2" }, "locked": { "lastModified": 1768704530, @@ -302,7 +384,7 @@ }, "nur": { "inputs": { - "flake-parts": "flake-parts_3", + "flake-parts": "flake-parts_4", "nixpkgs": "nixpkgs_3" }, "locked": { @@ -347,16 +429,17 @@ }, "root": { "inputs": { + "angrr": "angrr", "home-manager": "home-manager", "lanzaboote": "lanzaboote", "mysecrets": "mysecrets", - "nix-darwin": "nix-darwin", + "nix-darwin": "nix-darwin_2", "nix-direnv": "nix-direnv", "nixos-hardware": "nixos-hardware", "nixos-unstable": "nixos-unstable", "nixpkgs": "nixpkgs_2", "nur": "nur", - "treefmt-nix": "treefmt-nix_2", + "treefmt-nix": "treefmt-nix_3", "utils": "utils" } }, @@ -397,6 +480,27 @@ } }, "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "angrr", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1770228511, + "narHash": "sha256-wQ6NJSuFqAEmIg2VMnLdCnUc0b7vslUohqqGGD+Fyxk=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "337a4fe074be1042a35086f15481d763b8ddc0e7", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { "inputs": { "nixpkgs": [ "nix-direnv", @@ -417,7 +521,7 @@ "type": "github" } }, - "treefmt-nix_2": { + "treefmt-nix_3": { "inputs": { "nixpkgs": [ "nixpkgs" diff --git a/flake.nix b/flake.nix index 567a2c6..7b733a2 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,10 @@ url = "github:nix-community/nix-direnv"; inputs.nixpkgs.follows = "nixpkgs"; }; + angrr = { + url = "github:linyinfeng/angrr"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; @@ -46,6 +50,7 @@ home-manager, treefmt-nix, nix-darwin, + angrr, ... }@inputs: let @@ -121,17 +126,20 @@ ./hosts/thinknix inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t440s lanzaboote.nixosModules.lanzaboote + inputs.angrr.nixosModules.angrr ]; framenix = mkSystem systems.x86_64-linux [ ./hosts/framenix inputs.nixos-hardware.nixosModules.framework-13-7040-amd lanzaboote.nixosModules.lanzaboote + inputs.angrr.nixosModules.angrr ]; }; darwinConfigurations."OS-MacBook-Pro" = nix-darwin.lib.darwinSystem { modules = [ ./darwin/configuration.nix inputInjection + inputs.angrr.darwinModules.angrr ]; };