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: do bts work on configs and more

A bit of GitHub Copilot help in there for some recursion related errors.

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

+68 -66
+56 -51
flake.nix
··· 102 102 nix4vscode, 103 103 firefox-addons, 104 104 agenix, 105 - agenix-rekey 105 + agenix-rekey, 106 106 }: 107 107 let 108 108 dev-pkgs = import ./pkgs; 109 - # resolve the current system at evaluation time and compute the per-system packages 110 - current = builtins.currentSystem; 111 - systemPackages = flake-utils.lib.eachDefaultSystem (system: 112 - let 113 - pkgs = nixpkgs.legacyPackages.${system}; 114 - in 115 - { 109 + in 110 + flake-utils.lib.eachDefaultSystem (system: 111 + let 112 + pkgs = import nixpkgs { inherit system; }; 113 + in 114 + { 115 + overlays = { 116 + default = final: prev: { 117 + coolify-compose = prev.callPackage ./pkgs/coolify-compose.nix { }; 118 + detect-vscode-for-git = prev.callPackage ./pkgs/detect-vscode-for-git.nix { }; 119 + ssh-agent-loader = prev.callPackage ./pkgs/ssh-agent-loader.nix { }; 120 + }; 121 + }; 122 + 123 + # Packages for this system 124 + packages = { 116 125 coolify-compose = pkgs.callPackage ./pkgs/coolify-compose.nix { }; 117 126 detect-vscode-for-git = pkgs.callPackage ./pkgs/detect-vscode-for-git.nix { }; 118 127 ssh-agent-loader = pkgs.callPackage ./pkgs/ssh-agent-loader.nix { }; 119 - } 120 - ); 121 - in 122 - { 123 - overlays.default = final: prev: { 124 - coolify-compose = prev.callPackage ./pkgs/coolify-compose.nix { }; 125 - detect-vscode-for-git = prev.callPackage ./pkgs/detect-vscode-for-git.nix { }; 126 - ssh-agent-loader = prev.callPackage ./pkgs/ssh-agent-loader.nix { }; 127 - }; 128 128 129 - # For CI and other builds, alongside flake-based package installs via 130 - # packages.${arch}-${platform}.${package-name} output. 131 - packages = systemPackages; 129 + # Optionally make one the default to support `nix profile add .#` 130 + default = pkgs.callPackage ./pkgs/coolify-compose.nix { }; 131 + }; 132 132 133 - # Convenient aliases resolved to the current system so consumers can do: 134 - # nix profile add .#<package-name> 135 - # instead of: 136 - # nix profile add .#packages.x86_64-linux.<package-name> 137 - coolify-compose = systemPackages.${current}.coolify-compose; 138 - detect-vscode-for-git = systemPackages.${current}.detect-vscode-for-git; 139 - ssh-agent-loader = systemPackages.${current}.ssh-agent-loader; 133 + # If you want app-style outputs, you can also define apps here: 134 + # apps.default = { 135 + # type = "app"; 136 + # program = "${self.packages.${system}.coolify-compose}/bin/coolify-compose"; 137 + # }; 140 138 139 + # Keep nixosConfigurations and homeConfigurations outside of eachDefaultSystem 140 + # or gate them by `system` if needed; shown below outside the lambda. 141 + } 142 + ) 143 + // { 141 144 nixosConfigurations = { 142 145 recoverykit-amd64 = nixpkgs.lib.nixosSystem { 143 146 system = "x86_64-linux"; 144 147 modules = [ 148 + # nix flake modules first 149 + nix-ld.nixosModules.nix-ld 150 + determinate.nixosModules.default 151 + home-manager.nixosModules.home-manager 152 + vscode-server.nixosModules.default 153 + 154 + # and then the configs 145 155 ./shared/meta.nix 146 156 ./hosts/recoverykit/configuration.nix 147 157 "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" ··· 151 161 portable-amd64-256gb = nixpkgs.lib.nixosSystem { 152 162 system = "x86_64-linux"; 153 163 modules = [ 164 + # nix flake modules first 165 + nix-ld.nixosModules.nix-ld 166 + determinate.nixosModules.default 167 + home-manager.nixosModules.home-manager 168 + vscode-server.nixosModules.default 169 + 170 + # and then the configs 154 171 ./shared/meta.nix 155 172 ./hosts/portable/amd64/configuration.nix 156 173 ]; 157 174 158 175 specialArgs = { 159 - inherit self; 160 176 inherit zen-browser; 161 - inherit dev-pkgs; 162 - inherit nix-ld; 163 - inherit determinate; 164 - inherit home-manager; 165 - inherit vscode-server; 166 - inherit nix4vscode; 167 177 }; 168 178 }; 169 179 170 180 lairland = nixpkgs.lib.nixosSystem { 171 181 system = "x86_64-linux"; 172 182 modules = [ 183 + # nix flake modules first 184 + nix-ld.nixosModules.nix-ld 185 + determinate.nixosModules.default 186 + home-manager.nixosModules.home-manager 187 + vscode-server.nixosModules.default 188 + 189 + # and then the configs 173 190 ./shared/meta.nix 174 191 ./hosts/lairland/configuration.nix 175 192 ]; 176 193 177 194 specialArgs = { 178 - inherit self; 179 195 inherit zen-browser; 180 - inherit dev-pkgs; 181 - inherit nix-ld; 182 - inherit determinate; 183 - inherit home-manager; 184 - inherit vscode-server; 185 - inherit nix4vscode; 186 196 }; 187 197 }; 188 198 ··· 195 205 ./hosts/stellapent-cier/configuration.nix 196 206 ]; 197 207 specialArgs = { 198 - inherit self; 199 208 inherit zen-browser; 200 - inherit dev-pkgs; 201 - inherit nix-ld; 202 - inherit determinate; 203 - inherit home-manager; 204 - inherit vscode-server; 205 - inherit nix4vscode; 206 209 }; 207 210 }; 208 211 }; ··· 235 238 }; 236 239 }; 237 240 } 241 + zen-browser.homeModules.beta 238 242 ./shared/home-manager/main.nix 239 243 { 240 244 home = { ··· 272 276 }; 273 277 }; 274 278 } 275 - 279 + zen-browser.homeModules.beta 276 280 ./shared/home-manager/main.nix 277 281 { 278 282 home.username = "ajhalili2006"; ··· 294 298 inherit zen-browser; 295 299 }; 296 300 modules = [ 297 - { 301 + { 298 302 nixpkgs = { 299 - overlays = [ 303 + overlays = [ 300 304 self.overlays.default 301 305 nix4vscode.overlays.default 302 306 ]; ··· 307 311 }; 308 312 }; 309 313 } 314 + zen-browser.homeModules.beta 310 315 ./shared/home-manager/nogui.nix 311 316 { 312 317 home.username = "ajhalili2006";
+2 -2
hosts/recoverykit/configuration.nix
··· 7 7 imports = [ 8 8 ../../shared/systemd.nix 9 9 ../../shared/server/ssh.nix 10 - ../../shared/meta-configs.nix 10 + ../../shared/nix.nix 11 11 ../../shared/systemd.nix 12 12 ]; 13 13 ··· 24 24 }; 25 25 }; 26 26 }; 27 - } 27 + }
+4 -4
shared/home-manager/desktop.nix
··· 1 1 # Desktop apps and related configs go here in this Nix file 2 - { pkgs, zen-browser, ... }: 2 + { pkgs, ... }: 3 3 4 4 { 5 5 imports = [ 6 6 # make sure to import the zen-browser home module 7 7 # for programs.zen-browser to work 8 - zen-browser.homeModules.beta 8 + #zen-browser.homeModules.beta 9 9 ]; 10 10 11 11 home.packages = with pkgs; [ ··· 27 27 programs.zen-browser = { 28 28 enable = true; 29 29 nativeMessagingHosts = with pkgs; [ 30 - firefoxpwa 31 - _1password-gui 30 + firefoxpwa 31 + _1password-gui 32 32 ]; 33 33 }; 34 34 }
-1
shared/home-manager/main.nix
··· 7 7 pkgs, 8 8 lib, 9 9 home-manager, 10 - zen-browser, 11 10 ... 12 11 }: 13 12
+6 -8
shared/meta.nix
··· 1 1 # One Nix file to import all the base configs without cluttering the per-host 2 2 # imports, alongside a minimal base packages. 3 - { pkgs, nix-ld, determinate, home-manager, vscode-server, ... }: 3 + { 4 + pkgs, 5 + config, 6 + ... 7 + }: 4 8 5 9 { 6 10 # import configs first 7 11 imports = [ 8 - # nix flake modules first 9 - nix-ld.nixosModules.nix-ld 10 - determinate.nixosModules.default 11 - home-manager.nixosModules.home-manager 12 - vscode-server.nixosModules.default 13 - 14 - # then the configs 12 + # import shared configs 15 13 ./1password.nix 16 14 ./nix.nix 17 15 ./appimages.nix