2022-11-20 22:17:25 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
home-manager,
|
2023-11-10 18:48:06 +00:00
|
|
|
flake,
|
2022-11-20 22:17:25 +00:00
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-06-13 00:14:25 +00:00
|
|
|
let
|
2021-06-06 13:22:44 +00:00
|
|
|
psCfg = config.pub-solar;
|
|
|
|
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
|
2023-11-10 18:48:06 +00:00
|
|
|
tritonshell = flake.inputs.tritonshell;
|
2022-11-20 22:17:25 +00:00
|
|
|
in {
|
2021-06-06 13:22:44 +00:00
|
|
|
imports = [
|
|
|
|
./session-variables.nix
|
2023-05-05 16:10:08 +00:00
|
|
|
./concepts-and-training.nix
|
|
|
|
./mnx.nix
|
2021-06-06 13:22:44 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
2023-11-10 18:48:06 +00:00
|
|
|
# TODO change in alacritty config directly
|
|
|
|
#pub-solar.graphical.alacritty.settings.font.size = 12;
|
|
|
|
#pub-solar.graphical.alacritty.settings.key_bindings = [
|
|
|
|
# {
|
|
|
|
# key = "V";
|
|
|
|
# mods = "Control|Super";
|
|
|
|
# action = "Paste";
|
|
|
|
# }
|
|
|
|
# {
|
|
|
|
# key = "C";
|
|
|
|
# mods = "Control|Super";
|
|
|
|
# action = "Copy";
|
|
|
|
# }
|
|
|
|
#];
|
2022-11-20 22:17:25 +00:00
|
|
|
#services.kbfs.enable = true;
|
|
|
|
#services.keybase.enable = true;
|
2023-11-10 18:48:06 +00:00
|
|
|
|
2023-12-17 21:48:05 +00:00
|
|
|
users.users."${psCfg.user.name}" = {
|
|
|
|
extraGroups = ["dialout"];
|
|
|
|
};
|
2023-11-10 18:48:06 +00:00
|
|
|
home-manager.users.${psCfg.user.name} = {
|
2022-11-20 22:17:25 +00:00
|
|
|
xdg.configFile."git/config".text = import ./.config/git/config.nix {
|
|
|
|
inherit config;
|
|
|
|
inherit pkgs;
|
|
|
|
};
|
|
|
|
xdg.configFile."git/config_greenbaum.cloud".text = import ./.config/git/config_greenbaum.cloud.nix {
|
|
|
|
inherit config;
|
|
|
|
inherit pkgs;
|
|
|
|
};
|
2023-05-31 18:53:16 +00:00
|
|
|
xdg.configFile."git/config_mnx".text = import ./.config/git/config_mnx.nix {
|
|
|
|
inherit config;
|
|
|
|
inherit pkgs;
|
|
|
|
};
|
2022-11-20 22:17:25 +00:00
|
|
|
xdg.configFile."git/config_git.b12f.io".text = import ./.config/git/config_git.b12f.io.nix {
|
|
|
|
inherit config;
|
|
|
|
inherit pkgs;
|
|
|
|
};
|
2024-02-07 18:10:03 +00:00
|
|
|
xdg.configFile."tmate/tmate.conf".text = import ./.config/tmate/config.nix {
|
|
|
|
inherit config;
|
|
|
|
inherit pkgs;
|
|
|
|
};
|
2022-11-20 22:17:25 +00:00
|
|
|
xdg.configFile."watson/config".text = import ./.config/watson/config.nix {
|
|
|
|
inherit config;
|
|
|
|
inherit pkgs;
|
|
|
|
};
|
2021-06-06 13:22:44 +00:00
|
|
|
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
AusweisApp2
|
2022-10-24 15:23:45 +00:00
|
|
|
drone-docker-runner
|
2022-01-19 00:13:15 +00:00
|
|
|
gpu-switch
|
2021-10-11 22:36:44 +00:00
|
|
|
ifmetric
|
|
|
|
ipmitool
|
2021-06-06 13:22:44 +00:00
|
|
|
thunderbird
|
|
|
|
veracrypt
|
2022-10-24 15:23:45 +00:00
|
|
|
age-plugin-yubikey
|
2024-02-02 22:25:54 +00:00
|
|
|
#cockroach-bin
|
2023-05-17 21:53:51 +00:00
|
|
|
obs-studio
|
2024-04-18 10:51:43 +00:00
|
|
|
scan2paperless
|
2024-01-25 18:12:22 +00:00
|
|
|
wlvncc
|
2021-06-06 13:22:44 +00:00
|
|
|
];
|
2023-03-14 13:29:20 +00:00
|
|
|
programs.bash.initExtra = ''
|
2023-03-27 16:06:16 +00:00
|
|
|
source ${config.age.secrets.environment-secrets.path}
|
2023-11-10 18:48:06 +00:00
|
|
|
source ${flake.inputs.tritonshell.packages.${pkgs.system}.triton-utils}/bin/ttp.sh
|
2023-03-27 16:06:16 +00:00
|
|
|
|
2024-03-06 17:51:29 +00:00
|
|
|
_tailscale()
|
|
|
|
{
|
|
|
|
local cur prev words cword
|
|
|
|
_init_completion -n = || return
|
|
|
|
|
|
|
|
if [[ $cword -eq 1 ]]; then
|
|
|
|
SUBCOMMANDS=$(tailscale --help 2>&1 | awk '/SUBCOMMANDS/{ f = 1; next } /FLAGS/{ f = 0 } f{print $1}')
|
|
|
|
SUBCOMMANDS="$SUBCOMMANDS debug"
|
|
|
|
FLAGS="-h --help --socket"
|
|
|
|
COMPREPLY=( $(compgen -W "$SUBCOMMANDS $FLAGS" -- "$cur" ))
|
|
|
|
return
|
|
|
|
else
|
|
|
|
subcmd="''${COMP_WORDS[1]}"
|
|
|
|
if [[ "$cur" = *=* ]]; then
|
|
|
|
COMPREPLY=( $(compgen -W 'false' -- "''${cur#*=}") )
|
|
|
|
return
|
|
|
|
elif [[ "$cur" = -* ]]; then
|
|
|
|
FLAGS=$(tailscale "$subcmd" --help 2>&1 | awk '/FLAGS/{ f = 1; next } f' | grep -oE -- '--[^ ]+[=]?' | tr -d ',')
|
|
|
|
FLAGS="$FLAGS --help"
|
|
|
|
COMPREPLY=( $(compgen -W "$FLAGS" -- "$cur" ))
|
|
|
|
return
|
|
|
|
else
|
|
|
|
case "$subcmd" in
|
|
|
|
"ping"|"ssh")
|
|
|
|
IP_AND_HOSTNAME=$(tailscale status 2>&1 | awk '{print $1"\n"$2}')
|
|
|
|
COMPREPLY=( $(compgen -W "$IP_AND_HOSTNAME" -- "$cur" ))
|
|
|
|
;;
|
|
|
|
"debug")
|
|
|
|
SUBCOMMANDS=""
|
|
|
|
if [[ $cword -eq 2 ]]; then
|
|
|
|
SUBCOMMANDS=$(tailscale "$subcmd" --help 2>&1 | awk '/SUBCOMMANDS/{ f = 1; next } /FLAGS/{ f = 0 } f{print $1}')
|
|
|
|
fi
|
|
|
|
FLAGS=$(tailscale "$subcmd" --help 2>&1 | awk '/FLAGS/{ f = 1; next } f' | grep -oE -- '--[^ ]+[=]?' | tr -d ',')
|
|
|
|
COMPREPLY=( $(compgen -W "$SUBCOMMANDS $FLAGS" -- "$cur" ))
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
complete -F _tailscale tailscale
|
2023-11-12 18:06:07 +00:00
|
|
|
complete -C ${flake.inputs.nixos-22-05.legacyPackages.${pkgs.system}.terraform}/bin/terraform terraform
|
2024-01-14 22:06:17 +00:00
|
|
|
complete -C ${pkgs.opentofu}/bin/tofu tofu
|
2023-03-14 13:29:20 +00:00
|
|
|
'';
|
2021-06-06 13:22:44 +00:00
|
|
|
|
|
|
|
# xdg.configFile."wallpaper.jpg".source = ./assets/wallpaper.jpg;
|
|
|
|
};
|
|
|
|
|
|
|
|
#services.mopidy.configuration = mkIf config.pub-solar.audio.enable (builtins.readFile ../../secrets/mopidy.conf);
|
|
|
|
};
|
|
|
|
}
|