This commit is contained in:
Daniel Flanagan 2024-01-24 20:25:19 -06:00
parent 54d91634cb
commit f27a46d2e9
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
5 changed files with 80 additions and 25 deletions

View file

@ -116,6 +116,11 @@
defaultLocale = "en_US.UTF-8"; defaultLocale = "en_US.UTF-8";
}; };
programs.mosh = {
enable = true;
openFirewall = true;
};
services = { services = {
xserver = { xserver = {
layout = "us"; layout = "us";
@ -127,6 +132,8 @@
settings = { settings = {
PasswordAuthentication = false; PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
settings.PermitRootLogin = true;
}; };
openFirewall = lib.mkDefault false; openFirewall = lib.mkDefault false;
@ -176,7 +183,7 @@
firewall = { firewall = {
enable = lib.mkDefault true; enable = lib.mkDefault true;
allowPing = lib.mkDefault true; allowPing = lib.mkDefault true;
allowedTCPPorts = lib.mkDefault []; allowedTCPPorts = lib.mkDefault [22];
allowedUDPPorts = lib.mkDefault []; allowedUDPPorts = lib.mkDefault [];
}; };
@ -292,5 +299,7 @@
# }; # };
}; };
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
system.stateVersion = lib.mkDefault "23.11"; system.stateVersion = lib.mkDefault "23.11";
} }

View file

@ -1,4 +1,6 @@
{...}: { {...}: {
sound.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
@ -14,12 +16,13 @@
hardware = { hardware = {
pulseaudio = { pulseaudio = {
enable = false;
support32Bit = true; support32Bit = true;
}; };
}; };
security = { security = {
# I forget why I need these... # I forget why I need these exactly...
polkit.enable = true; polkit.enable = true;
rtkit.enable = true; rtkit.enable = true;
}; };

View file

@ -6,6 +6,7 @@ with builtins; (listToAttrs (map (name: {
}; };
}) [ }) [
"base" "base"
"htpc"
"beefcake" "beefcake"
"dragon" "dragon"
"foxtrot" "foxtrot"

65
nixos/htpc.nix Normal file
View file

@ -0,0 +1,65 @@
{
lib,
outputs,
config,
modulesPath,
...
}: {
nixpkgs.hostPlatform = "x86_64-linux";
networking.hostName = "htpc";
imports = with outputs.nixosModules; [
(modulesPath + "/installer/scan/not-detected.nix")
desktop-usage
gnome
wifi
flanfam
flanfamkiosk
];
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 = [];
boot.kernelModules = ["kvm-intel" "acpi_call"];
boot.extraModulePackages = with config.boot.kernelPackages; [acpi_call];
fileSystems."/" = {
device = "/dev/disk/by-uuid/0f4e5814-0002-43f0-bfab-8368e3fe5b8a";
fsType = "ext4";
};
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
system.stateVersion = "23.11";
}

View file

@ -27,27 +27,6 @@
]; ];
}; };
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
];
config = {
allowUnfree = true;
};
};
nix = {
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
settings = {
experimental-features = "nix-command flakes";
auto-optimise-store = true;
};
};
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
services.fprintd = { services.fprintd = {
@ -87,8 +66,6 @@
boot.kernelModules = ["kvm-intel" "acpi_call"]; boot.kernelModules = ["kvm-intel" "acpi_call"];
boot.extraModulePackages = with config.boot.kernelPackages; [acpi_call]; boot.extraModulePackages = with config.boot.kernelPackages; [acpi_call];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
system.stateVersion = "23.11"; system.stateVersion = "23.11";