15 Commits

Author SHA1 Message Date
John Lancaster
e662bb181a janus root 2026-01-03 15:37:44 -06:00
John Lancaster
cbce55a4fa added janus ssh target 2026-01-03 15:32:26 -06:00
John Lancaster
2e5f045bb2 fix 2026-01-03 15:05:34 -06:00
John Lancaster
fcb50fb567 reworked resticprofile scripts 2026-01-03 14:50:28 -06:00
John Lancaster
247d87adae added another exclude for john-nas 2026-01-03 00:31:17 -06:00
John Lancaster
e83fdadf7d soteria target updates 2025-12-28 12:21:32 -06:00
John Lancaster
593602d87a broke up update scripts 2025-12-28 11:32:49 -06:00
John Lancaster
0c00e983d6 added soteria ssh target 2025-12-28 11:31:52 -06:00
John Lancaster
4e875f654f ssh config 2025-12-27 11:57:34 -06:00
John Lancaster
432453304e wildcard match block for john-stream.com hosts with a cert 2025-12-18 08:53:53 -06:00
John Lancaster
a7eebbc8c8 default match block 2025-12-18 08:53:21 -06:00
John Lancaster
c442e84e11 using zsh as the ghostty command 2025-12-17 22:38:11 -06:00
John Lancaster
da0ee1e014 ghostty working again 2025-12-07 22:15:09 -06:00
John Lancaster
8f1ea421dc comment 2025-12-07 22:01:57 -06:00
John Lancaster
422f662a64 added excludes 2025-12-07 22:01:39 -06:00
5 changed files with 68 additions and 18 deletions

View File

@@ -55,9 +55,12 @@
btop
yazi
uv
(writeShellScriptBin "nhms" ''
nix run home-manager -- switch --flake ~/.config/home-manager --impure
'')
(writeShellScriptBin "nhmu" ''
nix flake update --flake ~/.config/home-manager
nix run home-manager -- switch --flake ~/.config/home-manager --impure
nhms
'')
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the

View File

@@ -16,7 +16,7 @@
enableZshIntegration = true;
package = config.lib.nixGL.wrap pkgs.ghostty;
settings = {
command = "TERM=xterm-256color /usr/bin/bash";
command = "TERM=xterm-256color ${pkgs.zsh}/bin/zsh";
font-size = 12;
font-family = "Source Code Pro";
# theme = "idleToes";
@@ -58,7 +58,7 @@
name = "Ghostty";
type = "Application";
comment = "A terminal emulator";
exec = "nixGL ghostty";
exec = "nixGLMesa ghostty";
icon = "com.mitchellh.ghostty";
terminal = false;
startupNotify = true;
@@ -75,14 +75,14 @@
actions = {
new-window = {
name = "New Window";
exec = "nixGL ghostty";
exec = "nixGLMesa ghostty";
};
};
};
# https://discourse.nixos.org/t/apps-installed-via-home-manager-are-not-visible-within-gnome/48252/2
# home.activation.copyDesktopFiles = lib.hm.dag.entryAfter ["installPackages"] ''
# if [ "$XDG_CURRENT_DESKTOP" = "GNOME" ]; then
# if [[ "$XDG_CURRENT_DESKTOP" == "GNOME" || "$XDG_CURRENT_DESKTOP" == "Unity" ]]; then
# mkdir -p "${config.home.homeDirectory}/.local/share/applications"

View File

@@ -14,11 +14,13 @@
backup = {
verbose = true;
exclude = [
".vscode*"
".cache"
".devenv"
".rustup"
".cargo"
".venv"
".pyenv"
".devenv"
".vscode*"
"data/postgres"
"build"
"__pycache__"
@@ -33,6 +35,9 @@
"dist"
"/home/*/Pictures"
"/home/*/Videos"
"/home/*/go"
"/home/*/snap"
"/home/john/john-nas"
];
schedule-permission = "user";
schedule-priority = "background";

View File

@@ -7,6 +7,7 @@ let
baseProfile = import ./profiles/base.nix { inherit lib config; };
profiles = lib.recursiveUpdate baseProfile cfg.profiles;
in {
# Create the programs.resticprofile option
options.programs.resticprofile = {
enable = mkEnableOption "Enable resticprofile (Restic backup profile manager)";
@@ -45,21 +46,27 @@ in {
resticprofileCmd = ''
${cfg.package}/bin/resticprofile --config "${config.xdg.configHome}/resticprofile/profiles.yaml"
'';
# Define the rp script as a variable so we can reference it
rpScript = pkgs.writeShellScriptBin "rp" ''
set -e
sudo ${cfg.package}/bin/resticprofile --config "${config.xdg.configHome}/resticprofile/profiles.yaml" $@
'';
rpbackupScript = pkgs.writeShellScriptBin "rp-backup" ''
${rpScript}/bin/rp run-schedule backup@default
'';
in {
# Add a script to manually unschedule and reschedule all resticprofiles
home.packages = [
cfg.package
(pkgs.writeShellScriptBin "rp" ''
set -e
sudo ${cfg.package}/bin/resticprofile --config "${config.xdg.configHome}/resticprofile/profiles.yaml" $@
'')
rpScript
rpbackupScript
(pkgs.writeShellScriptBin "rps" ''
set -e
rp unschedule --all
rp schedule --all
${rpScript}/bin/rp unschedule --all
${rpScript}/bin/rp schedule --all
'')
(pkgs.writeShellScriptBin "rp-test" "rp run-schedule backup@default --dry-run")
(pkgs.writeShellScriptBin "rp-test" "rp run-schedule backup@default --dry-run")
(pkgs.writeShellScriptBin "rp-test" "${rpbackupScript}/bin/rp-backup --dry-run")
];
xdg.configFile."resticprofile/profiles.yaml".source = yamlFormat.generate "profiles" {
version = "2";

View File

@@ -11,9 +11,18 @@
{
"*" = {
user = "john";
forwardAgent = true;
serverAliveInterval = 60;
serverAliveCountMax = 2;
# From the help text about the deprecation of the default config:
forwardAgent = false;
addKeysToAgent = "no";
compression = false;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
};
}
(lib.mkIf (config.profile == "personal") {
@@ -29,6 +38,10 @@
hostname = "192.168.1.110";
user = "root";
};
"gitea" = {
hostname = "192.168.1.104";
user = "john";
};
"hermes" = {
hostname = "192.168.1.150";
user = "root";
@@ -57,6 +70,28 @@
hostname = "192.168.1.129";
user = "root";
};
"janus" = {
hostname = "janus.john-stream.com";
user = "root";
identitiesOnly = true;
identityFile = "~/.ssh/id_ed25519";
certificateFile = "~/.ssh/id_ed25519-cert.pub";
};
"soteria" = {
hostname = "soteria.john-stream.com";
user = "john";
identitiesOnly = true;
identityFile = "~/.ssh/id_ed25519";
certificateFile = "~/.ssh/id_ed25519-cert.pub";
};
"*.john-stream.com" = {
user = "john";
identitiesOnly = true;
identityFile = "~/.ssh/id_ed25519";
certificateFile = "~/.ssh/id_ed25519-cert.pub";
addKeysToAgent = "yes";
forwardAgent = true;
};
})
(lib.mkIf (config.profile == "work") {
"ubuntu-nvidia" = {