From c91432d2b841bc77b67f9fe66259c737509c9ee1 Mon Sep 17 00:00:00 2001 From: essse-est Date: Sat, 12 Sep 2026 06:49:33 -0500 Subject: [PATCH] updated nixos --- nixos/configuration.nix | 88 ++++++++++++++------------------ nixos/flake.lock | 27 ++++++++++ nixos/flake.nix | 12 +++++ nixos/hardware-configuration.nix | 40 +++++++++++++++ nixos/pkg/core.nix | 41 +++++++++++++++ nixos/pkg/dev.nix | 54 ++++++++++++++++++++ nixos/pkg/userland.nix | 48 +++++++++++++++++ 7 files changed, 260 insertions(+), 50 deletions(-) create mode 100644 nixos/flake.lock create mode 100644 nixos/flake.nix create mode 100644 nixos/hardware-configuration.nix create mode 100644 nixos/pkg/core.nix create mode 100644 nixos/pkg/dev.nix create mode 100644 nixos/pkg/userland.nix diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 0b069d4..871b3a2 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -5,65 +5,53 @@ { config, lib, pkgs, ... }: { - nixpkgs.overlays = [ (final: prev: { - inherit (prev.lixPackageSets.stable) - nixpkgs-review - nix-eval-jobs - nix-fast-build - colmena; - }) ]; - nix.package = pkgs.lixPackageSets.stable.lix; - - imports = - [ + imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix - ./pkg.nix - ./services.nix - ]; - programs.nix-ld.libraries = with pkgs; [ - fontconfig - wayland - libx11 - libxcursor - libxext - libxi - - - ]; - + ./pkg/dev.nix + ./pkg/core.nix + ./pkg/userland.nix + ]; boot.loader.systemd-boot.enable = true; - networking.hostName = "f1ndm3"; - networking.networkmanager.enable = true; - time.timeZone = "America/Chicago"; - i18n.defaultLocale = "en_US.UTF-8"; - + # Use latest kernel. + boot.kernelPackages = pkgs.linuxKernel.packages.linux_7_1; - users.users.supa = { - isNormalUser = true; - extraGroups = [ "wheel" "libvirtd" ]; + networking.hostName = "fzfound"; # Define your hostname. + + # Configure network connections interactively with nmcli or nmtui. + networking.networkmanager.enable = true; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + # Set your time zone. + time.timeZone = "America/Chicago"; + + services.pipewire = { + enable = true; + pulse.enable = true; }; - users.defaultUserShell = pkgs.bash; - programs.neovim.defaultEditor = true; - - # graphics - - hardware.graphics.enable = true; - hardware.nvidia.open = true; - - - # firewall - - networking.firewall.allowedTCPPorts = [ ]; - networking.firewall.allowedUDPPorts = [ ]; - networking.firewall.enable = true; - - # virtualisation - + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.esse = { + isNormalUser = true; + extraGroups = [ "wheel" "docker" "disk" ]; # Enable ‘sudo’ for the user. + }; + users.groups.libvirtd.members = ["esse"]; virtualisation.libvirtd.enable = true; virtualisation.spiceUSBRedirection.enable = true; + security.polkit.enable = true; + security.pam.services.swaylock = {}; + nixpkgs.config.allowUnfree = true; + # :( +# 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; # Copy the NixOS configuration file and link it from the resulting system # (/run/current-system/configuration.nix). This is useful in case you diff --git a/nixos/flake.lock b/nixos/flake.lock new file mode 100644 index 0000000..dac7a98 --- /dev/null +++ b/nixos/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1788039129, + "narHash": "sha256-pa4Q0qErvCvzCaaUph7Sm37RhR4xvPrYI8Lgz6k85+A=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d2f67949798825fe853f7c5d0492b8bf016d3f88", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/nixos/flake.nix b/nixos/flake.nix new file mode 100644 index 0000000..632eb20 --- /dev/null +++ b/nixos/flake.nix @@ -0,0 +1,12 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + outputs = { self, nixpkgs, ... }@inputs: { + nixosConfigurations.fzfound = nixpkgs.lib.nixosSystem { + modules = [ + ./configuration.nix + ]; + }; + }; +} diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix new file mode 100644 index 0000000..504199d --- /dev/null +++ b/nixos/hardware-configuration.nix @@ -0,0 +1,40 @@ +# 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" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/f30ad54f-7598-46b2-b484-0a652c1d805c"; + fsType = "xfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/08B2-36C3"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + fileSystems."/mnt/1tb1" = + { device = "/dev/disk/by-uuid/9edf6659-16f6-4d6f-898f-c32fb849710a"; + fsType = "xfs"; + }; + fileSystems."/mnt/1tb2" = + { device = "/dev/disk/by-uuid/4770e6c5-33d4-4921-ad4b-877504c77446"; + fsType = "xfs"; + }; + swapDevices = + [ { device = "/dev/disk/by-uuid/a6f63a27-2bdc-46aa-9e0c-56ec680bbf4f"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/nixos/pkg/core.nix b/nixos/pkg/core.nix new file mode 100644 index 0000000..75a5292 --- /dev/null +++ b/nixos/pkg/core.nix @@ -0,0 +1,41 @@ +{ config, lib, pkgs, ... }: + + +{ + # kde + services = { + desktopManager.plasma6.enable = true; + displayManager.ly.enable = true; + }; + + environment.plasma6.excludePackages = with pkgs.kdePackages; [ + plasma-browser-integration + konsole + kate + okular + gwenview + elisa + ]; + + qt.enable = true; + environment.systemPackages = with pkgs; [ + qadwaitadecorations-qt6 + qt6.qtsvg + ]; + + # drivers + hardware.graphics.enable = true; + services.xserver.videoDrivers = [ "nvidia" ]; + hardware.nvidia.open = true; + + + hardware.nvidia.modesetting.enable = true; + + + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "nvidia-x11" + "nvidia-settings" + "nvidia-persistenced" + ]; + +} diff --git a/nixos/pkg/dev.nix b/nixos/pkg/dev.nix new file mode 100644 index 0000000..23e9f24 --- /dev/null +++ b/nixos/pkg/dev.nix @@ -0,0 +1,54 @@ +{ config, lib, pkgs, ... }: + + +{ + environment.systemPackages = with pkgs; [ + autoconf + automake + bat + bat-extras.batdiff + bazelisk + binutils + bison + clang + clang-tools + cloudflared + cron + debugedit + fakeroot + findutils + gawk + gcc + gettext + git + git-lfs + github-cli + gnumake + groff + gzip + jdk17 + jdk25 + jdk8 + libtool + m4 + mdformat + meson + mise + ncurses + ninja + nodejs_26 + pkgconf + python3 + shellcheck + shfmt + texinfo + unrar + unzip + vulkan-tools + wget + wmctrl + xprop + xxd + zip + ]; +} diff --git a/nixos/pkg/userland.nix b/nixos/pkg/userland.nix new file mode 100644 index 0000000..3dc0e6d --- /dev/null +++ b/nixos/pkg/userland.nix @@ -0,0 +1,48 @@ +{ config, lib, pkgs, ... }: + + +{ + + environment.systemPackages = with pkgs; [ + audacity + btop + daggerfall-unity + dig + discord + fastfetch + filezilla + firefox + foot + fzf + gamemode + gimp-with-plugins + heroic + htop + hyfetch + jellyfin + jellyfin-desktop + kdePackages.dolphin + kitty + lutris + mangohud + neovim + nix-search-tv + prismlauncher + protontricks + qbittorrent + rofi + sgdboop + tmux + vlc + vscodium-fhs + wineWow64Packages.staging + wineWow64Packages.waylandFull + winetricks + wpgtk + ]; + programs.steam.enable = true; + programs.virt-manager.enable = true; + +# break in case of emergency + services.flatpak.enable = true; +}