my nixos config
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

initial commit lets add all the files i guess

chfour 655cf742

+574
+65
flake.lock
··· 1 + { 2 + "nodes": { 3 + "home-manager": { 4 + "inputs": { 5 + "nixpkgs": [ 6 + "nixpkgs" 7 + ] 8 + }, 9 + "locked": { 10 + "lastModified": 1693187908, 11 + "narHash": "sha256-cTcNpsqi1llmUFl9bmCdD0mTyfjhBrNFPhu2W12WXzA=", 12 + "owner": "nix-community", 13 + "repo": "home-manager", 14 + "rev": "8bde7a651b94ba30bd0baaa9c4a08aae88cc2e92", 15 + "type": "github" 16 + }, 17 + "original": { 18 + "owner": "nix-community", 19 + "repo": "home-manager", 20 + "type": "github" 21 + } 22 + }, 23 + "nixos-hardware": { 24 + "locked": { 25 + "lastModified": 1692952286, 26 + "narHash": "sha256-TsrtPv3+Q1KR0avZxpiJH+b6fX/R/hEQVHbjl1ebotY=", 27 + "owner": "NixOS", 28 + "repo": "nixos-hardware", 29 + "rev": "817e297fc3352fadc15f2c5306909aa9192d7d97", 30 + "type": "github" 31 + }, 32 + "original": { 33 + "owner": "NixOS", 34 + "ref": "master", 35 + "repo": "nixos-hardware", 36 + "type": "github" 37 + } 38 + }, 39 + "nixpkgs": { 40 + "locked": { 41 + "lastModified": 1693158576, 42 + "narHash": "sha256-aRTTXkYvhXosGx535iAFUaoFboUrZSYb1Ooih/auGp0=", 43 + "owner": "NixOS", 44 + "repo": "nixpkgs", 45 + "rev": "a999c1cc0c9eb2095729d5aa03e0d8f7ed256780", 46 + "type": "github" 47 + }, 48 + "original": { 49 + "owner": "NixOS", 50 + "ref": "nixos-unstable", 51 + "repo": "nixpkgs", 52 + "type": "github" 53 + } 54 + }, 55 + "root": { 56 + "inputs": { 57 + "home-manager": "home-manager", 58 + "nixos-hardware": "nixos-hardware", 59 + "nixpkgs": "nixpkgs" 60 + } 61 + } 62 + }, 63 + "root": "root", 64 + "version": 7 65 + }
+36
flake.nix
··· 1 + { 2 + inputs = { 3 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 4 + 5 + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; 6 + home-manager = { 7 + url = "github:nix-community/home-manager"; 8 + inputs.nixpkgs.follows = "nixpkgs"; 9 + }; 10 + }; 11 + 12 + outputs = { self, nixpkgs, nixos-hardware, home-manager, ... }: { 13 + nixosModules = { 14 + declarativeHome = { ... }: { 15 + # big thank you to https://determinate.systems/posts/declarative-gnome-configuration-with-nixos !!! 16 + imports = [ home-manager.nixosModules.home-manager ]; 17 + config = { 18 + home-manager.useGlobalPkgs = true; 19 + home-manager.useUserPackages = true; 20 + }; 21 + }; 22 + # theres probably a better way to do this lol 23 + overlays = ./overlays; 24 + }; 25 + nixosConfigurations."foxbox" = nixpkgs.lib.nixosSystem { 26 + system = "x86_64-linux"; 27 + modules = with self.nixosModules; [ 28 + overlays 29 + ./machines/foxbox 30 + nixos-hardware.nixosModules.lenovo-thinkpad-e14-intel 31 + declarativeHome 32 + ./users/chfour 33 + ]; 34 + }; 35 + }; 36 + }
+169
machines/foxbox/default.nix
··· 1 + { config, pkgs, ... }: 2 + 3 + { 4 + imports = [ 5 + ./hardware.nix 6 + ]; 7 + 8 + networking.hostName = "foxbox"; 9 + 10 + nixpkgs.config.allowUnfree = true; 11 + nix.settings = { 12 + experimental-features = [ "nix-command" "flakes" ]; 13 + auto-optimise-store = true; 14 + }; 15 + 16 + boot.loader.systemd-boot.enable = true; 17 + boot.loader.efi.canTouchEfiVariables = true; 18 + 19 + boot.kernelPackages = pkgs.linuxPackages_latest; 20 + 21 + time.timeZone = "Europe/Warsaw"; 22 + i18n.defaultLocale = "en_US.UTF-8"; 23 + i18n.extraLocaleSettings = { 24 + LC_ADDRESS = "C.UTF-8"; 25 + LC_IDENTIFICATION = "C.UTF-8"; 26 + LC_MEASUREMENT = "C.UTF-8"; 27 + LC_MONETARY = "C.UTF-8"; 28 + LC_NAME = "C.UTF-8"; 29 + LC_NUMERIC = "C.UTF-8"; 30 + LC_PAPER = "C.UTF-8"; 31 + LC_TELEPHONE = "C.UTF-8"; 32 + LC_TIME = "C.UTF-8"; 33 + }; 34 + services.xserver = { 35 + layout = "pl"; 36 + xkbVariant = ""; 37 + }; 38 + console.keyMap = "pl2"; 39 + 40 + programs.zsh = { 41 + enable = true; 42 + ohMyZsh = { 43 + enable = true; 44 + plugins = [ "git" "fzf" "colored-man-pages" ]; 45 + theme = "af-magic"; 46 + customPkgs = with pkgs; [ 47 + nix-zsh-completions 48 + ]; 49 + }; 50 + }; 51 + environment.shells = with pkgs; [ zsh ]; 52 + 53 + programs.steam.enable = true; 54 + 55 + programs.gnupg.agent = { 56 + enable = true; 57 + enableSSHSupport = true; 58 + }; 59 + 60 + hardware.rtl-sdr.enable = true; 61 + 62 + programs.adb.enable = true; 63 + 64 + #services.flatpak.enable = true; # ugh 65 + 66 + environment.systemPackages = with pkgs; [ 67 + micro wl-clipboard 68 + curlHTTP3 69 + wget fzf 70 + cnping # this has to be here because security.wrappers.* 71 + htop 72 + 73 + pinentry-curses # gnupg weirdness 74 + virt-manager 75 + wine 76 + ]; 77 + 78 + #programs.cnping.enable = true; # so that does not, in fact, work 79 + security.wrappers.cnping = { 80 + source = "${pkgs.cnping}/bin/cnping"; 81 + owner = "root"; group = "root"; 82 + capabilities = "cap_net_raw+ep"; 83 + }; 84 + 85 + fonts = { 86 + packages = with pkgs; [ 87 + noto-fonts 88 + liberation_ttf 89 + terminus_font 90 + terminus_font_ttf 91 + fira 92 + unifont 93 + twitter-color-emoji # the non-svg variant cuz that didnt work 94 + ]; 95 + fontconfig.defaultFonts = { 96 + # wow this is so much simpler than on arch holy shit 97 + emoji = [ "Twitter Color Emoji" ]; 98 + }; 99 + }; 100 + 101 + environment.variables = { 102 + # teehee 103 + SUDO_PROMPT = "[sudo] programming socks required beyond this point: "; 104 + }; 105 + 106 + 107 + services.xserver.enable = true; 108 + 109 + services.xserver.displayManager.gdm.enable = true; 110 + services.xserver.desktopManager.gnome = { 111 + enable = true; 112 + extraGSettingsOverrides = '' 113 + # hell naw to automount and autorun 114 + # (like ???what this isnt windows) 115 + [org.gnome.desktop.media-handling] 116 + automount=false 117 + automount-open=false 118 + autorun-never=true 119 + 120 + # exclude node_modules from tracker 121 + # seriously DID MAKING IT A DOT-DIR 122 + # NEVER COME ACROSS THEIR MINDS CMON 123 + [org.freedesktop.Tracker.Miner.Files] 124 + ignored-directories-with-content='node_modules' 125 + ''; 126 + extraGSettingsOverridePackages = with pkgs; [ 127 + gnome.gnome-shell 128 + tracker-miners 129 + ]; 130 + }; 131 + environment.gnome.excludePackages = with pkgs; [ 132 + gnome.geary gnome-tour gnome.gnome-contacts 133 + gnome.gnome-music gnome-photos 134 + gnome-console # important!! bring your own terminal emulator 135 + ]; 136 + 137 + services.printing = { 138 + enable = true; 139 + drivers = with pkgs; [ hplip ]; 140 + }; 141 + services.avahi.enable = true; 142 + services.avahi.nssmdns = true; 143 + 144 + sound.enable = true; 145 + hardware.pulseaudio.enable = false; 146 + security.rtkit.enable = true; 147 + services.pipewire = { 148 + enable = true; 149 + alsa.enable = true; 150 + alsa.support32Bit = true; 151 + pulse.enable = true; 152 + #jack.enable = true; 153 + wireplumber.enable = true; 154 + }; 155 + 156 + networking.networkmanager.enable = true; 157 + 158 + virtualisation.libvirtd = { 159 + enable = true; 160 + #qemu.runAsRoot = false; 161 + #qemu.swtpm.enable = true; 162 + }; 163 + virtualisation.spiceUSBRedirection.enable = true; # right. 164 + 165 + # :nerd: :nerd: 166 + networking.firewall.enable = false; 167 + 168 + system.stateVersion = "23.05"; 169 + }
+55
machines/foxbox/hardware.nix
··· 1 + { config, lib, pkgs, modulesPath, ... }: 2 + 3 + { 4 + imports = [ 5 + (modulesPath + "/installer/scan/not-detected.nix") 6 + ]; 7 + 8 + systemd.services."touchpad-fix" = rec { 9 + after = [ "post-resume.target" ]; 10 + wantedBy = after; 11 + script = "${pkgs.kmod}/bin/modprobe -r psmouse && ${pkgs.kmod}/bin/modprobe psmouse"; 12 + }; 13 + 14 + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 15 + 16 + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 17 + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 18 + 19 + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; 20 + boot.initrd.kernelModules = [ ]; 21 + boot.kernelModules = [ "kvm-intel" ]; 22 + boot.extraModulePackages = [ ]; 23 + 24 + fileSystems."/" = { 25 + device = "/dev/disk/by-uuid/46f61b03-25b1-4ca0-9c88-43afa655b053"; 26 + fsType = "ext4"; 27 + }; 28 + 29 + fileSystems."/boot" = { 30 + device = "/dev/disk/by-uuid/4C67-853B"; 31 + fsType = "vfat"; 32 + }; 33 + 34 + fileSystems."/home" = { 35 + device = "/dev/disk/by-uuid/ecaee476-5e34-45a7-9c35-a219272e53e0"; 36 + fsType = "ext4"; 37 + }; 38 + 39 + fileSystems."/tmp" = { 40 + device = "none"; 41 + fsType = "tmpfs"; 42 + options = [ "defaults" "size=2G" "mode=777" ]; 43 + }; 44 + 45 + swapDevices = [ 46 + { device = "/dev/disk/by-uuid/3279a9f7-efc9-4af3-8c94-92c53cb9bf1f"; } 47 + ]; 48 + 49 + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 50 + # (the default) this is the recommended approach. When using systemd-networkd it's 51 + # still possible to use this option, but it's recommended to use it in conjunction 52 + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 53 + networking.useDHCP = lib.mkDefault true; 54 + 55 + }
+49
overlays/default.nix
··· 1 + { lib, pkgs, ... }: 2 + 3 + { 4 + nixpkgs.overlays = [ 5 + (self: super: { 6 + sdrpp = super.sdrpp.overrideAttrs (old: { 7 + src = super.fetchFromGitHub { 8 + owner = "AlexandreRouma"; 9 + repo = "SDRPlusPlus"; 10 + rev = "15ad065feb4052a711181ae7fc8e82e8d119e4df"; 11 + hash = "sha256-ewjDMbHbsRIV9pn3cvNb0ccF36nVOzwES1oBphlDxkA="; 12 + }; 13 + buildInputs = old.buildInputs ++ (with pkgs; [ zstd ]); 14 + }); 15 + }) 16 + (self: super: { 17 + sdrpp = super.sdrpp.override { weather_sat_decoder = false; }; 18 + }) 19 + (self: super: { 20 + cnping = super.cnping.overrideAttrs (old: { 21 + version = "unstable-2023-05-11"; 22 + src = super.fetchFromGitHub { 23 + owner = "cntools"; 24 + repo = "cnping"; 25 + rev = "f62db84a5dbc049c0b19c7eba72bb3f8b76cb3f7"; 26 + sha256 = "sha256-lp/d4NPhstf0fg0uDx7Q5jSKoz/ikY7BYnIU6+a/OGI="; 27 + fetchSubmodules = true; 28 + }; 29 + }); 30 + }) 31 + #(self: super: { 32 + # # so that's broken, let's revert it to the version in 23.05 33 + # python3 = super.python3.override { 34 + # packageOverrides = pyself: pysuper: { 35 + # debugpy = pysuper.debugpy.overridePythonAttrs (old: rec { 36 + # version = "1.6.7"; 37 + # src = super.fetchFromGitHub { 38 + # owner = "microsoft"; 39 + # repo = "debugpy"; 40 + # rev = "refs/tags/v${version}"; 41 + # hash = "sha256-porQTFvcLaIkvhWPM4vWR0ohlcFRkRwSLpQJNg25Tj4="; 42 + # }; 43 + # }); 44 + # }; 45 + # }; 46 + # #python310Packages = super.recurseIntoAttrs (python310.pkgs); 47 + #}) 48 + ]; 49 + }
+12
users/chfour/default.nix
··· 1 + { config, pkgs, ... }: 2 + 3 + { 4 + home-manager.users.chfour = ./home.nix; 5 + 6 + users.users.chfour = { 7 + isNormalUser = true; 8 + description = "chfour"; 9 + shell = pkgs.zsh; 10 + extraGroups = [ "networkmanager" "wheel" "plugdev" "dialout" "adbusers" ]; 11 + }; 12 + }
+98
users/chfour/env-gnome.nix
··· 1 + { pkgs, lib, ... }: 2 + 3 + { 4 + dconf.settings = { 5 + # extension prefs 6 + "org/gnome/shell" = { 7 + disable-user-extensions = false; 8 + enabled-extensions = [ 9 + "appindicatorsupport@rgcjonas.gmail.com" 10 + "runcat@kolesnikov.se" # run lil fella!!! also features eepy 11 + "blur-my-shell@aunetx" # blur pretty,, pretty blur .................. 12 + ]; 13 + }; 14 + 15 + "org/gnome/shell/extensions/runcat" = { 16 + idle-threshold = 5; # give them some eepy time 17 + }; 18 + "org/gnome/shell/extensions/blur-my-shell" = { 19 + brightness = 1.0; 20 + color-and-noise = false; # performance very yes 21 + hacks-level = 0; # "highest performance" option 22 + }; 23 + 24 + # set the theme 25 + "org/gnome/desktop/interface" = { 26 + color-scheme = "prefer-dark"; 27 + gtk-theme = "Adwaita-dark"; 28 + }; 29 + 30 + # enable minimize, maximize buttons 31 + "org/gnome/desktop/wm/preferences" = { 32 + button-layout=":appmenu,minimize,close"; 33 + }; 34 + 35 + # wm tweaks 36 + "org/gnome/mutter" = { 37 + edge-tiling = true; 38 + dynamic-workspaces = true; 39 + }; 40 + "org/gnome/desktop/wm/preferences" = { 41 + resize-with-right-button = true; 42 + }; 43 + "org/gnome/desktop/interface" = { 44 + enable-hot-corners = true; 45 + }; 46 + 47 + # input 48 + "org/gnome/desktop/peripherals/touchpad" = { 49 + tap-to-click = true; 50 + natural-scroll = false; 51 + }; 52 + "org/gnome/desktop/peripherals/mouse" = { 53 + accel-profile = "flat"; 54 + speed = 0.22; 55 + }; 56 + "org/gnome/desktop/input-sources" = { 57 + # set the compose key to scrollock 58 + # i have no idea what the terminate: thing does 59 + # pressing it doesn't seem to do anything 60 + xkb-options = ["terminate:ctrl_alt_bksp" "lv3:ralt_switch" "compose:sclk"]; 61 + }; 62 + 63 + # shortcuts 64 + "org/gnome/settings-daemon/plugins/media-keys" = { 65 + home = [ "<Super>e" ]; 66 + custom-keybindings = [ 67 + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" 68 + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/" 69 + ]; 70 + }; 71 + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = rec { 72 + name = command; 73 + binding = "<Super>Return"; 74 + command = "gnome-terminal"; 75 + }; 76 + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = rec { 77 + name = command; 78 + binding = "<Super>period"; 79 + command = "gnome-characters"; 80 + }; 81 + }; 82 + 83 + gtk = { 84 + enable = true; 85 + cursorTheme = { 86 + name = "Vanilla-DMZ"; 87 + package = pkgs.vanilla-dmz; 88 + }; 89 + }; 90 + 91 + home.packages = with pkgs; [ 92 + gnome.gnome-terminal 93 + #blackbox-terminal # this thing keeps crashing and has generally started to piss me off 94 + gnomeExtensions.appindicator 95 + gnomeExtensions.runcat 96 + gnomeExtensions.blur-my-shell 97 + ]; 98 + }
+90
users/chfour/home.nix
··· 1 + { pkgs, lib, osConfig, config, ... }: 2 + 3 + { 4 + # kinda ugly 5 + imports = (if osConfig.services.xserver.desktopManager.gnome.enable then [ ./env-gnome.nix ] else []); 6 + 7 + home.username = "chfour"; 8 + home.homeDirectory = "/home/chfour"; 9 + 10 + 11 + programs.git = { 12 + enable = true; 13 + 14 + userName = "chfour"; 15 + userEmail = "chfourchfour@protonmail.com"; 16 + 17 + signing.signByDefault = true; 18 + signing.key = "BD2EC4C0608DED53"; 19 + 20 + extraConfig = { 21 + commit.verbose = true; 22 + init.defaultBranch = "main"; 23 + }; 24 + }; 25 + 26 + programs.vscode = { 27 + enable = true; 28 + package = pkgs.vscodium; 29 + 30 + extensions = with pkgs.vscode-extensions; [ 31 + jnoortheen.nix-ide 32 + #ms-python.python # DEBUGPY WHY MUST YOU BE SO *STUPID* 33 + ]; 34 + 35 + userSettings = { 36 + "editor.fontFamily" = "\'Terminus (TTF)\', \'Droid Sans Mono\', \'monospace\', monospace"; 37 + "editor.fontSize" = 16; 38 + "workbench.colorTheme" = "Monokai"; 39 + "editor.cursorBlinking" = "phase"; 40 + }; 41 + }; 42 + 43 + xdg.userDirs.enable = true; 44 + 45 + services.mpd = { 46 + enable = true; 47 + network.startWhenNeeded = true; 48 + 49 + # holy shit :sob: 50 + extraConfig = '' 51 + ${lib.strings.optionalString osConfig.services.pipewire.enable ''audio_output { 52 + type "pipewire" 53 + name "PipeWire" 54 + }''} 55 + ''; 56 + }; 57 + 58 + home.packages = with pkgs; [ 59 + tree file usbutils pciutils 60 + 61 + firefox 62 + keepassxc 63 + (discord-canary.override { 64 + withOpenASAR = true; 65 + }) 66 + helvum 67 + inkscape gimp 68 + obs-studio 69 + prismlauncher 70 + #cnping 71 + beets yt-dlp 72 + mat2 73 + 74 + btop 75 + git jq 76 + hyfetch 77 + ffmpeg imagemagick 78 + mpv sox 79 + sqlite-interactive 80 + platformio 81 + 82 + sdrpp 83 + rtl-sdr 84 + gpredict 85 + #chirp # lol lmao 86 + ] ++ (if config.services.mpd.enable then [ pkgs.mpdevil ] else []); 87 + 88 + programs.home-manager.enable = true; 89 + home.stateVersion = "23.05"; 90 + }