Personal NixOS flake

filesystems.nix, virt.nix

+172 -103
+77 -77
configuration.nix
··· 12 12 13 13 #nix.settings.experimental-features = ["nix-command" "flakes"]; 14 14 15 - nix.settings = { 16 - experimental-features = ["nix-command" "flakes"]; 17 - #substituters = ["https://hyprland.cachix.org"]; 18 - #trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; 19 - }; 15 + # nix.settings = { 16 + # experimental-features = ["nix-command" "flakes"]; 17 + # #substituters = ["https://hyprland.cachix.org"]; 18 + # #trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; 19 + # }; 20 20 21 21 22 22 # Bootloader. 23 - boot.loader.systemd-boot.enable = true; 24 - boot.loader.efi.canTouchEfiVariables = true; 23 + # boot.loader.systemd-boot.enable = true; 24 + # boot.loader.efi.canTouchEfiVariables = true; 25 25 26 - networking.hostName = "Emerald"; # Define your hostname. 26 + #networking.hostName = "Emerald"; # Define your hostname. 27 27 # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. 28 28 29 29 # Configure network proxy if necessary ··· 31 31 # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 32 32 33 33 # Enable networking 34 - networking.networkmanager.enable = true; 34 + #networking.networkmanager.enable = true; 35 35 36 36 # Set your time zone. 37 - time.timeZone = "America/New_York"; 37 + # time.timeZone = "America/New_York"; 38 38 39 - # Select internationalisation properties. 40 - i18n.defaultLocale = "en_US.UTF-8"; 39 + # # Select internationalisation properties. 40 + # i18n.defaultLocale = "en_US.UTF-8"; 41 41 42 - i18n.extraLocaleSettings = { 43 - LC_ADDRESS = "en_US.UTF-8"; 44 - LC_IDENTIFICATION = "en_US.UTF-8"; 45 - LC_MEASUREMENT = "en_US.UTF-8"; 46 - LC_MONETARY = "en_US.UTF-8"; 47 - LC_NAME = "en_US.UTF-8"; 48 - LC_NUMERIC = "en_US.UTF-8"; 49 - LC_PAPER = "en_US.UTF-8"; 50 - LC_TELEPHONE = "en_US.UTF-8"; 51 - LC_TIME = "en_US.UTF-8"; 52 - }; 42 + # i18n.extraLocaleSettings = { 43 + # LC_ADDRESS = "en_US.UTF-8"; 44 + # LC_IDENTIFICATION = "en_US.UTF-8"; 45 + # LC_MEASUREMENT = "en_US.UTF-8"; 46 + # LC_MONETARY = "en_US.UTF-8"; 47 + # LC_NAME = "en_US.UTF-8"; 48 + # LC_NUMERIC = "en_US.UTF-8"; 49 + # LC_PAPER = "en_US.UTF-8"; 50 + # LC_TELEPHONE = "en_US.UTF-8"; 51 + # LC_TIME = "en_US.UTF-8"; 52 + # }; 53 53 54 54 # Enable the X11 windowing system. 55 55 # You can disable this if you're only using the Wayland session. ··· 69 69 services.printing.enable = true; 70 70 71 71 # Enable sound with pipewire. 72 - hardware.pulseaudio.enable = false; 73 - security.rtkit.enable = true; 74 - services.pipewire = { 75 - enable = true; 76 - alsa.enable = true; 77 - alsa.support32Bit = true; 78 - pulse.enable = true; 79 - # If you want to use JACK applications, uncomment this 80 - #jack.enable = true; 72 + # hardware.pulseaudio.enable = false; 73 + # security.rtkit.enable = true; 74 + # services.pipewire = { 75 + # enable = true; 76 + # alsa.enable = true; 77 + # alsa.support32Bit = true; 78 + # pulse.enable = true; 79 + # # If you want to use JACK applications, uncomment this 80 + # #jack.enable = true; 81 81 82 - # use the example session manager (no others are packaged yet so this is enabled by default, 83 - # no need to redefine it in your config for now) 84 - #media-session.enable = true; 85 - }; 82 + # # use the example session manager (no others are packaged yet so this is enabled by default, 83 + # # no need to redefine it in your config for now) 84 + # #media-session.enable = true; 85 + # }; 86 86 87 87 #services.pipewire.extraConfig.pipewire."92-low-latency" = { 88 88 # "context.properties" = { ··· 209 209 # enable = true; 210 210 # }; 211 211 212 - hardware.graphics = { 213 - enable = true; 214 - }; 212 + # hardware.graphics = { 213 + # enable = true; 214 + # }; 215 215 216 216 217 - services.xserver.videoDrivers = ["nvidia"]; 218 - hardware.nvidia = { 219 - modesetting.enable = true; 220 - powerManagement.enable = false; 221 - powerManagement.finegrained = false; 222 - open = false; 223 - nvidiaSettings = true; 217 + # services.xserver.videoDrivers = ["nvidia"]; 218 + # hardware.nvidia = { 219 + # modesetting.enable = true; 220 + # powerManagement.enable = false; 221 + # powerManagement.finegrained = false; 222 + # open = false; 223 + # nvidiaSettings = true; 224 224 225 - package = config.boot.kernelPackages.nvidiaPackages.stable; 226 - }; 225 + # package = config.boot.kernelPackages.nvidiaPackages.stable; 226 + # }; 227 227 228 - boot.supportedFilesystems = [ "ntfs" ]; 228 + # boot.supportedFilesystems = [ "ntfs" ]; 229 229 230 - fileSystems."/mnt/BiggusDiskus" = { 231 - device = "/dev/nvme0n1p2"; 232 - fsType = "ntfs-3g"; 233 - options = [ 234 - "users" 235 - "nofail" 236 - "rw" 237 - "exec" 238 - ]; 239 - }; 230 + # fileSystems."/mnt/BiggusDiskus" = { 231 + # device = "/dev/nvme0n1p2"; 232 + # fsType = "ntfs-3g"; 233 + # options = [ 234 + # "users" 235 + # "nofail" 236 + # "rw" 237 + # "exec" 238 + # ]; 239 + # }; 240 240 241 241 # hyprland 242 242 programs.hyprland.enable = true; ··· 246 246 247 247 users.defaultUserShell = pkgs.fish; 248 248 249 - virtualisation.oci-containers.containers = { 250 - "gitea" = { 251 - autoStart = true; 252 - image = "gitea/gitea"; 253 - ports = [ "32769:22" "32768:3000"]; 254 - environment = { 255 - #USER_UID = "1000"; 256 - #USER_GID = "1000"; 257 - USER = "git"; 258 - GITEA_CUSTOM = "/data/gitea"; 259 - }; 260 - volumes = [ 261 - "/home/volumes/gitea/data:/data" 262 - "/etc/timezone:/etc/timezone:ro" 263 - "/etc/localtime:/etc/localtime:ro" 264 - ]; 265 - }; 249 + # virtualisation.oci-containers.containers = { 250 + # "gitea" = { 251 + # autoStart = true; 252 + # image = "gitea/gitea"; 253 + # ports = [ "32769:22" "32768:3000"]; 254 + # environment = { 255 + # #USER_UID = "1000"; 256 + # #USER_GID = "1000"; 257 + # USER = "git"; 258 + # GITEA_CUSTOM = "/data/gitea"; 259 + # }; 260 + # volumes = [ 261 + # "/home/volumes/gitea/data:/data" 262 + # "/etc/timezone:/etc/timezone:ro" 263 + # "/etc/localtime:/etc/localtime:ro" 264 + # ]; 265 + # }; 266 266 267 267 #"freshrss" = { 268 268 # autoStart = true; ··· 273 273 #}; 274 274 275 275 276 - }; 276 + # }; 277 277 278 278 279 279 # Some programs need SUID wrappers, can be configured further or are
+21
sys/default.nix
··· 5 5 experimental-features = ["nix-command" "flakes"]; 6 6 }; 7 7 }; 8 + 9 + time.timeZone = "America/New_York"; 10 + 11 + i18n = { 12 + defaultLocale = "en_US.UTF-8"; 13 + 14 + extraLocaleSettings = { 15 + LC_ADDRESS = "en_US.UTF-8"; 16 + LC_IDENTIFICATION = "en_US.UTF-8"; 17 + LC_MEASUREMENT = "en_US.UTF-8"; 18 + LC_MONETARY = "en_US.UTF-8"; 19 + LC_NAME = "en_US.UTF-8"; 20 + LC_NUMERIC = "en_US.UTF-8"; 21 + LC_PAPER = "en_US.UTF-8"; 22 + LC_TELEPHONE = "en_US.UTF-8"; 23 + LC_TIME = "en_US.UTF-8"; 24 + 25 + }; 26 + }; 27 + 28 + boot.supportedFilesystems = [ "ntfs" ]; 8 29 }
+42 -26
sys/desktop.nix
··· 4 4 # ./hw-confs/desktop.nix 5 5 # ]; 6 6 7 - # boot.loader = { 8 - # systemd-boot.enable = true; 9 - # efi.canTouchEfiVariables = true; 10 - # }; 7 + imports = [ 8 + ./filesystems.nix 9 + ./virt.nix 10 + ]; 11 11 12 - # networking = { 13 - # hostName = "Emerald"; 14 - # networkmanager.enable = true; 15 - # }; 16 - 17 - # time.timeZone = "America/New_York"; 12 + boot.loader = { 13 + systemd-boot.enable = true; 14 + efi.canTouchEfiVariables = true; 15 + }; 18 16 19 - # i18n = { 20 - # defaultLocale = "en_US.UTF-8"; 17 + networking = { 18 + hostName = "Emerald"; 19 + networkmanager.enable = true; 20 + }; 21 21 22 - # extraLocaleSettings = { 23 - # LC_ADDRESS = "en_US.UTF-8"; 24 - # LC_IDENTIFICATION = "en_US.UTF-8"; 25 - # LC_MEASUREMENT = "en_US.UTF-8"; 26 - # LC_MONETARY = "en_US.UTF-8"; 27 - # LC_NAME = "en_US.UTF-8"; 28 - # LC_NUMERIC = "en_US.UTF-8"; 29 - # LC_PAPER = "en_US.UTF-8"; 30 - # LC_TELEPHONE = "en_US.UTF-8"; 31 - # LC_TIME = "en_US.UTF-8"; 32 - 33 - # }; 34 - # }; 22 + # pipewire 23 + hardware.pulseaudio.enable = false; 24 + security.rtkit.enable = true; 25 + services.pipewire = { 26 + enable = true; 27 + alsa.enable = true; 28 + alsa.support32Bit = true; 29 + pulse.enable = true; 30 + # If you want to use JACK applications, uncomment this 31 + #jack.enable = true; 35 32 36 - 33 + # use the example session manager (no others are packaged yet so this is enabled by default, 34 + # no need to redefine it in your config for now) 35 + #media-session.enable = true; 36 + }; 37 + 38 + hardware.graphics = { 39 + enable = true; 40 + }; 41 + 42 + services.xserver.videoDrivers = ["nvidia"]; 43 + hardware.nvidia = { 44 + modesetting.enable = true; 45 + powerManagement.enable = false; 46 + powerManagement.finegrained = false; 47 + open = false; 48 + nvidiaSettings = true; 49 + 50 + package = config.boot.kernelPackages.nvidiaPackages.stable; 51 + }; 52 + 37 53 environment.systemPackages = with pkgs; [ 38 54 figlet 39 55 lolcat
+12
sys/filesystems.nix
··· 1 + { 2 + fileSystems."/mnt/BiggusDiskus" = { 3 + device = "/dev/nvme0n1p2"; 4 + fsType = "ntfs-3g"; 5 + options = [ 6 + "users" 7 + "nofail" 8 + "rw" 9 + "exec" 10 + ]; 11 + }; 12 + }
+20
sys/virt.nix
··· 1 + { 2 + virtualisation.oci-containers.containers = { 3 + "gitea" = { 4 + autoStart = true; 5 + image = "gitea/gitea"; 6 + ports = [ "32769:22" "32768:3000"]; 7 + environment = { 8 + #USER_UID = "1000"; 9 + #USER_GID = "1000"; 10 + USER = "git"; 11 + GITEA_CUSTOM = "/data/gitea"; 12 + }; 13 + volumes = [ 14 + "/home/volumes/gitea/data:/data" 15 + "/etc/timezone:/etc/timezone:ro" 16 + "/etc/localtime:/etc/localtime:ro" 17 + ]; 18 + }; 19 + }; 20 + }