This commit is contained in:
Lucy Hochkamp 2024-08-30 19:33:39 +02:00
parent 279570c40b
commit eb9cd960e5
No known key found for this signature in database
10 changed files with 388 additions and 97 deletions

View file

@ -2,7 +2,6 @@
programs.zsh.enable = true; programs.zsh.enable = true;
environment.pathsToLink = [ "/share/zsh" ]; environment.pathsToLink = [ "/share/zsh" ];
services.nix-daemon.enable = true; services.nix-daemon.enable = true;
nix.package = pkgs.nix;
nix.settings.cores = 0; # use all cores nix.settings.cores = 0; # use all cores
nix.settings.max-jobs = 10; # use all cores nix.settings.max-jobs = 10; # use all cores
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];

View file

@ -12,71 +12,340 @@ in
}; };
programs.nushell = { programs.nushell = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''
let carapace_completer = {|spans| let carapace_completer = {|spans: list<string>|
carapace $spans.0 nushell ...$spans | from json carapace $spans.0 nushell ...$spans
} | from json
$env.config = { | if ($in | default [] | where value =~ '^-.*ERR$' | is-empty) { $in } else { null }
edit_mode: vi }
show_banner: false, let external_completer = {|spans|
completions: { let expanded_alias = scope aliases
case_sensitive: false # case-sensitive completions | where name == $spans.0
quick: true # set to false to prevent auto-selecting completions | get -i 0.expansion
partial: true # set to false to prevent partial filling of the prompt
algorithm: "fuzzy" # prefix or fuzzy let spans = if $expanded_alias != null {
external: { $spans
# set to false to prevent nushell looking into $env.PATH to find more suggestions | skip 1
enable: true | prepend ($expanded_alias | split row ' ' | take 1)
# set to lower can improve completion performance at the cost of omitting some options } else {
max_results: 100 $spans
completer: $carapace_completer # check 'carapace_completer' }
match $spans.0 {
# carapace completions are incorrect for nu
# nu => $fish_completer
# fish completes commits and branch names in a nicer way
# git => $fish_completer
# carapace doesn't have completions for asdf
# asdf => $fish_completer
# use zoxide completions for zoxide commands
# __zoxide_z | __zoxide_zi => $zoxide_completer
_ => $carapace_completer
} | do $in $spans
}
$env.config = {
edit_mode: vi
show_banner: false,
completions: {
case_sensitive: false # case-sensitive completions
quick: true # set to false to prevent auto-selecting completions
partial: true # set to false to prevent partial filling of the prompt
algorithm: "fuzzy" # prefix or fuzzy
external: {
# set to false to prevent nushell looking into $env.PATH to find more suggestions
enable: true
# set to lower can improve completion performance at the cost of omitting some options
max_results: 100
completer: $external_completer # check 'carapace_completer'
}
} }
} }
} $env.EDITOR = "hx"
$env.NIX_REMOTE = "daemon" $env.VISUAL = "hx"
$env.NIX_USER_PROFILE_DIR = $"/nix/var/nix/profiles/per-user/($env.USER)" $env.NIX_REMOTE = "daemon"
$env.NIX_PROFILES = $"/nix/var/nix/profiles/default:($env.HOME)/.nix-profile" $env.NIX_USER_PROFILE_DIR = $"/nix/var/nix/profiles/per-user/($env.USER)"
$env.NIX_SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt" $env.NIX_PROFILES = $"/nix/var/nix/profiles/default:($env.HOME)/.nix-profile"
$env.NIX_PATH = "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixpkgs:/nix/var/nix/profiles/per-user/root/channels" $env.NIX_SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt"
$env.PATH = ($env.PATH | $env.NIX_PATH = "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixpkgs:/nix/var/nix/profiles/per-user/root/channels"
split row (char esep) | $env.PATH = ($env.PATH |
append /usr/bin/env | split row (char esep) |
append $"($env.HOME)/.nix-profile/bin" | append /usr/bin/env |
append "/nix/var/nix/profiles/default/bin" | append $"($env.HOME)/.nix-profile/bin" |
append $"/etc/profiles/per-user/($env.USER)/bin" | append "/nix/var/nix/profiles/default/bin" |
append "/run/current-system/sw/bin" | append $"/etc/profiles/per-user/($env.USER)/bin" |
append "/opt/homebrew/bin" | append "/run/current-system/sw/bin" |
append $"($env.HOME)/.cargo/bin" | append "/opt/homebrew/bin" |
append $"($env.HOME)/.local/bin" append $"($env.HOME)/.cargo/bin" |
) append $"($env.HOME)/.local/bin"
alias no = open )
alias open = ^open alias no = open
alias l = ls -al alias open = ^open
alias ll = ls -l alias l = ls -al
alias ga = git add alias ll = ls -l
alias gaa = git add -A alias ga = git add
alias gd = git diff alias gaa = git add -A
alias gc = git commit alias gd = git diff
alias gp = git push alias gc = git commit
alias gpl = git pull alias gp = git push
''; alias gpl = git pull
shellAliases = { '';
vi = "hx"; shellAliases = {
vim = "hx"; vi = "hx";
nano = "hx"; vim = "hx";
}; nano = "hx";
}; };
programs.carapace.enable = true;
programs.carapace.enableNushellIntegration = true;
programs.starship = { enable = true;
settings = {
add_newline = false;
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
}; };
programs.carapace.enable = true;
programs.carapace.enableNushellIntegration = true;
programs.starship = {
enable = true;
settings = {
"add_newline" = true;
"aws" = {
"disabled" = true;
"format" = " [aws](italic) [$symbol $profile $region]($style)";
"style" = "bold blue";
"symbol" = " ";
};
"battery" = {
"charging_symbol" = "[](italic bold green)";
"discharging_symbol" = "";
"display" = [
{
"style" = "italic bold red";
"threshold" = 20;
}
{
"style" = "italic dimmed bright-purple";
"threshold" = 60;
}
{
"style" = "italic dimmed yellow";
"threshold" = 70;
}
];
"empty_symbol" = "";
"format" = "[ $percentage $symbol]($style)";
"full_symbol" = "";
"unknown_symbol" = "";
};
"buf" = {
"format" = " [buf](italic) [$symbol $version $buf_version]($style)";
"symbol" = " ";
};
"c" = {
"format" = " [$symbol($version(-$name))]($style)";
"symbol" = " ";
};
"character" = {
"error_symbol" = "[](italic purple)";
"format" = "$symbol ";
"success_symbol" = "[](bold italic bright-yellow)";
"vimcmd_replace_one_symbol" = "";
"vimcmd_replace_symbol" = "";
"vimcmd_symbol" = "[](italic dimmed green)";
"vimcmd_visual_symbol" = "";
};
"cmd_duration" = {
"format" = "[ $duration ](italic white)";
};
"conda" = {
"format" = " conda [$symbol$environment]($style)";
"symbol" = " ";
};
"continuation_prompt" = "[ ](dimmed white)";
"dart" = {
"format" = " dart [$symbol($version )]($style)";
"symbol" = " ";
};
"deno" = {
"format" = " [deno](italic) [ $version](green bold)";
"version_format" = "\${raw}";
};
"directory" = {
"format" = "[$path]($style)[$read_only]($read_only_style)";
"home_symbol" = "";
"read_only" = " ";
"repo_root_format" = "[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) [](bold bright-blue)";
"repo_root_style" = "bold blue";
"style" = "italic blue";
"truncation_length" = 2;
"truncation_symbol" = " ";
"use_os_path_sep" = true;
};
"docker_context" = {
"format" = " docker [$symbol$context]($style)";
"symbol" = " ";
};
"elixir" = {
"format" = " exs [$symbol $version OTP $otp_version ]($style)";
"symbol" = " ";
};
"elm" = {
"format" = " elm [$symbol($version )]($style)";
"symbol" = " ";
};
"env_var" = {
"VIMSHELL" = {
"format" = "[$env_value]($style)";
"style" = "green italic";
};
};
"fill" = {
"symbol" = " ";
};
"format" = "($nix_shell$container$fill$git_metrics\n)$cmd_duration$hostname$localip$shlvl$shell$env_var$jobs$sudo$username$character";
"git_branch" = {
"format" = " [$branch(:$remote_branch)]($style)";
"ignore_branches" = [
"main"
"master"
];
"only_attached" = true;
"style" = "italic bright-blue";
"symbol" = "[](bold italic bright-blue)";
"truncation_length" = 11;
"truncation_symbol" = "";
};
"git_metrics" = {
"added_style" = "italic dimmed green";
"deleted_style" = "italic dimmed red";
"disabled" = false;
"format" = "([$added]($added_style))([$deleted]($deleted_style))";
"ignore_submodules" = true;
};
"git_status" = {
"ahead" = "[[\${count}](bold white)](italic green)";
"behind" = "[[\${count}](bold white)](italic red)";
"conflicted" = "[](italic bright-magenta)";
"deleted" = "[](italic red)";
"diverged" = "[ [\${ahead_count}](regular white)[\${behind_count}](regular white)](italic bright-magenta)";
"format" = "([$ahead_behind$staged$modified$untracked$renamed$deleted$conflicted$stashed]($style))";
"modified" = "[](italic yellow)";
"renamed" = "[](italic bright-blue)";
"staged" = "[[$count](bold white)](italic bright-cyan)";
"stashed" = "[](italic white)";
"style" = "bold italic bright-blue";
"untracked" = "[](italic bright-yellow)";
};
"golang" = {
"format" = " go [$symbol($version )]($style)";
"symbol" = " ";
};
"haskell" = {
"format" = " hs [$symbol($version )]($style)";
"symbol" = "λ ";
};
"java" = {
"format" = " java [\${symbol}(\${version} )]($style)";
"symbol" = " ";
};
"jobs" = {
"format" = "[$symbol$number]($style) ";
"style" = "white";
"symbol" = "[](blue italic)";
};
"julia" = {
"format" = " jl [$symbol($version )]($style)";
"symbol" = " ";
};
"localip" = {
"disabled" = false;
"format" = " [$localipv4](bold magenta)";
"ssh_only" = true;
};
"lua" = {
"format" = " [lua](italic) [\${symbol}\${version}]($style)";
"style" = "bold bright-yellow";
"symbol" = " ";
"version_format" = "\${raw}";
};
"memory_usage" = {
"format" = " mem [\${ram}( \${swap})]($style)";
"symbol" = " ";
};
"nim" = {
"format" = " nim [$symbol($version )]($style)";
"symbol" = " ";
};
"nix_shell" = {
"format" = "[$symbol nix$state]($style) [$name](italic dimmed white)";
"impure_msg" = "[](bold dimmed red)";
"pure_msg" = "[](bold dimmed green)";
"style" = "bold italic dimmed blue";
"symbol" = "";
"unknown_msg" = "[](bold dimmed ellow)";
};
"nodejs" = {
"detect_extensions" = [
];
"detect_files" = [
"package-lock.json"
"yarn.lock"
];
"detect_folders" = [
"node_modules"
];
"format" = " [node](italic) [ ($version)](bold bright-green)";
"version_format" = "\${raw}";
};
"package" = {
"format" = " [pkg](italic dimmed) [$symbol$version]($style)";
"style" = "dimmed yellow italic bold";
"symbol" = " ";
"version_format" = "\${raw}";
};
"python" = {
"format" = " [py](italic) [\${symbol}\${version}]($style)";
"style" = "bold bright-yellow";
"symbol" = "[](bold bright-blue) ";
"version_format" = "\${raw}";
};
"right_format" = "$singularity$kubernetes$directory$vcsh$fossil_branch$git_branch$git_commit$git_state$git_status$hg_branch$pijul_channel$docker_context$package$c$cmake$cobol$daml$dart$deno$dotnet$elixir$elm$erlang$fennel$golang$guix_shell$haskell$haxe$helm$java$julia$kotlin$gradle$lua$nim$nodejs$ocaml$opa$perl$php$pulumi$purescript$python$raku$rlang$red$ruby$rust$scala$solidity$swift$terraform$vlang$vagrant$zig$buf$conda$meson$spack$memory_usage$aws$gcloud$openstack$azure$crystal$custom$status$os$battery$time";
"ruby" = {
"format" = " [rb](italic) [\${symbol}\${version}]($style)";
"style" = "bold red";
"symbol" = " ";
"version_format" = "\${raw}";
};
"rust" = {
"format" = " [rs](italic) [$symbol$version]($style)";
"style" = "bold red";
"symbol" = " ";
"version_format" = "\${raw}";
};
"spack" = {
"format" = " spack [$symbol$environment]($style)";
"symbol" = " ";
};
"sudo" = {
"disabled" = false;
"format" = "[$symbol]($style)";
"style" = "bold italic bright-purple";
"symbol" = "";
};
"swift" = {
"format" = " [sw](italic) [\${symbol}\${version}]($style)";
"style" = "bold bright-red";
"symbol" = " ";
"version_format" = "\${raw}";
};
"time" = {
"disabled" = false;
"format" = "[ $time]($style)";
"style" = "italic dimmed white";
"time_format" = "%R";
"utc_time_offset" = "local";
};
"username" = {
"disabled" = false;
"format" = "[ $user]($style) ";
"show_always" = false;
"style_root" = "purple bold italic";
"style_user" = "bright-yellow bold italic";
};
};
}; };
programs.vscode.userSettings."terminal.integrated.profiles.osx" = { programs.vscode.userSettings."terminal.integrated.profiles.osx" = {
nushell = { nushell = {

View file

@ -62,31 +62,31 @@ in
viAlias = true; viAlias = true;
plugins = plugins =
let let
nnn-nvim = pkgs.vimUtils.buildVimPlugin { # nnn-nvim = pkgs.vimUtils.buildVimPlugin {
pname = "nnn-nvim"; # pname = "nnn-nvim";
version = "1.0.0"; # version = "1.0.0";
src = inputs.nnn-nvim; # src = inputs.nnn-nvim;
}; # };
notify-nvim = pkgs.vimUtils.buildVimPlugin { # notify-nvim = pkgs.vimUtils.buildVimPlugin {
pname = "notify-nvim"; # pname = "notify-nvim";
version = "1.0.0"; # version = "1.0.0";
src = inputs.notify-nvim; # src = inputs.notify-nvim;
}; # };
noice-nvim = pkgs.vimUtils.buildVimPlugin { # noice-nvim = pkgs.vimUtils.buildVimPlugin {
pname = "noice-nvim"; # pname = "noice-nvim";
version = "1.0.0"; # version = "1.0.0";
src = inputs.noice-nvim; # src = inputs.noice-nvim;
}; # };
in in
map (x: { plugin = x; }) (with pkgs.unstable.vimPlugins; [ map (x: { plugin = x; }) (with pkgs.unstable.vimPlugins; [
vim-tmux-navigator # tmux vim-tmux-navigator # tmux
nnn-nvim # nnn as filebrowser # nnn-nvim # nnn as filebrowser
gruvbox-nvim # theme gruvbox-nvim # theme
tokyonight-nvim # light theme tokyonight-nvim # light theme
# complete ui overhaul # complete ui overhaul
notify-nvim # notify-nvim
nui-nvim nui-nvim
noice-nvim # noice-nvim
telescope-nvim telescope-nvim
telescope-ui-select-nvim telescope-ui-select-nvim
# line # line

View file

@ -16,9 +16,9 @@ in
# "${inputs.agkozak-zsh-prompt}/agkozak-zsh-prompt.plugin.zsh" # "${inputs.agkozak-zsh-prompt}/agkozak-zsh-prompt.plugin.zsh"
"${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/git/git.plugin.zsh" "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/git/git.plugin.zsh"
#"${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/globalias/globalias.plugin.zsh" #"${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/globalias/globalias.plugin.zsh"
"${inputs.zsh-vim-mode}/zsh-vim-mode.plugin.zsh" # "${inputs.zsh-vim-mode}/zsh-vim-mode.plugin.zsh"
"${inputs.zsh-syntax-highlighting}/zsh-syntax-highlighting.plugin.zsh" # "${inputs.zsh-syntax-highlighting}/zsh-syntax-highlighting.plugin.zsh"
"${inputs.zsh-completions}/zsh-completions.plugin.zsh" # "${inputs.zsh-completions}/zsh-completions.plugin.zsh"
]; ];
source = map (x: "source " + x) sources; source = map (x: "source " + x) sources;

View file

@ -19,10 +19,10 @@ with lib.my;
"lima" "lima"
"docker" # docker cli "docker" # docker cli
"docker-compose" "docker-compose"
"leoafarias/fvm/fvm" # flutter version manager # "leoafarias/fvm/fvm" # flutter version manager
"cocoapods" # flutter/other ios shit "cocoapods" # flutter/other ios shit
"butane" # "butane"
"borgbackup" # time machine can eat my ass "borgbackup" # time machine can eat my ass
]; ];
casks = [ casks = [
@ -33,7 +33,7 @@ with lib.my;
"hammerspoon" "hammerspoon"
"kicad" "kicad"
"android-platform-tools" "android-platform-tools"
"nheko" # "nheko"
"raycast" "raycast"
"ukelele" "ukelele"
"imhex" "imhex"
@ -42,23 +42,23 @@ with lib.my;
"balenaetcher" "balenaetcher"
"audacity" "audacity"
"openlens" "openlens"
"ferdium" # "ferdium"
"discord" "discord"
"vlc" "vlc"
"rectangle" "rectangle"
"floorp" "floorp"
"space-capsule" # "space-capsule"
"iterm2" "iterm2"
"signal" "signal"
"eqmac" "eqmac"
"syncthing" "syncthing"
"android-studio" "android-studio"
"temurin" # "temurin"
"whisky" "whisky"
"dbeaver-community" "dbeaver-community"
"qutebrowser" # rly want to switch to it # "qutebrowser" # rly want to switch to it
"dmenu-mac" # "dmenu-mac"
]; ];
#masApps = { #masApps = {

View file

@ -140,4 +140,19 @@ in
}; };
}; };
# changedetection
systemd.services."podman-cd-network" = {
script = ''
${pkgs.podman}/bin/podman network exists cd-net || ${pkgs.podman}/bin/podman network create cd-net --internal --ipv6
'';
};
virtualisation.oci-containers.containers.changedetection = {
image = "dgtlmoon/changedetection.io";
extraOptions = [ "--network=podman" "--network=cd-net" ];
volumes = [
"changedetection-data:/datastore"
];
};
} }

View file

@ -154,6 +154,14 @@ in
} }
} }
} }
@cd host cd.hailsatan.eu
handle @cd {
reverse_proxy http://changedetection:5000 {
transport http {
resolvers 10.88.0.1 # podman dns
}
}
}
@bzzt-api host bzzt-api.hailsatan.eu @bzzt-api host bzzt-api.hailsatan.eu
handle @bzzt-api { handle @bzzt-api {
reverse_proxy http://127.0.0.1:5001 reverse_proxy http://127.0.0.1:5001

View file

@ -251,8 +251,8 @@
home-manager.users.ragon = { pkgs, lib, inputs, config, ... }: { home-manager.users.ragon = { pkgs, lib, inputs, config, ... }: {
imports = [ imports = [
../../hm-modules/nvim # ../../hm-modules/nvim
../../hm-modules/zsh # ../../hm-modules/zsh
../../hm-modules/tmux ../../hm-modules/tmux
../../hm-modules/cli.nix ../../hm-modules/cli.nix
../../hm-modules/files.nix ../../hm-modules/files.nix

View file

@ -43,5 +43,5 @@ in {
}; };
}; };
ragon.persist.extraDirectories = [ "/var/lib/private/plausible" ]; ragon.persist.extraDirectories = [ "/var/lib/private/plausible" "/var/lib/clickhouse" ];
} }

View file

@ -37,7 +37,7 @@ caddy.override {
cp -r --reflink=auto . $out cp -r --reflink=auto . $out
''; '';
outputHash = "sha256-0wTy7+nOcTlnbs8BDpleKW6X8Lo21Okas4wh7PLl254="; outputHash = "sha256-yI5eUpEbbZN7qOemT64lodh/Khz9XkFwwoK7NEL0pdI=";
outputHashMode = "recursive"; outputHashMode = "recursive";
}; };