From fb91a29e058ad35d7c97f4f1765743f97dd788a3 Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Fri, 22 Dec 2023 09:48:31 +0800 Subject: [PATCH] nixos: nix: use nix-monitored --- flake.lock | 40 +++++++++++++++++++++++++++++ flake.nix | 12 ++++++--- nixos/profiles/core/nix/default.nix | 1 + nixos/profiles/core/nix/monitor.nix | 19 ++++++++++++++ 4 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 nixos/profiles/core/nix/monitor.nix diff --git a/flake.lock b/flake.lock index b0c483b..efa138d 100755 --- a/flake.lock +++ b/flake.lock @@ -329,6 +329,44 @@ "type": "github" } }, + "nix-filter": { + "locked": { + "lastModified": 1701697642, + "narHash": "sha256-L217WytWZHSY8GW9Gx1A64OnNctbuDbfslaTEofXXRw=", + "owner": "numtide", + "repo": "nix-filter", + "rev": "c843418ecfd0344ecb85844b082ff5675e02c443", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "nix-filter", + "type": "github" + } + }, + "nix-monitored": { + "inputs": { + "nix-filter": [ + "nix-filter" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1692605628, + "narHash": "sha256-jBasvDCk9V32JuwtPy1G4KyVAc2eaBSf2X5eRNQgIkY=", + "owner": "ners", + "repo": "nix-monitored", + "rev": "6be92b0c1eca7ef501b4f92735885e7cb4db414b", + "type": "github" + }, + "original": { + "owner": "ners", + "repo": "nix-monitored", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1702453208, @@ -519,6 +557,8 @@ "impermanence": "impermanence", "lanzaboote": "lanzaboote", "nix-darwin": "nix-darwin", + "nix-filter": "nix-filter", + "nix-monitored": "nix-monitored", "nixos-hardware": "nixos-hardware", "nixpak": "nixpak", "nixpak-pkgs": "nixpak-pkgs", diff --git a/flake.nix b/flake.nix index 3fd1376..747d3ce 100755 --- a/flake.nix +++ b/flake.nix @@ -54,6 +54,11 @@ url = "github:LnL7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-monitored = { + url = "github:ners/nix-monitored"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.nix-filter.follows = "nix-filter"; + }; nixos-hardware = { url = "github:NixOS/nixos-hardware"; }; @@ -108,6 +113,9 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.systems.follows = "systems-linux"; }; + nix-filter = { + url = "github:numtide/nix-filter"; + }; nvfetcher = { url = "github:berberman/nvfetcher"; inputs.nixpkgs.follows = "nixpkgs"; @@ -127,7 +135,6 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; }; - wlroots = { type = "gitlab"; host = "gitlab.freedesktop.org"; @@ -142,9 +149,6 @@ inputs.systems.follows = "systems-linux"; }; - # TODO: Unused, Soon(TM) - #daeuniverse.url = "github:daeuniverse/flake.nix"; - ## Non-Flake ### My NeoVim configuration nvim = { diff --git a/nixos/profiles/core/nix/default.nix b/nixos/profiles/core/nix/default.nix index 8af348c..8f303c2 100644 --- a/nixos/profiles/core/nix/default.nix +++ b/nixos/profiles/core/nix/default.nix @@ -3,5 +3,6 @@ ./flake.nix ./nix.nix ./gc.nix + ./monitor.nix ]; } diff --git a/nixos/profiles/core/nix/monitor.nix b/nixos/profiles/core/nix/monitor.nix new file mode 100644 index 0000000..f8ffd5f --- /dev/null +++ b/nixos/profiles/core/nix/monitor.nix @@ -0,0 +1,19 @@ +{ + pkgs, + inputs, + ... +}: let + nom = inputs.nix-monitored.packages.${pkgs.system}.default; +in { + nix.package = nom; + nixpkgs.overlays = [ + (_self: super: { + nixos-rebuild = super.nixos-rebuild.override { + nix = super.nom; + }; + nix-direnv = super.nix-direnv.override { + nix = super.nom; + }; + }) + ]; +}