From 23d10cb134d6799d421e4e47154da97163d2cfea Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 12 Dec 2025 20:58:41 -0500 Subject: [PATCH 01/14] Add configuration.nix --- configuration.nix | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 configuration.nix diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..e69de29 -- 2.49.1 From d14fe7d7c07ecd99ca19c7c0fe3ffa95cfca42d7 Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 12 Dec 2025 20:59:41 -0500 Subject: [PATCH 02/14] Add gpu-config.nix --- gpu-config.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 gpu-config.nix diff --git a/gpu-config.nix b/gpu-config.nix new file mode 100644 index 0000000..af2ef6a --- /dev/null +++ b/gpu-config.nix @@ -0,0 +1,30 @@ +{ config, pkgs, ... }: + +{ + # make the kernel use the correct driver early + boot.initrd.kernelModules = [ "amdgpu" ]; + + hardware.graphics.enable = true; + services.xserver.videoDrivers = [ "amdgpu" ]; + + hardware.graphics.enable32Bit = true; + + hardware.graphics.extraPackages = with pkgs; [ + # Mesa drivers (includes OpenGL, Vulkan via RADV) + mesa + + # AMD's official Vulkan driver (optional alternative to RADV) + amdvlk + + # OpenCL support - IMPORTANT: Check which OpenCL implementation works for RX 580 + # For R600-family and newer (RX 580 is GCN 4.0, so should use rusticl eventually) + mesa.opencl # Legacy OpenCL driver (Clover) - being removed soon + # OR for future-proofing (when rusticl becomes default): + # pkgs.mesa.rusticl + + # Video acceleration + libva + libva-utils + vaapiVdpau + ]; +} \ No newline at end of file -- 2.49.1 From 210faa1bd26de65fb3a0acd501b8e039358394c8 Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 12 Dec 2025 21:00:45 -0500 Subject: [PATCH 03/14] Add filesystem.nix --- filesystem.nix | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 filesystem.nix diff --git a/filesystem.nix b/filesystem.nix new file mode 100644 index 0000000..16eeb24 --- /dev/null +++ b/filesystem.nix @@ -0,0 +1,92 @@ +{ config, lib, pkgs, ... }: + +let + username = "brian"; + uid = 1000; + gid = 100; + + secrets = import ./secrets.nix; + + networkShares = [ + { + name = "seagate8tb"; + device = "//10.0.0.128/PublicShare"; + mountPoint = "/mnt/smb-seagate8tb"; + } + { + name = "wd4tb"; + device = "//10.0.0.65/wd4tb"; + mountPoint = "/mnt/smb-wd4tb"; + } + { + name = "stashapp"; + device = "//10.0.0.65/stashapp"; + mountPoint = "/mnt/smb-app"; + } + + ]; + + networkFileSystems = builtins.listToAttrs (map (share: { + name = share.mountPoint; + value = { + device = share.device; + fsType = "cifs"; + options = [ + "username=${secrets."${share.name}Username"}" + "password=${secrets."${share.name}Password"}" + "uid=1000" + "gid=1000" + "file_mode=0775" + "dir_mode=0775" + ]; + }; + }) networkShares); +in +{ + # Only add network shares and NVMe + # Root and boot are already in hardware-configuration.nix + fileSystems = networkFileSystems // { + # Your new NVMe drive ONLY + "/mnt/nvme" = { + device = "/dev/disk/by-label/nvmedrive"; + fsType = "ext4"; + options = [ + "defaults" + "noatime" + "discard" + "uid=${toString uid}" + "gid=${toString gid}" + "fmask=022" + "dmask=022" + ]; + }; + }; + + systemd.services.fix-nvme-permissions = { + description = "Fix NVMe drive permissions"; + wantedBy = [ "multi-user.target" ]; + after = [ "local-fs.target" ]; + script = '' + # Set ownership + chown -R ${username}:users /mnt/nvme 2>/dev/null || true + # Create game directories + mkdir -p /mnt/nvme/games/steam + chown -R ${username}:users /mnt/nvme/games + # Set permissions + chmod -R 775 /mnt/nvme 2>/dev/null || true + ''; + serviceConfig.Type = "oneshot"; + }; + + # Create symlinks in home directory for easy access + systemd.tmpfiles.rules = + (map (share: + "L+ /home/${username}/${share.name} - - - - ${share.mountPoint}" + ) networkShares) + ++ + [ + "L+ /home/${username}/nvme - - - - /mnt/nvme" + "d /mnt/nvme/games 0775 ${username} users -" + "d /mnt/nvme/games/steam 0775 ${username} users -" + ]; +} \ No newline at end of file -- 2.49.1 From c118b7022482910605799b95da53265117ddf1c5 Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 12 Dec 2025 21:02:04 -0500 Subject: [PATCH 04/14] Add hardware-configuration.nix --- hardware-configuration.nix | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 hardware-configuration.nix diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..91955a0 --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,38 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/9a663648-ed99-4810-a0a4-1b90d3b326b9"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/D21E-C36A"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # 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.enp27s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} -- 2.49.1 From 4698ec846554a37a2bd31383761ddaa90efce354 Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 12 Dec 2025 21:02:32 -0500 Subject: [PATCH 05/14] Update hardware-configuration.nix --- hardware-configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 91955a0..7894e18 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -1,4 +1,4 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ +# Do not modify this file! It was generated by nixos-generate-config # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. { config, lib, pkgs, modulesPath, ... }: -- 2.49.1 From 1f64e0d97c96c5d08a10f79fcb2aa41b24a4aec3 Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 12 Dec 2025 21:06:22 -0500 Subject: [PATCH 06/14] Update configuration.nix --- configuration.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/configuration.nix b/configuration.nix index e69de29..a479c5c 100644 --- a/configuration.nix +++ b/configuration.nix @@ -0,0 +1,16 @@ +{}: + +{ + environment.systemPackages = with pkgs; [ + librewolf + discord + prismlauncher + git + steam + jellyfin-media-player + piper + protonvpn + vscodium + node + ] +} \ No newline at end of file -- 2.49.1 From 8c9c1162bfcff7ef8a111a641cc0dfcc733168f3 Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 12 Dec 2025 21:48:30 -0500 Subject: [PATCH 07/14] Update configuration.nix --- configuration.nix | 136 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 135 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index a479c5c..5000b84 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,4 +1,138 @@ -{}: +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Bootloader. + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + boot.loader.grub.useOSProber = true; + + networking.hostName = "nixos"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "America/New_York"; + + # Select internationalisation properties. + 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"; + }; + + # Enable the X11 windowing system. + # You can disable this if you're only using the Wayland session. + services.xserver.enable = true; + + # Enable the KDE Plasma Desktop Environment. + services.displayManager.sddm.enable = true; + services.desktopManager.plasma6.enable = true; + + # Configure keymap in X11 + services.xserver.xkb = { + layout = "us"; + variant = ""; + }; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Enable sound with pipewire. + services.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.xserver.libinput.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.brian = { + isNormalUser = true; + description = "Brian"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ + kdePackages.kate + # thunderbird + ]; + }; + + # Install firefox. + programs.firefox.enable = true; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "25.05"; # Did you read the comment? + +} + + { environment.systemPackages = with pkgs; [ -- 2.49.1 From 95435fb4545298e056edecf03f05ac217580b854 Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 12 Dec 2025 22:14:18 -0500 Subject: [PATCH 08/14] mount network drives only --- filesystem.nix | 64 +++++++++----------------------------------------- 1 file changed, 11 insertions(+), 53 deletions(-) diff --git a/filesystem.nix b/filesystem.nix index 16eeb24..92f5b99 100644 --- a/filesystem.nix +++ b/filesystem.nix @@ -18,12 +18,6 @@ let device = "//10.0.0.65/wd4tb"; mountPoint = "/mnt/smb-wd4tb"; } - { - name = "stashapp"; - device = "//10.0.0.65/stashapp"; - mountPoint = "/mnt/smb-app"; - } - ]; networkFileSystems = builtins.listToAttrs (map (share: { @@ -34,59 +28,23 @@ let options = [ "username=${secrets."${share.name}Username"}" "password=${secrets."${share.name}Password"}" - "uid=1000" - "gid=1000" + "uid=${toString uid}" + "gid=${toString gid}" "file_mode=0775" "dir_mode=0775" + "nofail" # <<< ADDED: Don't fail boot if network is down + "_netdev" # <<< ADDED: Wait for network ]; }; }) networkShares); in { - # Only add network shares and NVMe - # Root and boot are already in hardware-configuration.nix - fileSystems = networkFileSystems // { - # Your new NVMe drive ONLY - "/mnt/nvme" = { - device = "/dev/disk/by-label/nvmedrive"; - fsType = "ext4"; - options = [ - "defaults" - "noatime" - "discard" - "uid=${toString uid}" - "gid=${toString gid}" - "fmask=022" - "dmask=022" - ]; - }; - }; - - systemd.services.fix-nvme-permissions = { - description = "Fix NVMe drive permissions"; - wantedBy = [ "multi-user.target" ]; - after = [ "local-fs.target" ]; - script = '' - # Set ownership - chown -R ${username}:users /mnt/nvme 2>/dev/null || true - # Create game directories - mkdir -p /mnt/nvme/games/steam - chown -R ${username}:users /mnt/nvme/games - # Set permissions - chmod -R 775 /mnt/nvme 2>/dev/null || true - ''; - serviceConfig.Type = "oneshot"; - }; + # Only network shares - NO NVMe for now + fileSystems = networkFileSystems; # Create symlinks in home directory for easy access - systemd.tmpfiles.rules = - (map (share: - "L+ /home/${username}/${share.name} - - - - ${share.mountPoint}" - ) networkShares) - ++ - [ - "L+ /home/${username}/nvme - - - - /mnt/nvme" - "d /mnt/nvme/games 0775 ${username} users -" - "d /mnt/nvme/games/steam 0775 ${username} users -" - ]; -} \ No newline at end of file + systemd.tmpfiles.rules = map (share: + "L+ /home/${username}/${share.name} - - - - ${share.mountPoint}" + ) networkShares; +} + -- 2.49.1 From 5355706ee93592d61749414b022ec5e9cc501b0d Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 12 Dec 2025 22:15:26 -0500 Subject: [PATCH 09/14] import gpu and filesystem --- configuration.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/configuration.nix b/configuration.nix index 5000b84..9260f60 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,13 +1,11 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - { config, pkgs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ./gpu-config.nix + ./filesystem.nix ]; # Bootloader. -- 2.49.1 From e8c3a1ffa5eddd80c0cc5cab0c8858a55b5cc153 Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 12 Dec 2025 22:15:48 -0500 Subject: [PATCH 10/14] Update configuration.nix --- configuration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configuration.nix b/configuration.nix index 9260f60..437edf0 100644 --- a/configuration.nix +++ b/configuration.nix @@ -77,7 +77,7 @@ # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; - # Define a user account. Don't forget to set a password with ‘passwd’. + # Define a user account. Don't forget to set a password with passwd. users.users.brian = { isNormalUser = true; description = "Brian"; @@ -122,7 +122,7 @@ # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave + # on your system were taken. Its perfectly fine and recommended to leave # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). -- 2.49.1 From 240240dc65bcf6ff0b4f33f1a41a5b1790668358 Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 12 Dec 2025 22:17:04 -0500 Subject: [PATCH 11/14] added packages --- configuration.nix | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/configuration.nix b/configuration.nix index 437edf0..0a52092 100644 --- a/configuration.nix +++ b/configuration.nix @@ -99,6 +99,14 @@ environment.systemPackages = with pkgs; [ # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. # wget + librewolf + steam + discord + prismlauncher + piper + git + protonvpn-gui + vscodium ]; # Some programs need SUID wrappers, can be configured further or are @@ -128,21 +136,4 @@ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "25.05"; # Did you read the comment? -} - - - -{ - environment.systemPackages = with pkgs; [ - librewolf - discord - prismlauncher - git - steam - jellyfin-media-player - piper - protonvpn - vscodium - node - ] } \ No newline at end of file -- 2.49.1 From 02130054734fd2d70bbc75371afe14fe9abb037b Mon Sep 17 00:00:00 2001 From: brian Date: Sat, 13 Dec 2025 16:52:56 -0500 Subject: [PATCH 12/14] mount nvme drive --- nvme-mount.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 nvme-mount.nix diff --git a/nvme-mount.nix b/nvme-mount.nix new file mode 100644 index 0000000..34fe214 --- /dev/null +++ b/nvme-mount.nix @@ -0,0 +1,16 @@ +{ config, lib, pkgs, ... }: + +{ + fileSystems."/mnt/nvme" = { + device = "/dev/nvme0n1"; + fsType = "ext4"; + options = [ + "defaults" + "nofail" + ]; + }; + + systemd.tmpfiles.rules = [ + "d /mnt/nvme 0775 brian users -" + ]; +} -- 2.49.1 From 7bb2202f9e34187ccec99bf1d7231af8c37d505c Mon Sep 17 00:00:00 2001 From: brian Date: Sat, 13 Dec 2025 16:53:24 -0500 Subject: [PATCH 13/14] mount nvme drive --- configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/configuration.nix b/configuration.nix index 0a52092..2b1b4ad 100644 --- a/configuration.nix +++ b/configuration.nix @@ -6,6 +6,7 @@ ./hardware-configuration.nix ./gpu-config.nix ./filesystem.nix + ./nvme-mount.nix ]; # Bootloader. -- 2.49.1 From 5daefd2302fbdeb1256b5521cf63dff9877fa41b Mon Sep 17 00:00:00 2001 From: brian Date: Sat, 13 Dec 2025 17:11:31 -0500 Subject: [PATCH 14/14] initial git connection --- .gitignore | 1 + README.md | 4 + configuration.nix | 147 +++++++++++++++++++++++++++++++++++++ filesystem.nix | 54 ++++++++++++++ gpu-config.nix | 30 ++++++++ hardware-configuration.nix | 32 ++++++++ nvme-mount.nix | 16 ++++ 7 files changed, 284 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 configuration.nix create mode 100644 filesystem.nix create mode 100644 gpu-config.nix create mode 100644 hardware-configuration.nix create mode 100644 nvme-mount.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..89b3a77 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +secrets.nix diff --git a/README.md b/README.md new file mode 100644 index 0000000..3df9dd4 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# My Setup for NixOS +This repo is to server as a backup and version manager for my nixos build. + +The current commit is the most up to date, working version. diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..7e2955a --- /dev/null +++ b/configuration.nix @@ -0,0 +1,147 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, ... }: + + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ./gpu-config.nix + ./filesystem.nix + ./nvme-mount.nix + ]; + + # Bootloader. + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + boot.loader.grub.useOSProber = true; + + networking.hostName = "nixos"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "America/New_York"; + + # Select internationalisation properties. + 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"; + }; + + # Enable the X11 windowing system. + # You can disable this if you're only using the Wayland session. + services.xserver.enable = true; + + # Enable the KDE Plasma Desktop Environment. + services.displayManager.sddm.enable = true; + services.desktopManager.plasma6.enable = true; + + # Configure keymap in X11 + services.xserver.xkb = { + layout = "us"; + variant = ""; + }; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Enable sound with pipewire. + services.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.xserver.libinput.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.brian = { + isNormalUser = true; + description = "Brian"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ + kdePackages.kate + # thunderbird + ]; + }; + + # Install firefox. + programs.firefox.enable = true; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget + librewolf + steam + discord + prismlauncher + piper + git + protonvpn-gui + vscodium + gitea + tea + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "25.05"; # Did you read the comment? + +} diff --git a/filesystem.nix b/filesystem.nix new file mode 100644 index 0000000..5ea9046 --- /dev/null +++ b/filesystem.nix @@ -0,0 +1,54 @@ +{ config, lib, pkgs, ... }: + +let + username = "brian"; + uid = 1000; + gid = 100; + + secrets = import ./secrets.nix; + + networkShares = [ + { + name = "seagate8tb"; + device = "//10.0.0.128/PublicShare"; + mountPoint = "/mnt/smb-seagate8tb"; + } + { + name = "wd4tb"; + device = "//10.0.0.65/wd4tb"; + mountPoint = "/mnt/smb-wd4tb"; + } + { + name = "stashapp"; + device = "//10.0.0.65/stashapp"; + mountPoint = "/mnt/smb-app"; + } + ]; + + networkFileSystems = builtins.listToAttrs (map (share: { + name = share.mountPoint; + value = { + device = share.device; + fsType = "cifs"; + options = [ + "username=${secrets."${share.name}Username"}" + "password=${secrets."${share.name}Password"}" + "uid=${toString uid}" + "gid=${toString gid}" + "file_mode=0775" + "dir_mode=0775" + "nofail" # <<< ADDED: Don't fail boot if network is down + "_netdev" # <<< ADDED: Wait for network + ]; + }; + }) networkShares); +in +{ + # Only network shares - NO NVMe for now + fileSystems = networkFileSystems; + + # Create symlinks in home directory for easy access + systemd.tmpfiles.rules = map (share: + "L+ /home/${username}/${share.name} - - - - ${share.mountPoint}" + ) networkShares; +} diff --git a/gpu-config.nix b/gpu-config.nix new file mode 100644 index 0000000..4a69ae0 --- /dev/null +++ b/gpu-config.nix @@ -0,0 +1,30 @@ +{ config, pkgs, ... }: + +{ + # make the kernel use the correct driver early + boot.initrd.kernelModules = [ "amdgpu" ]; + + hardware.graphics.enable = true; + services.xserver.videoDrivers = [ "amdgpu" ]; + + hardware.graphics.enable32Bit = true; + + hardware.graphics.extraPackages = with pkgs; [ + # Mesa drivers (includes OpenGL, Vulkan via RADV) + mesa + + # AMD's official Vulkan driver (optional alternative to RADV) + amdvlk + + # OpenCL support - IMPORTANT: Check which OpenCL implementation works for RX 580 + # For R600-family and newer (RX 580 is GCN 4.0, so should use rusticl eventually) + mesa.opencl # Legacy OpenCL driver (Clover) - being removed soon + # OR for future-proofing (when rusticl becomes default): + # pkgs.mesa.rusticl + + # Video acceleration + libva + libva-utils + vaapiVdpau + ]; +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..cd193e7 --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,32 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/1aa4a223-cd34-42c1-88d5-38d082cfed48"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + + # 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.enp27s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/nvme-mount.nix b/nvme-mount.nix new file mode 100644 index 0000000..34fe214 --- /dev/null +++ b/nvme-mount.nix @@ -0,0 +1,16 @@ +{ config, lib, pkgs, ... }: + +{ + fileSystems."/mnt/nvme" = { + device = "/dev/nvme0n1"; + fsType = "ext4"; + options = [ + "defaults" + "nofail" + ]; + }; + + systemd.tmpfiles.rules = [ + "d /mnt/nvme 0775 brian users -" + ]; +} -- 2.49.1