23.11?
This commit is contained in:
parent
2707a0bd5d
commit
defee15663
7 changed files with 152 additions and 52 deletions
58
flake.lock
generated
58
flake.lock
generated
|
|
@ -298,16 +298,16 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1699748081,
|
||||
"narHash": "sha256-MOmMapBydd7MTjhX4eeQZzKlCABWw8W6iSHSG4OeFKE=",
|
||||
"lastModified": 1702195709,
|
||||
"narHash": "sha256-+zRjWkm5rKqQ57PuLZ3JF3xi3vPMiOJzItb1m/43Cq4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "04bac349d585c9df38d78e0285b780a140dc74a4",
|
||||
"rev": "6761b8188b860f374b457eddfdb05c82eef9752f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-23.05",
|
||||
"ref": "release-23.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
@ -484,16 +484,16 @@
|
|||
},
|
||||
"nixpkgs-darwin": {
|
||||
"locked": {
|
||||
"lastModified": 1700097215,
|
||||
"narHash": "sha256-ODQ3gBTv1iHd7lG21H+ErVISB5wVeOhd/dEogOqHs/I=",
|
||||
"lastModified": 1702161203,
|
||||
"narHash": "sha256-nq40oP9Pk/bC9/3ShxUah2FWsyHcObtS2NU5rV8shXY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9fb122519e9cd465d532f736a98c1e1eb541ef6f",
|
||||
"rev": "901fc6ea49ca9e9bbf636c48e2611588802e7b16",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-23.05-darwin",
|
||||
"ref": "nixpkgs-23.11-darwin",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
@ -550,16 +550,16 @@
|
|||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1699994397,
|
||||
"narHash": "sha256-xxNeIcMNMXH2EA9IAX6Cny+50mvY22LhIBiGZV363gc=",
|
||||
"lastModified": 1701952659,
|
||||
"narHash": "sha256-TJv2srXt6fYPUjxgLAL0cy4nuf1OZD4KuA1TrCiQqg0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d4b5a67bbe9ef750bd2fdffd4cad400dd5553af8",
|
||||
"rev": "b4372c4924d9182034066c823df76d6eaf1f4ec4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.05",
|
||||
"ref": "nixos-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
@ -708,6 +708,8 @@
|
|||
"spoons": "spoons",
|
||||
"utils": "utils",
|
||||
"x": "x",
|
||||
"xonsh-direnv": "xonsh-direnv",
|
||||
"xonsh-fish-completer": "xonsh-fish-completer",
|
||||
"xynoblog": "xynoblog",
|
||||
"zsh-completions": "zsh-completions",
|
||||
"zsh-syntax-highlighting": "zsh-syntax-highlighting",
|
||||
|
|
@ -828,6 +830,38 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xonsh-direnv": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1655602282,
|
||||
"narHash": "sha256-h56Gx/MMCW4L6nGwLAhBkiR7bX+qfFk80LEsJMiDtjQ=",
|
||||
"owner": "74th",
|
||||
"repo": "xonsh-direnv",
|
||||
"rev": "3bea5847b9459c5799c64966ec85e624d0be69b9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "74th",
|
||||
"repo": "xonsh-direnv",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xonsh-fish-completer": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1685515780,
|
||||
"narHash": "sha256-PV6u21iU0zR+xusqJmXKnosAKAS1iX7pEDx6bMPBjkE=",
|
||||
"owner": "xonsh",
|
||||
"repo": "xontrib-fish-completer",
|
||||
"rev": "ed14c56eb7436aa9f3b6c4f299b1ce281b1b5364",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "xonsh",
|
||||
"repo": "xontrib-fish-completer",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xynoblog": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
|
|||
12
flake.nix
12
flake.nix
|
|
@ -5,12 +5,12 @@
|
|||
utils.url = "github:numtide/flake-utils";
|
||||
|
||||
## nixos/nix-darwin dependencies
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
nixpkgs-darwin.url = "github:NixOS/nixpkgs/nixpkgs-23.05-darwin";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||
nixpkgs-darwin.url = "github:NixOS/nixpkgs/nixpkgs-23.11-darwin";
|
||||
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
|
||||
agenix.url = "github:ryantm/agenix/main";
|
||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager.url = "github:nix-community/home-manager/release-23.05";
|
||||
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
impermanence.url = "github:nix-community/impermanence";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
|
|
@ -58,6 +58,12 @@
|
|||
agkozak-zsh-prompt.url = "github:agkozak/agkozak-zsh-prompt";
|
||||
agkozak-zsh-prompt.flake = false;
|
||||
|
||||
## xonsh
|
||||
xonsh-fish-completer.url = "github:xonsh/xontrib-fish-completer";
|
||||
xonsh-fish-completer.flake = false;
|
||||
xonsh-direnv.url = "github:74th/xonsh-direnv";
|
||||
xonsh-direnv.flake = false;
|
||||
|
||||
## hammerspoon
|
||||
miro.url = "github:miromannino/miro-windows-manager";
|
||||
miro.flake = false;
|
||||
|
|
|
|||
|
|
@ -19,5 +19,6 @@
|
|||
run-shell -b '~/.config/tmux-switch-colors/start_theme_switcher.sh'
|
||||
'';
|
||||
};
|
||||
|
||||
home.file.".config/tmux-switch-colors".source = ./tmux-switch-colors;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,81 @@
|
|||
{ pkgs, config, lib, inputs, ... }:
|
||||
let
|
||||
cfg = config.ragon.xonsh;
|
||||
xonsh =
|
||||
pkgs.unstable.xonsh.override {
|
||||
extraPackages = ps: [
|
||||
(ps.buildPythonPackage {
|
||||
pname = "xonsh-direnv";
|
||||
version = "0.0.0";
|
||||
src = inputs.xonsh-direnv;
|
||||
})
|
||||
(ps.buildPythonPackage {
|
||||
pname = "xonsh-fish-completer";
|
||||
version = "0.0.0";
|
||||
format = "pyproject";
|
||||
doCheck = false;
|
||||
src = inputs.xonsh-fish-completer;
|
||||
propagatedBuildInputs = [
|
||||
ps.setuptools
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
options.ragon.xonsh.enable = lib.mkOption { default = false; };
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
home.packages = [
|
||||
xonsh
|
||||
];
|
||||
programs.fish.enable = true; # for completions
|
||||
home.file.".xonshrc".text = ''
|
||||
$PROMPT_FIELDS['rootuser'] = lambda: "{RED}{user}{RESET}" if $USER == "root" else None
|
||||
$PROMPT_FIELDS['sshhostname'] = lambda: "{user}@{hostname}" if "SSH_TTY" in ''${...} else $PROMPT_FIELDS['rootuser']()
|
||||
$PROMPT = '{gitstatus:{RESET}[{}{RESET}] }{sshhostname:{} }{BOLD_GREEN}{short_cwd}{RED}{last_return_code_if_nonzero: [{BOLD_INTENSE_RED}{}{RED}] }{RESET}{BOLD_BLUE}{RESET}> '
|
||||
$VI_MODE = True
|
||||
aliases['v'] = "nvim"
|
||||
aliases['c'] = "code"
|
||||
aliases['vim'] = "nvim"
|
||||
aliases['gpl'] = "git pull"
|
||||
aliases['gpf'] = "git push --force-with-lease --force-if-includes"
|
||||
aliases['gp'] = "git push"
|
||||
aliases['gd'] = "git diff"
|
||||
aliases['lg'] = "lazygit"
|
||||
aliases['gc'] = "git commit -v"
|
||||
# aliases['kb'] = "git commit -m \"\$(curl -s http://whatthecommit.com/index.txt)\""
|
||||
aliases['gs'] = "git status -v"
|
||||
aliases['gfc'] = "git fetch && git checkout"
|
||||
aliases['gl'] = "git log --graph"
|
||||
aliases['l'] = "exa -la --git"
|
||||
aliases['la'] = "exa -la --git"
|
||||
aliases['ls'] = "exa"
|
||||
aliases['ll'] = "exa -l --git"
|
||||
aliases['cat'] = "bat"
|
||||
aliases['p'] = "cd ~/proj"
|
||||
aliases['pd'] = "cd ~/proj/devsaur"
|
||||
|
||||
# https://xon.sh/xonshrc.html?highlight=nix#use-the-nix-package-manager-with-xonsh
|
||||
import os.path
|
||||
if os.path.exists(f"{$HOME}/.nix-profile") and not __xonsh__.env.get("NIX_PATH"):
|
||||
$NIX_REMOTE="daemon"
|
||||
$NIX_USER_PROFILE_DIR="/nix/var/nix/profiles/per-user/" + $USER
|
||||
$NIX_PROFILES="/nix/var/nix/profiles/default " + $HOME + "/.nix-profile"
|
||||
$NIX_SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt"
|
||||
$NIX_PATH="nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixpkgs:/nix/var/nix/profiles/per-user/root/channels"
|
||||
$PATH += [f"{$HOME}/.nix-profile/bin", "/nix/var/nix/profiles/default/bin"]
|
||||
|
||||
xontrib load direnv
|
||||
xontrib load fish_completer
|
||||
'';
|
||||
programs.vscode.userSettings."terminal.integrated.profiles.osx" = {
|
||||
xonsh = {
|
||||
path = "${xonsh}/bin/xonsh";
|
||||
};
|
||||
};
|
||||
programs.vscode.userSettings."terminal.integrated.defaultProfile.osx" = "xonsh";
|
||||
programs.tmux.extraConfig = ''
|
||||
set-option -g default-command "${xonsh}/bin/xonsh"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ with lib.my;
|
|||
#};
|
||||
};
|
||||
|
||||
environment.pathsToLink = [ "/share/fish" ];
|
||||
|
||||
ragon.services.borgmatic =
|
||||
let
|
||||
tmMountPath = "/tmp/timeMachineSnapshotForBorg";
|
||||
|
|
@ -149,7 +151,7 @@ with lib.my;
|
|||
pandoc
|
||||
|
||||
#unstable.qutebrowser
|
||||
unstable.python311Packages.adblock
|
||||
#unstable.python311Packages.adblock
|
||||
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -73,23 +73,17 @@ in
|
|||
services.borgmatic = {
|
||||
enable = true;
|
||||
configurations."ds9-offsite" = {
|
||||
location = {
|
||||
source_directories = [ "/backups" "/data" "/persistent" ];
|
||||
repositories = [ "ssh://root@gatebridge/media/backup/ds9" ];
|
||||
exclude_if_present = [ ".nobackup" ];
|
||||
};
|
||||
source_directories = [ "/backups" "/data" "/persistent" ];
|
||||
repositories = [ "ssh://root@gatebridge/media/backup/ds9" ];
|
||||
exclude_if_present = [ ".nobackup" ];
|
||||
#upload_rate_limit = "4000";
|
||||
storage = {
|
||||
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.borgmaticEncryptionKey.path}";
|
||||
compression = "auto,zstd,10";
|
||||
ssh_command = "ssh -o GlobalKnownHostsFile=${config.age.secrets.gatebridgeHostKeys.path} -i ${config.age.secrets.ds9OffsiteBackupSSH.path}";
|
||||
};
|
||||
hooks = {
|
||||
before_actions = [ "${pkgs.curl}/bin/curl -fss -m 10 --retry 5 -o /dev/null $(${pkgs.coreutils}/bin/cat ${config.age.secrets.ds9SyncoidHealthCheckUrl.path})/start" ];
|
||||
after_actions = [ "${pkgs.curl}/bin/curl -fss -m 10 --retry 5 -o /dev/null $(${pkgs.coreutils}/bin/cat ${config.age.secrets.ds9SyncoidHealthCheckUrl.path})" ];
|
||||
on_error = [ "${pkgs.curl}/bin/curl -fss -m 10 --retry 5 -o /dev/null $(${pkgs.coreutils}/bin/cat ${config.age.secrets.ds9SyncoidHealthCheckUrl.path})/fail" ];
|
||||
# postgresql_databases = [{ name = "all"; pg_dump_command = "${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_dumpall"; pg_restore_command = "${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_restore"; }];
|
||||
};
|
||||
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.borgmaticEncryptionKey.path}";
|
||||
compression = "auto,zstd,10";
|
||||
ssh_command = "ssh -o GlobalKnownHostsFile=${config.age.secrets.gatebridgeHostKeys.path} -i ${config.age.secrets.ds9OffsiteBackupSSH.path}";
|
||||
before_actions = [ "${pkgs.curl}/bin/curl -fss -m 10 --retry 5 -o /dev/null $(${pkgs.coreutils}/bin/cat ${config.age.secrets.ds9SyncoidHealthCheckUrl.path})/start" ];
|
||||
after_actions = [ "${pkgs.curl}/bin/curl -fss -m 10 --retry 5 -o /dev/null $(${pkgs.coreutils}/bin/cat ${config.age.secrets.ds9SyncoidHealthCheckUrl.path})" ];
|
||||
on_error = [ "${pkgs.curl}/bin/curl -fss -m 10 --retry 5 -o /dev/null $(${pkgs.coreutils}/bin/cat ${config.age.secrets.ds9SyncoidHealthCheckUrl.path})/fail" ];
|
||||
# postgresql_databases = [{ name = "all"; pg_dump_command = "${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_dumpall"; pg_restore_command = "${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/pg_restore"; }];
|
||||
retention = {
|
||||
keep_daily = 7;
|
||||
keep_weekly = 4;
|
||||
|
|
|
|||
|
|
@ -145,31 +145,25 @@
|
|||
services.borgmatic = {
|
||||
enable = true;
|
||||
configurations."picard-ds9" = {
|
||||
location = {
|
||||
source_directories = [ "/persistent" ];
|
||||
repositories = [
|
||||
"ssh://picardbackup@ds9/backups/picard/borgmatic"
|
||||
"ssh://root@gatebridge/media/backup/picard"
|
||||
];
|
||||
exclude_if_present = [ ".nobackup" ];
|
||||
};
|
||||
storage = {
|
||||
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.picardResticPassword.path}";
|
||||
compression = "auto,zstd,10";
|
||||
ssh_command = "ssh -o GlobalKnownHostsFile=${config.age.secrets.gatebridgeHostKeys.path} -i ${config.age.secrets.picardResticSSHKey.path}";
|
||||
};
|
||||
source_directories = [ "/persistent" ];
|
||||
repositories = [
|
||||
"ssh://picardbackup@ds9/backups/picard/borgmatic"
|
||||
"ssh://root@gatebridge/media/backup/picard"
|
||||
];
|
||||
exclude_if_present = [ ".nobackup" ];
|
||||
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.picardResticPassword.path}";
|
||||
compression = "auto,zstd,10";
|
||||
ssh_command = "ssh -o GlobalKnownHostsFile=${config.age.secrets.gatebridgeHostKeys.path} -i ${config.age.secrets.picardResticSSHKey.path}";
|
||||
retention = {
|
||||
keep_daily = 7;
|
||||
keep_weekly = 4;
|
||||
keep_monthly = 12;
|
||||
keep_yearly = 10;
|
||||
};
|
||||
hooks = {
|
||||
before_actions = [ "${pkgs.curl}/bin/curl -fss -m 10 --retry 5 -o /dev/null $(${pkgs.coreutils}/bin/cat ${config.age.secrets.picardResticHealthCheckUrl.path})/start" ];
|
||||
after_actions = [ "${pkgs.curl}/bin/curl -fss -m 10 --retry 5 -o /dev/null $(${pkgs.coreutils}/bin/cat ${config.age.secrets.picardResticHealthCheckUrl.path})" ];
|
||||
on_error = [ "${pkgs.curl}/bin/curl -fss -m 10 --retry 5 -o /dev/null $(${pkgs.coreutils}/bin/cat ${config.age.secrets.picardResticHealthCheckUrl.path})/fail" ];
|
||||
postgresql_databases = [{ name = "all"; pg_dump_command = "${pkgs.postgresql}/bin/pg_dumpall"; pg_restore_command = "${pkgs.postgresql}/bin/pg_restore"; }];
|
||||
};
|
||||
before_actions = [ "${pkgs.curl}/bin/curl -fss -m 10 --retry 5 -o /dev/null $(${pkgs.coreutils}/bin/cat ${config.age.secrets.picardResticHealthCheckUrl.path})/start" ];
|
||||
after_actions = [ "${pkgs.curl}/bin/curl -fss -m 10 --retry 5 -o /dev/null $(${pkgs.coreutils}/bin/cat ${config.age.secrets.picardResticHealthCheckUrl.path})" ];
|
||||
on_error = [ "${pkgs.curl}/bin/curl -fss -m 10 --retry 5 -o /dev/null $(${pkgs.coreutils}/bin/cat ${config.age.secrets.picardResticHealthCheckUrl.path})/fail" ];
|
||||
postgresql_databases = [{ name = "all"; pg_dump_command = "${pkgs.postgresql}/bin/pg_dumpall"; pg_restore_command = "${pkgs.postgresql}/bin/pg_restore"; }];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue