From 39619235991bc07d694e1e2753d64e50bd96bd6d Mon Sep 17 00:00:00 2001 From: Colin Date: Sun, 2 Jul 2023 22:49:17 +0000 Subject: [PATCH] scripts: move these to more appropriate places --- README.md | 4 +--- hosts/common/home/default.nix | 2 +- hosts/common/home/{keyring.nix => keyring/default.nix} | 2 +- {scripts => hosts/common/home/keyring}/init-keyring | 0 hosts/modules/roles/client/bluetooth-pairings.nix | 2 +- {scripts => hosts/modules/roles/client}/install-bluetooth | 0 {scripts => hosts/modules/roles/client}/install-iwd | 0 hosts/modules/roles/client/wifi-pairings.nix | 2 +- 8 files changed, 5 insertions(+), 7 deletions(-) rename hosts/common/home/{keyring.nix => keyring/default.nix} (81%) rename {scripts => hosts/common/home/keyring}/init-keyring (100%) rename {scripts => hosts/modules/roles/client}/install-bluetooth (100%) rename {scripts => hosts/modules/roles/client}/install-iwd (100%) diff --git a/README.md b/README.md index b869b811..8ee02be1 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,7 @@ directly here; even the sources for those packages is often kept here too. - inline code for wholly custom packages (e.g. `pkgs/additional/sane-scripts/` for CLI tools that are highly specific to my setup). - `scripts/` - - scripts which are referenced by other things in this repo. - - these aren't generally user-facing, but they're factored out so that they can - be invoked directly when i need to debug. + - scripts which aren't reachable on a deployed system, but may aid manual deployments - `secrets/` - encrypted keys, API tokens, anything which one or more of my machines needs read access to but shouldn't be world-readable. diff --git a/hosts/common/home/default.nix b/hosts/common/home/default.nix index 41d8edc2..2b3ae15a 100644 --- a/hosts/common/home/default.nix +++ b/hosts/common/home/default.nix @@ -1,7 +1,7 @@ { ... }: { imports = [ - ./keyring.nix + ./keyring ./mime.nix ./ssh.nix ./xdg-dirs.nix diff --git a/hosts/common/home/keyring.nix b/hosts/common/home/keyring/default.nix similarity index 81% rename from hosts/common/home/keyring.nix rename to hosts/common/home/keyring/default.nix index 0686b196..7b4047a8 100644 --- a/hosts/common/home/keyring.nix +++ b/hosts/common/home/keyring/default.nix @@ -4,7 +4,7 @@ sane.user.persist.private = [ ".local/share/keyrings" ]; sane.user.fs."private/.local/share/keyrings/default" = { - generated.script.script = builtins.readFile ../../../scripts/init-keyring; + generated.script.script = builtins.readFile ./init-keyring; # TODO: is this `wantedBy` needed? can we inherit it? wantedBy = [ config.sane.fs."/home/colin/private".unit ]; wantedBeforeBy = [ ]; # don't created this as part of `multi-user.target` diff --git a/scripts/init-keyring b/hosts/common/home/keyring/init-keyring similarity index 100% rename from scripts/init-keyring rename to hosts/common/home/keyring/init-keyring diff --git a/hosts/modules/roles/client/bluetooth-pairings.nix b/hosts/modules/roles/client/bluetooth-pairings.nix index 3871cab9..dfbd138a 100644 --- a/hosts/modules/roles/client/bluetooth-pairings.nix +++ b/hosts/modules/roles/client/bluetooth-pairings.nix @@ -3,7 +3,7 @@ let install-bluetooth = pkgs.static-nix-shell.mkBash { pname = "install-bluetooth"; - src = ../../../../scripts; + src = ./.; pkgs = [ "gnused" ]; }; in diff --git a/scripts/install-bluetooth b/hosts/modules/roles/client/install-bluetooth similarity index 100% rename from scripts/install-bluetooth rename to hosts/modules/roles/client/install-bluetooth diff --git a/scripts/install-iwd b/hosts/modules/roles/client/install-iwd similarity index 100% rename from scripts/install-iwd rename to hosts/modules/roles/client/install-iwd diff --git a/hosts/modules/roles/client/wifi-pairings.nix b/hosts/modules/roles/client/wifi-pairings.nix index e85cbe52..6623a8e4 100644 --- a/hosts/modules/roles/client/wifi-pairings.nix +++ b/hosts/modules/roles/client/wifi-pairings.nix @@ -3,7 +3,7 @@ let install-iwd = pkgs.static-nix-shell.mkBash { pname = "install-iwd"; - src = ../../../../scripts; + src = ./.; pkgs = [ "gnused" ]; }; in