Files
dendritic/modules/hosts/john-pc-ubuntu.nix
2026-03-11 18:31:41 -05:00

76 lines
1.9 KiB
Nix

{ inputs, ... }:
let
hostname = "john-pc-ubuntu";
in
{
flake.modules.homeManager."${hostname}" = { pkgs, config, ... }:
let
flakeDir = "${config.xdg.configHome}/home-manager/jsl-dendritic";
in
{
imports = with inputs.self.modules.homeManager; [
rebuild
zsh
john
ssh
resticprofile
sops
docker
desktop
];
home.packages = with pkgs; [
nixos-rebuild
(writeShellScriptBin "test-push" ''
nixos-rebuild switch --flake ${flakeDir}#janus --target-host root@fded:fb16:653e:25da:be24:11ff:fea0:753f
'')
];
# TODO: Add host-specific settings here:
# - sops secret for `restic_password/john_ubuntu`
# - resticprofile profile definition
# - zsh RESTIC* session variables
# TODO: make this more restrictive, rather than allowing all unfree packages
nixpkgs.config.allowUnfree = true;
nixpkgs.config.permittedInsecurePackages = [ "openssl-1.1.1w" ];
homeManagerFlakeDir = flakeDir;
docker.enable = true;
ssh.matchSets = {
certs = true;
appdaemon = true;
homelab = true;
dev = true;
};
shell.program = "zsh";
sops.secrets."restic_password/john_ubuntu" = {
path = "${config.xdg.configHome}/resticprofile/password.txt";
};
programs.resticprofile = {
enable= true;
profiles = {
default = {
"inherit" = "base";
repository = "rest:https://soteria.john-stream.com/john-ubuntu";
# cacert = "${config.home.homeDirectory}/.step/certs/root_ca.crt";
# tls-client-cert = "${config.home.homeDirectory}/.step/certs/mtls.pem";
backup = {
source = [
"${config.xdg.userDirs.documents}"
"/conf"
];
schedule = "*-*-* *:15,30,45:00";
};
};
};
};
};
flake.homeConfigurations."${hostname}" = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
modules = with inputs.self.modules; [
homeManager."${hostname}"
];
};
}