From 1e20b6b4016e3aef4300420034155c788ca10ae9 Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Wed, 19 Jun 2024 20:22:37 +0100 Subject: [PATCH 1/4] Allow SSH login to any machine --- colmena/remote.nix | 5 ----- common/{openssh.nix => ssh.nix} | 2 -- hive.nix | 1 + 3 files changed, 1 insertion(+), 7 deletions(-) rename common/{openssh.nix => ssh.nix} (80%) diff --git a/colmena/remote.nix b/colmena/remote.nix index 47191f7..84c28bd 100644 --- a/colmena/remote.nix +++ b/colmena/remote.nix @@ -7,10 +7,5 @@ tags = [ "remote" ]; }; - # Required for remote builds security.sudo.wheelNeedsPassword = false; - - imports = [ - ../common/openssh.nix - ]; } diff --git a/common/openssh.nix b/common/ssh.nix similarity index 80% rename from common/openssh.nix rename to common/ssh.nix index 6715088..d8dd364 100644 --- a/common/openssh.nix +++ b/common/ssh.nix @@ -10,6 +10,4 @@ }; services.fail2ban.enable = true; - - networking.firewall.allowedTCPPorts = [ 22 ]; } \ No newline at end of file diff --git a/hive.nix b/hive.nix index e3ccd2b..7251c01 100644 --- a/hive.nix +++ b/hive.nix @@ -23,6 +23,7 @@ in { (import "${sources.home-manager}/nixos") (import "${sources.agenix}/modules/age.nix") ./pinning.nix + ./common/ssh.nix ./common/sudo.nix ./common/utilities.nix ./users/qenya.nix From a36c1d5e9f11a991b186fb122001c8f7bdacc400 Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Wed, 19 Jun 2024 20:30:53 +0100 Subject: [PATCH 2/4] Add key for tohru to agenix secrets file --- secrets/secrets.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 15c6b9f..a4a270a 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -1,5 +1,6 @@ let - yevaud = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICHUAgyQhl390yUObLUI+jEbuNrZ2U6+8px628DolD+T"; - systems = [ yevaud ]; + tohru = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOk8wuGzF0Y7SaH9aimo3SmCz99MTQwL+rEVhx0jsueU root@tohru"; + yevaud = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICHUAgyQhl390yUObLUI+jEbuNrZ2U6+8px628DolD+T root@yevaud"; + systems = [ tohru yevaud ]; in { } From f71a65d0513d3268b7469c3a382d5a6549309135 Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Wed, 19 Jun 2024 20:58:18 +0100 Subject: [PATCH 3/4] [tohru] Remove reference to itch client --- common/{gaming.nix => steam.nix} | 5 ----- hosts/tohru/configuration.nix | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) rename common/{gaming.nix => steam.nix} (68%) diff --git a/common/gaming.nix b/common/steam.nix similarity index 68% rename from common/gaming.nix rename to common/steam.nix index b58ffc5..d59135c 100644 --- a/common/gaming.nix +++ b/common/steam.nix @@ -8,9 +8,4 @@ }; services.joycond.enable = true; - - # Currently broken: - # environment.systemPackages = with pkgs; [ - # itch - # ]; } \ No newline at end of file diff --git a/hosts/tohru/configuration.nix b/hosts/tohru/configuration.nix index 70865b3..388c069 100644 --- a/hosts/tohru/configuration.nix +++ b/hosts/tohru/configuration.nix @@ -6,7 +6,7 @@ ./hardware-configuration.nix ./home.nix ../../common/fonts.nix - ../../common/gaming.nix + ../../common/steam.nix ]; boot.loader.systemd-boot.enable = true; From 19886a488c2a0b853274858228235e54c6effe2e Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Wed, 19 Jun 2024 21:00:03 +0100 Subject: [PATCH 4/4] [tohru] Enable syncthing with kilgharrah --- hosts/tohru/configuration.nix | 1 + hosts/tohru/syncthing.nix | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 hosts/tohru/syncthing.nix diff --git a/hosts/tohru/configuration.nix b/hosts/tohru/configuration.nix index 388c069..47e8232 100644 --- a/hosts/tohru/configuration.nix +++ b/hosts/tohru/configuration.nix @@ -7,6 +7,7 @@ ./home.nix ../../common/fonts.nix ../../common/steam.nix + ./syncthing.nix ]; boot.loader.systemd-boot.enable = true; diff --git a/hosts/tohru/syncthing.nix b/hosts/tohru/syncthing.nix new file mode 100644 index 0000000..0bd239c --- /dev/null +++ b/hosts/tohru/syncthing.nix @@ -0,0 +1,24 @@ +{ config, lib, pkgs, ... }: + +{ + services.syncthing = { + enable = true; + user = "qenya"; + dataDir = "/data/syncthing"; + openDefaultPorts = true; + overrideDevices = true; + overrideFolders = true; + settings = { + devices = { + "kilgharrah" = { id = "RDT7IGD-76FZ6LY-37PPB2W-DWPQRPR-LZ4AXF7-4GIIHYJ-RVXUUSG-ZXPN3AZ"; }; + }; + folders = { + "Documents" = { + id = "alp59-7gs9s"; + path = "~/Documents"; + devices = [ "kilgharrah" ]; + }; + }; + }; + }; +}