My NixOS config Part 3: Flake-Parts Crusaders nix.ladas552.me
hjem nix nixos impermanence flake-parts nvfetcher niri noctalia

trying to resurrect nixmux

Ladas552 14a3624e abda861e

+50 -50
+49 -49
modules/flake-parts/host-machines.nix
··· 5 5 ... 6 6 }: 7 7 { 8 - flake.nixosConfigurations = 8 + flake = 9 9 let 10 10 prefix = "hosts/"; 11 + prefixAndroid = "nixOnDroidConfigurations/"; 11 12 in 12 - lib.pipe config.flake.modules.nixos [ 13 - (lib.filterAttrs (name: _: lib.hasPrefix prefix name)) 14 - (lib.mapAttrs' ( 15 - name: module: { 16 - name = lib.removePrefix prefix name; 17 - value = inputs.nixpkgs.lib.nixosSystem { 18 - modules = [ 19 - module 20 - config.flake.modules.nixos.hjem 21 - config.flake.modules.nixos.homeManager 22 - config.flake.modules.generic.options 23 - { 24 - hjem.extraModules = [ 25 - inputs.hjem-rum.hjemModules.default 26 - config.flake.modules.generic.options 27 - config.flake.modules.hjem.homebrewModules 28 - ]; 29 - home-manager.sharedModules = [ 30 - config.flake.modules.generic.options 31 - config.flake.modules.homeManager.base 32 - # minimal as different module only exists because I am not bothered to add minimal = true; to nix-on-droid 33 - config.flake.modules.homeManager.homeManager-minimal 34 - ]; 35 - } 36 - ]; 37 - }; 38 - } 39 - )) 40 - ]; 13 + { 14 + nixosConfigurations = lib.pipe config.flake.modules.nixos [ 15 + (lib.filterAttrs (name: _: lib.hasPrefix prefix name)) 16 + (lib.mapAttrs' ( 17 + name: module: { 18 + name = lib.removePrefix prefix name; 19 + value = inputs.nixpkgs.lib.nixosSystem { 20 + modules = [ 21 + module 22 + config.flake.modules.nixos.hjem 23 + config.flake.modules.nixos.homeManager 24 + config.flake.modules.generic.options 25 + { 26 + hjem.extraModules = [ 27 + inputs.hjem-rum.hjemModules.default 28 + config.flake.modules.generic.options 29 + config.flake.modules.hjem.homebrewModules 30 + ]; 31 + home-manager.sharedModules = [ 32 + config.flake.modules.generic.options 33 + config.flake.modules.homeManager.base 34 + # minimal as different module only exists because I am not bothered to add minimal = true; to nix-on-droid 35 + config.flake.modules.homeManager.homeManager-minimal 36 + ]; 37 + } 38 + ]; 39 + }; 40 + } 41 + )) 42 + ]; 41 43 42 - flake.nixOnDroidConfigurations = 43 - let 44 - prefix = "nixOnDroidConfigurations/"; 45 - in 46 - lib.pipe config.flake.modules.nixOnDroid [ 47 - (lib.filterAttrs (name: _: lib.hasPrefix prefix name)) 48 - (lib.mapAttrs' ( 49 - name: module: { 50 - name = lib.removePrefix prefix name; 51 - value = inputs.nix-on-droid.lib.nixOnDroidConfiguration { 52 - pkgs = import inputs.nixpkgs { system = "aarch64-linux"; }; 53 - modules = [ 54 - module 55 - config.flake.modules.nixOnDroid.options 56 - ]; 57 - }; 58 - } 59 - )) 60 - ]; 44 + # Having a let in for `prefix` breaks treesitter for some reason 45 + nixOnDroidConfigurations = lib.pipe config.flake.modules.nixOnDroid [ 46 + (lib.filterAttrs (name: _: lib.hasPrefix prefixAndroid name)) 47 + (lib.mapAttrs' ( 48 + name: module: { 49 + name = lib.removePrefix prefixAndroid name; 50 + value = inputs.nix-on-droid.lib.nixOnDroidConfiguration { 51 + pkgs = import inputs.nixpkgs { system = "aarch64-linux"; }; 52 + modules = [ 53 + module 54 + config.flake.modules.generic.options 55 + ]; 56 + }; 57 + } 58 + )) 59 + ]; 60 + }; 61 61 }
+1 -1
modules/hosts/NixMux/nixmux.nix
··· 31 31 nix.registry = (lib.mapAttrs (_: flake: { inherit flake; }) inputs); 32 32 nix.nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") inputs; 33 33 # Better Error messages 34 - nix.package = pkgs.nixVersions.latest; 34 + nix.package = pkgs.lixPackageSets.git.lix; 35 35 # Read the changelog before changing this value 36 36 system.stateVersion = "24.05"; # Set up nix for flakes 37 37 # Set your time zone