From 1654c9a3493ffd8751caa1515d84729f92243210 Mon Sep 17 00:00:00 2001 From: Dan Nixon Date: Mon, 24 Jun 2024 15:24:36 +0100 Subject: [PATCH] yukari: remove --- .github/workflows/ci.yml | 1 - configurations/yukari/README.md | 13 ---- .../yukari/home-manager/default.nix | 31 ---------- configurations/yukari/nixos/default.nix | 61 ------------------- configurations/yukari/nixos/disk-config.nix | 42 ------------- .../yukari/nixos/update-storage.nix | 34 ----------- flake.nix | 2 - 7 files changed, 184 deletions(-) delete mode 100644 configurations/yukari/README.md delete mode 100644 configurations/yukari/home-manager/default.nix delete mode 100644 configurations/yukari/nixos/default.nix delete mode 100644 configurations/yukari/nixos/disk-config.nix delete mode 100644 configurations/yukari/nixos/update-storage.nix diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79cfe37..98b530d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,6 @@ jobs: - dan@maya - minimal - dan@mitori - - dan@yukari - dan@yuyuko steps: diff --git a/configurations/yukari/README.md b/configurations/yukari/README.md deleted file mode 100644 index 512c25e..0000000 --- a/configurations/yukari/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# `yukari` - -## Hardware - -Hetzner CPX11 VM in Helsinki. - -## Deployment - -- `nixos-anywhere --tty --flake .#yukari root@` -- Connect via web console - - `passwd` - - `sudo tailscale up` -- (then manage normally/locally via `nix-configs` on target) diff --git a/configurations/yukari/home-manager/default.nix b/configurations/yukari/home-manager/default.nix deleted file mode 100644 index a93d1ab..0000000 --- a/configurations/yukari/home-manager/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - inputs, - outputs, -}: let - pkgs-unstable = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux; -in - inputs.home-manager.lib.homeManagerConfiguration { - pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; - extraSpecialArgs = {inherit inputs outputs pkgs-unstable;}; - - modules = [ - ../../../modules/home-manager/terminal_environment - ../../../modules/home-manager/borgmatic.nix - ../../../modules/home-manager/email - - { - programs.borgmatic.backups."main" = { - location = { - sourceDirectories = [ - "/home/dan/docs" - "/home/dan/git" - "/home/dan/phone" - "/home/dan/tombs" - ]; - repositories = ["ssh://sfxwxlb3@sfxwxlb3.repo.borgbase.com/./repo"]; - }; - storage.encryptionPasscommand = "pass borg/yukari/passphrase"; - }; - } - ]; - } diff --git a/configurations/yukari/nixos/default.nix b/configurations/yukari/nixos/default.nix deleted file mode 100644 index bc0a6a5..0000000 --- a/configurations/yukari/nixos/default.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ - inputs, - outputs, -}: -inputs.nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs outputs;}; - - modules = [ - inputs.disko.nixosModules.disko - ({modulesPath, ...}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - (modulesPath + "/profiles/qemu-guest.nix") - ]; - }) - ./disk-config.nix - - ../../../modules/nixos/base - ../../../modules/nixos/dan.nix - ../../../modules/nixos/dnscrypt-proxy.nix - ../../../modules/nixos/networkmanager.nix - ../../../modules/nixos/ssh.nix - ../../../modules/nixos/syncthing.nix - - ({pkgs, ...}: { - nixpkgs.overlays = [ - (final: _prev: { - update-storage = final.callPackage ./update-storage.nix {}; - }) - ]; - - boot.loader.grub = { - efiSupport = true; - efiInstallAsRemovable = true; - }; - - nixpkgs.hostPlatform = "x86_64-linux"; - - networking.hostName = "yukari"; - - networking.firewall.extraInputRules = '' - iifname "tailscale0" tcp dport 22 log prefix "firewall: new SSH connection: " counter accept - iifname "tailscale0" tcp dport 22000 log prefix "firewall: Syncthing: " counter accept - iifname "tailscale0" udp dport 22000 log prefix "firewall: Syncthing: " counter accept - iifname "tailscale0" udp dport 21027 log prefix "firewall: Syncthing: " counter accept - ''; - services.openssh.openFirewall = false; - services.syncthing.openDefaultPorts = false; - - services.tailscale.enable = true; - - dotfiles.dan.initialPassword = "for-fucks-sake-change-this"; - - # Disable gpg-agent, but ensure the directory is present for SSH forwarded socket - dotfiles.dan.enableGpgAgent = false; - systemd.user.tmpfiles.rules = ["d %t/gnupg 700 - - -"]; - - environment.systemPackages = with pkgs; [update-storage]; - }) - ]; -} diff --git a/configurations/yukari/nixos/disk-config.nix b/configurations/yukari/nixos/disk-config.nix deleted file mode 100644 index b80ad6f..0000000 --- a/configurations/yukari/nixos/disk-config.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - disko.devices.disk = { - sda = { - type = "disk"; - device = "/dev/sda"; - content = { - type = "gpt"; - partitions = { - boot = { - name = "boot"; - size = "1M"; - type = "EF02"; - }; - ESP = { - name = "ESP"; - size = "500M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - root = { - name = "root"; - size = "100%"; - content = { - type = "luks"; - name = "cryptedroot"; - extraOpenArgs = ["--allow-discards"]; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; - }; - }; - }; - }; - }; - }; -} diff --git a/configurations/yukari/nixos/update-storage.nix b/configurations/yukari/nixos/update-storage.nix deleted file mode 100644 index b11dfda..0000000 --- a/configurations/yukari/nixos/update-storage.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - lib, - writeTextFile, - bash, - git, - rsync, -}: let - name = "update-storage"; -in - writeTextFile { - inherit name; - executable = true; - destination = "/bin/${name}"; - - text = '' - #!${bash}${bash.shellPath} - - set -ex - - ${git}/bin/git -C "$HOME/git/notebook.git" push storage1 - ${git}/bin/git -C "$HOME/git/password-store.git" push storage1 master - - ${rsync}/bin/rsync \ - --archive \ - --inplace \ - --verbose \ - ~/tombs/ \ - '100.94.151.123:/data/dan/tombs' - ''; - - meta = with lib; { - mainProgram = name; - }; - } diff --git a/flake.nix b/flake.nix index a0a4bb9..4155ca7 100644 --- a/flake.nix +++ b/flake.nix @@ -96,7 +96,6 @@ kawashiro = import ./configurations/kawashiro/nixos {inherit inputs outputs;}; maya = import ./configurations/maya/nixos {inherit inputs outputs;}; mitori = import ./configurations/mitori/nixos {inherit inputs outputs;}; - yukari = import ./configurations/yukari/nixos {inherit inputs outputs;}; yuyuko = import ./configurations/yuyuko/nixos {inherit inputs outputs;}; }; @@ -108,7 +107,6 @@ "dan@mitori" = import ./configurations/mitori/home-manager {inherit inputs outputs;}; "dan@maya" = import ./configurations/maya/home-manager {inherit inputs outputs;}; minimal = import ./configurations/minimal/home-manager {inherit inputs outputs;}; - "dan@yukari" = import ./configurations/yukari/home-manager {inherit inputs outputs;}; "dan@yuyuko" = import ./configurations/yuyuko/home-manager {inherit inputs outputs;}; }; };