From c5f43030aaebabb6ec063d14ced8250d1d2d3c88 Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Fri, 30 Jun 2023 10:29:30 +0100 Subject: [PATCH] Set hostname in host module. --- flake.nix | 6 +++--- hosts/c1/default.nix | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 3bb99a9..957cf3f 100644 --- a/flake.nix +++ b/flake.nix @@ -10,13 +10,13 @@ outputs = { self, nixpkgs, deploy-rs, ... }@inputs: let - mkNixos = hostname: modules: nixpkgs.lib.nixosSystem { + mkNixos = modules: nixpkgs.lib.nixosSystem { inherit modules; - specialArgs = { inherit inputs hostname; }; + specialArgs = { inherit inputs; }; }; in { nixosConfigurations = { - c1 = mkNixos "c1" [ ./hosts/c1 ]; + c1 = mkNixos [ ./hosts/c1 ]; }; deploy = { diff --git a/hosts/c1/default.nix b/hosts/c1/default.nix index 11ad4c5..079ba83 100644 --- a/hosts/c1/default.nix +++ b/hosts/c1/default.nix @@ -1,4 +1,4 @@ -{ pkgs, inputs, hostname, ... }: +{ pkgs, inputs, ... }: { imports = [ ../common/global @@ -6,7 +6,7 @@ ./hardware.nix ]; - networking.hostName = hostname; + networking.hostName = "c1"; swapDevices = pkgs.lib.mkForce [ { device = "/dev/disk/by-id/nvme-eui.002538b981b03d98-part2";