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 42 additions and 21 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";

Binary file not shown.

BIN
flake.nix

Binary file not shown.