From f8782068d266412ae0b2bc65edecb19c0aa8b37b Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 3 Jul 2024 07:26:09 +0100 Subject: [PATCH] Remove uses of home-manager repo, merge home-manager README entries Remove system-update-all script --- README.org | 73 +++++++++++++++++++++++-- home/scripts/default.nix | 2 - home/scripts/shell/system-update-all.sh | 14 ----- system/default.nix | 26 +++------ 4 files changed, 76 insertions(+), 39 deletions(-) delete mode 100644 home/scripts/shell/system-update-all.sh diff --git a/README.org b/README.org index 278da9ef..07bd4bcb 100644 --- a/README.org +++ b/README.org @@ -1,10 +1,75 @@ #+title: README #+author: Evie Litherland-Smith #+email: evie@xenia.me.uk -System configuration files for NixOS. +My personal NixOS + home-manager configuration files. -Fairly minimal setup and installation, to be paired with [[https://git.xenia.me.uk/pixelifytica/home-manager.git][a -home-manager config]] to get the full user setup. +To set up without cloning the repository (assuming an already running +NixOS system), run: +#+begin_src bash + sudo nixos-rebuild switch --flake "git+https://git.xenia.me.uk/pixelifytica/nixos.git?ref=main"\#$(hostname) +#+end_src -Further reading: +* Password store setup +** Transfer GPG key(s) +#+begin_src bash + # Export keys on existing machine + gpg -a --export > publickeys.asc + gpg -a --export-secret-keys > privatekeys.asc + # Import key on new machine + gpg --import privatekeys.asc; gpg --import publickeys.asc + # Edit (for each key) to set trust + gpg --edit-key evie@xenia.me.uk +#+end_src +** Clone password-store repository +#+begin_src bash + git -c credential.helper='' clone https://git.xenia.me.uk/pixelifytica/pass $PASSWORD_STORE_DIR +#+end_src + +* Email setup +** Proton +*** Bridge +Start Proton Mail Bridge application, if needed configure to store +using =SecretService= and log in. Application will auto-start with +plasma session. +*** Password +Get password from ~protonmail-bridge~, save to ~password-store~: +#+begin_src bash + pass insert mbsync/$(hostname)/proton + # Insert pass at prompt +#+end_src +** iCloud +*** Password +If not already done, save password to ~password-store~: +#+begin_src bash + pass insert mbsync/$(hostname)/icloud + # Insert pass at prompt +#+end_src +This will be synced across devices so only needs doing once +** Outlook +*** Password +If not already done, save password to ~password-store~: +#+begin_src bash + pass insert mbsync/$(hostname)/outlook + # Insert pass at prompt +#+end_src +This will be synced across devices so only needs doing once +*** Configuration +Run src_bash{davmail-setup} to automate this process. + +On first run (or if token expires), stop systemd service and run manually to complete manual auth. Token will stay valid for a little while (no idea how long specifically). +#+begin_src bash + # Restart service to ensure ~/.davmail.properties exists + systemctl --user restart davmail.service + # Run to use manual authentication + systemctl --user stop davmail.service && davmail -notray ~/.davmail.properties + # Restart again so that service picks up available ports + systemctl --user restart davmail.service +#+end_src + +* Flathub setup +#+begin_src bash + flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo +#+end_src + +* Further reading: - https://nixos.org/ diff --git a/home/scripts/default.nix b/home/scripts/default.nix index d0ec3505..2a534698 100644 --- a/home/scripts/default.nix +++ b/home/scripts/default.nix @@ -1,7 +1,5 @@ {pkgs, ...}: { home.packages = [ - (pkgs.writeShellScriptBin "system-update-all" - (builtins.readFile ./shell/system-update-all.sh)) (pkgs.writeShellScriptBin "git-sync-all" (builtins.readFile ./shell/git-sync-all.sh)) (pkgs.writeShellScriptBin "rsync-local-config" diff --git a/home/scripts/shell/system-update-all.sh b/home/scripts/shell/system-update-all.sh deleted file mode 100644 index fac7392f..00000000 --- a/home/scripts/shell/system-update-all.sh +++ /dev/null @@ -1,14 +0,0 @@ -NIXOS_CONFIGURATION="/etc/nixos" -HOME_MANAGER_CONFIGURATION="$HOME/.config/home-manager" - -( - cd "$NIXOS_CONFIGURATION" || exit 1 - git pull --ff --ff-only || exit 1 - sudo nixos-rebuild switch -) - -( - cd "$HOME_MANAGER_CONFIGURATION" || exit 1 - git pull --ff --ff-only || exit 1 - home-manager switch -) diff --git a/system/default.nix b/system/default.nix index 6ca3da6b..4aef60a9 100644 --- a/system/default.nix +++ b/system/default.nix @@ -19,26 +19,14 @@ options = "--delete-older-than 7d"; }; optimise.automatic = true; - registry = { - my-nixos = { - from = { - type = "indirect"; - id = "my-nixos"; - }; - to = { - type = "git"; - url = "https://git.xenia.me.uk/pixelifytica/nixos.git?ref=main"; - }; + registry.my-nixos = { + from = { + type = "indirect"; + id = "my-nixos"; }; - my-home-manager = { - from = { - type = "indirect"; - id = "my-home-manager"; - }; - to = { - type = "git"; - url = "https://git.xenia.me.uk/pixelifytica/home-manager.git?ref=main"; - }; + to = { + type = "git"; + url = "https://git.xenia.me.uk/pixelifytica/nixos.git?ref=main"; }; }; extraOptions = ''