diff options
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/configurations.nix | 18 | ||||
-rw-r--r-- | nixos/modules/desktop.nix | 1 | ||||
-rw-r--r-- | nixos/modules/generic.nix | 10 |
3 files changed, 18 insertions, 11 deletions
diff --git a/nixos/configurations.nix b/nixos/configurations.nix index 5dcb141..b96b0f6 100644 --- a/nixos/configurations.nix +++ b/nixos/configurations.nix @@ -26,10 +26,17 @@ with nixpkgs.lib; let system ? "x86_64-linux", extra_modules ? [], }: hostname: { - ${hostname} = nixpkgs.lib.nixosSystem { + ${hostname} = nixturris.lib.addBuildPlatform (nixpkgs.lib.nixosSystem { inherit system specialArgs; - modules = (modules hostname) ++ extra_modules; - }; + modules = + (modules hostname) + ++ extra_modules + ++ [ + { + nixpkgs.hostPlatform.system = system; + } + ]; + }); }; amd64System = genericSystem {}; vpsSystem = genericSystem { @@ -42,7 +49,6 @@ with nixpkgs.lib; let system = "armv7l-linux"; extra_modules = [ nixos-hardware.nixosModules.raspberry-pi-2 - nixturris.nixosModules.turris-crossbuild nixturris.nixosModules.armv7l-overlay ({pkgs, ...}: { boot.loader.systemd-boot.enable = false; @@ -53,7 +59,6 @@ with nixpkgs.lib; let raspi3System = genericSystem { system = "aarch64-linux"; extra_modules = [ - nixturris.nixosModules.turris-crossbuild ({pkgs, ...}: { boot.kernelPackages = pkgs.linuxPackages_rpi3; boot.initrd.includeDefaultModules = false; @@ -69,7 +74,6 @@ with nixpkgs.lib; let beagleboneSystem = genericSystem { system = "armv7l-linux"; extra_modules = [ - nixturris.nixosModules.turris-crossbuild nixturris.nixosModules.armv7l-overlay { boot.loader.grub.enable = false; @@ -83,8 +87,8 @@ with nixpkgs.lib; let genericSystem { inherit system; extra_modules = [ - nixturris.nixosModules.turris-crossbuild { + nixpkgs.hostPlatform.system = system; boot.loader.systemd-boot.enable = false; virtualisation.qemu.package = self.nixosConfigurations."${hostSystem}".pkgs.qemu; } diff --git a/nixos/modules/desktop.nix b/nixos/modules/desktop.nix index 04e5b82..3ae64a4 100644 --- a/nixos/modules/desktop.nix +++ b/nixos/modules/desktop.nix @@ -156,7 +156,6 @@ in { ]); programs = { vim.package = pkgs.vimHugeX; - shellrc.desktop = true; firefox.enable = true; light.enable = mkIf cnf.laptop true; }; diff --git a/nixos/modules/generic.nix b/nixos/modules/generic.nix index 309dd95..02498a3 100644 --- a/nixos/modules/generic.nix +++ b/nixos/modules/generic.nix @@ -5,7 +5,7 @@ ... }: with lib; let - isNative = config.nixpkgs.crossSystem == null; + isNative = config.nixpkgs.hostPlatform == config.nixpkgs.buildPlatform; in { config = { system.stateVersion = "22.05"; @@ -89,6 +89,7 @@ in { nethogs sshfs wakeonlan + speedtest-cli lm_sensors ] @@ -139,8 +140,11 @@ in { ]; }; }; - programs.zsh.enable = isNative; - programs.shellrc.enable = true; + programs.zsh = { + enable = isNative; + syntaxHighlighting.enable = isNative; + }; + programs.shellrc = true; programs.vim.defaultEditor = mkDefault true; security.sudo.extraRules = [ |