From a572a13f0454a57875329146c4b4c38081ef99c1 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sat, 17 Feb 2024 20:45:06 -0500 Subject: [PATCH] refactor(devices): rearrange some files to prepare for nas --- common/modules/cachix.nix | 2 +- common/pkgs/rars-flatlaf/default.nix | 13 +++++++------ devices/README.md | 5 +++-- devices/nas/default.nix | 8 ++++++++ .../modules/arion/default.nix | 0 .../modules/arion/forgejo/compose.nix | 0 .../arion/forgejo/images/act_runner.nix | 0 .../modules/arion/forgejo/images/forgejo.nix | 0 .../modules/arion/forgejo/images/postgres.nix | 0 .../modules/arion/lineageos/Caddyfile | 0 .../modules/arion/lineageos/compose.nix | 0 .../arion/lineageos/manifests/manifests.xml | 0 .../arion/lineageos/manifests/roomservice.xml | 0 .../modules/arion/lineageos/scripts/before.sh | 0 .../modules/arion/music/jbots/compose.nix | 0 .../arion/music/jbots/images/jmusicbot.nix | 0 .../{servivi => nas}/modules/borgbackup.nix | 0 devices/{servivi => nas}/modules/nfs.nix | 0 devices/oksys/default.nix | 2 ++ devices/servivi/default.nix | 6 +++--- flake.nix | Bin 8162 -> 8070 bytes modules/greetd/ags.nix | 1 - modules/greetd/default.nix | 1 - 23 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 devices/nas/default.nix rename devices/{servivi => nas}/modules/arion/default.nix (100%) rename devices/{servivi => nas}/modules/arion/forgejo/compose.nix (100%) rename devices/{servivi => nas}/modules/arion/forgejo/images/act_runner.nix (100%) rename devices/{servivi => nas}/modules/arion/forgejo/images/forgejo.nix (100%) rename devices/{servivi => nas}/modules/arion/forgejo/images/postgres.nix (100%) rename devices/{servivi => nas}/modules/arion/lineageos/Caddyfile (100%) rename devices/{servivi => nas}/modules/arion/lineageos/compose.nix (100%) rename devices/{servivi => nas}/modules/arion/lineageos/manifests/manifests.xml (100%) rename devices/{servivi => nas}/modules/arion/lineageos/manifests/roomservice.xml (100%) rename devices/{servivi => nas}/modules/arion/lineageos/scripts/before.sh (100%) rename devices/{servivi => nas}/modules/arion/music/jbots/compose.nix (100%) rename devices/{servivi => nas}/modules/arion/music/jbots/images/jmusicbot.nix (100%) rename devices/{servivi => nas}/modules/borgbackup.nix (100%) rename devices/{servivi => nas}/modules/nfs.nix (100%) diff --git a/common/modules/cachix.nix b/common/modules/cachix.nix index a82ef41d..682c2912 100644 --- a/common/modules/cachix.nix +++ b/common/modules/cachix.nix @@ -8,7 +8,7 @@ name = "rebuild-no-cache"; runtimeInputs = [config.nh.package]; text = '' - nh os switch -- --option binary-caches "https://cache.nixos.org" "$@" + nh os switch -- --option binary-caches "https://cache.nixos.org" "$@" ''; }) ]; diff --git a/common/pkgs/rars-flatlaf/default.nix b/common/pkgs/rars-flatlaf/default.nix index a3fd3b17..0a6585a3 100644 --- a/common/pkgs/rars-flatlaf/default.nix +++ b/common/pkgs/rars-flatlaf/default.nix @@ -28,12 +28,13 @@ stdenvNoCC.mkDerivation rec { runtimeInputs = [hyprland]; text = "(sleep 1; hyprctl dispatch togglefloating) & ${name}"; }; - in makeDesktopItem { - name = "RARS"; - desktopName = "RARS"; - exec = "${execScript}/bin/execScript"; - icon = name; - }; + in + makeDesktopItem { + name = "RARS"; + desktopName = "RARS"; + exec = "${execScript}/bin/execScript"; + icon = name; + }; nativeBuildInputs = [makeWrapper rsync jre]; diff --git a/devices/README.md b/devices/README.md index 06600981..6db85b3c 100644 --- a/devices/README.md +++ b/devices/README.md @@ -8,8 +8,9 @@ This directory encompasses every device's main configuration file. | ---------- | ------------------------------------------------------------------------------------------------------- | | `android` | My [Nix-On-Droid](https://github.com/nix-community/nix-on-droid) configuration for my OnePlus 9 Pro | | `binto` | My desktop PC with a multi-monitor setup and an NVIDIA (cringe) 3070 | -| `cluster` | WIP | -| `oksys` | A very old Acer laptop that went from sailing the seas for years to becoming my web server and VPN host | +| `cluster` | Two Lenovo mini pcs that make use of [NixOS-pcsd](https://github.com/matt1432/nixos-pcsd) to form a cluster | +| `nas` | My current custom built server running Proxmox. Conversion to NixOS wip | +| `oksys` | A very old Acer laptop that went from sailing the seas for years to becoming my web server and VPN host. It is now retired indefinitely. | | `servivi` | A gaming PC in a previous life, it is now used to slowly convert my Proxmox server to NixOS | | `wim` | My 2-1 Lenovo Laptop that I use for uni | diff --git a/devices/nas/default.nix b/devices/nas/default.nix new file mode 100644 index 00000000..a44b8577 --- /dev/null +++ b/devices/nas/default.nix @@ -0,0 +1,8 @@ +# WIP +{...}: { + imports = [ + ./modules/arion + ./modules/borgbackup.nix + ./modules/nfs.nix + ]; +} diff --git a/devices/servivi/modules/arion/default.nix b/devices/nas/modules/arion/default.nix similarity index 100% rename from devices/servivi/modules/arion/default.nix rename to devices/nas/modules/arion/default.nix diff --git a/devices/servivi/modules/arion/forgejo/compose.nix b/devices/nas/modules/arion/forgejo/compose.nix similarity index 100% rename from devices/servivi/modules/arion/forgejo/compose.nix rename to devices/nas/modules/arion/forgejo/compose.nix diff --git a/devices/servivi/modules/arion/forgejo/images/act_runner.nix b/devices/nas/modules/arion/forgejo/images/act_runner.nix similarity index 100% rename from devices/servivi/modules/arion/forgejo/images/act_runner.nix rename to devices/nas/modules/arion/forgejo/images/act_runner.nix diff --git a/devices/servivi/modules/arion/forgejo/images/forgejo.nix b/devices/nas/modules/arion/forgejo/images/forgejo.nix similarity index 100% rename from devices/servivi/modules/arion/forgejo/images/forgejo.nix rename to devices/nas/modules/arion/forgejo/images/forgejo.nix diff --git a/devices/servivi/modules/arion/forgejo/images/postgres.nix b/devices/nas/modules/arion/forgejo/images/postgres.nix similarity index 100% rename from devices/servivi/modules/arion/forgejo/images/postgres.nix rename to devices/nas/modules/arion/forgejo/images/postgres.nix diff --git a/devices/servivi/modules/arion/lineageos/Caddyfile b/devices/nas/modules/arion/lineageos/Caddyfile similarity index 100% rename from devices/servivi/modules/arion/lineageos/Caddyfile rename to devices/nas/modules/arion/lineageos/Caddyfile diff --git a/devices/servivi/modules/arion/lineageos/compose.nix b/devices/nas/modules/arion/lineageos/compose.nix similarity index 100% rename from devices/servivi/modules/arion/lineageos/compose.nix rename to devices/nas/modules/arion/lineageos/compose.nix diff --git a/devices/servivi/modules/arion/lineageos/manifests/manifests.xml b/devices/nas/modules/arion/lineageos/manifests/manifests.xml similarity index 100% rename from devices/servivi/modules/arion/lineageos/manifests/manifests.xml rename to devices/nas/modules/arion/lineageos/manifests/manifests.xml diff --git a/devices/servivi/modules/arion/lineageos/manifests/roomservice.xml b/devices/nas/modules/arion/lineageos/manifests/roomservice.xml similarity index 100% rename from devices/servivi/modules/arion/lineageos/manifests/roomservice.xml rename to devices/nas/modules/arion/lineageos/manifests/roomservice.xml diff --git a/devices/servivi/modules/arion/lineageos/scripts/before.sh b/devices/nas/modules/arion/lineageos/scripts/before.sh similarity index 100% rename from devices/servivi/modules/arion/lineageos/scripts/before.sh rename to devices/nas/modules/arion/lineageos/scripts/before.sh diff --git a/devices/servivi/modules/arion/music/jbots/compose.nix b/devices/nas/modules/arion/music/jbots/compose.nix similarity index 100% rename from devices/servivi/modules/arion/music/jbots/compose.nix rename to devices/nas/modules/arion/music/jbots/compose.nix diff --git a/devices/servivi/modules/arion/music/jbots/images/jmusicbot.nix b/devices/nas/modules/arion/music/jbots/images/jmusicbot.nix similarity index 100% rename from devices/servivi/modules/arion/music/jbots/images/jmusicbot.nix rename to devices/nas/modules/arion/music/jbots/images/jmusicbot.nix diff --git a/devices/servivi/modules/borgbackup.nix b/devices/nas/modules/borgbackup.nix similarity index 100% rename from devices/servivi/modules/borgbackup.nix rename to devices/nas/modules/borgbackup.nix diff --git a/devices/servivi/modules/nfs.nix b/devices/nas/modules/nfs.nix similarity index 100% rename from devices/servivi/modules/nfs.nix rename to devices/nas/modules/nfs.nix diff --git a/devices/oksys/default.nix b/devices/oksys/default.nix index 2cf11686..06c78eed 100644 --- a/devices/oksys/default.nix +++ b/devices/oksys/default.nix @@ -1,3 +1,5 @@ +# Not currently operational + {config, ...}: let inherit (config.vars) mainUser hostName; in { diff --git a/devices/servivi/default.nix b/devices/servivi/default.nix index be183132..297b8e73 100644 --- a/devices/servivi/default.nix +++ b/devices/servivi/default.nix @@ -8,11 +8,11 @@ in { ../../modules/sshd.nix ../../modules/tailscale.nix - ./modules/arion ./modules/binary-cache.nix - ./modules/borgbackup.nix ./modules/minecraft.nix - ./modules/nfs.nix + + # WIP + ../nas ]; vars = { diff --git a/flake.nix b/flake.nix index ee2613e5d8337caf30448ebf29c8d174a58b6633..bb2f1da8c38edca5ba4f1cb94d31bf5808c5bf6b 100644 GIT binary patch delta 12 TcmaE4-)6tzAoFHfmZQ=DB}oMj delta 54 zcmZp(e`LSmATzfD802RcR~Aoxz%0tIr=OBqmYJMdtPc^Jz#_*AW^LZid|ny=1X&Y% diff --git a/modules/greetd/ags.nix b/modules/greetd/ags.nix index ed1246a7..18545826 100644 --- a/modules/greetd/ags.nix +++ b/modules/greetd/ags.nix @@ -6,7 +6,6 @@ }: let inherit (config.vars) mainUser; hyprland = config.home-manager.users.${mainUser}.wayland.windowManager.hyprland.finalPackage; - in { # Add home folder for home-manager to work users.users.greeter = { diff --git a/modules/greetd/default.nix b/modules/greetd/default.nix index fd35bc39..007ca764 100644 --- a/modules/greetd/default.nix +++ b/modules/greetd/default.nix @@ -10,7 +10,6 @@ # Nix stuff isTouchscreen = config.hardware.sensor.iio.enable; hyprland = config.home-manager.users.${mainUser}.wayland.windowManager.hyprland.finalPackage; - in { imports = [./ags.nix];