From 2c088442a1ea22fba56c1b25f2c59b8a171e6bb1 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 29 Feb 2024 23:23:57 +0000 Subject: [PATCH] Remove hostname variable --- flake.nix | 11 ++--------- justfile | 9 ++++++--- lib/nixos/configuration.nix | 3 +-- lib/nixos/default.nix | 3 +-- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/flake.nix b/flake.nix index 4a8a724..e2f03e9 100644 --- a/flake.nix +++ b/flake.nix @@ -39,15 +39,8 @@ lib = import ./lib {inherit inputs;}; nixosConfigurations = { - apollo = mkNixos { - desktop = true; - hostname = "apollo"; - }; - - nixedo = mkNixos { - desktop = true; - hostname = "nixedo"; - }; + apollo = mkNixos {desktop = true;}; + nixedo = mkNixos {desktop = true;}; }; homeConfigurations = { diff --git a/justfile b/justfile index 7ab1947..5387059 100644 --- a/justfile +++ b/justfile @@ -4,11 +4,14 @@ _default: check: nix flake check -nixos-build profile: - sudo nixos-rebuild build --flake ".#{{ profile }}" +nixos-build: + sudo nixos-rebuild build --flake . nixos-switch profile: - sudo nixos-rebuild switch --flake ".#{{ profile }}" + sudo nixos-rebuild switch --flake . + +nixos-test profile: + sudo nixos-rebuild test --flake . update: nix flake update diff --git a/lib/nixos/configuration.nix b/lib/nixos/configuration.nix index 7a2ea9c..e15cbbc 100644 --- a/lib/nixos/configuration.nix +++ b/lib/nixos/configuration.nix @@ -1,7 +1,6 @@ { inputs, desktop ? false, - hostname, pkgs, system, }: let @@ -36,7 +35,7 @@ in { DefaultTimeoutStopSec=10s ''; - networking.hostName = hostname; + # networking.hostName = hostname; # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary diff --git a/lib/nixos/default.nix b/lib/nixos/default.nix index 672379b..1ba1d17 100644 --- a/lib/nixos/default.nix +++ b/lib/nixos/default.nix @@ -6,9 +6,8 @@ username, }: { desktop ? false, - hostname, }: let - configuration = import ./configuration.nix {inherit desktop hostname inputs pkgs system;}; + configuration = import ./configuration.nix {inherit desktop inputs pkgs system;}; hardwareConfiguration = import ./hardware-configuration.nix; in inputs.nixpkgs.lib.nixosSystem {