feat: add nh and separate cachix entries from default.nix

This commit is contained in:
matt1432 2023-10-20 12:12:37 -04:00
parent 47841de992
commit 55dc691b8e
4 changed files with 126 additions and 26 deletions

29
common/cachix.nix Normal file
View file

@ -0,0 +1,29 @@
{ ... }: {
nix = {
settings = {
substituters = [
"https://hyprland.cachix.org"
"https://nix-gaming.cachix.org"
# Nixpkgs-Wayland
"https://cache.nixos.org"
"https://nixpkgs-wayland.cachix.org"
"https://nix-community.cachix.org"
# Neovim and stuff
"https://nix-community.cachix.org"
# Nh
"https://viperml.cachix.org"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
# Nixpkgs-Wayland
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
# Neovim and stuff
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
# Nh
"viperml.cachix.org-1:qZhKBMTfmcLL+OG6fj/hzsMEedgKvZVFRRAhq7j8Vh8="
];
};
};
}

View file

@ -3,6 +3,7 @@
, lib
, nixpkgs
, nixpkgs-wayland
, nh
, nur
, nix-melt
, nurl
@ -10,7 +11,9 @@
, ...
}: {
imports = [
./cachix.nix
home-manager.nixosModules.default
nh.nixosModules.default
./modules/programs.nix
./modules/locale.nix
./overlays
@ -28,27 +31,6 @@
keep-derivations = true;
auto-optimise-store = true;
warn-dirty = false;
# Cachix
substituters = [
"https://hyprland.cachix.org"
"https://nix-gaming.cachix.org"
# Nixpkgs-Wayland
"https://cache.nixos.org"
"https://nixpkgs-wayland.cachix.org"
"https://nix-community.cachix.org"
# Neovim and stuff
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
# Nixpkgs-Wayland
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
# Neovim and stuff
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
# Minimize dowloads of indirect nixpkgs flakes
@ -59,6 +41,16 @@
};
nixpkgs.overlays = [ nixpkgs-wayland.overlay ];
nh = {
enable = true;
# weekly cleanup
clean = {
enable = true;
extraArgs = "--keep-since 30d";
};
};
environment.variables.FLAKE = "/home/matt/.nix";
services.xserver = {
layout = "ca";
xkbVariant = "multix";

View file

@ -116,6 +116,24 @@
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1693611461,
"narHash": "sha256-aPODl8vAgGQ0ZYFIRisxYG5MOGSkIczvu2Cd8Gb9+1Y=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "7f53fdb7bdc5bb237da7fefef12d099e4fd611ca",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_5": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_3"
},
"locked": {
"lastModified": 1696343447,
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
@ -130,7 +148,7 @@
"type": "github"
}
},
"flake-parts_5": {
"flake-parts_6": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs-wayland",
@ -336,7 +354,7 @@
"lib-aggregate": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs-lib": "nixpkgs-lib_3"
"nixpkgs-lib": "nixpkgs-lib_4"
},
"locked": {
"lastModified": 1697371715,
@ -398,9 +416,31 @@
"type": "github"
}
},
"nh": {
"inputs": {
"flake-parts": "flake-parts_4",
"nix-filter": "nix-filter",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1697547831,
"narHash": "sha256-7HDNyb2X2a7iMUTFuTi74HBCkXlAk18tlFclhG+72gI=",
"owner": "viperML",
"repo": "nh",
"rev": "303c4ff5bf7915565b867c7f5b2b08972fdda4b2",
"type": "github"
},
"original": {
"owner": "viperML",
"repo": "nh",
"type": "github"
}
},
"nix-eval-jobs": {
"inputs": {
"flake-parts": "flake-parts_5",
"flake-parts": "flake-parts_6",
"nixpkgs": "nixpkgs_6",
"treefmt-nix": "treefmt-nix"
},
@ -418,9 +458,24 @@
"type": "github"
}
},
"nix-filter": {
"locked": {
"lastModified": 1694857738,
"narHash": "sha256-bxxNyLHjhu0N8T3REINXQ2ZkJco0ABFPn6PIe2QUfqo=",
"owner": "numtide",
"repo": "nix-filter",
"rev": "41fd48e00c22b4ced525af521ead8792402de0ea",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "nix-filter",
"type": "github"
}
},
"nix-gaming": {
"inputs": {
"flake-parts": "flake-parts_4",
"flake-parts": "flake-parts_5",
"nixpkgs": "nixpkgs_4"
},
"locked": {
@ -492,6 +547,24 @@
}
},
"nixpkgs-lib_2": {
"locked": {
"dir": "lib",
"lastModified": 1693471703,
"narHash": "sha256-0l03ZBL8P1P6z8MaSDS/MvuU8E75rVxe5eE1N6gxeTo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3e52e76b70d5508f3cec70b882a29199f4d1ee85",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib_3": {
"locked": {
"dir": "lib",
"lastModified": 1696019113,
@ -509,7 +582,7 @@
"type": "github"
}
},
"nixpkgs-lib_3": {
"nixpkgs-lib_4": {
"locked": {
"lastModified": 1697331025,
"narHash": "sha256-a5LJWWHfEvnq9tBd9UyNVdtzLXc2ehu5MCp//Bex/0E=",
@ -683,6 +756,7 @@
"hyprgrass": "hyprgrass",
"hyprland": "hyprland",
"neovim-nightly-overlay": "neovim-nightly-overlay",
"nh": "nh",
"nix-gaming": "nix-gaming",
"nix-melt": "nix-melt",
"nixpkgs": "nixpkgs_5",

View file

@ -25,6 +25,11 @@
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
nh = {
url = "github:viperML/nh";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-melt = {
url = "github:nix-community/nix-melt";
inputs.nixpkgs.follows = "nixpkgs";