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": {
"lastModified": 1,
"narHash": "sha256-tqJYXR0mlrRwAOCqQDl2rdJWntnpWYVhMGyvaqvgUJE=",
"path": "./shells",
"path": "shells",
"type": "path"
},
"original": {
"path": "./shells",
"path": "shells",
"type": "path"
}
},

View file

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

View file

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