From 55e6188abdda85c51622bb3775a9d1b2a692880a Mon Sep 17 00:00:00 2001 From: Xory Date: Wed, 7 Jan 2026 15:02:17 +0200 Subject: [PATCH] init: create minimal ver of config --- configuration.nix | 58 ++--------- home.nix | 70 -------------- hosts/nullstar/config.nix | 31 ------ hosts/nullstar/hardware/disko.nix | 96 ------------------- .../hardware/hardware-configuration.nix | 23 ----- hosts/voidspear/config.nix | 28 ------ hosts/voidspear/hardware/disko.nix | 88 ----------------- .../hardware/hardware-configuration.nix | 23 ----- 8 files changed, 9 insertions(+), 408 deletions(-) delete mode 100644 hosts/nullstar/config.nix delete mode 100644 hosts/nullstar/hardware/disko.nix delete mode 100644 hosts/nullstar/hardware/hardware-configuration.nix delete mode 100644 hosts/voidspear/config.nix delete mode 100644 hosts/voidspear/hardware/disko.nix delete mode 100644 hosts/voidspear/hardware/hardware-configuration.nix diff --git a/configuration.nix b/configuration.nix index 47f4168..b28c502 100644 --- a/configuration.nix +++ b/configuration.nix @@ -58,11 +58,11 @@ "/var/log" "/var/lib/bluetooth" "/var/lib/nixos" - "/var/lib/libvirt" - "/var/lib/ollama-models" - "/var/lib/flatpak" + # "/var/lib/libvirt" + # "/var/lib/ollama-models" + # "/var/lib/flatpak" "/var/lib/tailscale" - "/var/lib/syncthing" + # "/var/lib/syncthing" "/etc/NetworkManager/system-connections" "/etc/ssh" ]; @@ -149,26 +149,6 @@ "--env=GTK_THEME=Adwaita:dark" ]; }; - signal-desktop-bin = { - executable = "${pkgs.signal-desktop-bin}/bin/signal-desktop"; - profile = "${pkgs.firejail}/etc/firejail/signal-desktop.profile"; - extraArgs = [ - "--env=GTK_THEME=Adwaita:dark" - "--noblacklist=~/Pictures" - "--noblacklist=~/Documents" - "--whitelist=~/Pictures" - "--whitelist=~/Documents" - "--dbus-user.talk=org.freedesktop.Notifications" - "--dbus-user.talk=org.kde.StatusNotifierWatcher" - ]; - }; - obsidian = { - executable = "${pkgs.obsidian}/bin/obsidian"; - profile = "${pkgs.firejail}/etc/firejail/obsidian.profile"; - extraArgs = [ - "--env=GTK_THEME=Adwaita:dark" - ]; - }; }; }; @@ -181,11 +161,11 @@ # Enable Hyprland. programs.hyprland.enable = true; - services.flatpak.enable = true; + # services.flatpak.enable = true; # Enable CUPS to print documents. - services.printing.enable = true; - services.printing.drivers = [ pkgs.hplip ]; + # services.printing.enable = true; + # services.printing.drivers = [ pkgs.hplip ]; programs.gnupg.agent.enable = true; @@ -221,8 +201,8 @@ enable32Bit = true; }; - services.ollama.enable = true; - services.ollama.models = "/var/lib/ollama-models"; + # services.ollama.enable = true; + # services.ollama.models = "/var/lib/ollama-models"; # Enable automatic login for the user. # We temporarily keep this enabled because I plan to switch to LVM on LUKS. @@ -244,32 +224,12 @@ git ]; - programs.steam.enable = true; - nix.gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 2d"; }; - programs.virt-manager.enable = true; - virtualisation.libvirtd = { - enable = true; - qemu = { - vhostUserPackages = with pkgs; [ virtiofsd ]; - swtpm.enable = true; - }; - }; - virtualisation.spiceUSBRedirection.enable = true; - virtualisation.docker.enable = true; - - services = { - syncthing = { - enable = true; - group = "users"; - user = "xory"; - }; - }; services.openssh.enable = true; # TODO: add declarative key-based auth # Some programs need SUID wrappers, can be configured further or are diff --git a/home.nix b/home.nix index cd955d3..aa6ad14 100644 --- a/home.nix +++ b/home.nix @@ -1,7 +1,6 @@ { config, pkgs, inputs, ... }: { - imports = [ inputs.spicetify-nix.homeManagerModules.default ]; home.username = "xory"; home.homeDirectory = "/home/xory"; @@ -11,39 +10,8 @@ git cava kdePackages.qtwebsockets - (python313.withPackages (python-pkgs: [ - python313Packages.websockets - python313Packages.requests # basic python test env - ])) - simplex-chat-desktop - qbittorrent - ffmpeg - yt-dlp - prismlauncher keepassxc - (wrapOBS { - plugins = with pkgs.obs-studio-plugins; [ - obs-vaapi - obs-gstreamer - obs-vkcapture - wlrobs - obs-pipewire-audio-capture - ]; - }) - mpv - kdePackages.kdenlive - gimp - inkscape - krita - distrobox screen - arduino-ide - (lutris.override { - extraLibraries = pkgs: [ - wineWowPackages.stable - winetricks - ]; - }) libadwaita # fucking winetricks zenity woeusb-ng @@ -52,13 +20,9 @@ hyprsunset grim slurp - input-leap - viber hyprpolkitagent pulsemixer feh - opentrack - aitrack progress croc libarchive @@ -111,40 +75,6 @@ eval "$(direnv hook zsh)" settings.window_padding_width = 5; }; - programs.spicetify = - let - spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system}; - in - { - enable = true; - - theme = spicePkgs.themes.catppuccin; - colorScheme = "mocha"; - - enabledExtensions = with spicePkgs.extensions; [ - hidePodcasts - shuffle - betterGenres - beautifulLyrics - ]; - - enabledCustomApps = with spicePkgs.apps; [ - newReleases - ncsVisualizer - ]; - }; - - # firejail - xdg.desktopEntries.spotify = { - name = "Spotify"; - genericName = "Music Player"; - icon = "spotify-client"; - exec = "${pkgs.firejail}/bin/firejail ${config.programs.spicetify.spicedSpotify}/bin/spotify %U"; - terminal = false; - categories = [ "Audio" "Music" "Player" "AudioVideo" ]; - mimeType = [ "x-scheme-handler/spotify" ]; - }; - wayland.windowManager.hyprland.enable = true; programs.waybar.enable = true; programs.wofi.enable = true; diff --git a/hosts/nullstar/config.nix b/hosts/nullstar/config.nix deleted file mode 100644 index 674080b..0000000 --- a/hosts/nullstar/config.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ config, pkgs, lib, inputs, ... }: - -{ - imports = - [ - ./hardware/hardware-configuration.nix - ./hardware/disko.nix - (inputs.nixos-hardware.nixosModules.framework-16-7040-amd) - ]; - - services.fwupd.enable = true; - - networking.hostName = "nullstar"; - networking.hostId = "322d5212"; - - # Enable FL16 Input modules - hardware.inputmodule.enable = true; - hardware.keyboard.qmk.enable = true; - - hardware.graphics.extraPackages = with pkgs; [ - libvdpau-va-gl - rocmPackages.clr.icd - ]; - - services.ollama.package = pkgs.ollama-rocm; - - environment.systemPackages = with pkgs; [ - framework-tool - inputmodule-control - ]; -} diff --git a/hosts/nullstar/hardware/disko.nix b/hosts/nullstar/hardware/disko.nix deleted file mode 100644 index b4e0acd..0000000 --- a/hosts/nullstar/hardware/disko.nix +++ /dev/null @@ -1,96 +0,0 @@ -{ - disko.devices = { - disk = { - main = { - type = "disk"; - device = "/dev/nvme0n1"; - content = { - type = "gpt"; - partitions = { - ESP = { - size = "512M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; - }; - luks = { - size = "100%"; - content = { - type = "luks"; - name = "crypted"; - # Disable this if you do not want to allow TRIM requests to pass through LUKS - # (Security vs SSD longevity trade-off) - settings.allowDiscards = true; - # Uncomment if you want to use a keyfile during install: - # settings.keyFile = "/tmp/secret.key"; - content = { - type = "zfs"; - pool = "zroot"; - }; - }; - }; - }; - }; - }; - }; - zpool = { - zroot = { - type = "zpool"; - options = { - ashift = "12"; - autotrim = "on"; - }; - rootFsOptions = { - acltype = "posixacl"; - xattr = "sa"; - dnodesize = "auto"; - compression = "zstd"; - normalization = "formD"; - relatime = "on"; - canmount = "off"; - # Prevent auto-snapshotting by default (enable explicitly on datasets that need it) - "com.sun:auto-snapshot" = "false"; - }; - datasets = { - # The ephemeral root dataset. - # We create a blank snapshot immediately so you can rollback to it on boot. - "root" = { - type = "zfs_fs"; - mountpoint = "/"; - options.mountpoint = "legacy"; - postCreateHook = "zfs snapshot zroot/root@blank"; - }; - - # The Nix Store (reproducible, doesn't need backing up usually) - "nix" = { - type = "zfs_fs"; - mountpoint = "/nix"; - options.mountpoint = "legacy"; - options."com.sun:auto-snapshot" = "false"; - }; - - # Persisted state (for impermanence) - "persist" = { - type = "zfs_fs"; - mountpoint = "/persist"; - options.mountpoint = "legacy"; - # Enable snapshots for data safety if using sanoid/syncoid - # options."com.sun:auto-snapshot" = "true"; - }; - - # Home directories - "home" = { - type = "zfs_fs"; - mountpoint = "/home"; - options.mountpoint = "legacy"; - # options."com.sun:auto-snapshot" = "true"; - }; - }; - }; - }; - }; -} diff --git a/hosts/nullstar/hardware/hardware-configuration.nix b/hosts/nullstar/hardware/hardware-configuration.nix deleted file mode 100644 index 72e9c1e..0000000 --- a/hosts/nullstar/hardware/hardware-configuration.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp42s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/voidspear/config.nix b/hosts/voidspear/config.nix deleted file mode 100644 index 31173ec..0000000 --- a/hosts/voidspear/config.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ config, pkgs, lib, inputs, ... }: - -{ - imports = [ - ./hardware/hardware-configuration.nix - ./hardware/disko.nix - ]; - - networking.hostName = "voidspear"; - networking.hostID = "ec82a76e"; - - - # nVidia drivers. - hardware.graphics.extraPackages = with pkgs; [ - libvdpau-va-gl - ]; - services.xserver.videoDrivers = [ "nvidia"]; - hardware.nvidia = { - modesetting.enable = true; - powerManagement.enable = false; - open = false; - nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.stable; - }; - boot.blacklistedKernelModules = [ "nouveau" ]; - - services.ollama.package = pkgs.ollama-cuda; -} diff --git a/hosts/voidspear/hardware/disko.nix b/hosts/voidspear/hardware/disko.nix deleted file mode 100644 index fc8c217..0000000 --- a/hosts/voidspear/hardware/disko.nix +++ /dev/null @@ -1,88 +0,0 @@ -{ - disko.devices = { - disk = { - main = { - type = "disk"; - device = "/dev/nvme0n1"; - content = { - type = "gpt"; - partitions = { - ESP = { - size = "512M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; - }; - luks = { - size = "100%"; - content = { - type = "luks"; - name = "crypted"; - # Critical for Samsung NVMe longevity/performance - settings.allowDiscards = true; - content = { - type = "zfs"; - pool = "zroot"; - }; - }; - }; - }; - }; - }; - }; - zpool = { - zroot = { - type = "zpool"; - options = { - ashift = "12"; - autotrim = "on"; - }; - rootFsOptions = { - acltype = "posixacl"; - xattr = "sa"; - dnodesize = "auto"; - compression = "zstd"; - normalization = "formD"; - relatime = "on"; - canmount = "off"; - "com.sun:auto-snapshot" = "false"; - }; - datasets = { - # Ephemeral root (rolls back to blank on boot) - "root" = { - type = "zfs_fs"; - mountpoint = "/"; - options.mountpoint = "legacy"; - postCreateHook = "zfs snapshot zroot/root@blank"; - }; - - # Nix store - "nix" = { - type = "zfs_fs"; - mountpoint = "/nix"; - options.mountpoint = "legacy"; - options."com.sun:auto-snapshot" = "false"; - }; - - # Persistent data - "persist" = { - type = "zfs_fs"; - mountpoint = "/persist"; - options.mountpoint = "legacy"; - }; - - # Home directories - "home" = { - type = "zfs_fs"; - mountpoint = "/home"; - options.mountpoint = "legacy"; - }; - }; - }; - }; - }; -} diff --git a/hosts/voidspear/hardware/hardware-configuration.nix b/hosts/voidspear/hardware/hardware-configuration.nix deleted file mode 100644 index 53f8354..0000000 --- a/hosts/voidspear/hardware/hardware-configuration.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ 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 = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp42s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -}