nix-config/systems/x86_64-linux/navis/default.nix

194 lines
4 KiB
Nix
Raw Normal View History

2024-05-07 03:17:46 -04:00
{
pkgs,
config,
inputs,
...
}:
with pkgs; {
imports = [./hardware.nix];
age = {
secrets.passwd.file = /etc/secrets/passwd.age;
identityPaths = [
"/persist/root/.ssh/id_ed25519"
];
};
chaotic = {
scx = {
enable = true;
scheduler = "scx_rusty";
};
steam.extraCompatPackages = [
luxtorpeda
proton-ge-custom
];
};
virtualisation.podman.enable = true;
virtualisation.podman.enableNvidia = true;
environment = {
sessionVariables = {
NIXOS_OZONE_WL = "1";
EDITOR = "nvim";
};
systemPackages =
[
kde-rounded-corners
]
++ (with inputs; [
agenix.packages.${system}.default
kwin-effects-forceblur.packages.${system}.default
]);
persistence."/persist" = {
hideMounts = true;
directories = [
"/root/.ssh"
"/etc/secrets"
"/etc/ssh"
"/var/lib/bluetooth"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
{
directory = "/var/lib/colord";
user = "colord";
group = "colord";
mode = "u=rwx,g=rx,o=";
}
];
files = [
"/etc/machine-id"
{
file = "/var/keys/secret_file";
parentDirectory = {mode = "u=rwx,g=,o=";};
}
];
};
};
boot = {
#initrd.systemd.enable = true;
#plymouth.enable = true;
blacklistedKernelModules = ["i915"];
kernelPackages = linuxPackages_cachyos;
kernelParams = ["module_blacklist=i915" "quiet"];
supportedFilesystems = ["btrfs" "ntfs"];
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
nix = {
package = nixVersions.git;
settings = {
trusted-users = ["marshall"];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://cache.iog.io"
"https://nyx.chaotic.cx/"
];
trusted-substituters = [
"cache.nixos.org"
"nix-community.cachix.org"
"cache.iog.io"
"nyx.chaotic.cx"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
"nyx.chaotic.cx-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
"chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
];
};
};
programs = {
fish.enable = true;
gamemode.enable = true;
steam.enable = true;
gnupg.agent.enable = true;
nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = "/home/marshall/nix-config";
};
};
networking = {
hostName = "navis";
networkmanager.enable = true;
firewall.enable = false;
};
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
services = {
btrfs.autoScrub.enable = true;
desktopManager.plasma6.enable = true;
displayManager.sddm.enable = true;
flatpak.enable = true;
libinput.enable = true;
libinput.touchpad.naturalScrolling = true;
openssh.enable = true;
xserver = {
enable = true;
videoDrivers = ["nvidia"];
xkb.layout = "us";
};
pipewire = {
enable = true;
pulse.enable = true;
};
};
users = {
mutableUsers = false;
users.marshall = {
isNormalUser = true;
extraGroups = ["wheel" "gamemode"];
shell = fish;
hashedPasswordFile = config.age.secrets.passwd.path;
packages = [
firefox
neovim
telegram-desktop
];
};
};
hardware = {
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.latest;
modesetting.enable = true;
};
};
system.stateVersion = "24.05";
}