nix/nixos/htpc.nix

82 lines
2 KiB
Nix
Raw Normal View History

2024-01-24 20:25:19 -06:00
{
lib,
2024-01-24 21:25:09 -06:00
inputs,
2024-01-24 20:25:19 -06:00
outputs,
modulesPath,
...
}: {
nixpkgs.hostPlatform = "x86_64-linux";
networking.hostName = "htpc";
imports = with outputs.nixosModules; [
(modulesPath + "/installer/scan/not-detected.nix")
2024-01-24 21:25:09 -06:00
inputs.hardware.nixosModules.common-cpu-intel-kaby-lake
inputs.hardware.nixosModules.common-pc-ssd
inputs.hardware.nixosModules.common-pc
2024-01-24 20:25:19 -06:00
desktop-usage
gnome
wifi
flanfam
flanfamkiosk
];
2024-01-24 21:30:04 -06:00
services.gnome.gnome-remote-desktop.enable = true;
2024-01-24 20:25:19 -06:00
networking.networkmanager.enable = true;
nix.settings.experimental-features = ["nix-command" "flakes"];
home-manager.users.daniel = {
imports = with outputs.homeManagerModules; [linux-desktop];
};
environment.systemPackages =
#with pkgs;
[];
programs.steam.enable = true;
programs.steam.remotePlay.openFirewall = true;
services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "daniel";
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
# hardware
systemd.targets.sleep.enable = false;
systemd.targets.suspend.enable = false;
systemd.targets.hibernate.enable = false;
systemd.targets.hybrid-sleep.enable = false;
powerManagement.enable = false;
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
boot.initrd.kernelModules = [];
2024-01-24 21:12:45 -06:00
boot.kernelModules = ["kvm-intel"];
2024-01-24 21:13:03 -06:00
boot.extraModulePackages = [];
2024-01-24 20:25:19 -06:00
fileSystems."/" = {
device = "/dev/disk/by-uuid/0f4e5814-0002-43f0-bfab-8368e3fe5b8a";
fsType = "ext4";
};
2024-01-24 21:30:04 -06:00
networking = {
# useDHCP = true;
firewall = {
enable = true;
allowPing = true;
allowedTCPPorts = [22 5900];
allowedUDPPorts = [5900];
};
};
2024-01-24 20:25:19 -06:00
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
system.stateVersion = "23.11";
}