From 0e1c540ccaf7f5ffe873ed40c9e1d768fcf02600 Mon Sep 17 00:00:00 2001 From: rope Date: Mon, 10 Aug 2026 08:44:50 +0100 Subject: [PATCH] =?UTF-8?q?hosts:=20add=20FredOS-Kayla=20=E2=80=94=20plain?= =?UTF-8?q?=20KDE=20Plasma=20desktop=20for=20kayla?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.nix | 1 + hosts/FredOS-Kayla.nix | 42 ++++++++++++++++++++++++++ hosts/hardware/FredOS-Kayla.nix | 52 +++++++++++++++++++++++++++++++++ settings/audio.nix | 2 +- settings/users.nix | 8 +++++ 5 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 hosts/FredOS-Kayla.nix create mode 100644 hosts/hardware/FredOS-Kayla.nix diff --git a/flake.nix b/flake.nix index b2936f7..2a5d156 100644 --- a/flake.nix +++ b/flake.nix @@ -51,6 +51,7 @@ FredOS-Gaming = mkHost "FredOS-Gaming" [ ./hosts/hardware/FredOS-Gaming.nix ]; FredOS-Mediaserver = mkHost "FredOS-Mediaserver" [ ./hosts/hardware/FredOS-Mediaserver.nix ]; FredOS-Macbook = mkHost "FredOS-Macbook" [ ./hosts/hardware/FredOS-Macbook.nix ]; + FredOS-Kayla = mkHost "FredOS-Kayla" [ ./hosts/hardware/FredOS-Kayla.nix ]; # Mediaserver's services on fake hardware, for testing from-scratch # bring-up (arr-interconnect especially) in a throwaway VM: diff --git a/hosts/FredOS-Kayla.nix b/hosts/FredOS-Kayla.nix new file mode 100644 index 0000000..ddf25d0 --- /dev/null +++ b/hosts/FredOS-Kayla.nix @@ -0,0 +1,42 @@ +# hosts/FredOS-Kayla.nix — Kayla's desktop. Deliberately plain: stock KDE +# Plasma 6 on SDDM, no Hyprland/quickshell/zen (all of those are gated to +# FredOS-Gaming/FredOS-Macbook and stay off here). Windows refugees get a +# taskbar, a start menu and a settings app that look like what they left. +{ config, pkgs, lib, ... }: +{ + config = lib.mkIf (config.networking.hostName == "FredOS-Kayla") { + services.displayManager.sddm = { + enable = true; + wayland.enable = true; + }; + services.desktopManager.plasma6.enable = true; + + # Dark mode: stylix (imported for every host by mkHost, polarity = "dark", + # autoEnable = true) drives its `kde` target off the HM user below, which + # writes kdeglobals + the Breeze colour scheme. No manual Plasma theming. + + environment.systemPackages = with pkgs; [ + google-chrome + spotify + vesktop + faugus-launcher + mangohud + gamescope + ]; + + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + }; + + boot.loader.systemd-boot.configurationLimit = 5; + + # stylix's qt target only speaks qtct and warns under Plasma; its kde + # target already paints Qt apps via kdeglobals. Both HM users on this box. + home-manager.sharedModules = [ { stylix.targets.qt.enable = false; } ]; + + home-manager.users.kayla = { ... }: { + home.stateVersion = "25.11"; + }; + }; +} diff --git a/hosts/hardware/FredOS-Kayla.nix b/hosts/hardware/FredOS-Kayla.nix new file mode 100644 index 0000000..13f7ba5 --- /dev/null +++ b/hosts/hardware/FredOS-Kayla.nix @@ -0,0 +1,52 @@ +#./hosts/hardware/FredOS-Kayla.nix +# +# Same hardware as FredOS-Gaming apart from the drives (and the monitor, which +# Plasma's own display settings handle — nothing to pin here). Kept off the +# CachyOS kernel/attic substituter the gaming box uses: stock +# linuxPackages_latest from common.nix, one less input to babysit. +# +# The fileSystems below are PLACEHOLDERS — this evaluates but will not boot. +# Run `nixos-generate-config --show-hardware-config` on the machine and paste +# the real UUIDs over them, then push. +{ config, lib, pkgs, modulesPath, ... }: +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ "amdgpu" ]; + boot.kernelModules = [ "kvm-amd" "ntsync" ]; + boot.extraModulePackages = [ ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + boot.kernelParams = [ "amdgpu.ppfeaturemask=0xffffffff" "amdgpu.freesync_video=1" ]; + + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; # TODO: replace with the real UUID + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-label/BOOT"; # TODO: replace with the real UUID + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.enableRedistributableFirmware = true; + networking.hostName = "FredOS-Kayla"; + + hardware.graphics = { + enable = true; + enable32Bit = true; + }; + services.xserver.videoDrivers = [ "amdgpu" ]; + + system.stateVersion = "25.11"; +} diff --git a/settings/audio.nix b/settings/audio.nix index aa39b7f..cf24b52 100644 --- a/settings/audio.nix +++ b/settings/audio.nix @@ -1,7 +1,7 @@ # audio.nix { config, pkgs, lib, ... }: { - config = lib.mkIf (lib.elem config.networking.hostName [ "FredOS-Gaming" "FredOS-Macbook" ]) { + config = lib.mkIf (lib.elem config.networking.hostName [ "FredOS-Gaming" "FredOS-Macbook" "FredOS-Kayla" ]) { services.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { diff --git a/settings/users.nix b/settings/users.nix index 53134fb..02262f7 100644 --- a/settings/users.nix +++ b/settings/users.nix @@ -22,4 +22,12 @@ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID12fECfsFS+vOXUa9na4nhBtx9DVbGD12aRQ8a9Bh0Z fredrik@work-laptop" # Work laptop (Windows), replaced old work PC key 2026-07-28 ]; }; + + # Kayla only exists on her own box. Password with `passwd kayla` after the + # first boot. wheel so `update` can sudo; no NOPASSWD rule (that's fred's). + users.users.kayla = lib.mkIf (config.networking.hostName == "FredOS-Kayla") { + isNormalUser = true; + description = "Kayla"; + extraGroups = [ "networkmanager" "wheel" "video" ]; + }; }