Compare commits
7 commits
c361f1f7ed
...
6e2981cf22
Author | SHA1 | Date | |
---|---|---|---|
6e2981cf22 | |||
23f756a5bd | |||
9cc8cbc0c8 | |||
fd09638278 | |||
0b0b1bd8ea | |||
ef7763bfbc | |||
880deccb75 |
19 changed files with 460 additions and 262 deletions
|
@ -157,7 +157,22 @@
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.${config.custom.username} = {
|
users = {
|
||||||
|
root = {
|
||||||
|
# Inherit from user
|
||||||
|
programs.home-manager.enable = config.home-manager.users.${config.custom.username}.programs.home-manager.enable;
|
||||||
|
systemd.user.startServices = config.home-manager.users.${config.custom.username}.systemd.user.startServices;
|
||||||
|
nixpkgs.config = config.home-manager.users.${config.custom.username}.nixpkgs.config;
|
||||||
|
nix.gc = config.home-manager.users.${config.custom.username}.nix.gc;
|
||||||
|
|
||||||
|
home = {
|
||||||
|
username = "root";
|
||||||
|
homeDirectory = "/root";
|
||||||
|
stateVersion = config.home-manager.users.${config.custom.username}.home.stateVersion;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
${config.custom.username} = {
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
systemd.user.startServices = "sd-switch"; # Start/stop user services immediately
|
systemd.user.startServices = "sd-switch"; # Start/stop user services immediately
|
||||||
|
|
||||||
|
@ -180,4 +195,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,9 @@ with lib; let
|
||||||
jq = "${pkgs.jq}/bin/jq";
|
jq = "${pkgs.jq}/bin/jq";
|
||||||
kill = "${pkgs.procps}/bin/kill";
|
kill = "${pkgs.procps}/bin/kill";
|
||||||
kitty = "${config.home-manager.users.${config.custom.username}.programs.kitty.package}/bin/kitty";
|
kitty = "${config.home-manager.users.${config.custom.username}.programs.kitty.package}/bin/kitty";
|
||||||
|
left = config.home-manager.users.${config.custom.username}.home.file.".local/bin/left".source;
|
||||||
loginctl = "${pkgs.systemd}/bin/loginctl";
|
loginctl = "${pkgs.systemd}/bin/loginctl";
|
||||||
menu = "~/.local/bin/menu";
|
menu = config.home-manager.users.${config.custom.username}.home.file.".local/bin/menu".source;
|
||||||
nautilus = "${pkgs.nautilus}/bin/nautilus";
|
nautilus = "${pkgs.nautilus}/bin/nautilus";
|
||||||
networkmanager_dmenu = "${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu";
|
networkmanager_dmenu = "${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu";
|
||||||
notify-send = "${pkgs.libnotify}/bin/notify-send";
|
notify-send = "${pkgs.libnotify}/bin/notify-send";
|
||||||
|
@ -26,6 +27,7 @@ with lib; let
|
||||||
pkill = "${pkgs.procps}/bin/pkill";
|
pkill = "${pkgs.procps}/bin/pkill";
|
||||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||||
rofi-rbw = "${pkgs.rofi-rbw}/bin/rofi-rbw";
|
rofi-rbw = "${pkgs.rofi-rbw}/bin/rofi-rbw";
|
||||||
|
rm = "${pkgs.coreutils}/bin/rm";
|
||||||
sleep = "${pkgs.coreutils}/bin/sleep";
|
sleep = "${pkgs.coreutils}/bin/sleep";
|
||||||
steam = "${config.programs.steam.package}/bin/steam";
|
steam = "${config.programs.steam.package}/bin/steam";
|
||||||
swayosd-client = "${pkgs.swayosd}/bin/swayosd-client";
|
swayosd-client = "${pkgs.swayosd}/bin/swayosd-client";
|
||||||
|
@ -126,7 +128,7 @@ in {
|
||||||
# TODO: Toggle trackball hand
|
# TODO: Toggle trackball hand
|
||||||
#// (key "Delete" "Super" "exec" "left")
|
#// (key "Delete" "Super" "exec" "left")
|
||||||
|
|
||||||
(key "Delete" "Super+Shift" "exec" "vrr")
|
(key "Delete" "Super+Shift" "exec" "${left} kensington-orbit-wireless-tb-mouse")
|
||||||
(key "Down" "Super" "movewindow" "d")
|
(key "Down" "Super" "movewindow" "d")
|
||||||
(key "Down" "Super+Shift" "movewindoworgroup" "d")
|
(key "Down" "Super+Shift" "movewindoworgroup" "d")
|
||||||
(key "Equal" "Super" "exec" "audio Normalizer")
|
(key "Equal" "Super" "exec" "audio Normalizer")
|
||||||
|
@ -228,8 +230,8 @@ in {
|
||||||
(key "T" "Super" "togglespecialworkspace" "terminal")
|
(key "T" "Super" "togglespecialworkspace" "terminal")
|
||||||
(key "T" "Super+Shift" "movetoworkspacesilent" "terminal")
|
(key "T" "Super+Shift" "movetoworkspacesilent" "terminal")
|
||||||
(key "T" "Super+Shift" "exec" kitty)
|
(key "T" "Super+Shift" "exec" kitty)
|
||||||
(key "V" "Super" "exec" "${kitty} --app-id clipboard --override font_size=12 ${clipse}")
|
(key "V" "Super" "exec" "${menu} --clipboard")
|
||||||
(key "V" "Super+Shift" "exec" "${clipse} -clear && ${notify-send} clipse 'Clipboard cleared' --urgency low")
|
(key "V" "Super+Shift" "exec" "${rm} ~/.cache/walker/clipboard.gob; ${notify-send} walker 'Clipboard cleared' --urgency low")
|
||||||
(key "W" "Super" "togglespecialworkspace" "vm")
|
(key "W" "Super" "togglespecialworkspace" "vm")
|
||||||
(key "W" "Super+Ctrl" "exec" "vm -x ${
|
(key "W" "Super+Ctrl" "exec" "vm -x ${
|
||||||
if config.custom.hidpi
|
if config.custom.hidpi
|
||||||
|
|
|
@ -9,6 +9,7 @@ with lib; let
|
||||||
firefox-esr = "${
|
firefox-esr = "${
|
||||||
config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage
|
config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage
|
||||||
}/bin/firefox-esr";
|
}/bin/firefox-esr";
|
||||||
|
left = config.home-manager.users.${config.custom.username}.home.file.".local/bin/left".source;
|
||||||
pkill = "${pkgs.procps}/bin/pkill";
|
pkill = "${pkgs.procps}/bin/pkill";
|
||||||
rm = "${pkgs.coreutils}/bin/rm";
|
rm = "${pkgs.coreutils}/bin/rm";
|
||||||
sleep = "${pkgs.coreutils}/bin/sleep";
|
sleep = "${pkgs.coreutils}/bin/sleep";
|
||||||
|
@ -64,10 +65,9 @@ in {
|
||||||
# https://wiki.hyprland.org/Configuring/Keywords/#executing
|
# https://wiki.hyprland.org/Configuring/Keywords/#executing
|
||||||
exec-once =
|
exec-once =
|
||||||
[
|
[
|
||||||
"${rm} ~/.config/qalculate/qalc.dmenu.history" # Clear calc history
|
"${rm} ~/.cache/walker/clipboard.gob" # Clear clipboard
|
||||||
"${clipse} -clear" # Clear clipboard history
|
|
||||||
"${clipse} -listen" # Monitor clipboard
|
|
||||||
sway-audio-idle-inhibit # Inhibit idle while audio is playing
|
sway-audio-idle-inhibit # Inhibit idle while audio is playing
|
||||||
|
left # Left-handed at boot
|
||||||
|
|
||||||
# TODO: Remove when systemd service fixed
|
# TODO: Remove when systemd service fixed
|
||||||
# https://github.com/Alexays/Waybar/issues/2882
|
# https://github.com/Alexays/Waybar/issues/2882
|
||||||
|
|
|
@ -14,58 +14,176 @@ in {
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
promptInit = ''
|
||||||
|
# Disable greeting
|
||||||
|
set -g fish_greeting
|
||||||
|
|
||||||
|
# Prompt
|
||||||
|
function fish_prompt --description 'Write out the prompt'
|
||||||
|
set -l last_status $status
|
||||||
|
set -l normal (set_color normal)
|
||||||
|
set -l status_color (set_color brgreen)
|
||||||
|
set -l cwd_color (set_color $fish_color_cwd)
|
||||||
|
set -l vcs_color (set_color brpurple)
|
||||||
|
set -l prompt_status ""
|
||||||
|
|
||||||
|
# Since we display the prompt on a new line allow the directory names to be longer.
|
||||||
|
set -q fish_prompt_pwd_dir_length
|
||||||
|
or set -lx fish_prompt_pwd_dir_length 0
|
||||||
|
|
||||||
|
# Color the prompt differently when we're root
|
||||||
|
set -l suffix '❯'
|
||||||
|
if functions -q fish_is_root_user; and fish_is_root_user
|
||||||
|
if set -q fish_color_cwd_root
|
||||||
|
set cwd_color (set_color $fish_color_cwd_root)
|
||||||
|
end
|
||||||
|
set suffix '#'
|
||||||
|
end
|
||||||
|
|
||||||
|
# Color the prompt in red on error
|
||||||
|
if test $last_status -ne 0
|
||||||
|
set status_color (set_color $fish_color_error)
|
||||||
|
set prompt_status $status_color "[" $last_status "]" $normal
|
||||||
|
end
|
||||||
|
|
||||||
|
echo -s (prompt_login) ' ' $cwd_color (prompt_pwd) $vcs_color (fish_vcs_prompt) $normal ' ' $prompt_status
|
||||||
|
echo -n -s $status_color $suffix ' ' $normal
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users = {
|
||||||
|
# Inherit root abbreviations from user
|
||||||
|
root.programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
shellAbbrs = config.home-manager.users.${config.custom.username}.programs.fish.shellAbbrs;
|
||||||
|
};
|
||||||
|
|
||||||
|
${config.custom.username}.programs.fish = let
|
||||||
|
any = expansion: {
|
||||||
|
inherit expansion;
|
||||||
|
position = "anywhere";
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
shellAbbrs = {
|
shellAbbrs = {
|
||||||
|
# Expand abbreviations anywhere in the shell
|
||||||
|
#?? sudo ABBREVIATION
|
||||||
|
"/e" = any "/etc";
|
||||||
|
"/en" = any "/etc/nixos";
|
||||||
|
"/h" = any "~";
|
||||||
|
"/hd" = any "~/.dev";
|
||||||
|
"/n" = any "/nix";
|
||||||
|
"/nv" = any "/nix/var";
|
||||||
|
"/nvn" = any "/nix/var/nix";
|
||||||
|
"/nvnp" = any "/nix/var/nix/profiles";
|
||||||
|
"/nvnps" = any "/nix/var/nix/profiles/system";
|
||||||
|
"/r" = any "/run";
|
||||||
|
"/rc" = any "/run/current-system";
|
||||||
|
|
||||||
|
reboot = any "systemctl reboot";
|
||||||
|
restart = any "systemctl reboot";
|
||||||
|
poweroff = any "systemctl poweroff";
|
||||||
|
shutdown = any "systemctl poweroff";
|
||||||
|
|
||||||
|
backup = any "borgmatic -v 1 create --progress --stats";
|
||||||
|
extract = any "borgmatic -v 1 extract --progress";
|
||||||
|
init = any "borgmatic init -e repokey-blake2";
|
||||||
|
key = any "borgmatic key export";
|
||||||
|
list = any "borgmatic -v 1 list";
|
||||||
|
restore = any "borgmatic -v 1 restore";
|
||||||
|
|
||||||
|
rsync = any "rsync --info=progress2";
|
||||||
|
|
||||||
|
jc = any "journalctl";
|
||||||
|
jcs = any "journalctl --system";
|
||||||
|
jcse = any "journalctl --system --pager-end";
|
||||||
|
jcseu = any "journalctl --system --pager-end --unit";
|
||||||
|
jcsf = any "journalctl --system --follow";
|
||||||
|
jcsfu = any "journalctl --system --follow --unit";
|
||||||
|
jcsi = any "journalctl --system --identifier";
|
||||||
|
jcst = any "journalctl --system --target";
|
||||||
|
jcsu = any "journalctl --system --unit";
|
||||||
|
jcu = any "journalctl --user";
|
||||||
|
jcue = any "journalctl --user --pager-end";
|
||||||
|
jcueu = any "journalctl --user --pager-end --unit";
|
||||||
|
jcuf = any "journalctl --user --follow";
|
||||||
|
jcufu = any "journalctl --user --follow --unit";
|
||||||
|
jcui = any "journalctl --user --identifier";
|
||||||
|
jcut = any "journalctl --user --target";
|
||||||
|
jcuu = any "journalctl --user --unit";
|
||||||
|
|
||||||
|
sc = any "systemctl";
|
||||||
|
scp = any "systemctl poweroff";
|
||||||
|
scr = any "systemctl reboot";
|
||||||
|
scs = any "systemctl --system";
|
||||||
|
scsd = any "systemctl --system disable";
|
||||||
|
scsdn = any "systemctl --system disable --now";
|
||||||
|
scse = any "systemctl --system reenable";
|
||||||
|
scsen = any "systemctl --system reenable --now";
|
||||||
|
scsh = any "systemctl --system show";
|
||||||
|
scsl = any "systemctl --system list-unit-files";
|
||||||
|
scsm = any "systemctl --system mask";
|
||||||
|
scsr = any "systemctl --system restart";
|
||||||
|
scsrr = any "systemctl --system reload-or-restart";
|
||||||
|
scss = any "systemctl --system status";
|
||||||
|
scst = any "systemctl --system stop";
|
||||||
|
scsu = any "systemctl --system unmask";
|
||||||
|
scu = any "systemctl --user";
|
||||||
|
scud = any "systemctl --user disable";
|
||||||
|
scudn = any "systemctl --user disable --now";
|
||||||
|
scue = any "systemctl --user reenable";
|
||||||
|
scuen = any "systemctl --user reenable --now";
|
||||||
|
scuh = any "systemctl --user show";
|
||||||
|
scul = any "systemctl --user list-unit-files";
|
||||||
|
scum = any "systemctl --user mask";
|
||||||
|
scur = any "systemctl --user restart";
|
||||||
|
scurr = any "systemctl --user reload-or-restart";
|
||||||
|
scus = any "systemctl --user status";
|
||||||
|
scut = any "systemctl --user stop";
|
||||||
|
scuu = any "systemctl --user unmask";
|
||||||
|
|
||||||
|
d = any "docker";
|
||||||
|
dc = any "docker compose";
|
||||||
|
dcd = any "docker compose down";
|
||||||
|
dce = any "docker compose exec";
|
||||||
|
dcl = any "docker compose logs";
|
||||||
|
dcp = any "docker compose pull";
|
||||||
|
dcu = any "docker compose up";
|
||||||
|
dcuf = any "docker compose up --force-recreate";
|
||||||
|
de = any "docker exec";
|
||||||
|
dei = any "docker exec --interactive";
|
||||||
|
deit = any "docker exec --interactive --tty";
|
||||||
|
det = any "docker exec --tty";
|
||||||
|
di = any "docker images";
|
||||||
|
dk = any "docker kill";
|
||||||
|
dn = any "docker network";
|
||||||
|
dnl = any "docker network ls";
|
||||||
|
dp = any "docker pull";
|
||||||
|
dps = any "docker ps";
|
||||||
|
dpsa = any "docker ps --all --size";
|
||||||
|
dr = any "docker rm";
|
||||||
|
ds = any "docker system";
|
||||||
|
dsp = any "docker system prune";
|
||||||
|
dspav = any "docker system prune --all --volumes";
|
||||||
|
|
||||||
c = "clear";
|
c = "clear";
|
||||||
e = "exit";
|
e = "exit";
|
||||||
m = "mosh";
|
m = "mosh";
|
||||||
s = "ssh";
|
s = "ssh";
|
||||||
i = "tailscale ip --4";
|
|
||||||
|
|
||||||
"/h" = "cd ~";
|
ip = "tailscale ip --4";
|
||||||
"/hd" = "cd ~/.dev";
|
|
||||||
"/e" = "cd /etc";
|
|
||||||
"/en" = "cd /etc/nixos";
|
|
||||||
"/n" = "cd /nix";
|
|
||||||
"/nv" = "cd /nix/var";
|
|
||||||
"/nvn" = "cd /nix/var/nix";
|
|
||||||
"/nvnp" = "cd /nix/var/nix/profiles";
|
|
||||||
"/nvnps" = "cd /nix/var/nix/profiles/system";
|
|
||||||
"/r" = "cd /run";
|
|
||||||
"/rc" = "cd /run/current-system";
|
|
||||||
|
|
||||||
f = "flakegen";
|
n = "nixos";
|
||||||
r = "rebuild";
|
nb = "nixos build";
|
||||||
rb = "rebuild boot";
|
nbb = "nixos build boot";
|
||||||
rbp = "rebuild boot && poweroff";
|
nbs = "nixos build switch";
|
||||||
rbr = "rebuild boot && reboot";
|
nbt = "nixos build test";
|
||||||
rs = "rebuild switch";
|
nd = "nixos diff";
|
||||||
rt = "rebuild test";
|
ng = "nixos generate";
|
||||||
t = "target";
|
nl = "nixos list";
|
||||||
u = "upgrade";
|
nr = "nixos repl";
|
||||||
ub = "upgrade boot";
|
|
||||||
ubp = "upgrade boot && poweroff";
|
|
||||||
ubr = "upgrade boot && reboot";
|
|
||||||
|
|
||||||
nd = "nvd diff /run/current-system /nix/var/nix/profiles/system";
|
|
||||||
no = "nh os";
|
|
||||||
nb = "flakegen && nh os boot";
|
|
||||||
nbr = "flakegen && nh os boot && reboot";
|
|
||||||
nbp = "flakegen && nh os boot && poweroff";
|
|
||||||
ns = "flakegen && nh os switch";
|
|
||||||
nt = "flakegen && nh os test";
|
|
||||||
|
|
||||||
jc = "journalctl";
|
|
||||||
sc = "systemctl";
|
|
||||||
|
|
||||||
d = "docker";
|
|
||||||
dc = "docker compose";
|
|
||||||
dcd = "docker compose down";
|
|
||||||
dce = "docker compose exec";
|
|
||||||
dcl = "docker compose logs";
|
|
||||||
dcp = "docker compose pull";
|
|
||||||
dcu = "docker compose up";
|
|
||||||
dcuf = "docker compose up --force-recreate";
|
|
||||||
ds = "docker system";
|
|
||||||
|
|
||||||
g = "git";
|
g = "git";
|
||||||
gb = "git bisect";
|
gb = "git bisect";
|
||||||
|
@ -119,43 +237,7 @@ in {
|
||||||
waydroid app launch com.YoStarEN.Arknights
|
waydroid app launch com.YoStarEN.Arknights
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
promptInit = ''
|
|
||||||
# Disable greeting
|
|
||||||
set -g fish_greeting
|
|
||||||
|
|
||||||
# Prompt
|
|
||||||
function fish_prompt --description 'Write out the prompt'
|
|
||||||
set -l last_status $status
|
|
||||||
set -l normal (set_color normal)
|
|
||||||
set -l status_color (set_color brgreen)
|
|
||||||
set -l cwd_color (set_color $fish_color_cwd)
|
|
||||||
set -l vcs_color (set_color brpurple)
|
|
||||||
set -l prompt_status ""
|
|
||||||
|
|
||||||
# Since we display the prompt on a new line allow the directory names to be longer.
|
|
||||||
set -q fish_prompt_pwd_dir_length
|
|
||||||
or set -lx fish_prompt_pwd_dir_length 0
|
|
||||||
|
|
||||||
# Color the prompt differently when we're root
|
|
||||||
set -l suffix '❯'
|
|
||||||
if functions -q fish_is_root_user; and fish_is_root_user
|
|
||||||
if set -q fish_color_cwd_root
|
|
||||||
set cwd_color (set_color $fish_color_cwd_root)
|
|
||||||
end
|
|
||||||
set suffix '#'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Color the prompt in red on error
|
|
||||||
if test $last_status -ne 0
|
|
||||||
set status_color (set_color $fish_color_error)
|
|
||||||
set prompt_status $status_color "[" $last_status "]" $normal
|
|
||||||
end
|
|
||||||
|
|
||||||
echo -s (prompt_login) ' ' $cwd_color (prompt_pwd) $vcs_color (fish_vcs_prompt) $normal ' ' $prompt_status
|
|
||||||
echo -n -s $status_color $suffix ' ' $normal
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,8 @@ in {
|
||||||
inactive_tab_font_style = "normal";
|
inactive_tab_font_style = "normal";
|
||||||
confirm_os_window_close = 0;
|
confirm_os_window_close = 0;
|
||||||
cursor_blink_interval = 0;
|
cursor_blink_interval = 0;
|
||||||
|
cursor_shape = "beam";
|
||||||
|
cursor_shape_unfocused = "underline";
|
||||||
placement_strategy = "top-left"; # Partially fix padding
|
placement_strategy = "top-left"; # Partially fix padding
|
||||||
scrollback_lines = -1;
|
scrollback_lines = -1;
|
||||||
strip_trailing_spaces = "smart";
|
strip_trailing_spaces = "smart";
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
|
menu = config.home-manager.users.${config.custom.username}.home.file.".local/bin/menu".source;
|
||||||
|
|
||||||
cfg = config.custom.programs.networkmanager-dmenu;
|
cfg = config.custom.programs.networkmanager-dmenu;
|
||||||
in {
|
in {
|
||||||
options.custom.programs.networkmanager-dmenu.enable = mkOption {default = false;};
|
options.custom.programs.networkmanager-dmenu.enable = mkOption {default = false;};
|
||||||
|
@ -13,11 +15,9 @@ in {
|
||||||
# https://github.com/firecat53/networkmanager-dmenu/blob/main/config.ini.example
|
# https://github.com/firecat53/networkmanager-dmenu/blob/main/config.ini.example
|
||||||
#!! Option not available, files written directly
|
#!! Option not available, files written directly
|
||||||
# FIXME: active_chars does not take effect
|
# FIXME: active_chars does not take effect
|
||||||
home.file.".config/networkmanager-dmenu/config.ini".text = let
|
home.file.".config/networkmanager-dmenu/config.ini".text = ''
|
||||||
wofi = "${config.home-manager.users.${config.custom.username}.programs.wofi.package}/bin/wofi";
|
|
||||||
in ''
|
|
||||||
[dmenu]
|
[dmenu]
|
||||||
dmenu_command = ${wofi} --dmenu --lines 11
|
dmenu_command = ${menu} --input
|
||||||
active_chars = >
|
active_chars = >
|
||||||
wifi_icons =
|
wifi_icons =
|
||||||
format = {icon} {name}
|
format = {icon} {name}
|
||||||
|
|
|
@ -24,16 +24,51 @@ in {
|
||||||
#?? systemctl --user restart walker.service
|
#?? systemctl --user restart walker.service
|
||||||
runAsService = true;
|
runAsService = true;
|
||||||
|
|
||||||
|
# https://github.com/abenz1267/walker/wiki/Basic-Configuration
|
||||||
# https://github.com/abenz1267/walker/blob/master/internal/config/config.default.json
|
# https://github.com/abenz1267/walker/blob/master/internal/config/config.default.json
|
||||||
config = {
|
config = {
|
||||||
activation_mode.labels = ""; # Chord indicators
|
activation_mode.disabled = true; # Key chords
|
||||||
|
ignore_mouse = true; # Hover interrupts keyboard selections
|
||||||
search.placeholder = "";
|
search.placeholder = "";
|
||||||
|
|
||||||
|
# https://github.com/abenz1267/walker/wiki/Modules
|
||||||
|
# https://www.nerdfonts.com/cheat-sheet
|
||||||
builtins = {
|
builtins = {
|
||||||
|
calculator.switcher_only = false;
|
||||||
|
clipboard.switcher_only = true;
|
||||||
|
commands.switcher_only = true;
|
||||||
|
custom_commands.switcher_only = true;
|
||||||
|
runner.switcher_only = true;
|
||||||
|
ssh.switcher_only = true;
|
||||||
|
windows.switcher_only = true;
|
||||||
|
|
||||||
applications = {
|
applications = {
|
||||||
actions = false; # Desktop file actions
|
# BUG: Ghost entries are still visible
|
||||||
prioritize_new = false;
|
#// actions = false; # Desktop file actions
|
||||||
show_sub_when_single = false; # Subtext with one module
|
|
||||||
|
switcher_only = false;
|
||||||
|
weight = 10;
|
||||||
|
};
|
||||||
|
|
||||||
|
dmenu = {
|
||||||
|
keep_sort = true; # Disable sorting entries
|
||||||
|
placeholder = "Input";
|
||||||
|
switcher_only = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
emojis = {
|
||||||
|
placeholder = "Unicode";
|
||||||
|
switcher_only = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
finder = {
|
||||||
|
placeholder = "Files";
|
||||||
|
switcher_only = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
websearch = {
|
||||||
|
placeholder = "Search";
|
||||||
|
switcher_only = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -42,21 +77,24 @@ in {
|
||||||
theme = {
|
theme = {
|
||||||
style = builtins.readFile ./style.css;
|
style = builtins.readFile ./style.css;
|
||||||
|
|
||||||
# https://github.com/abenz1267/walker/blob/master/internal/config/themes/bare.json
|
# https://github.com/abenz1267/walker/blob/master/internal/config/layout.default.json
|
||||||
layout.ui.window.box = rec {
|
layout.ui.window.box = rec {
|
||||||
height = 500 / config.custom.scale;
|
height = 250 / config.custom.scale;
|
||||||
width = 1000 / config.custom.scale;
|
width = 1000 / config.custom.scale;
|
||||||
|
|
||||||
scroll.list = {
|
scroll.list = {
|
||||||
min_height = height;
|
|
||||||
max_height = height;
|
max_height = height;
|
||||||
max_width = width;
|
max_width = width;
|
||||||
min_width = width;
|
min_width = width;
|
||||||
|
|
||||||
# Icon resolution
|
# Icon resolution
|
||||||
item.icon = {
|
item = {
|
||||||
|
text.sub.hide = true; # Subtext
|
||||||
|
|
||||||
|
icon = {
|
||||||
icon_size = "largest"; # 128px
|
icon_size = "largest"; # 128px
|
||||||
pixel_size = 32;
|
pixel_size = 32; # Downscale
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,6 +21,7 @@ https://docs.gtk.org/gtk4/css-properties.html
|
||||||
/* Input box */
|
/* Input box */
|
||||||
#search entry {
|
#search entry {
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
|
margin-bottom: 4px;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +38,7 @@ https://docs.gtk.org/gtk4/css-properties.html
|
||||||
/* List entry */
|
/* List entry */
|
||||||
#list child {
|
#list child {
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
margin: 4px 0;
|
margin: 2px 8px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,13 +13,16 @@ with lib; let
|
||||||
hyprctl = "${
|
hyprctl = "${
|
||||||
config.home-manager.users.${config.custom.username}.wayland.windowManager.hyprland.finalPackage
|
config.home-manager.users.${config.custom.username}.wayland.windowManager.hyprland.finalPackage
|
||||||
}/bin/hyprctl";
|
}/bin/hyprctl";
|
||||||
|
inhibit = config.home-manager.users.${config.custom.username}.home.file.".local/bin/inhibit".source;
|
||||||
jq = "${pkgs.jq}/bin/jq";
|
jq = "${pkgs.jq}/bin/jq";
|
||||||
loginctl = "${pkgs.systemd}/bin/loginctl";
|
loginctl = "${pkgs.systemd}/bin/loginctl";
|
||||||
|
network = config.home-manager.users.${config.custom.username}.home.file.".local/bin/network".source;
|
||||||
nm-connection-editor = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
|
nm-connection-editor = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
|
||||||
pgrep = "${pkgs.procps}/bin/pgrep";
|
pgrep = "${pkgs.procps}/bin/pgrep";
|
||||||
ping = "${pkgs.iputils}/bin/ping";
|
ping = "${pkgs.iputils}/bin/ping";
|
||||||
pkill = "${pkgs.procps}/bin/pkill";
|
pkill = "${pkgs.procps}/bin/pkill";
|
||||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||||
|
power = config.home-manager.users.${config.custom.username}.home.file.".local/bin/power".source;
|
||||||
rfkill = "${pkgs.util-linux}/bin/rfkill";
|
rfkill = "${pkgs.util-linux}/bin/rfkill";
|
||||||
sleep = "${pkgs.coreutils}/bin/sleep";
|
sleep = "${pkgs.coreutils}/bin/sleep";
|
||||||
swaync-client = "${
|
swaync-client = "${
|
||||||
|
@ -29,6 +32,8 @@ with lib; let
|
||||||
systemctl = "${pkgs.systemd}/bin/systemctl";
|
systemctl = "${pkgs.systemd}/bin/systemctl";
|
||||||
systemd-inhibit = "${pkgs.systemd}/bin/systemd-inhibit";
|
systemd-inhibit = "${pkgs.systemd}/bin/systemd-inhibit";
|
||||||
tailscale = "${pkgs.tailscale}/bin/tailscale";
|
tailscale = "${pkgs.tailscale}/bin/tailscale";
|
||||||
|
vm = config.home-manager.users.${config.custom.username}.home.file.".local/bin/vm".source;
|
||||||
|
vpn = config.home-manager.users.${config.custom.username}.home.file.".local/bin/vpn".source;
|
||||||
wttrbar = "${pkgs.wttrbar}/bin/wttrbar";
|
wttrbar = "${pkgs.wttrbar}/bin/wttrbar";
|
||||||
|
|
||||||
cfg = config.custom.programs.waybar;
|
cfg = config.custom.programs.waybar;
|
||||||
|
@ -126,13 +131,13 @@ in {
|
||||||
"custom/inhibitor" = {
|
"custom/inhibitor" = {
|
||||||
interval = 5;
|
interval = 5;
|
||||||
exec = "~/.config/waybar/scripts/inhibitor.sh";
|
exec = "~/.config/waybar/scripts/inhibitor.sh";
|
||||||
on-click = "~/.local/bin/inhibit";
|
on-click = inhibit;
|
||||||
};
|
};
|
||||||
|
|
||||||
"custom/vm" = {
|
"custom/vm" = {
|
||||||
interval = 5;
|
interval = 5;
|
||||||
exec = "~/.config/waybar/scripts/vm.sh";
|
exec = "~/.config/waybar/scripts/vm.sh";
|
||||||
on-click = "~/.local/bin/vm -x ${
|
on-click = "${vm} -x ${
|
||||||
if config.custom.hidpi
|
if config.custom.hidpi
|
||||||
then "/scale:140"
|
then "/scale:140"
|
||||||
else ""
|
else ""
|
||||||
|
@ -142,7 +147,7 @@ in {
|
||||||
"custom/vpn" = {
|
"custom/vpn" = {
|
||||||
interval = 5;
|
interval = 5;
|
||||||
exec = "~/.config/waybar/scripts/vpn.sh";
|
exec = "~/.config/waybar/scripts/vpn.sh";
|
||||||
on-click = "~/.local/bin/vpn mypi3";
|
on-click = "${vpn} mypi3";
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/Alexays/Waybar/wiki/Module:-Idle-Inhibitor
|
# https://github.com/Alexays/Waybar/wiki/Module:-Idle-Inhibitor
|
||||||
|
@ -281,7 +286,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
on-click = nm-connection-editor;
|
on-click = nm-connection-editor;
|
||||||
on-click-right = "~/.local/bin/network"; # Toggle networking on/off
|
on-click-right = network; # Toggle networking on/off
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/Alexays/Waybar/wiki/Module:-Battery
|
# https://github.com/Alexays/Waybar/wiki/Module:-Battery
|
||||||
|
@ -306,7 +311,7 @@ in {
|
||||||
warning = 30;
|
warning = 30;
|
||||||
};
|
};
|
||||||
|
|
||||||
on-click = "~/.local/bin/power"; # Toggle power-saver mode
|
on-click = power; # Toggle power-saver mode
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,6 +20,10 @@ in {
|
||||||
".local/bin/${name}".source =
|
".local/bin/${name}".source =
|
||||||
pkgs.writeShellApplication {
|
pkgs.writeShellApplication {
|
||||||
inherit name;
|
inherit name;
|
||||||
|
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/261115
|
||||||
|
#// excludeShellChecks = ["SC2154"]; # argc evaluates variables at runtime
|
||||||
|
|
||||||
runtimeInputs = dependencies;
|
runtimeInputs = dependencies;
|
||||||
text = builtins.readFile ./${name}.sh;
|
text = builtins.readFile ./${name}.sh;
|
||||||
}
|
}
|
||||||
|
@ -82,11 +86,6 @@ in {
|
||||||
fprintd
|
fprintd
|
||||||
libnotify
|
libnotify
|
||||||
])
|
])
|
||||||
(bash "flakegen" [
|
|
||||||
git
|
|
||||||
libnotify
|
|
||||||
nix
|
|
||||||
])
|
|
||||||
(bash "inhibit" [
|
(bash "inhibit" [
|
||||||
coreutils
|
coreutils
|
||||||
libnotify
|
libnotify
|
||||||
|
@ -111,18 +110,20 @@ in {
|
||||||
libnotify
|
libnotify
|
||||||
networkmanager
|
networkmanager
|
||||||
])
|
])
|
||||||
|
(bash "nixos" [
|
||||||
|
argc
|
||||||
|
coreutils
|
||||||
|
git
|
||||||
|
nh
|
||||||
|
nix
|
||||||
|
nixos-rebuild
|
||||||
|
nvd
|
||||||
|
systemd
|
||||||
|
])
|
||||||
(bash "power" [
|
(bash "power" [
|
||||||
libnotify
|
libnotify
|
||||||
power-profiles-daemon
|
power-profiles-daemon
|
||||||
])
|
])
|
||||||
(bash "rebuild" [
|
|
||||||
libnotify
|
|
||||||
nixos-rebuild
|
|
||||||
])
|
|
||||||
(bash "repl" [
|
|
||||||
libnotify
|
|
||||||
nixos-rebuild
|
|
||||||
])
|
|
||||||
(bash "screenshot" [
|
(bash "screenshot" [
|
||||||
coreutils
|
coreutils
|
||||||
grimblast
|
grimblast
|
||||||
|
@ -130,21 +131,12 @@ in {
|
||||||
libnotify
|
libnotify
|
||||||
swappy
|
swappy
|
||||||
])
|
])
|
||||||
(bash "target" [
|
|
||||||
libnotify
|
|
||||||
nixos-rebuild
|
|
||||||
])
|
|
||||||
(bash "toggle" [
|
(bash "toggle" [
|
||||||
gnugrep
|
gnugrep
|
||||||
hyprland
|
hyprland
|
||||||
jq
|
jq
|
||||||
libnotify
|
libnotify
|
||||||
])
|
])
|
||||||
(bash "upgrade" [
|
|
||||||
libnotify
|
|
||||||
nix
|
|
||||||
nixos-rebuild
|
|
||||||
])
|
|
||||||
(bash "vm" [
|
(bash "vm" [
|
||||||
coreutils
|
coreutils
|
||||||
freerdp3
|
freerdp3
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
#! /usr/bin/env bash
|
|
||||||
|
|
||||||
# Generate flake.nix via flakegen
|
|
||||||
# https://github.com/jorsn/flakegen
|
|
||||||
|
|
||||||
cd /etc/nixos || exit 1
|
|
||||||
|
|
||||||
if [[ "${1-}" == '-r' ]]; then
|
|
||||||
# Nuke and reinitialize
|
|
||||||
rm flake.nix
|
|
||||||
nix flake init --template github:jorsn/flakegen
|
|
||||||
else
|
|
||||||
# Generate and track all files
|
|
||||||
nix run .#genflake flake.nix
|
|
||||||
git add .
|
|
||||||
fi
|
|
|
@ -1,15 +1,27 @@
|
||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
# Toggle left-handed mouse
|
# Toggle left-handed mouse
|
||||||
# TODO: Make device-specific when commit released
|
#?? left DEVICE
|
||||||
# https://github.com/hyprwm/hyprlang/commit/95471ec86f37acb8281062e54e2be99b24b50cd0
|
|
||||||
|
|
||||||
left=$(("$(hyprctl getoption input:left_handed -j | jq '.int')" - 1))
|
# BUG: New hyprctl syntax does not support per-device getoption
|
||||||
|
# https://github.com/hyprwm/hyprlang/issues/43
|
||||||
|
# HACK: Condition based on file presence, requires creation at login to set state
|
||||||
|
#?? exec-once = left
|
||||||
|
FILE=/tmp/left
|
||||||
|
|
||||||
hyprctl keyword input:left_handed ${left#-}
|
if (("$#" == 0)); then
|
||||||
|
touch "$FILE"
|
||||||
if [[ "$(hyprctl getoption input:left_handed -j | jq '.int')" == 1 ]]; then
|
exit
|
||||||
notify-send '> left' 'Left-handed' --urgency low
|
fi
|
||||||
else
|
|
||||||
notify-send '> left' 'Right-handed' --urgency low
|
if [[ -f "$FILE" ]]; then
|
||||||
|
hyprctl keyword "device[$1]:left_handed" false
|
||||||
|
hyprctl keyword "device[$1]:natural_scroll" false
|
||||||
|
rm --force "$FILE"
|
||||||
|
notify-send "> left" "Right-handed" --urgency low
|
||||||
|
else
|
||||||
|
hyprctl keyword "device[$1]:left_handed" true
|
||||||
|
hyprctl keyword "device[$1]:natural_scroll" true
|
||||||
|
touch "$FILE"
|
||||||
|
notify-send "> left" "Left-handed" --urgency low
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -7,35 +7,41 @@ command=walker
|
||||||
|
|
||||||
while (("$#" > 0)); do
|
while (("$#" > 0)); do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-a | --applications)
|
--applications)
|
||||||
command="walker --modules applications"
|
command="walker --modules applications"
|
||||||
;;
|
;;
|
||||||
-c | --calculator)
|
--calculator)
|
||||||
command="walker --modules calc"
|
command="walker --modules calc"
|
||||||
;;
|
;;
|
||||||
-f | --files)
|
--clipboard)
|
||||||
|
command="walker --modules clipboard"
|
||||||
|
;;
|
||||||
|
--files)
|
||||||
command="walker --modules finder"
|
command="walker --modules finder"
|
||||||
;;
|
;;
|
||||||
-i | --input)
|
--input)
|
||||||
command="walker --dmenu"
|
command="walker --dmenu"
|
||||||
;;
|
;;
|
||||||
-n | --networks)
|
--networks)
|
||||||
command="networkmanager_dmenu"
|
command="networkmanager_dmenu"
|
||||||
;;
|
;;
|
||||||
-p | --passwords)
|
--passwords)
|
||||||
command="rofi-rbw"
|
command="rofi-rbw"
|
||||||
;;
|
;;
|
||||||
-r | --runner)
|
--runner)
|
||||||
command="walker --modules runner"
|
command="walker --modules runner"
|
||||||
;;
|
;;
|
||||||
-s | --ssh)
|
--search)
|
||||||
|
command="walker --modules websearch"
|
||||||
|
;;
|
||||||
|
--ssh)
|
||||||
command="walker --modules ssh"
|
command="walker --modules ssh"
|
||||||
;;
|
;;
|
||||||
-u | --unicode)
|
--unicode)
|
||||||
command="walker --modules emojis"
|
command="walker --modules emojis"
|
||||||
;;
|
;;
|
||||||
-w | --web)
|
--windows)
|
||||||
command="walker --modules websearch"
|
command="walker --modules windows"
|
||||||
;;
|
;;
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
|
|
113
options/custom/scripts/nixos.sh
Normal file
113
options/custom/scripts/nixos.sh
Normal file
|
@ -0,0 +1,113 @@
|
||||||
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
|
cd /etc/nixos || exit 1
|
||||||
|
|
||||||
|
# @describe Wrapper for NixOS tools
|
||||||
|
# Assumes flakes and configuration in /etc/nixos/
|
||||||
|
#
|
||||||
|
# https://github.com/sigoden/argc
|
||||||
|
# https://github.com/jorsn/flakegen
|
||||||
|
# https://github.com/viperML/nh
|
||||||
|
|
||||||
|
# @meta combine-shorts
|
||||||
|
# @meta inherit-flag-options
|
||||||
|
|
||||||
|
# @cmd Build NixOS configuration
|
||||||
|
# @alias b,bu,bui,buil
|
||||||
|
# @option -b --builder[=nh|nixos] Use nh os (default) or nixos-rebuild to build
|
||||||
|
# @option -t --target Remote machine to build with root, only nixos-rebuild is supported
|
||||||
|
# @flag -n --no-generate Do not regenerate flake.nix before building
|
||||||
|
# @flag -p --poweroff Gracefully poweroff system after a successful build
|
||||||
|
# @flag -r --reboot Gracefully reboot system after a successful build
|
||||||
|
# @flag -u --update Update flake.lock before building
|
||||||
|
# @arg extra~ Pass extra arguments to builder
|
||||||
|
build() { :; }
|
||||||
|
|
||||||
|
# Internal wrapper for subcommands
|
||||||
|
_build() {
|
||||||
|
# Regenerate flake.nix and stage git files by default
|
||||||
|
if [[ ! "${argc_no_generate:-}" ]]; then
|
||||||
|
nix run .#genflake flake.nix
|
||||||
|
git add .
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update flake.lock
|
||||||
|
if [[ "${argc_update:-}" ]]; then
|
||||||
|
nix flake update
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build and send closures to remote machine
|
||||||
|
if [[ "${argc_target:-}" ]]; then
|
||||||
|
nixos-rebuild --flake ".#${argc_target}" --target-host "root@${argc_target}" "$1" ${argc_extra:+"${argc_extra[@]}"}
|
||||||
|
else
|
||||||
|
# Build current system
|
||||||
|
if [[ "${argc_builder:-}" == nh ]]; then
|
||||||
|
nh os "$1" ${argc_extra:+"${argc_extra[@]}"}
|
||||||
|
elif [[ "${argc_builder:-}" == nixos ]]; then
|
||||||
|
sudo nixos-rebuild "$1" ${argc_extra:+"${argc_extra[@]}"}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Invoke systemd to shutdown system
|
||||||
|
# Assumes errexit shell option is set
|
||||||
|
if [[ "${argc_poweroff:-}" ]]; then
|
||||||
|
sudo systemctl poweroff
|
||||||
|
elif [[ "${argc_reboot:-}" ]]; then
|
||||||
|
sudo systemctl reboot
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# @cmd Build and boot NixOS configuration
|
||||||
|
# @alias b,bo,boo
|
||||||
|
build::boot() { _build boot; }
|
||||||
|
|
||||||
|
# @cmd Build and switch NixOS configuration
|
||||||
|
# @alias s,sw,swi,swit,switc
|
||||||
|
build::switch() { _build switch; }
|
||||||
|
|
||||||
|
# @cmd Build and test NixOS configuration
|
||||||
|
# @alias t,te,tes
|
||||||
|
build::test() { _build test; }
|
||||||
|
|
||||||
|
# @cmd Compare NixOS system generations
|
||||||
|
# @alias d,di,dif
|
||||||
|
# @arg path1=/run/current-system Store path to compare with (current system by default)
|
||||||
|
# @arg path2=/nix/var/nix/profiles/system Store path to compare against (built system by default)
|
||||||
|
diff() {
|
||||||
|
nvd diff "${argc_path1:-}" "${argc_path2:-}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# @cmd Generate flake.nix from flake.in.nix with flakegen
|
||||||
|
# @alias g,ge,gen,gene,gener,genera,generat
|
||||||
|
# @flag -n --nuke Delete flake.nix and reinitialize
|
||||||
|
generate() {
|
||||||
|
if [[ "${argc_nuke:-}" ]]; then
|
||||||
|
rm --force flake.nix
|
||||||
|
nix flake init --template github:jorsn/flakegen
|
||||||
|
else
|
||||||
|
nix run .#genflake flake.nix
|
||||||
|
git add .
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# @cmd List NixOS generations
|
||||||
|
# @alias l,li,lis
|
||||||
|
# @arg extra~ Pass extra arguments to nixos-rebuild
|
||||||
|
list() {
|
||||||
|
nixos-rebuild list-generations ${argc_extra:+"${argc_extra[@]}"}
|
||||||
|
}
|
||||||
|
|
||||||
|
# @cmd Enter an interactive NixOS read-eval-print loop with the current configuration
|
||||||
|
# @alias r,re,rep
|
||||||
|
# @flag -n --no-generate Do not regenerate flake.nix before entering loop
|
||||||
|
# @arg extra~ Pass extra arguments to nixos-rebuild
|
||||||
|
repl() {
|
||||||
|
if [[ ! "${argc_no_generate:-}" ]]; then
|
||||||
|
nix run .#genflake flake.nix
|
||||||
|
git add .
|
||||||
|
fi
|
||||||
|
|
||||||
|
nixos-rebuild repl ${argc_extra:+"${argc_extra[@]}"}
|
||||||
|
}
|
||||||
|
|
||||||
|
eval "$(argc --argc-eval "$0" "$@")"
|
|
@ -1,10 +0,0 @@
|
||||||
#! /usr/bin/env bash
|
|
||||||
|
|
||||||
# Rebuild local flake configuration
|
|
||||||
|
|
||||||
cd /etc/nixos || exit 1
|
|
||||||
|
|
||||||
nix run .#genflake flake.nix &&
|
|
||||||
sleep 0.1 &&
|
|
||||||
git add . &&
|
|
||||||
sudo nixos-rebuild --show-trace "$@"
|
|
|
@ -1,10 +0,0 @@
|
||||||
#! /usr/bin/env bash
|
|
||||||
|
|
||||||
# Nix repl with loaded configuration
|
|
||||||
|
|
||||||
cd /etc/nixos || exit 1
|
|
||||||
|
|
||||||
nix run .#genflake flake.nix &&
|
|
||||||
sleep 0.1 &&
|
|
||||||
git add . &&
|
|
||||||
nixos-rebuild repl "$@"
|
|
|
@ -1,10 +0,0 @@
|
||||||
#! /usr/bin/env bash
|
|
||||||
|
|
||||||
# Rebuild and send closures to remote machine
|
|
||||||
|
|
||||||
cd /etc/nixos || exit 1
|
|
||||||
|
|
||||||
nix run .#genflake flake.nix &&
|
|
||||||
sleep 0.1 &&
|
|
||||||
git add . &&
|
|
||||||
nixos-rebuild --flake .#"$1" --target-host root@"$1" "$2" --show-trace "${@:3}"
|
|
|
@ -1,11 +0,0 @@
|
||||||
#! /usr/bin/env bash
|
|
||||||
|
|
||||||
# Update flake.lock and rebuild
|
|
||||||
|
|
||||||
cd /etc/nixos || exit 1
|
|
||||||
|
|
||||||
nix run .#genflake flake.nix &&
|
|
||||||
sleep 0.1 &&
|
|
||||||
git add . &&
|
|
||||||
sudo nix flake update &&
|
|
||||||
sudo nixos-rebuild --show-trace "$@"
|
|
|
@ -35,20 +35,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
backup = "sudo borgmatic -v 1 create --progress --stats";
|
|
||||||
extract = "sudo borgmatic -v 1 extract --progress";
|
|
||||||
restore = "sudo borgmatic -v 1 restore";
|
|
||||||
list = "sudo borgmatic -v 1 list";
|
|
||||||
init = "sudo borgmatic init -e repokey-blake2";
|
|
||||||
key = "sudo borgmatic key export";
|
|
||||||
|
|
||||||
reboot = "sudo systemctl reboot";
|
|
||||||
restart = "sudo systemctl reboot";
|
|
||||||
poweroff = "sudo systemctl poweroff";
|
|
||||||
shutdown = "sudo systemctl poweroff";
|
|
||||||
|
|
||||||
rsync = "rsync --info=progress2";
|
|
||||||
|
|
||||||
# https://github.com/aksiksi/compose2nix?tab=readme-ov-file#usage
|
# https://github.com/aksiksi/compose2nix?tab=readme-ov-file#usage
|
||||||
# https://github.com/aksiksi/compose2nix?tab=readme-ov-file#agenix
|
# https://github.com/aksiksi/compose2nix?tab=readme-ov-file#agenix
|
||||||
compose2nix = concatStringsSep " " [
|
compose2nix = concatStringsSep " " [
|
||||||
|
|
Loading…
Add table
Reference in a new issue