From 825ac5d7eb523ace9448381c499ff2968f45c1b5 Mon Sep 17 00:00:00 2001 From: Kurtis Andrews Date: Sun, 24 Mar 2024 23:32:09 +1000 Subject: [PATCH] Update Updated config updated scripts to work with nixos --- README.md | 4 ++-- components/user-kurtisa.nix | 1 + rebuild-nix.sh | 19 +++++++++++++++++++ setup.sh | 5 ----- update-nix.sh | 9 +++++++++ 5 files changed, 31 insertions(+), 7 deletions(-) create mode 100755 rebuild-nix.sh delete mode 100644 setup.sh create mode 100755 update-nix.sh diff --git a/README.md b/README.md index 2541b46..c5cec66 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ Configurations for all of my workstations in NixOS ## To Setup ## -Just run the following command to install +Just run the following command to install and then use the bash files in the directory. ``` -sudo bash -c "$(wget --auth-no-challenge --user=kurtis --password=02eb4348683346fc736eca38bc297c47b52af5d6 -q -O - https://git.tcmeta.net/kurtis/vargix-os/raw/branch/main/setup.sh)" +git clone https://70781d52eb90ab251c6bf11e531b26820e30072c@git.tcmeta.net/kurtis/dotfiles.git ~/.vargix-os ``` \ No newline at end of file diff --git a/components/user-kurtisa.nix b/components/user-kurtisa.nix index 85fa3b7..9340839 100644 --- a/components/user-kurtisa.nix +++ b/components/user-kurtisa.nix @@ -75,6 +75,7 @@ in ]; }; programs.fish.enable = true; + programs.thefuck.enable = true; programs.starship = { enable = true; enableFishIntegration = true; diff --git a/rebuild-nix.sh b/rebuild-nix.sh new file mode 100755 index 0000000..90d81d4 --- /dev/null +++ b/rebuild-nix.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# Okay need to get the hostname and see if this exists in our list of items. + +hostname=$(hostname -f) + +if [ $hostname == "nixos" ] +then + echo "This distro has not been initialised" +else + # Need to check if the nix file exists + if [[ ! -f "$hostname.nix" ]] + then + echo "Your host does not have a config" + else + echo "Performing Build" + sudo nixos-rebuild dry-build -I nixos-config=./$hostname.nix + fi +fi \ No newline at end of file diff --git a/setup.sh b/setup.sh deleted file mode 100644 index d2c040f..0000000 --- a/setup.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -USER=kurtis -PASS=02eb4348683346fc736eca38bc297c47b52af5d6 - -# Need to add more to this later once we have the configurations setup \ No newline at end of file diff --git a/update-nix.sh b/update-nix.sh new file mode 100755 index 0000000..5aec184 --- /dev/null +++ b/update-nix.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# This will update the repo + +echo "Updating Configs" + +git pull + +echo "Done" \ No newline at end of file