Personal NixOS flake

Initial commit

Initial Commit

ssh config

asdfjaklsdfj

fugmaaaaaa

pls

Initial Commit

authored by

Emily W and committed by m1emi1em.dev 186d9a2b

+650
+56
.gitignore
··· 1 + # ---> Nix 2 + # Ignore build outputs from performing a nix-build or `nix build` command 3 + result 4 + result-* 5 + 6 + # ---> Emacs 7 + # -*- mode: gitignore; -*- 8 + *~ 9 + \#*\# 10 + /.emacs.desktop 11 + /.emacs.desktop.lock 12 + *.elc 13 + auto-save-list 14 + tramp 15 + .\#* 16 + 17 + # Org-mode 18 + .org-id-locations 19 + *_archive 20 + 21 + # flymake-mode 22 + *_flymake.* 23 + 24 + # eshell files 25 + /eshell/history 26 + /eshell/lastdir 27 + 28 + # elpa packages 29 + /elpa/ 30 + 31 + # reftex files 32 + *.rel 33 + 34 + # AUCTeX auto folder 35 + /auto/ 36 + 37 + # cask packages 38 + .cask/ 39 + dist/ 40 + 41 + # Flycheck 42 + flycheck_*.el 43 + 44 + # server auth directory 45 + /server/ 46 + 47 + # projectiles files 48 + .projectile 49 + 50 + # directory configuration 51 + .dir-locals.el 52 + 53 + # network security 54 + /network-security.data 55 + 56 +
+5
README.md
··· 1 + # NixOS 2 + 3 + NixOS Configs 4 + 5 + Will this work do u work yet u work?
+307
configuration.nix
··· 1 + # Edit this configuration file to define what should be installed on 2 + # your system. Help is available in the configuration.nix(5) man page 3 + # and in the NixOS manual (accessible by running ‘nixos-help’). 4 + 5 + { config, lib, pkgs, ... }: 6 + 7 + { 8 + imports = 9 + [ # Include the results of the hardware scan. 10 + ./hardware-configuration.nix 11 + ]; 12 + 13 + #nix.settings.experimental-features = ["nix-command" "flakes"]; 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 + }; 20 + 21 + 22 + # Bootloader. 23 + boot.loader.systemd-boot.enable = true; 24 + boot.loader.efi.canTouchEfiVariables = true; 25 + 26 + networking.hostName = "Emerald"; # Define your hostname. 27 + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. 28 + 29 + # Configure network proxy if necessary 30 + # networking.proxy.default = "http://user:password@proxy:port/"; 31 + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 32 + 33 + # Enable networking 34 + networking.networkmanager.enable = true; 35 + 36 + # Set your time zone. 37 + time.timeZone = "America/New_York"; 38 + 39 + # Select internationalisation properties. 40 + i18n.defaultLocale = "en_US.UTF-8"; 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 + }; 53 + 54 + # Enable the X11 windowing system. 55 + # You can disable this if you're only using the Wayland session. 56 + services.xserver.enable = true; 57 + 58 + # Enable the KDE Plasma Desktop Environment. 59 + services.displayManager.sddm.enable = true; 60 + services.desktopManager.plasma6.enable = true; 61 + 62 + # Configure keymap in X11 63 + services.xserver.xkb = { 64 + layout = "us"; 65 + variant = ""; 66 + }; 67 + 68 + # Enable CUPS to print documents. 69 + services.printing.enable = true; 70 + 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; 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 + }; 86 + 87 + #services.pipewire.extraConfig.pipewire."92-low-latency" = { 88 + # "context.properties" = { 89 + #"default.clock.rate" = 48000; 90 + #"default.clock.quantum" = 2048; 91 + # "default.clock.min-quantum" = 1024; 92 + #"default.clock.max-quantum" = 2048; 93 + # }; 94 + #}; 95 + 96 + # services.pipewire.extraConfig.pipewire-pulse."92-low-latency" = { 97 + # context.modules = [ 98 + # { 99 + # name = "libpipewire-module-protocol-pulse"; 100 + # args = { 101 + # pulse.min.req = "768/48000"; 102 + # pulse.default.req = "768/48000"; 103 + # pulse.max.req = "768/48000"; 104 + # pulse.min.quantum = "768/48000"; 105 + # pulse.max.quantum = "768/48000"; 106 + # }; 107 + # } 108 + # ]; 109 + # stream.properties = { 110 + # node.latency = "768/48000"; 111 + # resample.quality = 1; 112 + # }; 113 + # }; 114 + 115 + # Containers 116 + virtualisation = { 117 + 118 + # Docker 119 + docker = { 120 + enable = true; 121 + liveRestore = false; 122 + 123 + daemon.settings = { 124 + data-root = "/docker"; 125 + }; 126 + 127 + # rootless = { 128 + # enable = true; 129 + # setSocketVariable = true; 130 + #}; 131 + 132 + }; 133 + }; 134 + 135 + # Enable touchpad support (enabled default in most desktopManager). 136 + # services.xserver.libinput.enable = true; 137 + 138 + # Define a user account. Don't forget to set a password with ‘passwd’. 139 + users.users.emily = { 140 + isNormalUser = true; 141 + description = "Emily"; 142 + extraGroups = [ "networkmanager" "wheel" "docker"]; 143 + packages = with pkgs; [ 144 + kdePackages.kate 145 + keepassxc 146 + #obsidian 147 + #vesktop 148 + #neofetch 149 + # thunderbird 150 + ]; 151 + }; 152 + 153 + # Install firefox. 154 + programs.firefox.enable = true; 155 + 156 + # Allow unfree packages 157 + nixpkgs.config.allowUnfree = true; 158 + 159 + # List packages installed in system profile. To search, run: 160 + # $ nix search wget 161 + environment.systemPackages = with pkgs; [ 162 + git 163 + wget 164 + #neovim # We explicitly install and configure neovim system-wide below 165 + bat 166 + btop 167 + htop 168 + ranger 169 + unzip 170 + tmux 171 + dua 172 + swayfx 173 + wofi 174 + just 175 + kitty 176 + p7zip 177 + # wget 178 + ]; 179 + 180 + 181 + environment.shellAliases = { 182 + nv = "nvim"; 183 + }; 184 + 185 + programs.neovim = { 186 + enable = true; 187 + configure = { 188 + customRC = '' 189 + nnoremap ; : 190 + set number 191 + set relativenumber 192 + set expandtab 193 + set shiftwidth=2 194 + ''; 195 + }; 196 + viAlias = true; 197 + vimAlias = true; 198 + defaultEditor = true; 199 + }; 200 + 201 + programs.steam = { 202 + enable = true; 203 + remotePlay.openFirewall = true; 204 + dedicatedServer.openFirewall = true; 205 + localNetworkGameTransfers.openFirewall = true; 206 + }; 207 + 208 + # hardware.opengl = { 209 + # enable = true; 210 + # }; 211 + 212 + hardware.graphics = { 213 + enable = true; 214 + }; 215 + 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; 224 + 225 + package = config.boot.kernelPackages.nvidiaPackages.stable; 226 + }; 227 + 228 + boot.supportedFilesystems = [ "ntfs" ]; 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 + }; 240 + 241 + # hyprland 242 + programs.hyprland.enable = true; 243 + 244 + # feesh 245 + programs.fish.enable = true; 246 + 247 + users.defaultUserShell = pkgs.fish; 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 + }; 266 + 267 + #"freshrss" = { 268 + # autoStart = true; 269 + # image = ""; 270 + # ports = []; 271 + # volumes = [ 272 + # ]; 273 + #}; 274 + 275 + 276 + }; 277 + 278 + 279 + # Some programs need SUID wrappers, can be configured further or are 280 + # started in user sessions. 281 + # programs.mtr.enable = true; 282 + # programs.gnupg.agent = { 283 + # enable = true; 284 + # enableSSHSupport = true; 285 + # }; 286 + 287 + # List services that you want to enable: 288 + 289 + # Enable the OpenSSH daemon. 290 + # services.openssh.enable = true; 291 + 292 + # Open ports in the firewall. 293 + # networking.firewall.allowedTCPPorts = [ ... ]; 294 + # networking.firewall.allowedUDPPorts = [ ... ]; 295 + # Or disable the firewall altogether. 296 + #networking.firewall.enable = false; 297 + 298 + # This value determines the NixOS release from which the default 299 + # settings for stateful data, like file locations and database versions 300 + # on your system were taken. It‘s perfectly fine and recommended to leave 301 + # this value at the release version of the first install of this system. 302 + # Before changing this value read the documentation for this option 303 + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 304 + system.stateVersion = "24.05"; # Did you read the comment? 305 + 306 + 307 + }
+66
flake.lock
··· 1 + { 2 + "nodes": { 3 + "home-manager": { 4 + "inputs": { 5 + "nixpkgs": [ 6 + "nixpkgs" 7 + ] 8 + }, 9 + "locked": { 10 + "lastModified": 1735344290, 11 + "narHash": "sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM=", 12 + "owner": "nix-community", 13 + "repo": "home-manager", 14 + "rev": "613691f285dad87694c2ba1c9e6298d04736292d", 15 + "type": "github" 16 + }, 17 + "original": { 18 + "owner": "nix-community", 19 + "ref": "release-24.11", 20 + "repo": "home-manager", 21 + "type": "github" 22 + } 23 + }, 24 + "nixpkgs": { 25 + "locked": { 26 + "lastModified": 1735669367, 27 + "narHash": "sha256-tfYRbFhMOnYaM4ippqqid3BaLOXoFNdImrfBfCp4zn0=", 28 + "owner": "NixOS", 29 + "repo": "nixpkgs", 30 + "rev": "edf04b75c13c2ac0e54df5ec5c543e300f76f1c9", 31 + "type": "github" 32 + }, 33 + "original": { 34 + "owner": "NixOS", 35 + "ref": "nixos-24.11", 36 + "repo": "nixpkgs", 37 + "type": "github" 38 + } 39 + }, 40 + "nixpkgs-unstable": { 41 + "locked": { 42 + "lastModified": 1735471104, 43 + "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", 44 + "owner": "NixOS", 45 + "repo": "nixpkgs", 46 + "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", 47 + "type": "github" 48 + }, 49 + "original": { 50 + "owner": "NixOS", 51 + "ref": "nixos-unstable", 52 + "repo": "nixpkgs", 53 + "type": "github" 54 + } 55 + }, 56 + "root": { 57 + "inputs": { 58 + "home-manager": "home-manager", 59 + "nixpkgs": "nixpkgs", 60 + "nixpkgs-unstable": "nixpkgs-unstable" 61 + } 62 + } 63 + }, 64 + "root": "root", 65 + "version": 7 66 + }
+55
flake.nix
··· 1 + { 2 + description = "m1emi1em NixOS Flake"; 3 + 4 + inputs = { 5 + # NixOS official package source, using the nixos-24.11 branch here 6 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; 7 + 8 + # Unstable package sources 9 + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; 10 + 11 + # home-manager 12 + home-manager = { 13 + url = "github:nix-community/home-manager/release-24.11"; 14 + inputs.nixpkgs.follows = "nixpkgs"; 15 + }; 16 + 17 + 18 + }; 19 + 20 + outputs = { self, nixpkgs, home-manager, nixpkgs-unstable, ... }@inputs: 21 + let 22 + system = "x86_64-linux"; 23 + #pkgs-unstable = nixpkgs-unstable.legacyPackages.${system}; 24 + pkgs-unstable = import nixpkgs-unstable {inherit system; config.allowUnfree = true; }; 25 + in 26 + { 27 + # Please replace my-nixos with your hostname 28 + nixosConfigurations.Emerald = nixpkgs.lib.nixosSystem { 29 + #system = "x86_64-linux"; 30 + inherit system; 31 + modules = [ 32 + # Import the previous configuration.nix we used, 33 + # so the old configuration file still takes effect 34 + ./configuration.nix 35 + 36 + # home-manager 37 + home-manager.nixosModules.home-manager 38 + { 39 + 40 + home-manager.useGlobalPkgs = true; 41 + home-manager.useUserPackages = true; 42 + 43 + # Shenanigans for unstable packages 44 + home-manager.extraSpecialArgs = { inherit pkgs-unstable; }; 45 + 46 + 47 + # Personal account 48 + home-manager.users.emily = import ./home.nix; 49 + } 50 + 51 + ]; 52 + 53 + }; 54 + }; 55 + }
+46
hardware-configuration.nix
··· 1 + # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 + # and may be overwritten by future invocations. Please make changes 3 + # to /etc/nixos/configuration.nix instead. 4 + { config, lib, pkgs, modulesPath, ... }: 5 + 6 + { 7 + imports = 8 + [ (modulesPath + "/installer/scan/not-detected.nix") 9 + ]; 10 + 11 + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; 12 + boot.initrd.kernelModules = [ ]; 13 + boot.kernelModules = [ "kvm-amd" ]; 14 + boot.extraModulePackages = [ ]; 15 + 16 + fileSystems."/" = 17 + { device = "/dev/disk/by-uuid/d829208c-2a56-4e8d-ac6c-53344ed2472f"; 18 + fsType = "ext4"; 19 + }; 20 + 21 + fileSystems."/boot" = 22 + { device = "/dev/disk/by-uuid/B017-9D17"; 23 + fsType = "vfat"; 24 + options = [ "fmask=0077" "dmask=0077" ]; 25 + }; 26 + 27 + fileSystems."/home" = 28 + { device = "/dev/disk/by-uuid/bb4ef7d8-b0a3-4dff-80bf-e90669e57ecc"; 29 + fsType = "ext4"; 30 + }; 31 + 32 + swapDevices = 33 + [ { device = "/dev/disk/by-uuid/6dae0a56-ce8b-4661-b10a-b72814cfe58b"; } 34 + ]; 35 + 36 + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 37 + # (the default) this is the recommended approach. When using systemd-networkd it's 38 + # still possible to use this option, but it's recommended to use it in conjunction 39 + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 40 + networking.useDHCP = lib.mkDefault true; 41 + # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; 42 + # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; 43 + 44 + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 45 + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 46 + }
+115
home.nix
··· 1 + {config, pkgs, pkgs-unstable, ...} : 2 + let 3 + stablePackages = with pkgs; [ 4 + hyfetch 5 + emacs 6 + steam 7 + mpv 8 + discord 9 + vesktop 10 + keepassxc 11 + prismlauncher 12 + signal-desktop 13 + duf 14 + ]; 15 + unstablePackages = with pkgs-unstable; [ 16 + obsidian 17 + alacritty 18 + leiningen 19 + babashka 20 + lutris 21 + pfetch 22 + ghostty 23 + yazi 24 + godot_4 25 + ]; 26 + in 27 + { 28 + home.username = "emily"; 29 + home.homeDirectory = "/home/emily"; 30 + 31 + # Stable packages 32 + home.packages = stablePackages ++ unstablePackages; 33 + 34 + nixpkgs.config.packageOverrides = pkgs: { 35 + steam = pkgs.steam.override { 36 + extraPkgs = pkgs: with pkgs; [ 37 + xorg.libXcursor 38 + xorg.libXi 39 + xorg.libXinerama 40 + xorg.libXScrnSaver 41 + libpng 42 + libpulseaudio 43 + libvorbis 44 + stdenv.cc.cc.lib 45 + libkrb5 46 + keyutils 47 + ]; 48 + }; 49 + }; 50 + 51 + 52 + 53 + #programs.firefox = { 54 + # enable = true; 55 + # policies = { 56 + # "SearchSuggestEnabled" = false; 57 + # }; 58 + #} 59 + 60 + # Unstable packages 61 + #home.packages = with nixpkgs-unstable; [ 62 + # obsidian 63 + #]; 64 + 65 + 66 + #programs.bash = { 67 + # shellAliases = { 68 + # nv = "nvim"; 69 + # }; 70 + #}; 71 + programs.bash.enable = true; 72 + programs.fish = { 73 + enable = true; 74 + plugins = [ 75 + { name = "pure"; src = pkgs.fishPlugins.pure.src; } 76 + ]; 77 + }; 78 + 79 + 80 + home.shellAliases = { 81 + nv = "nvim"; 82 + }; 83 + 84 + home.sessionVariables = { 85 + #PF_INFO = "ascii title os kernel pkgs uptime shell editor wm palette"; 86 + PF_INFO="ascii title os kernel pkgs shell editor wm palette"; 87 + }; 88 + 89 + programs.ssh = { 90 + enable = true; 91 + includes = [ "~/.config/ssh/config" ]; 92 + #matchBlocks = { 93 + # "m1-gitea" = { 94 + # hostname = "localhost"; 95 + # user = "git"; 96 + # port = "32769"; 97 + # identitiesOnly = true; 98 + # identityFile = "~/.ssh/id_m1_gh"; 99 + 100 + # }; 101 + #9}; 102 + }; 103 + 104 + 105 + # home.programs.steam = { 106 + # enable = true; 107 + # remotePlay.openFirewall = true; 108 + # dedicatedServer.openFirewall = true; 109 + # localNetworkGameTransfers.openFirewall = true; 110 + # }; 111 + 112 + 113 + home.stateVersion = "24.11"; 114 + programs.home-manager.enable = true; 115 + }