formatting
This commit is contained in:
@@ -1,81 +1,89 @@
|
|||||||
{ inputs, ... }:
|
{ inputs, ... }:
|
||||||
let
|
let
|
||||||
username = "john";
|
username = "john";
|
||||||
hostname = "john-pc-ubuntu";
|
hostname = "john-pc-ubuntu";
|
||||||
testTarget = "fded:fb16:653e:25da:be24:11ff:fea0:753f";
|
testTarget = "fded:fb16:653e:25da:be24:11ff:fea0:753f";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.homeManager."${hostname}" = { pkgs, config, ... }:
|
flake.modules.homeManager."${hostname}" = { pkgs, config, ... }:
|
||||||
let
|
let
|
||||||
flakeDir = "${config.xdg.configHome}/home-manager/jsl-dendritic";
|
flakeDir = "${config.xdg.configHome}/home-manager/jsl-dendritic";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = with inputs.self.modules.homeManager; [
|
imports = with inputs.self.modules.homeManager; [
|
||||||
rebuild
|
rebuild
|
||||||
john
|
john
|
||||||
resticprofile
|
resticprofile
|
||||||
sops
|
sops
|
||||||
docker
|
docker
|
||||||
desktop
|
desktop
|
||||||
];
|
step-ssh-user
|
||||||
targets.genericLinux.enable = true;
|
];
|
||||||
|
targets.genericLinux.enable = true;
|
||||||
|
|
||||||
shell.program = "zsh";
|
shell.program = "zsh";
|
||||||
|
|
||||||
home.username = "${username}";
|
home.username = "${username}";
|
||||||
home.homeDirectory = "/home/${username}";
|
home.homeDirectory = "/home/${username}";
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
nixos-rebuild
|
nixos-rebuild
|
||||||
(writeShellScriptBin "test-push" ''
|
(writeShellScriptBin "test-push" ''
|
||||||
nixos-rebuild switch --flake ${flakeDir}#janus --target-host root@${testTarget}
|
nixos-rebuild switch --flake ${flakeDir}#janus --target-host root@${testTarget}
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
# TODO: Add host-specific settings here:
|
# TODO: Add host-specific settings here:
|
||||||
# - sops secret for `restic_password/john_ubuntu`
|
# - sops secret for `restic_password/john_ubuntu`
|
||||||
# - resticprofile profile definition
|
# - resticprofile profile definition
|
||||||
# - zsh RESTIC* session variables
|
# - zsh RESTIC* session variables
|
||||||
|
|
||||||
# TODO: make this more restrictive, rather than allowing all unfree packages
|
# TODO: make this more restrictive, rather than allowing all unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nixpkgs.config.permittedInsecurePackages = [ "openssl-1.1.1w" ];
|
nixpkgs.config.permittedInsecurePackages = [ "openssl-1.1.1w" ];
|
||||||
|
|
||||||
homeManagerFlakeDir = flakeDir;
|
homeManagerFlakeDir = flakeDir;
|
||||||
docker.enable = true;
|
docker.enable = true;
|
||||||
ssh.certificates.enable = true;
|
|
||||||
ssh.matchSets = {
|
|
||||||
certs = true;
|
|
||||||
appdaemon = true;
|
|
||||||
homelab = true;
|
|
||||||
dev = true;
|
|
||||||
};
|
|
||||||
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 {
|
step-ssh-user = {
|
||||||
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
|
enable = true;
|
||||||
modules = with inputs.self.modules; [
|
principals = ["root" "${username}" "appdaemon"];
|
||||||
homeManager."${hostname}"
|
};
|
||||||
];
|
ssh = {
|
||||||
};
|
certificates.enable = true;
|
||||||
|
matchSets = {
|
||||||
|
certs = true;
|
||||||
|
appdaemon = true;
|
||||||
|
homelab = true;
|
||||||
|
dev = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
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}"
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user