diff --git a/configuration.nix b/configuration.nix index 4347baf..954ece4 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,170 +1,181 @@ { config, pkgs, ... }: { - # Imports - imports = [ - ./hardware-configuration.nix - # spicetify-nix.homeManagerModules.spicetify - ]; - - # Boot configuration - boot = { - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; + # Imports + imports = [ + ./hardware-configuration.nix + # spicetify-nix.homeManagerModules.spicetify + ]; + + # Boot configuration + boot = { + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; }; - - # Users configuration - users = { - defaultUserShell = pkgs.fish; # Global default shell - users.kewb = { - isNormalUser = true; - description = "kewbionic"; - home = "/home/kewb"; - extraGroups = [ "wheel" "audio" "video" "networkmanager" ]; - }; + }; + + # Users configuration + users = { + defaultUserShell = pkgs.fish; # Global default shell + users.kewb = { + isNormalUser = true; + description = "kewbionic"; + home = "/home/kewb"; + extraGroups = [ + "wheel" + "audio" + "video" + "networkmanager" + ]; }; - - # Nix settings - nixpkgs.config.allowUnfree = true; - - nix = { - settings = { - experimental-features = [ "nix-command" "flakes" ]; - trusted-users = [ "@wheel" ]; - auto-optimise-store = true; - use-xdg-base-directories = true; - }; - }; - - system.stateVersion = "25.11"; # Make sure this matches your desired version - - # Networking configuration - networking = { - firewall.enable = true; - firewall.allowedTCPPorts = []; - firewall.allowedUDPPorts = []; - hostName = "pissbrick"; - networkmanager.enable = true; + }; + + # Nix settings + nixpkgs.config.allowUnfree = true; + + nix = { + settings = { + experimental-features = [ + "nix-command" + "flakes" + ]; + trusted-users = [ "@wheel" ]; + auto-optimise-store = true; + use-xdg-base-directories = true; }; - - # Time settings - time.timeZone = "America/New_York"; - - # Internationalization settings - i18n = { - defaultLocale = "en_US.UTF-8"; - 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"; - }; + }; + + system.stateVersion = "25.11"; # Make sure this matches your desired version + + # Networking configuration + networking = { + firewall.enable = true; + firewall.allowedTCPPorts = [ ]; + firewall.allowedUDPPorts = [ ]; + hostName = "pissbrick"; + networkmanager.enable = true; + }; + + # Time settings + time.timeZone = "America/New_York"; + + # Internationalization settings + i18n = { + defaultLocale = "en_US.UTF-8"; + 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"; }; - - # Packages - environment.systemPackages = with pkgs; [ - # Games - modrinth-app - heroic - - # Media - vlc - - # Social - signal-desktop - vesktop - - # Notification Manager - mako - - # Launcher - rofi - - # Other - gimp - zed-editor - lmms - vscodium - obsidian - pulseaudio - wineWowPackages.stableFull - nautilus - polkit_gnome - nh - fd # Fast "find" command alternative - gnome-keyring - gcr # Added for compatibility with gnome-keyring packages + }; + + # Packages + environment.systemPackages = with pkgs; [ + # Games + modrinth-app + heroic + + # Media + vlc + + # Social + signal-desktop + vesktop + + # Notification Manager + mako + + # Launcher + rofi + + # Other + gimp + zed-editor + lmms + vscodium + obsidian + pulseaudio + wineWowPackages.stableFull + nautilus + polkit_gnome + nh + fd # Fast "find" command alternative + gnome-keyring + gcr # Added for compatibility with gnome-keyring packages + ]; + + # Programs configuration + programs = { + steam.enable = true; + fish.enable = true; + foot.enable = true; + # spicetify.enable = true; + }; + + # Fonts configuration + fonts = { + fontconfig.enable = true; + fontDir.enable = true; + packages = with pkgs; [ + jetbrains-mono + google-fonts ]; - - # Programs configuration - programs = { - steam.enable = true; - fish.enable = true; - foot.enable = true; - # spicetify.enable = true; + }; + + # Hardware configuration + hardware = { + graphics.enable = true; + nvidia = { + open = true; + modesetting.enable = true; + prime = { + offload.enable = true; + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; }; - - # Fonts configuration - fonts = { - fontconfig.enable = true; - fontDir.enable = true; - packages = with pkgs; [ - jetbrains-mono - google-fonts - ]; + }; + + # Services configuration + services = { + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + wireplumber.enable = true; }; - # Hardware configuration - hardware = { - graphics.enable = true; - nvidia = { - open = true; - modesetting.enable = true; - prime = { - offload.enable = true; - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; - }; - }; + xserver = { + displayManager.gdm.enable = true; + videoDrivers = [ "nvidia" ]; + xkb = { + layout = "us"; + variant = ""; + }; }; - # Services configuration - services = { - pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - wireplumber.enable = true; - }; - - xserver = { - displayManager.gdm.enable = true; - videoDrivers = [ "nvidia" ]; - xkb = { - layout = "us"; - variant = ""; - }; - }; - - openssh.enable = true; - libinput.enable = true; - dbus.packages = [ pkgs.gnome-keyring pkgs.gcr ]; - }; + openssh.enable = true; + libinput.enable = true; + dbus.packages = [ + pkgs.gnome-keyring + pkgs.gcr + ]; + }; - # Security settings - security = { - pam.services = { - gdm.enableGnomeKeyring = true; # Updated for gnome-keyring - login.enableGnomeKeyring = true; # Ensures keyring unlocks on login - }; + # Security settings + security = { + pam.services = { + gdm.enableGnomeKeyring = true; # Updated for gnome-keyring + login.enableGnomeKeyring = true; # Ensures keyring unlocks on login }; + }; } -- 2.51.2 From 6d94dc3b3e4556570d9707ccbf0b098b1b9cfcb3 Mon Sep 17 00:00:00 2001 From: MrSnowy Date: Sun, 25 Jan 2026 19:52:07 +0100 Subject: [PATCH 2/2] Fix config, add things, use flakes. --- configuration.nix | 86 ++++++++++++++++++++++++++++---------- flake.lock | 44 +++++++++++++++++++ flake.nix | 41 ++++++++++++++++++ hardware-configuration.nix | 2 + 4 files changed, 151 insertions(+), 22 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 hardware-configuration.nix diff --git a/configuration.nix b/configuration.nix index 954ece4..11bfb6c 100644 --- a/configuration.nix +++ b/configuration.nix @@ -10,7 +10,12 @@ # Boot configuration boot = { loader = { - systemd-boot.enable = true; + systemd-boot = { + enable = true; + consoleMode = "max"; + editor = true; + }; + efi.canTouchEfiVariables = true; }; }; @@ -21,7 +26,7 @@ users.kewb = { isNormalUser = true; description = "kewbionic"; - home = "/home/kewb"; + # home = "/home/kewb"; extraGroups = [ "wheel" "audio" @@ -44,15 +49,22 @@ auto-optimise-store = true; use-xdg-base-directories = true; }; - }; - system.stateVersion = "25.11"; # Make sure this matches your desired version + gc = { + automatic = true; + dates = "weekly"; + persistent = true; + options = "--delete-older-than 3d"; + }; + }; # Networking configuration networking = { - firewall.enable = true; - firewall.allowedTCPPorts = [ ]; - firewall.allowedUDPPorts = [ ]; + firewall = { + enable = true; + allowedTCPPorts = [ ]; + allowedUDPPorts = [ ]; + }; hostName = "pissbrick"; networkmanager.enable = true; }; @@ -63,17 +75,18 @@ # Internationalization settings i18n = { defaultLocale = "en_US.UTF-8"; - 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"; - }; + # TODO You dont need to specify the ones under this, since they will use the default locale + # 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"; + # }; }; # Packages @@ -101,14 +114,26 @@ lmms vscodium obsidian - pulseaudio - wineWowPackages.stableFull nautilus - polkit_gnome + + # CLI tools + wineWow64Packages.stagingFull nh fd # Fast "find" command alternative + btop-cuda # CLI Task manager + gdu # filesize usage CLI tool + bat # Nicer "cat" alternative + dysk # Diskusage CLI tool + fastfetch # system information + + # Deps + polkit_gnome gnome-keyring gcr # Added for compatibility with gnome-keyring packages + + # Theming (mostly for nautilus and other gnome apps) + adwaita-icon-theme + adw-gtk3 ]; # Programs configuration @@ -116,6 +141,13 @@ steam.enable = true; fish.enable = true; foot.enable = true; + + hyprland = { + enable = true; + withUWSM = true; + xwayland.enable = true; + }; + # spicetify.enable = true; }; @@ -132,6 +164,7 @@ # Hardware configuration hardware = { graphics.enable = true; + nvidia = { open = true; modesetting.enable = true; @@ -154,8 +187,9 @@ wireplumber.enable = true; }; + displayManager.gdm.enable = true; + xserver = { - displayManager.gdm.enable = true; videoDrivers = [ "nvidia" ]; xkb = { layout = "us"; @@ -163,8 +197,11 @@ }; }; + tetrd.enable = true; + openssh.enable = true; libinput.enable = true; + dbus.packages = [ pkgs.gnome-keyring pkgs.gcr @@ -178,4 +215,9 @@ login.enableGnomeKeyring = true; # Ensures keyring unlocks on login }; }; + + # This option defines the first version of NixOS you installed on this machine. + # This is used for compatibility. + # Do NOT change this after installing. + system.stateVersion = "25.11"; } diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..8dfdd64 --- /dev/null +++ b/flake.lock @@ -0,0 +1,44 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1769089682, + "narHash": "sha256-9yA/LIuAVQq0lXelrZPjLuLVuZdm03p8tfmHhnDIkms=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "078d69f03934859a181e81ba987c2bb033eebfc5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-tetrd": { + "locked": { + "lastModified": 1768044503, + "narHash": "sha256-Vtxm7j/sHwHASmCuEG/yUd+L75daCf19XqBAQYNS/Ps=", + "owner": "MrSn0wy", + "repo": "nixpkgs", + "rev": "9edb6a68ff6fde573771c11ba9c144850333e845", + "type": "github" + }, + "original": { + "owner": "MrSn0wy", + "ref": "update-tetrd", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "nixpkgs-tetrd": "nixpkgs-tetrd" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f7fff4a --- /dev/null +++ b/flake.nix @@ -0,0 +1,41 @@ +{ + description = "Kewb's system"; + + # Any flakes you want to add go here + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; # NixOS official package source + nixpkgs-tetrd.url = "github:MrSn0wy/nixpkgs/update-tetrd"; # nixpkgs fork for tetrd + }; + + outputs = + { self, ... }@inputs: + let + system = "x86_64-linux"; + tetrd-pkgs = import inputs.nixpkgs-tetrd { + inherit system; + config.allowUnfree = true; + }; + in + { + # The pissbrick system + nixosConfigurations.pissbrick = inputs.nixpkgs.lib.nixosSystem { + inherit system; + + # your "imports" + modules = [ + { + # overlays on your system's nixpkgs + nixpkgs.overlays = [ + (final: prev: { + # Replaces the tetrd of your nixpkgs to the custom version + tetrd = tetrd-pkgs.tetrd; + }) + ]; + } + + # your system configs... + ./configuration.nix + ]; + }; + }; +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..c224e71 --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,2 @@ +# Generate this on install using ‘nixos-generate-config --root /mnt’ +{ }