diff options
| author | Fuwn <[email protected]> | 2024-10-23 03:40:38 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-10-23 03:40:38 -0700 |
| commit | acd679c65a0dbd8020dfd7f6e3ea6f1e955fab94 (patch) | |
| tree | ceda1acda86dc4b39e7889fdc4dbde7fe11f29a2 /home/ebisu/kansai/system | |
| parent | home: simplify akashi module population (diff) | |
| download | nixos-config-acd679c65a0dbd8020dfd7f6e3ea6f1e955fab94.tar.xz nixos-config-acd679c65a0dbd8020dfd7f6e3ea6f1e955fab94.zip | |
home: move fortune modules up into kansai module
Diffstat (limited to 'home/ebisu/kansai/system')
| -rw-r--r-- | home/ebisu/kansai/system/default.nix | 15 | ||||
| -rw-r--r-- | home/ebisu/kansai/system/peripheral.nix | 7 | ||||
| -rw-r--r-- | home/ebisu/kansai/system/shell/default.nix | 20 | ||||
| -rw-r--r-- | home/ebisu/kansai/system/shell/fish.nix | 184 | ||||
| -rw-r--r-- | home/ebisu/kansai/system/shell/starship.nix | 304 | ||||
| -rw-r--r-- | home/ebisu/kansai/system/sops.nix | 22 | ||||
| -rw-r--r-- | home/ebisu/kansai/system/ssh.nix | 46 | ||||
| -rw-r--r-- | home/ebisu/kansai/system/terminal/default.nix | 12 | ||||
| -rw-r--r-- | home/ebisu/kansai/system/terminal/foot.nix | 49 | ||||
| -rw-r--r-- | home/ebisu/kansai/system/terminal/kitty.nix | 113 | ||||
| -rw-r--r-- | home/ebisu/kansai/system/tracing.nix | 8 | ||||
| -rw-r--r-- | home/ebisu/kansai/system/variables.nix | 102 | ||||
| -rw-r--r-- | home/ebisu/kansai/system/virtualisation/default.nix | 12 | ||||
| -rw-r--r-- | home/ebisu/kansai/system/virtualisation/docker.nix | 10 |
14 files changed, 904 insertions, 0 deletions
diff --git a/home/ebisu/kansai/system/default.nix b/home/ebisu/kansai/system/default.nix new file mode 100644 index 0000000..6a2babd --- /dev/null +++ b/home/ebisu/kansai/system/default.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: +{ + imports = [ + ./shell + ./terminal + ./virtualisation + ./peripheral.nix + ./sops.nix + ./ssh.nix + ./tracing.nix + ./variables.nix + ]; + + home.packages = [ pkgs.nerdfonts ]; +} diff --git a/home/ebisu/kansai/system/peripheral.nix b/home/ebisu/kansai/system/peripheral.nix new file mode 100644 index 0000000..7b91dfe --- /dev/null +++ b/home/ebisu/kansai/system/peripheral.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + # openrgb + solaar + ]; +} diff --git a/home/ebisu/kansai/system/shell/default.nix b/home/ebisu/kansai/system/shell/default.nix new file mode 100644 index 0000000..82c4a71 --- /dev/null +++ b/home/ebisu/kansai/system/shell/default.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: +{ + imports = [ + ./fish.nix + ./starship.nix + ]; + + home.packages = with pkgs; [ + asciinema + navi + shellclear + watchexec + zoxide + shellcheck + termius + dash + mosh + killall + ]; +} diff --git a/home/ebisu/kansai/system/shell/fish.nix b/home/ebisu/kansai/system/shell/fish.nix new file mode 100644 index 0000000..d7ff424 --- /dev/null +++ b/home/ebisu/kansai/system/shell/fish.nix @@ -0,0 +1,184 @@ +{ + pkgs, + config, + secrets, + self, + lib, + ... +}: +{ + programs.fish = { + enable = true; + + shellInit = '' + if status is-interactive + set fish_greeting + + fish_vi_key_bindings + + function fish_postexec --on-event fish_postexec + if test "$argv" != "clear" + echo + end + end + + function vpn + env BIND_INTERFACE=wgpia0 LD_PRELOAD=/usr/lib/bindToInterface.so $argv + end + + function nh + if test "$argv[1]" = "home" -a "$argv[2]" = "switch" + command nh $argv -- --impure + else + command nh $argv + end + end + + function nix-find + doas find $argv -type f -exec test ! -L {} \; -exec realpath {} \; | grep -v "^/nix/store" + end + + function code + command code $argv --wait + end + + function code! + command code $argv + end + end + + set -l config_home (set -q XDG_CONFIG_HOME; and echo $XDG_CONFIG_HOME; or echo ${config.xdg.configHome}) + set HISTSIZE -1 + set HISTFILESIZE -1 + set SAVEHIST -1 + set GPG_TTY (tty) + + bind \ce edit_command_buffer + + cat ${config.xdg.cacheHome}/wal/sequences + + zoxide init fish | source + ''; + + plugins = [ + { + name = "fzf.fish"; + + src = pkgs.fetchFromGitHub { + owner = "patrickf1"; + repo = "fzf.fish"; + rev = "8920367cf85eee5218cc25a11e209d46e2591e7a"; + sha256 = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM="; + }; + } + { + name = "bass"; + + src = pkgs.fetchFromGitHub { + owner = "edc"; + repo = "bass"; + rev = "79b62958ecf4e87334f24d6743e5766475bcf4d0"; + sha256 = "sha256-3d/qL+hovNA4VMWZ0n1L+dSM1lcz7P5CQJyy+/8exTc="; + }; + } + { + name = "nvm.fish"; + + src = pkgs.fetchFromGitHub { + owner = "jorgebucaran"; + repo = "nvm.fish"; + rev = "b8edb1ee24cbbf7259196b0cb3c6c4ab65b07929"; + sha256 = "sha256-7JxIQSseBv81SSpWH1pufx8fh9EQhbo3r2nVVREwc58="; + }; + } + { + name = "sponge"; + + src = pkgs.fetchFromGitHub { + owner = "meaningful-ooo"; + repo = "sponge"; + rev = "384299545104d5256648cee9d8b117aaa9a6d7be"; + sha256 = "sha256-MdcZUDRtNJdiyo2l9o5ma7nAX84xEJbGFhAVhK+Zm1w="; + }; + } + { + name = "autopair.fish"; + + src = pkgs.fetchFromGitHub { + owner = "jorgebucaran"; + repo = "autopair.fish"; + rev = "4d1752ff5b39819ab58d7337c69220342e9de0e2"; + sha256 = "sha256-qt3t1iKRRNuiLWiVoiAYOu+9E7jsyECyIqZJ/oRIT1A="; + }; + } + ]; + + shellAliases = + let + proxyEnvironment = "http_proxy=$(cat ${ + config.sops.secrets."proxy/i2p/http".path + }) HTTP_PROXY=$(cat ${config.sops.secrets."proxy/i2p/http".path}) https_proxy=$(cat ${ + config.sops.secrets."proxy/i2p/https".path + }) HTTPS_PROXY=$(cat ${config.sops.secrets."proxy/i2p/https".path}) socks_proxy=$(cat ${ + config.sops.secrets."proxy/i2p/socks5".path + }) SOCKS_PROXY=$(cat ${config.sops.secrets."proxy/i2p/socks5".path})"; + in + { + # Verbosity + cp = "cp -iv"; + mv = "mv -iv"; + # rm = "rm -vI"; + bc = "bc -ql"; + rsync = "rsync -vrPlu"; + mkd = "mkdir -pv"; + yt = "yt-dlp --embed-metadata -i"; + yta = "yt -x -f bestaudio/best"; + ytt = "yt --skip-download --write-thumbnail"; + ffmpeg = "ffmpeg -hide_banner"; + wdic = "wdic --homophones --kanji --color --pager"; + hakuneko = "hakuneko-desktop --no-sandbox"; + fastfetch = "clear && /usr/bin/env fastfetch"; + wget = "wget --hsts-file=${config.xdg.dataHome}/wget-hsts"; + mosh = "mosh --predict=experimental"; + + # Modern Alternatives & Alias Rewrites + unzip = "ripunzip unzip-file"; + nvim = "lvim"; + vim = "lvim"; + vimdiff = "lvim -d"; + rm = "rip"; + + # Colourise + ls = "exa -h --no-quotes --color=auto --group-directories-first"; + grep = "grep --color=auto"; + diff = "diff --color=auto"; + ccat = "highlight --out-format=ansi"; + ip = "ip -color=auto"; + + # Abbreviations + ka = "killall"; + g = "git"; + sdn = "shutdown -h now"; + e = "$EDITOR"; + v = "$EDITOR"; + ff = "fastfetch"; + + # Other + chan = "chan-downloader -c 10"; + rotd = "systemctl --user restart opentabledriver.service"; + ks = "kaguya stream --user-agent 'Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0'"; + def = "myougiden"; + suzuri = "SUZURI_MINIMAL=1 SUZURI_REVERSE=1 ${pkgs.tsutsumi.suzuri}/bin/suzuri"; + "5ch" = "html2md -i 'https://ff5ch.syoboi.jp/' -s section | glow"; + shinobu = "curl --silent https://shinobu.fuwn.workers.dev/shinobu -o /tmp/shinobu && feh /tmp/shinobu"; + auto_subtitle = "source ${config.home.homeDirectory}/Documents/Code/Git/Random/auto-subtitle/venv/bin/activate && auto_subtitle --model medium --task translate --srt_only True"; + steamy = "mangohud gamemoderun steam-runtime"; + koix = "koi -f"; + seamonkey = "${config.home.homeDirectory}/.local/src/seamonkey/seamonkey-bin"; + doom = "${config.xdg.configHome}/emacs/bin/doom"; + epiphany-i2p = "${proxyEnvironment} epiphany"; + eolie-i2p = "${proxyEnvironment} eolie"; + notion = "notion-app ${import "${self}/lib/electron-flags.nix" { inherit lib; }}"; + }; + }; +} diff --git a/home/ebisu/kansai/system/shell/starship.nix b/home/ebisu/kansai/system/shell/starship.nix new file mode 100644 index 0000000..4daeefc --- /dev/null +++ b/home/ebisu/kansai/system/shell/starship.nix @@ -0,0 +1,304 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ starship ]; + + programs.starship = { + enable = true; + enableFishIntegration = true; + + # I CBA to update the formatting to match the rest of the expressions, since + # this is a one-off that I tend to import over directly from starship. + settings = { + format = "[term%](bold green) "; + right_format = "$character$all"; + add_newline = false; + + line_break = { + disabled = true; + }; + + character = { + success_symbol = "[i](bold green)"; + error_symbol = "[x](bold red)"; + vimcmd_symbol = "[n](bold green)"; + vimcmd_visual_symbol = "[v](bold green)"; + vimcmd_replace_symbol = "[R](bold green)"; + vimcmd_replace_one_symbol = "[r](bold green)"; + }; + + git_commit = { + tag_symbol = " tag "; + }; + + git_status = { + ahead = ">"; + behind = "<"; + diverged = "<>"; + renamed = "r"; + deleted = "x"; + }; + + aws = { + symbol = "aws "; + }; + + azure = { + symbol = "az "; + }; + + bun = { + symbol = "bun "; + }; + + c = { + symbol = "C "; + }; + + cobol = { + symbol = "cobol "; + }; + + conda = { + symbol = "conda "; + }; + + crystal = { + symbol = "cr "; + }; + + cmake = { + symbol = "cmake "; + }; + + daml = { + symbol = "daml "; + }; + + dart = { + symbol = "dart "; + }; + + deno = { + symbol = "deno "; + }; + + dotnet = { + symbol = ".NET "; + }; + + directory = { + read_only = " ro"; + }; + + docker_context = { + symbol = "docker "; + }; + + elixir = { + symbol = "exs "; + }; + + elm = { + symbol = "elm "; + }; + + fennel = { + symbol = "fnl "; + }; + + fossil_branch = { + symbol = "fossil "; + }; + + gcloud = { + symbol = "gcp "; + }; + + git_branch = { + symbol = "git "; + }; + + golang = { + symbol = "go "; + }; + + gradle = { + symbol = "gradle "; + }; + + guix_shell = { + symbol = "guix "; + }; + + hg_branch = { + symbol = "hg "; + }; + + java = { + symbol = "java "; + }; + + julia = { + symbol = "jl "; + }; + + kotlin = { + symbol = "kt "; + }; + + lua = { + symbol = "lua "; + }; + + nodejs = { + symbol = "nodejs "; + }; + + memory_usage = { + symbol = "memory "; + }; + + meson = { + symbol = "meson "; + }; + + nim = { + symbol = "nim "; + }; + + nix_shell = { + symbol = "nix "; + }; + + ocaml = { + symbol = "ml "; + }; + + opa = { + symbol = "opa "; + }; + + os = { + symbols = { + Alpaquita = "alq "; + Alpine = "alp "; + Amazon = "amz "; + Android = "andr "; + Arch = "rch "; + Artix = "atx "; + CentOS = "cent "; + Debian = "deb "; + DragonFly = "dfbsd "; + Emscripten = "emsc "; + EndeavourOS = "ndev "; + Fedora = "fed "; + FreeBSD = "fbsd "; + Garuda = "garu "; + Gentoo = "gent "; + HardenedBSD = "hbsd "; + Illumos = "lum "; + Linux = "lnx "; + Mabox = "mbox "; + Macos = "mac "; + Manjaro = "mjo "; + Mariner = "mrn "; + MidnightBSD = "mid "; + Mint = "mint "; + NetBSD = "nbsd "; + NixOS = "nix "; + OpenBSD = "obsd "; + OpenCloudOS = "ocos "; + openEuler = "oeul "; + openSUSE = "osuse "; + OracleLinux = "orac "; + Pop = "pop "; + Raspbian = "rasp "; + Redhat = "rhl "; + RedHatEnterprise = "rhel "; + Redox = "redox "; + Solus = "sol "; + SUSE = "suse "; + Ubuntu = "ubnt "; + Unknown = "unk "; + Windows = "win "; + }; + }; + + package = { + symbol = "pkg "; + }; + + perl = { + symbol = "pl "; + }; + + php = { + symbol = "php "; + }; + + pijul_channel = { + symbol = "pijul "; + }; + + pulumi = { + symbol = "pulumi "; + }; + + purescript = { + symbol = "purs "; + }; + + python = { + symbol = "py "; + }; + + raku = { + symbol = "raku "; + }; + + ruby = { + symbol = "rb "; + }; + + rust = { + symbol = "rs "; + }; + + scala = { + symbol = "scala "; + }; + + spack = { + symbol = "spack "; + }; + + solidity = { + symbol = "solidity "; + }; + + status = { + symbol = "[x](bold red) "; + }; + + sudo = { + symbol = "sudo "; + }; + + swift = { + symbol = "swift "; + }; + + typst = { + symbol = "typst "; + }; + + terraform = { + symbol = "terraform "; + }; + + zig = { + symbol = "zig "; + }; + }; + }; +} diff --git a/home/ebisu/kansai/system/sops.nix b/home/ebisu/kansai/system/sops.nix new file mode 100644 index 0000000..e229626 --- /dev/null +++ b/home/ebisu/kansai/system/sops.nix @@ -0,0 +1,22 @@ +{ config, self, ... }: +{ + sops = { + gnupg.sshKeyPaths = [ ]; + defaultSopsFile = "${self}/secrets/${config.home.username}.yaml"; + + age = { + sshKeyPaths = [ ]; + keyFile = "${config.xdg.configHome}/sops/age/keys.txt"; + generateKey = false; + }; + + secrets = { + openai_api_key = { }; + suzuri_token = { }; + bark_api_key = { }; + "proxy/i2p/http" = { }; + "proxy/i2p/https" = { }; + "proxy/i2p/socks5" = { }; + }; + }; +} diff --git a/home/ebisu/kansai/system/ssh.nix b/home/ebisu/kansai/system/ssh.nix new file mode 100644 index 0000000..6a47791 --- /dev/null +++ b/home/ebisu/kansai/system/ssh.nix @@ -0,0 +1,46 @@ +{ config, secrets, ... }: +{ + programs.ssh = { + enable = true; + addKeysToAgent = "yes"; + serverAliveInterval = 60; + serverAliveCountMax = 10; + + extraConfig = '' + IgnoreUnknown UseKeychain + UseKeychain yes + IPQoS lowdelay throughput + ''; + + matchBlocks = { + "akashi" = { }; + "himeji".user = "root"; + "watson".user = "root"; + + "github.com" = { + user = "git"; + identityFile = "${config.home.homeDirectory}/.ssh/id_rsa"; + }; + + "aur.archlinux.org" = { + user = "aur"; + identityFile = "${config.home.homeDirectory}/.ssh/aur"; + }; + + "seti" = { + user = "root"; + port = 2222; + identityFile = "${config.home.homeDirectory}/.ssh/seti"; + }; + + "oit" = { + inherit (secrets.ssh.oit) hostname user; + }; + + "eu.nixbuild.net" = { + port = 2222; + identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519.1"; + }; + }; + }; +} diff --git a/home/ebisu/kansai/system/terminal/default.nix b/home/ebisu/kansai/system/terminal/default.nix new file mode 100644 index 0000000..6cd5378 --- /dev/null +++ b/home/ebisu/kansai/system/terminal/default.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +{ + imports = [ + ./kitty.nix + ./foot.nix + ]; + + home.packages = with pkgs; [ + cool-retro-term + # warp-terminal + ]; +} diff --git a/home/ebisu/kansai/system/terminal/foot.nix b/home/ebisu/kansai/system/terminal/foot.nix new file mode 100644 index 0000000..36fd525 --- /dev/null +++ b/home/ebisu/kansai/system/terminal/foot.nix @@ -0,0 +1,49 @@ +{ + programs.foot = { + enable = false; + + settings = { + main = { + font = "SF Mono:size=12"; + font-bold = "SF Mono:size=12:weight=medium"; + font-italic = "SF Mono:size=12:slant=italic"; + font-bold-italic = "SF Mono:size=12:slant=italic:weight=medium"; + + # Font Fine-tuning + # vertical-letter-offset = -1; + # line-height = 13; + # underline-thickness = 0.6; + # underline-offset = 2; + + # Styling + bold-text-in-bright = "palette-based"; + pad = "15x15"; # "24x24" + + # Misc. + resize-delay-ms = "0"; + term = "xterm"; + # locked-title = "yes"; + selection-target = "both"; + # workers = "0"; + # utmp-helper = "none"; + }; + + url.osc8-underline = "always"; + bell.urgent = "yes"; + # scrollback.lines = "1000"; + mouse.hide-when-typing = "yes"; + key-bindings.clipboard-paste = "Control+v Control+Shift+v"; + + tweak = { + scaling-filter = "none"; + # font-monospace-warn = "no"; + # grapheme-width-method = "wcswidth"; + # grapheme-shaping = "no"; + }; + + colors = { + alpha = "0.8"; + }; + }; + }; +} diff --git a/home/ebisu/kansai/system/terminal/kitty.nix b/home/ebisu/kansai/system/terminal/kitty.nix new file mode 100644 index 0000000..bf20b17 --- /dev/null +++ b/home/ebisu/kansai/system/terminal/kitty.nix @@ -0,0 +1,113 @@ +{ config, ... }: +{ + programs.kitty = { + enable = true; + + settings = { + # Font + # MesloLGS NF + font_family = "SF Mono Light"; + bold_font = "SF Mono Medium"; + italic_font = "SF Mono Light Italic"; + bold_italic_font = "SF Mono Medium Italic"; + font_size = 12; # 13.5 + + # Optimisation + resize_debounce_time = 0; + sync_to_monitor = true; + repaint_delay = 0; + input_delay = 0; + + # Style + background_opacity = "0.8"; + window_border_width = 0; + window_margin_width = 15; + hide_window_decorations = "titlebar-only"; + include = "${config.xdg.cacheHome}/wal/colors-kitty.conf"; + + # Cursor + cursor_blink_interval = 0; # 0.5 + cursor_stop_blinking_after = 0; # 15 + + # Other + scrollback_pager = "less +G -R"; + wheel_scroll_multiplier = 5; + click_interval = "0.5"; + select_by_word_characters = ":@-./_~?&=%+#"; + mouse_hide_wait = 0; + enabled_layouts = "*"; + remember_window_size = false; + macos_option_as_alt = false; + allow_remote_control = true; + confirm_os_window_close = 0; + term = "xterm-kitty"; + + # Bell + visual_bell_duration = 0; + enable_audio_bell = false; + + # URL Handling + open_url_modifiers = "ctrl+shift"; + open_url_with = "default"; + }; + + extraConfig = '' + # Clipboard + map super+v paste_from_clipboard + map ctrl+shift+s paste_from_selection + map super+c copy_to_clipboard + map shift+insert paste_from_selection + + # Scrolling + map ctrl+shift+up scroll_line_up + map ctrl+shift+down scroll_line_down + map ctrl+shift+k scroll_line_up + map ctrl+shift+j scroll_line_down + map ctrl+shift+page_up scroll_page_up + map ctrl+shift+page_down scroll_page_down + map ctrl+shift+home scroll_home + map ctrl+shift+end scroll_end + map ctrl+shift+h show_scrollback + + # Window management + map super+n new_os_window + map super+w close_window + map ctrl+shift+enter new_window + map ctrl+shift+] next_window + map ctrl+shift+[ previous_window + map ctrl+shift+f move_window_forward + map ctrl+shift+b move_window_backward + map ctrl+shift+` move_window_to_top + map ctrl+shift+1 first_window + map ctrl+shift+2 second_window + map ctrl+shift+3 third_window + map ctrl+shift+4 fourth_window + map ctrl+shift+5 fifth_window + map ctrl+shift+6 sixth_window + map ctrl+shift+7 seventh_window + map ctrl+shift+8 eighth_window + map ctrl+shift+9 ninth_window + map ctrl+shift+0 tenth_window + + # Tab management + map ctrl+shift+right next_tab + map ctrl+shift+left previous_tab + map ctrl+shift+t new_tab + map ctrl+shift+q close_tab + map ctrl+shift+l next_layout + map ctrl+shift+. move_tab_forward + map ctrl+shift+, move_tab_backward + + # Miscellaneous + map ctrl+shift+up increase_font_size + map ctrl+shift+down decrease_font_size + map ctrl+shift+backspace restore_font_size + + map ctrl+/ launch --allow-remote-control kitty +kitten kitty_search/search.py @active-kitty-window-id + ''; + }; + + # read the file, but remove the line with shell_integration + # xdg.configFile."kitty/kitty.conf".text = + # builtins.map (line: if builtins.match "shell_integration" line then "" else line) (builtins.split "\n" (builtins.readFile ~/.config/kitty/kitty.conf)); +} diff --git a/home/ebisu/kansai/system/tracing.nix b/home/ebisu/kansai/system/tracing.nix new file mode 100644 index 0000000..9a96847 --- /dev/null +++ b/home/ebisu/kansai/system/tracing.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + strace + bpftrace + lsof + ]; +} diff --git a/home/ebisu/kansai/system/variables.nix b/home/ebisu/kansai/system/variables.nix new file mode 100644 index 0000000..c958b85 --- /dev/null +++ b/home/ebisu/kansai/system/variables.nix @@ -0,0 +1,102 @@ +{ + pkgs, + config, + flakeDirectory, + lib, + ... +}: +{ + home.sessionVariables = { + # https://github.com/nix-community/home-manager/issues/354#issuecomment-475803163 + LOCALES_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive"; + FLAKE = flakeDirectory; + + # Default programs + EDITOR = "lvim"; + TERMINAL = "kitty"; + TERMINAL_PROG = "kitty"; + BROWSER = "zen"; + FLAKE_EDITOR = "${lib.getExe pkgs.zed-editor}"; + + # Home directory clean-up + # https://github.com/NixOS/nixpkgs/issues/224525#issuecomment-1945290961 + XDG_DATA_HOME = "${config.xdg.dataHome}"; + XDG_CONFIG_HOME = "${config.xdg.configHome}"; + XDG_STATE_HOME = "${config.xdg.stateHome}"; + XDG_CACHE_HOME = "${config.xdg.cacheHome}"; + NOTMUCH_CONFIG = "${config.xdg.configHome}/notmuch-config"; + # GTK2_RC_FILES = "${config.xdg.configHome}/gtk-2.0/gtkrc-2.0"; + WGETRC = "${config.xdg.configHome}/wget/wgetrc"; + INPUTRC = "${config.xdg.configHome}/shell/inputrc"; + ZDOTDIR = "${config.xdg.configHome}/zsh"; + # GNUPGHOME="${config.xdg.dataHome}/gnupg"; + WINEPREFIX = "${config.xdg.dataHome}/wineprefixes/default"; + KODI_DATA = "${config.xdg.dataHome}/kodi"; + PASSWORD_STORE_DIR = "${config.xdg.dataHome}/password-store"; + TMUX_TMPDIR = "$XDG_RUNTIME_DIR"; + ANDROID_SDK_HOME = "${config.xdg.configHome}/android"; + CARGO_HOME = "${config.xdg.dataHome}/cargo"; + GOPATH = "${config.xdg.dataHome}/go"; + GOMODCACHE = "${config.xdg.cacheHome}/go/mod"; + ANSIBLE_CONFIG = "${config.xdg.configHome}/ansible/ansible.cfg"; + UNISON = "${config.xdg.dataHome}/unison"; + HISTFILE = "${config.xdg.stateHome}/bash/history"; + MBSYNCRC = "${config.xdg.configHome}/mbsync/config"; + ELECTRUMDIR = "${config.xdg.dataHome}/electrum"; + PYTHONSTARTUP = "${config.xdg.configHome}/python/pythonrc"; + SQLITE_HISTORY = "${config.xdg.dataHome}/sqlite_history"; + WAKATIME_HOME = "${config.xdg.configHome}/wakatime"; + NVM_DIR = "${config.xdg.dataHome}/nvm"; + CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv"; + DOCKER_CONFIG = "${config.xdg.configHome}/docker"; + RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; + NUGET_PACKAGES = "${config.xdg.cacheHome}/NuGetPackages"; + KERAS_HOME = "${config.xdg.stateHome}/keras"; + PARALLEL_HOME = "${config.xdg.configHome}/parallel"; + _JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${config.xdg.configHome}/java"; + NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc"; + NODE_REPL_HISTORY = "${config.xdg.dataHome}/node_repl_history"; + MPLAYER_HOME = "${config.xdg.configHome}/mplayer"; + BUNDLE_PATH = "${config.home.homeDirectory}/.gems"; + STEAM_APP_DIR = "${config.home.homeDirectory}/.steam"; + ANDROID_USER_HOME = "${config.xdg.dataHome}/android"; + ASDF_DATA_DIR = "${config.xdg.dataHome}/asdf"; + CABAL_CONFIG = "${config.xdg.configHome}/cabal/config"; + CABAL_DIR = "${config.xdg.dataHome}/cabal"; + DOTNET_CLI_HOME = "${config.xdg.dataHome}/dotnet"; + GRADLE_USER_HOME = "${config.xdg.dataHome}/gradle"; + NIMBLE_DIR = "${config.xdg.dataHome}/nimble"; + REDISCLI_HISTFILE = "${config.xdg.dataHome}/redis/rediscli_history"; + STACK_ROOT = "${config.xdg.dataHome}/stack"; + STACK_XDG = 1; + PYHTHON_HISTORY = "${config.xdg.stateHome}/python_history"; + + # Other program settings + FZF_DEFAULT_OPTS = "--layout=reverse --height 40%"; + LESS = "R"; + LESS_TERMCAP_mb = "$(printf '%b' '[1;31m')"; + LESS_TERMCAP_md = "$(printf '%b' '[1;36m')"; + LESS_TERMCAP_me = "$(printf '%b' '[0m')"; + LESS_TERMCAP_so = "$(printf '%b' '[01;44;33m')"; + LESS_TERMCAP_se = "$(printf '%b' '[0m')"; + LESS_TERMCAP_us = "$(printf '%b' '[1;32m')"; + LESS_TERMCAP_ue = "$(printf '%b' '[0m')"; + LESSOPEN = "| highlight -O ansi %s 2>/dev/null"; + QT_QPA_PLATFORMTHEME = "gtk2"; + MOZ_USE_XINPUT2 = "1"; + AWT_TOOLKIT = "MToolkit wmname LG3D"; + _JAVA_AWT_WM_NONREPARENTING = 1; + OPENAI_API_KEY = "$(cat ${config.sops.secrets.openai_api_key.path})"; + NNN_FIFO = "/tmp/nnn.fifo"; + _Z_DATA = "${config.xdg.dataHome}/z"; + W3M_DIR = "${config.xdg.dataHome}/w3m"; + VMODULES = "${config.xdg.dataHome}/vmodules"; + TEXMFVAR = "${config.xdg.cacheHome}/texlive/texmf-var"; + BUNDLE_USER_CONFIG = "${config.xdg.configHome}/bundle"; + BUNDLE_USER_CACHE = "${config.xdg.cacheHome}/bundle"; + BUNDLE_USER_PLUGIN = "${config.xdg.dataHome}/bundle"; + PSQL_HISTORY = "${config.xdg.dataHome}/psql_history"; + PKG_CACHE_PATH = "${config.xdg.cacheHome}/pkg-cache"; + SUZURI_TOKEN = "$(cat ${config.sops.secrets.suzuri_token.path})"; + }; +} diff --git a/home/ebisu/kansai/system/virtualisation/default.nix b/home/ebisu/kansai/system/virtualisation/default.nix new file mode 100644 index 0000000..3a8591d --- /dev/null +++ b/home/ebisu/kansai/system/virtualisation/default.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +{ + imports = [ ./docker.nix ]; + + home.packages = with pkgs; [ + bottles + wine + wine-staging + tsutsumi.lilipod + distrobox + ]; +} diff --git a/home/ebisu/kansai/system/virtualisation/docker.nix b/home/ebisu/kansai/system/virtualisation/docker.nix new file mode 100644 index 0000000..737ef3d --- /dev/null +++ b/home/ebisu/kansai/system/virtualisation/docker.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + act + earthly + dive + docker-slim + docker-credential-helpers + ]; +} |