Files
Chickadee/hosts/desktop.nix
T

135 lines
3.4 KiB
Nix
Raw Normal View History

2026-09-23 17:39:36 -04:00
{ config, lib, pkgs, modulesPath, ... }:
2026-07-11 14:56:13 -04:00
{
imports = [
2026-09-23 17:39:36 -04:00
(modulesPath + "/installer/scan/not-detected.nix")
2026-07-11 16:28:11 -04:00
2026-09-23 17:39:36 -04:00
../modules/backup.nix
../modules/blog.nix
../modules/code.nix
../modules/mail.nix
../modules/music.nix
../modules/photo.nix
../modules/ssh.nix
../modules/vault.nix
2026-07-12 08:20:56 -04:00
2026-09-23 17:39:36 -04:00
../lilac.nix
2026-07-11 14:56:13 -04:00
];
networking.hostName = "desktop";
2026-07-11 16:28:11 -04:00
2026-07-11 14:56:13 -04:00
time.timeZone = "America/Toronto";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
services.xserver.enable = true;
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
services.xserver.xkb = {
layout = "us";
variant = "";
};
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
2026-07-12 08:20:56 -04:00
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "lilac";
systemd.sleep.settings.Sleep = {
AllowSuspend = "no";
AllowHibernation = "no";
AllowHybridSleep = "no";
AllowSuspendThenHibernate = "no";
};
2026-07-17 22:30:24 -04:00
systemd.services.amdgpu-performance = {
description = "Force AMD GPU performance level to high";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
ExecStart = ''
${pkgs.bash}/bin/bash -c '
for gpu in /sys/class/drm/card*/device; do
if [ -f "$gpu/vendor" ] && [ "$(cat "$gpu/vendor")" = "0x1002" ]; then
echo high > "$gpu/power_dpm_force_performance_level"
fi
done
'
'';
};
};
environment.systemPackages = with pkgs; [
whipper
2026-09-23 17:39:36 -04:00
restic
2026-07-17 22:30:24 -04:00
];
2026-08-03 13:22:28 -04:00
programs.steam.enable = true;
networking = {
firewall = {
2026-09-23 17:39:36 -04:00
enable = true;
allowedUDPPorts = [ 51820 ];
trustedInterfaces = [ "wg0" ];
};
2026-08-03 13:22:28 -04:00
2026-09-23 17:39:36 -04:00
wireguard.interfaces."wg0" = {
ips = [ "10.0.0.2/32" ];
generatePrivateKeyFile = true;
privateKeyFile = "/var/lib/wireguard/wg0.key";
peers = [{
2026-08-03 13:22:28 -04:00
publicKey = "Tst6SiqoGLSoOAF9l5vT2vvR2RGJ/mFcoBL3BL5n90k=";
2026-09-23 17:39:36 -04:00
allowedIPs = [ "10.0.0.0/24" ];
endpoint = "216.128.177.13:51820";
persistentKeepalive = 25;
}];
};
2026-08-03 13:22:28 -04:00
};
2026-07-11 14:56:13 -04:00
nixpkgs.config.allowUnfree = true;
2026-07-11 16:28:11 -04:00
nix.settings.experimental-features = [ "nix-command" "flakes" ];
2026-07-11 14:56:13 -04:00
system.stateVersion = "26.05";
2026-09-23 17:39:36 -04:00
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [ "amdgpu.runpm=0" ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/d7450680-7d53-4842-83c5-7fc32526dff1";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/D148-4AB8";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
2026-07-11 14:56:13 -04:00
}