adding the final touches to a better nixos setup for TFC

This commit is contained in:
Chris Cochrun 2023-01-27 14:39:54 -06:00
parent 46dcc769b3
commit 7210c8d8b1
4 changed files with 20 additions and 9 deletions

0
scripts/update-nix Normal file → Executable file
View file

2
scripts/upgrade-nix Normal file → Executable file
View file

@ -1,5 +1,5 @@
#!/bin/sh
currentdir=$(pwd)
cd ~/conf
nixos-rebuild --use-remote-sudo switch --verbose --impure --flake .#
nixos-rebuild --use-remote-sudo switch --verbose --impure --flake .#
cd $currentdir

View file

@ -13,8 +13,25 @@
nix = {
extraOptions = "experimental-features = nix-command flakes";
package = pkgs.nixFlakes;
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 20d";
};
settings = {
auto-optimise-store = true;
};
};
system.autoUpgrade = {
enable = true;
dates = "02:00";
allowReboot = true;
flake = "${config.users.users.chris.home}/conf";
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
};
nixpkgs.config.allowUnFree = true;
# Use the systemd-boot EFI boot loader.
@ -74,6 +91,7 @@
};
environment.variables.AMD_VULKAN_ICD = lib.mkDefault "RADV";
environment.homeBinInPath = true;
programs.fish.enable = true;
@ -349,13 +367,6 @@
};
};
system.autoUpgrade = {
enable = true;
dates = "01:00";
allowReboot = false;
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];

View file

@ -22,7 +22,7 @@
fileSystems."/storage" =
{ device = "/dev/disk/by-label/STORAGE";
fsType = "btrfs";
options = [ "subvol=@" "noatime" "nodiratime" "compress=zstd" ];
options = [ "noatime" "nodiratime" "compress=zstd" ];
};
fileSystems."/boot" =