From 4506c4671cb2e426d6dccd5dd3cdc4a781961c26 Mon Sep 17 00:00:00 2001 From: nomadics9 Date: Sun, 13 Oct 2024 16:50:59 +0300 Subject: [PATCH] installer automatic user and host creation --- flake.nix | 4 ++-- install.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 981f0b0..63d8b2c 100644 --- a/flake.nix +++ b/flake.nix @@ -30,8 +30,8 @@ "x86_64-darwin" ]; forAllSystems = nixpkgs.lib.genAttrs systems; - user = "nomad2"; - hostname = "unkown2"; + user = "nomad"; + hostname = "unkown"; in { packages = diff --git a/install.sh b/install.sh index 6d6bc66..8f01748 100755 --- a/install.sh +++ b/install.sh @@ -29,8 +29,8 @@ monitor_config_file="./home/$new_user/$new_hostname.nix" current_user=$(logname) -if [ ! -f "./hosts/common/users/nomad.nix" ]; then - echo -e "$RED Source file nomad.nix does not exist! $ENDCOLOR" +if [[ ! -f "./hosts/common/users/nomad.nix" && ! -d "./hosts/unkown/" ]]; then + echo -e "$RED Source files nomad.nix or ./hosts/unkown directory does not exist! $ENDCOLOR" exit 1 fi