2022-01-03 16:50:22 +00:00
|
|
|
{
|
2022-12-04 13:45:43 +00:00
|
|
|
tree,
|
|
|
|
modulesPath,
|
2023-09-13 19:26:50 +01:00
|
|
|
config,
|
2022-12-04 13:45:43 +00:00
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
2023-09-13 19:26:50 +01:00
|
|
|
}: let
|
|
|
|
secrets = config.services.secrets.secrets;
|
|
|
|
in {
|
2023-09-16 16:06:16 +01:00
|
|
|
networking.firewall.enable = true;
|
|
|
|
networking.firewall.allowPing = true;
|
|
|
|
|
2023-09-13 19:26:50 +01:00
|
|
|
imports = with tree;
|
|
|
|
[
|
|
|
|
users.root
|
|
|
|
users.chaos
|
|
|
|
|
|
|
|
profiles.base
|
|
|
|
profiles.sshd
|
2023-09-14 19:44:27 +01:00
|
|
|
profiles.nginx
|
|
|
|
profiles.nginx-firewall
|
2023-09-13 19:26:50 +01:00
|
|
|
|
|
|
|
profiles.connectivity.network_manager
|
|
|
|
profiles.connectivity.bluetooth
|
|
|
|
profiles.connectivity.ios
|
|
|
|
|
|
|
|
./secrets.nix
|
|
|
|
|
|
|
|
./boot.nix
|
|
|
|
(modulesPath + "/installer/sd-card/sd-image.nix")
|
|
|
|
]
|
|
|
|
++ (with hosts.raspberry.profiles; [
|
|
|
|
external-drive
|
2023-09-14 19:44:27 +01:00
|
|
|
wireguard
|
2023-09-16 16:06:16 +01:00
|
|
|
cockroachdb
|
|
|
|
piped
|
2023-09-14 19:44:27 +01:00
|
|
|
auto-storage-backups
|
2023-09-16 16:06:16 +01:00
|
|
|
rclone
|
2023-09-13 19:26:50 +01:00
|
|
|
]);
|
|
|
|
|
|
|
|
environment.systemPackages = [
|
|
|
|
(pkgs.writeShellScriptBin "vault-login" ''
|
|
|
|
${pkgs.vault-bin}/bin/vault login -method=userpass username=raspberry password=$(cat ${secrets.vault_login_password.path})
|
|
|
|
'')
|
2022-01-04 12:31:29 +00:00
|
|
|
];
|
2022-01-03 16:50:22 +00:00
|
|
|
|
2022-01-16 11:22:44 +00:00
|
|
|
home-manager.users.root = {
|
2022-12-04 13:45:43 +00:00
|
|
|
imports = with tree; [home.base home.dev.small];
|
2023-09-13 16:21:54 +01:00
|
|
|
home.stateVersion = "23.05";
|
2022-01-16 11:22:44 +00:00
|
|
|
};
|
2023-09-13 16:21:54 +01:00
|
|
|
|
2022-01-29 21:44:38 +00:00
|
|
|
home-manager.users.chaos = {
|
2022-12-04 13:45:43 +00:00
|
|
|
imports = with tree; [home.base home.dev.small];
|
2023-09-13 16:21:54 +01:00
|
|
|
home.stateVersion = "23.05";
|
2022-01-16 11:22:44 +00:00
|
|
|
};
|
2022-01-03 16:50:22 +00:00
|
|
|
|
2022-12-04 13:45:43 +00:00
|
|
|
boot.supportedFilesystems = lib.mkForce ["vfat"];
|
2022-01-24 21:18:03 +00:00
|
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
2022-01-24 16:50:53 +00:00
|
|
|
|
2022-01-03 16:50:22 +00:00
|
|
|
networking.hostName = "raspberry";
|
|
|
|
time.timeZone = "Europe/London";
|
|
|
|
|
|
|
|
sdImage.compressImage = lib.mkForce false;
|
|
|
|
|
|
|
|
system.stateVersion = "21.11";
|
|
|
|
}
|