Files
nixos/modules/base.nix
2026-10-07 01:20:42 +02:00

100 lines
2.1 KiB
Nix

{
config,
pkgs,
inputs,
...
}@osConfig:
{
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# garbage collection
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
nix.optimise.automatic = true;
nixpkgs.config.allowUnfree = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernel.sysctl."kernel.sysrq" = 1;
users.defaultUserShell = pkgs.fish;
users.users.djai = {
isNormalUser = true;
description = "djai";
extraGroups = [
"docker"
"networkmanager"
"video"
"wheel"
];
};
services.getty.autologinUser = "djai";
# TODO: figure out what we want to do w firewall
# networking.firewall.enable = false;
networking.networkmanager.enable = true;
programs.nix-ld.enable = true;
services.upower.enable = true;
virtualisation.docker.enable = true;
environment.systemPackages = with pkgs; [
git
wget
vim
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
backupFileExtension = "bck";
users."djai" = { config, ... }: {
programs.home-manager.enable = true;
xdg.configFile."uwsm/env".source = "${config.home.sessionVariablesPackage}/etc/profile.d/hm-session-vars.sh";
home.file.".ssh/config".text = ''
Include ${osConfig.config.sops.secrets."ssh-config".path}
'';
home = {
stateVersion = "26.05";
sessionPath = [
"$HOME/bin"
"$HOME/.local/bin"
"$HOME/.cargo/bin"
"$HOME/Scripts"
];
file.".config/WMScripts".source = ../scripts/WMScripts;
sessionVariables = { # TODO: add rest of .config/uwms/env.bck here
NEWT_COLORS_FILE = "$HOME/.newtColours";
BROWSER = "librewolf";
EDITOR = "nvim";
STARSHIP_LOG = "error";
};
};
catppuccin = {
accent = "mauve";
autoEnable = true;
enable = true;
flavor = "macchiato";
};
};
};
}