add nix-helper

This commit is contained in:
Anthony Rodriguez 2024-08-27 13:01:09 +02:00
parent 5ccf4b4e6f
commit dd434b351f
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
3 changed files with 13 additions and 9 deletions

View file

@ -494,11 +494,11 @@
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-tqJYXR0mlrRwAOCqQDl2rdJWntnpWYVhMGyvaqvgUJE=", "narHash": "sha256-tqJYXR0mlrRwAOCqQDl2rdJWntnpWYVhMGyvaqvgUJE=",
"path": "./shells", "path": "shells",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "./shells", "path": "shells",
"type": "path" "type": "path"
} }
}, },

View file

@ -15,7 +15,7 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
shells = { shells = {
url = "path:./shells"; url = "path:shells";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
stylix = { stylix = {

View file

@ -1,4 +1,4 @@
{ pkgs, hostname, lib, ... }: { { pkgs, hostname, username, lib, ... }: {
networking.hostName = hostname; networking.hostName = hostname;
boot = { boot = {
loader = { loader = {
@ -118,11 +118,15 @@
services.udev.packages = [ pkgs.sane-airscan pkgs.utsushi ]; services.udev.packages = [ pkgs.sane-airscan pkgs.utsushi ];
services.udisks2.enable = true; services.udisks2.enable = true;
# do garbage collection weekly to keep disk usage low
nix.gc = { programs.nh = {
automatic = lib.mkDefault true; enable = true;
dates = lib.mkDefault "weekly"; clean.enable = true;
options = lib.mkDefault "--delete-older-than 7d"; clean.extraArgs = "--keep-since 4d --keep 3";
};
environment.sessionVariables = {
FLAKE = "/home/${username}/.dotfiles";
}; };
# Enable all packages # Enable all packages