Skip to content

Commit 38bec72

Browse files
committed
chore: rpi updates
1 parent 11fc752 commit 38bec72

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Deployment configuration contained in `./deploy`
3838
- build the image: `nix build .#nixosConfigurations.rpi5.config.system.build.sdImage`
3939
- decompress (to `rpi-image`): `zstd --decompress result/sd-image/nixos-sd-image-24.11.20240529.ad57eef-aarch64-linux.img.zst -o rpi-image`
4040
- use `dd` to write the image to an sd card: `sudo dd if=rpi-image of=/dev/sdX bs=4M`
41+
- remotely apply nixos-configuration: `nixos-rebuild switch --flake .#rpi5 --target-host rpi5`
4142

4243
## terraform
4344

nixos/configurations/rpi5/default.nix

+20-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,24 @@ inputs: {
88
inputs.raspberry-pi-nix.nixosModules.raspberry-pi
99
];
1010
environment.systemPackages = [inputs.self.packages.aarch64-linux.neovim];
11-
users.users.root.openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL1Uj62/yt8juK3rSfrVuX/Ut+xzw1Z75KZS/7fOLm6l"];
11+
justinrubek = {
12+
administration.enable = true;
13+
tailscale.enable = true;
14+
};
15+
networking.firewall = {
16+
allowedTCPPorts = [22];
17+
interfaces.${config.services.tailscale.interfaceName} = {
18+
allowedTCPPorts = [22];
19+
};
20+
};
21+
users.users = {
22+
justin = {
23+
isNormalUser = true;
24+
description = "Justin";
25+
extraGroups = ["networkmanager" "wheel" "docker" "input" "systemd-journal"];
26+
shell = pkgs.bashInteractive;
27+
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL1Uj62/yt8juK3rSfrVuX/Ut+xzw1Z75KZS/7fOLm6l"];
28+
};
29+
root.openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL1Uj62/yt8juK3rSfrVuX/Ut+xzw1Z75KZS/7fOLm6l"];
30+
};
1231
}

nixos/modules/admin_ssh.nix

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@ in {
1313
};
1414

1515
config = lib.mkIf cfg.enable {
16-
# provide the `admin` user
1716
users.users.admin = {
1817
name = "admin";
1918
isNormalUser = true;
2019
extraGroups = ["wheel"];
2120

2221
openssh.authorizedKeys.keys = [
23-
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCsUQZGQOH2kmQNeG/Ezmsv6A/70JUO8nLh9WaZ/o7DlmpYeEyUdloTazxpP9FjuRv7d7nzRqtQFOF74TBaDEAxR9/eHxX9zc5RfyE1RYeGWPGgnuHpxoTijh70ncTlU6sr0oqP7e24qeIy7pqWKQmV8RDOkr2etbnb5OpCHEsZJ0l0sPYQpYi0Ud8cM/HFCCVPeg21wVuxBX2rA4ze8+YgnPJZRnhtHZg7rAapvhiIfDAJ3xIweauCoz0vZdmANlUsg2AoOx9b2Ym6rGNmRrJUNZYcsNxmUHc1/oc1g9NZ7GoaMhfw0BHVJ0kyfE2glpJX9iu6WHWjbL+XM0QnCFrc3hbQc41zYQsMHcY/N/P5MW9Gj77Q9P/qRDbwlVOdoFw1bUpIoMgsJ95o5gv5mClHuBLZD3ZO5cyRfnjH4w0pt6EnWtbkORsT5A7ULOQOG8AOuBL3ok/yVTVAFV2yMbaEg1BM2By0U6hn9M6SGWuOiM1oMwvVFJWdmZsvPeTZqaU= justin"
22+
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL1Uj62/yt8juK3rSfrVuX/Ut+xzw1Z75KZS/7fOLm6l"
2423
];
2524
};
2625

0 commit comments

Comments
 (0)