From b76a613945ab35b69941aa8f06241280afb537dd Mon Sep 17 00:00:00 2001 From: emily Date: Mon, 29 Apr 2024 12:22:22 +0200 Subject: [PATCH] add nixpkgs.hostplatform by default --- README.md | 4 +++- config/common/default.nix | 2 +- config/hosts/ryuuko/hardware-configuration-qemu.nix | 2 -- config/hosts/ryuuko/hardware-configuration.nix | 1 - config/hosts/seras/configuration.nix | 1 - config/hosts/web-dus/configuration.nix | 1 - lib/shinyflakes/default.nix | 1 + 7 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 772690a..f42e53f 100644 --- a/README.md +++ b/README.md @@ -43,5 +43,7 @@ nixfiles │   ├── hosts # configuration for specific hosts │   ├── profiles # configuariotn for specific machine types │   └── services # common service configuration -└── modules # NixOS modules +├── lib # helper functions +├── modules # NixOS modules +└── pkgs # nixpkgs overlays ``` diff --git a/config/common/default.nix b/config/common/default.nix index 0efd2f8..6dc974a 100644 --- a/config/common/default.nix +++ b/config/common/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, lib, pkgs, ... }: with lib; { imports = [ diff --git a/config/hosts/ryuuko/hardware-configuration-qemu.nix b/config/hosts/ryuuko/hardware-configuration-qemu.nix index 9be4f9c..ec41814 100644 --- a/config/hosts/ryuuko/hardware-configuration-qemu.nix +++ b/config/hosts/ryuuko/hardware-configuration-qemu.nix @@ -34,7 +34,5 @@ # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; } diff --git a/config/hosts/ryuuko/hardware-configuration.nix b/config/hosts/ryuuko/hardware-configuration.nix index 096b882..53e743c 100644 --- a/config/hosts/ryuuko/hardware-configuration.nix +++ b/config/hosts/ryuuko/hardware-configuration.nix @@ -20,6 +20,5 @@ # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; # networking.interfaces.wwp0s20f0u3.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; #powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; } diff --git a/config/hosts/seras/configuration.nix b/config/hosts/seras/configuration.nix index 9da6d2c..02452c7 100644 --- a/config/hosts/seras/configuration.nix +++ b/config/hosts/seras/configuration.nix @@ -19,7 +19,6 @@ max-substitution-jobs = 20 max-silent-time = 900 ''; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; systemd.network.networks."98-eth-default" = { address = [ diff --git a/config/hosts/web-dus/configuration.nix b/config/hosts/web-dus/configuration.nix index dbdbedc..9fa5b67 100644 --- a/config/hosts/web-dus/configuration.nix +++ b/config/hosts/web-dus/configuration.nix @@ -19,7 +19,6 @@ "2a0f:be01:0:100::1312/128" ]; }; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; services.vyosBld = { enable = true; output = "/var/www/kyouma.net/vyos"; diff --git a/lib/shinyflakes/default.nix b/lib/shinyflakes/default.nix index 5b86dda..0201d9b 100644 --- a/lib/shinyflakes/default.nix +++ b/lib/shinyflakes/default.nix @@ -29,6 +29,7 @@ ../../config/hosts/${hostname}/configuration.nix ({ ... }: { nixpkgs.overlays = [ self.overlays.kyouma ]; + nixpkgs.hostPlatform = system; }) ]; };