feat: add nix-monitored
This commit is contained in:
parent
d098a8f907
commit
66cbbaa4ba
3 changed files with 105 additions and 67 deletions
71
flake.lock
71
flake.lock
|
@ -662,6 +662,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-filter": {
|
||||
"locked": {
|
||||
"lastModified": 1687178632,
|
||||
"narHash": "sha256-HS7YR5erss0JCaUijPeyg2XrisEb959FIct3n2TMGbE=",
|
||||
"owner": "numtide",
|
||||
"repo": "nix-filter",
|
||||
"rev": "d90c75e8319d0dd9be67d933d8eb9d0894ec9174",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "nix-filter",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-index-database": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -697,6 +712,27 @@
|
|||
"url": "https://git.moritzboeh.me/moritz/NixLazy.nvim"
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"nix-super": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
|
@ -960,38 +996,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-puppeteer": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1706210708,
|
||||
"narHash": "sha256-tjL4qC1VAad4NXaZFDhTcmbrbdqNpVm7/MnyR/CE3rw=",
|
||||
"owner": "chrisgrieser",
|
||||
"repo": "nvim-puppeteer",
|
||||
"rev": "048c819c8033e5febe0a04e63b98e74a5d0f8de6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "chrisgrieser",
|
||||
"repo": "nvim-puppeteer",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-treesitter": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1706272330,
|
||||
"narHash": "sha256-R+oQGVcmncAd39D5AkGV1HAPgGDPMiucrC1GHMLh/Xk=",
|
||||
"owner": "nvim-treesitter",
|
||||
"repo": "nvim-treesitter",
|
||||
"rev": "efda19a54a157da8635aa6cb84f56a10593b1a23",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-treesitter",
|
||||
"repo": "nvim-treesitter",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_3",
|
||||
|
@ -1035,13 +1039,12 @@
|
|||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nix-lazy-nvim": "nix-lazy-nvim",
|
||||
"nix-monitored": "nix-monitored",
|
||||
"nix-super": "nix-super",
|
||||
"nixpkgs": "nixpkgs_7",
|
||||
"none-ls-nvim": "none-ls-nvim",
|
||||
"nur": "nur",
|
||||
"nvim-lspconfig": "nvim-lspconfig",
|
||||
"nvim-puppeteer": "nvim-puppeteer",
|
||||
"nvim-treesitter": "nvim-treesitter",
|
||||
"pre-commit-hooks": "pre-commit-hooks",
|
||||
"smartcolumn-nvim": "smartcolumn-nvim",
|
||||
"stable": "stable",
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
# Programs
|
||||
nix-super.url = "github:privatevoid-net/nix-super";
|
||||
nix-monitored.url = "github:ners/nix-monitored";
|
||||
nix-monitored.inputs.nixpkgs.follows = "nixpkgs";
|
||||
timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git";
|
||||
|
||||
# Neovim
|
||||
|
|
|
@ -9,6 +9,22 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.nix;
|
||||
|
||||
mkSuper = system: nix:
|
||||
if cfg.useSuper
|
||||
then inputs.nix-super.packages.${system}.default
|
||||
else nix;
|
||||
|
||||
mkNom = system: nix:
|
||||
if cfg.useNom
|
||||
then
|
||||
inputs.nix-monitored.packages.${system}.default.override
|
||||
{
|
||||
nix = nix;
|
||||
}
|
||||
else nix;
|
||||
|
||||
mkNix = system: nix: mkNom system (mkSuper system nix);
|
||||
in
|
||||
{
|
||||
options.my.programs.nix = {
|
||||
|
@ -21,12 +37,28 @@ in
|
|||
};
|
||||
};
|
||||
optimise.enable = mkEnableOption "nix-optimise";
|
||||
useSuper = mkEnableOption "use nix super" // { default = true; };
|
||||
useNom = mkEnableOption "use nix output monitor by default" // { default = true; };
|
||||
};
|
||||
|
||||
config.nix = {
|
||||
config = {
|
||||
my.nixpkgs.overlays = [
|
||||
(final: prev:
|
||||
{
|
||||
nixos-rebuild = prev.nixos-rebuild.override {
|
||||
nix = mkNom final.system final.nix;
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
home-manager.users.moritz.programs.direnv.nix-direnv.package = pkgs.nix-direnv.override {
|
||||
nix = config.nix.package;
|
||||
};
|
||||
|
||||
nix = {
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
|
||||
package = inputs.nix-super.packages.${pkgs.system}.default;
|
||||
package = mkNix pkgs.system pkgs.nix;
|
||||
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
|
||||
|
@ -65,4 +97,5 @@ in
|
|||
trusted-users = [ "root" "@wheel" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue