NixOS + home-manager configs, mirrored from GitLab SaaS. gitlab.com/andreijiroh-dev/nixops-config
nix-flake nixos home-manager nixpkgs nix-flakes
1
fork

Configure Feed

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

chore: setup new NixOS desktop config + cleanup labels

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.dev>

+266 -14
+3 -3
flake.lock
··· 153 153 ] 154 154 }, 155 155 "locked": { 156 - "lastModified": 1758853693, 157 - "narHash": "sha256-Gzrt0dOF9oQvQLTi3bke9HKY7Fv8ZGrjAvgEN58KKgU=", 156 + "lastModified": 1758899649, 157 + "narHash": "sha256-Z6IxPlvIS83lKbTIliP2xFj4hJ699/eM7Ubte4iytgQ=", 158 158 "owner": "nix-community", 159 159 "repo": "home-manager", 160 - "rev": "c1a47eae05fb93788d3e3a7f1e63d7fc34d60c63", 160 + "rev": "6238bbc0ae04951b64a3ad1b69d3e03b8b329e51", 161 161 "type": "github" 162 162 }, 163 163 "original": {
+18
flake.nix
··· 106 106 }; 107 107 }; 108 108 109 + lairland = nixpkgs.lib.nixosSystem { 110 + system = "x86_64-linux"; 111 + modules = [ 112 + ./hosts/lairland/configuration.nix 113 + # load Determinate Nix and the rest 114 + determinate.nixosModules.default 115 + home-manager.nixosModules.home-manager 116 + vscode-server.nixosModules.default 117 + nix-ld.nixosModules.nix-ld 118 + 119 + # one-liners? 120 + { programs.nix-ld.dev.enable = true; } 121 + ]; 122 + specialArgs = { 123 + zen-browser = zen-browser; 124 + }; 125 + }; 126 + 109 127 stellapent-cier = nixpkgs.lib.nixosSystem { 110 128 # for some reason, zen-browser needs to be imported before nixos-hardware 111 129 # otherwise, it fails to build with some missing dependencies
+134
hosts/lairland/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 + { 6 + self, 7 + config, 8 + pkgs, 9 + lib, 10 + ... 11 + }: 12 + let 13 + baseHostsFile = 14 + with import ../../shared/hosts-file.nix; 15 + { 16 + "127.0.0.1" = localhost ++ [ 17 + "lairland.local" 18 + "lairland.tailnet 19 + ] 20 + } // localNetwork.halilifam; 21 + 22 + # tailnet, blocking ads via blackholing to 0.0.0.0, etc. 23 + extraHosts = with import ../../shared/hosts-file.nix; tailnet; 24 + 25 + # them merge them all together 26 + hostsFile = baseHostsFile // extraHosts; 27 + in 28 + { 29 + imports = 30 + [ # Include the results of the hardware scan. 31 + ./hardware-configuration.nix 32 + ../../shared/meta.nix 33 + ../../shared/desktop/base.nix 34 + ../../shared/desktop/kde-plasma.nix 35 + ../../shared/server/ssh.nix 36 + ../../shared/server/tailscale.nix 37 + ../../shared/server/devenv.nix 38 + ../../shared/server/cockpit.nix 39 + ]; 40 + 41 + # Bootloader. 42 + boot.loader.systemd-boot.enable = true; 43 + boot.loader.efi.canTouchEfiVariables = true; 44 + 45 + # Use latest kernel. 46 + boot.kernelPackages = pkgs.linuxPackages_latest; 47 + 48 + networking = { 49 + hosts = hostsFile; 50 + hostName = "lairland"; 51 + networkmanager.enable = true; 52 + }; 53 + 54 + # Configure network proxy if necessary 55 + # networking.proxy.default = "http://user:password@proxy:port/"; 56 + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 57 + 58 + # Enable the X11 windowing system. 59 + # You can disable this if you're only using the Wayland session. 60 + services.xserver.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 + services.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 + # Enable touchpad support (enabled default in most desktopManager). 88 + # services.xserver.libinput.enable = true; 89 + 90 + security.rtkit.enable = true; 91 + services.pipewire = { 92 + enable = true; 93 + alsa.enable = true; 94 + alsa.support32Bit = true; 95 + pulse.enable = true; 96 + # If you want to use JACK applications, uncomment this 97 + #jack.enable = true; 98 + 99 + # use the example session manager (no others are packaged yet so this is enabled by default, 100 + # no need to redefine it in your config for now) 101 + #media-session.enable = true; 102 + }; 103 + 104 + # Define a user account. Don't forget to set a password with ‘passwd’. 105 + users.users.ajhalili2006 = { 106 + isNormalUser = true; 107 + description = "Andrei Jiroh Halili"; 108 + extraGroups = [ 109 + "networkmanager" 110 + "wheel" 111 + "docker" 112 + ]; 113 + openssh.authorizedKeys.keys = with import ../../shared/ssh-keys.nix; [ 114 + personal.y2022 115 + personal.passwordless 116 + work.recaptime-dev.crew 117 + rp.gildedguy 118 + ]; 119 + linger = true; 120 + }; 121 + 122 + # home-manager 123 + home-manager.users.gildedguy = import ./users/ajhalili2006.nix; 124 + 125 + # Some programs need SUID wrappers, can be configured further or are 126 + # started in user sessions. 127 + # programs.mtr.enable = true; 128 + # programs.gnupg.agent = { 129 + # enable = true; 130 + # enableSSHSupport = true; 131 + # }; 132 + 133 + ervices.xserver.videoDrivers = [ "nvidia" ]; 134 + }
+51
hosts/lairland/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 = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "uas" "sd_mod" "sr_mod" ]; 12 + boot.initrd.kernelModules = [ ]; 13 + boot.kernelModules = [ "kvm-intel" ]; 14 + boot.extraModulePackages = [ ]; 15 + 16 + fileSystems."/" = 17 + { device = "/dev/disk/by-uuid/93d4a464-80bb-43ad-909a-61556ca2ac2e"; 18 + fsType = "ext4"; 19 + }; 20 + 21 + fileSystems."/boot" = 22 + { device = "/dev/disk/by-uuid/1AB1-2566"; 23 + fsType = "vfat"; 24 + options = [ "fmask=0077" "dmask=0077" ]; 25 + }; 26 + 27 + fileSystems."/home" = 28 + { device = "/dev/disk/by-uuid/d9e01375-ed14-4c4d-bfaf-a7eab47dfef5"; 29 + fsType = "ext4"; 30 + }; 31 + 32 + fileSystems."/workspaces" = 33 + { device = "/dev/disk/by-uuid/3d45f467-8f59-4664-9d84-05b871c2d801"; 34 + fsType = "ext4"; 35 + }; 36 + 37 + swapDevices = [ ]; 38 + 39 + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 40 + # (the default) this is the recommended approach. When using systemd-networkd it's 41 + # still possible to use this option, but it's recommended to use it in conjunction 42 + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 43 + networking.useDHCP = lib.mkDefault true; 44 + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; 45 + # networking.interfaces.eno2.useDHCP = lib.mkDefault true; 46 + # networking.interfaces.enp0s20f0u11.useDHCP = lib.mkDefault true; 47 + # networking.interfaces.wlp0s20f0u9.useDHCP = lib.mkDefault true; 48 + 49 + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 50 + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 51 + }
+10
hosts/lairland/users/ajhalili2006.nix
··· 1 + { config, pkgs, lib, ... }: 2 + 3 + { 4 + imports = [ 5 + ../../../shared/home-manager/main.nix 6 + ]; 7 + 8 + home.username = "ajhalili2006"; 9 + home.homeDirectory = "/home/ajhalili2006"; 10 + }
+48 -5
hosts/stellapent-cier/configuration.nix
··· 56 56 # Use latest kernel. 57 57 boot.kernelPackages = pkgs.linuxPackages_latest; 58 58 59 + # portable setup 60 + boot.initrd.kernelModules = [ "usb_storage" ]; 61 + boot.initrd.preDeviceCommands = '' 62 + check_root_device() { 63 + ROOT_UUID="09170382-8b7e-47cc-8fde-d9035039b785" 64 + 65 + # 'test -e' checks if the file/device node exists 66 + if test -e "/dev/disk/by-uuid/$ROOT_UUID"; then 67 + return 0 # Success 68 + else 69 + return 1 # Failure 70 + fi 71 + } 72 + 73 + found() { 74 + echo "Device found, continuing boot..." 75 + exit 0 76 + } 77 + 78 + if ! check_root_device; then 79 + echo "Root device not found, retrying in 5 seconds..." 80 + sleep 5 81 + else 82 + found 83 + fi 84 + 85 + if ! check_root_device; then 86 + echo "Root device not found, retrying in 10 seconds..." 87 + sleep 10 88 + else 89 + found 90 + fi 91 + 92 + if ! check_root_device; then 93 + echo "Root device not found, retrying for last time in 20 seconds..." 94 + sleep 20 95 + else 96 + found 97 + fi 98 + 99 + 100 + if ! check_root_device; then 101 + echo "WARNING: Boot device not found, proceeding with caution." 102 + else 103 + found 104 + fi 105 + ''; 106 + 59 107 networking = { 60 108 hostName = "stellapent-cier"; 61 109 hosts = hostsFile; ··· 143 191 # Some programs need SUID wrappers, can be configured further or are 144 192 # started in user sessions. 145 193 programs.mtr.enable = true; 146 - 147 - system.nixos.tags = [ 148 - "laptop" 149 - "homelab" 150 - ]; 151 194 }
-1
shared/1password.nix
··· 25 25 mode = "0755"; 26 26 }; 27 27 }; 28 - system.nixos.tags = [ "1password" ]; 29 28 }
+1 -2
shared/flatpak.nix
··· 15 15 ''; 16 16 }; 17 17 18 - system.nixos.tags = [ "flatpak" ]; 19 - } 18 + }
-1
shared/server/devenv.nix
··· 66 66 programs.direnv.enable = true; 67 67 68 68 system.nixos.tags = [ 69 - "containers-and-vms" 70 69 "devtools" 71 70 ]; 72 71 }
+1 -2
shared/server/ssh.nix
··· 19 19 20 20 programs.mosh.enable = true; 21 21 22 - system.nixos.tags = [ "ssh" "mosh" ]; 23 - } 22 + }