From f05e7f6ae37ecc8b8da02555b5504dba1f89ada1 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 1 Nov 2024 22:09:49 +0000 Subject: [PATCH 1/6] update formatting and add main user --- hosts/x86_64/EDI/configuration.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/hosts/x86_64/EDI/configuration.nix b/hosts/x86_64/EDI/configuration.nix index b7d19c6..7bb53f6 100644 --- a/hosts/x86_64/EDI/configuration.nix +++ b/hosts/x86_64/EDI/configuration.nix @@ -7,8 +7,11 @@ #./home-assistant.nix ]; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + boot.kernelParams = [ "console=tty0" ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; @@ -21,6 +24,15 @@ maxJobs = 8; }]; + # Define user accounts + users.users.aaronh = { + description = "Aaron Honeycutt"; + home = "/home/aaronh"; + extraGroups = [ "wheel" "networkmanager" "adm"]; + isNormalUser = true; + hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx."; + }; + networking.hostName = "EDI"; networking.firewall = { enable = true; From 63eb2599046cde9ac6a64086fe8a465fa92b6beb Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Fri, 1 Nov 2024 22:41:20 +0000 Subject: [PATCH 2/6] update EDI for mdadm --- hosts/x86_64/EDI/configuration.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hosts/x86_64/EDI/configuration.nix b/hosts/x86_64/EDI/configuration.nix index 7bb53f6..27498d5 100644 --- a/hosts/x86_64/EDI/configuration.nix +++ b/hosts/x86_64/EDI/configuration.nix @@ -15,6 +15,17 @@ boot.kernelParams = [ "console=tty0" ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + boot.swraid = { + enable = true; + mdadmConf = "ARRAY /dev/md/edi:DATA metadata=1.2 UUID=f0384881:84c12f70:3dcad802:653ccc30"; + }; + + fileSystems = { + "/home/aaronh/DATA" = { + device = "/dev/md127"; + }; + }; + nix.settings.extra-platforms = [ "aarch64-linux" ]; nix.buildMachines = [{ hostName = "localhost"; @@ -44,6 +55,7 @@ ]; # Enable the OpenSSH daemon. + services.openssh.enable = true; services.openssh.settings = { PermitRootLogin = "no"; }; From 5531c630ea6684d5a2337ca003ad13f6b66fa44e Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 4 Nov 2024 15:02:31 +0000 Subject: [PATCH 3/6] fix mdadm trace error --- hosts/x86_64/EDI/configuration.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hosts/x86_64/EDI/configuration.nix b/hosts/x86_64/EDI/configuration.nix index 27498d5..83dc94a 100644 --- a/hosts/x86_64/EDI/configuration.nix +++ b/hosts/x86_64/EDI/configuration.nix @@ -17,7 +17,10 @@ boot.swraid = { enable = true; - mdadmConf = "ARRAY /dev/md/edi:DATA metadata=1.2 UUID=f0384881:84c12f70:3dcad802:653ccc30"; + mdadmConf = '' + ARRAY /dev/md/edi:DATA metadata=1.2 UUID=f0384881:84c12f70:3dcad802:653ccc30 + MAILADDR root + ''; }; fileSystems = { From 08f8d118fb8245054b7a617911ee96b80df8d1e8 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 4 Nov 2024 18:28:42 +0000 Subject: [PATCH 4/6] add note about mdadm --- hosts/x86_64/EDI/configuration.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosts/x86_64/EDI/configuration.nix b/hosts/x86_64/EDI/configuration.nix index 83dc94a..89cea5c 100644 --- a/hosts/x86_64/EDI/configuration.nix +++ b/hosts/x86_64/EDI/configuration.nix @@ -18,7 +18,11 @@ boot.swraid = { enable = true; mdadmConf = '' + # You can find that ARRAY information with this command + # sudo mdadm --detail --scan >> mdadm.conf + # Now just copy that information into the line ARRAY /dev/md/edi:DATA metadata=1.2 UUID=f0384881:84c12f70:3dcad802:653ccc30 + # This is to make an error disappear MAILADDR root ''; }; From c337b63c979467735fcacaaa37136092bd7c9735 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 4 Nov 2024 18:29:52 +0000 Subject: [PATCH 5/6] Update configuration.nix --- hosts/x86_64/EDI/configuration.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hosts/x86_64/EDI/configuration.nix b/hosts/x86_64/EDI/configuration.nix index 89cea5c..ff09c3c 100644 --- a/hosts/x86_64/EDI/configuration.nix +++ b/hosts/x86_64/EDI/configuration.nix @@ -15,14 +15,16 @@ boot.kernelParams = [ "console=tty0" ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + # You can find the swraid ARRAY information with this command + # sudo mdadm --detail --scan >> mdadm.conf + # Now just copy that information into the line + + # The MAILADDR is to fix a warning for swraid + boot.swraid = { enable = true; mdadmConf = '' - # You can find that ARRAY information with this command - # sudo mdadm --detail --scan >> mdadm.conf - # Now just copy that information into the line ARRAY /dev/md/edi:DATA metadata=1.2 UUID=f0384881:84c12f70:3dcad802:653ccc30 - # This is to make an error disappear MAILADDR root ''; }; From f254fdd4ec5d616661262ebb661a1e2a12ce6904 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 4 Nov 2024 15:38:16 -0700 Subject: [PATCH 6/6] add kavita --- homelab/kavita/default.nix | 8 ++++++++ hosts/x86_64/{EDI => edi}/configuration.nix | 0 2 files changed, 8 insertions(+) create mode 100644 homelab/kavita/default.nix rename hosts/x86_64/{EDI => edi}/configuration.nix (100%) diff --git a/homelab/kavita/default.nix b/homelab/kavita/default.nix new file mode 100644 index 0000000..f9a2727 --- /dev/null +++ b/homelab/kavita/default.nix @@ -0,0 +1,8 @@ +{ config, pkgs, lib, ... }: + +{ + services.kavita = { + enable = true; + # tokenKeyFile = "/home/aaronh/TokenKey"; # Update depending on the setup + }; +} diff --git a/hosts/x86_64/EDI/configuration.nix b/hosts/x86_64/edi/configuration.nix similarity index 100% rename from hosts/x86_64/EDI/configuration.nix rename to hosts/x86_64/edi/configuration.nix