Serenity/core/config.nix

90 lines
2.1 KiB
Nix

{
inputs,
outputs,
lib,
config,
pkgs,
...
}:
{
imports = [
inputs.home-manager.nixosModules.home-manager
## Semi-modularised config
./desktop-misc.nix # stuff that doesn't work in home-manager :(
./packages.nix # system-level packages here - needs tidying
./display.nix # declarations for display management
./gaming.nix # for gaming stuff, ideally would be in home/
./audio.nix # sound go bwuuuaaaahhhhhhhh
../home/users # user-level packages here
];
## Crikey !
time.timeZone = "Australia/Brisbane";
i18n.defaultLocale = "en_GB.UTF-8";
## Genuinely dunno what these do hey, like isnt sudo
## already restricted to @wheel only?
security = {
sudo.execWheelOnly = true;
polkit = {
enable = true;
#extraConfig = '' '';
};
};
nix = {
settings = {
## Use all cores during build
cores = 0;
max-jobs = "auto";
allow-dirty = false;
auto-optimise-store = true;
download-buffer-size = [ "268435456" ];
allowed-users = [ "@wheel" ];
## Enable flakes uwu
experimental-features = [
"recursive-nix"
"nix-command"
"flakes"
];
};
gc = {
## Automatically run 'nix-collect-garbage'
automatic = true;
## Ever day.
dates = "daily";
## and clear junk older than x days
options = "--delete-older-than 2d";
## No clue what this does lol.
#persistent = true;
};
};
hardware = {
## Enable all firmware modules
enableAllFirmware = true;
sensor.hddtemp = {
enable = true;
drives = [ "/dev/disk/by-uuid/*" ];
};
usbStorage.manageShutdown = true;
};
## Apparently prevents getting stuck at shutdown
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
## Disable these cuz they cause problems (thx sasha)
## see: https://github.com/NixOS/nixpkgs/issues/180175
systemd.services = {
networkManager-wait-online.enable = lib.mkForce false;
systemd-networkd-wait-online.enable = lib.mkForce false;
};
## https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.11";
}