From fedb596c8cc35cdb6437dece952c3b11cf4a358e Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 11 Aug 2024 11:31:44 +0000 Subject: [PATCH 01/71] setting wsl neovim configurations --- nixos/configuration.nix | 199 +++++++++------------------------------- nixos/neovim.nix | 17 ++++ nixos/readme.md | 6 ++ 3 files changed, 65 insertions(+), 157 deletions(-) create mode 100644 nixos/neovim.nix diff --git a/nixos/configuration.nix b/nixos/configuration.nix index af7afb1..23dd9b4 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -1,172 +1,57 @@ # Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). +# your system. Help is available in the configuration.nix(5) man page, on +# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ config, pkgs, ... }: +# NixOS-WSL specific options are documented on the NixOS-WSL repository: +# https://github.com/nix-community/NixOS-WSL + +{ config, lib, pkgs, ... }: { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ./tmux.nix - ./uxplay.nix - ]; - - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - boot.initrd.luks.devices."luks-04715655-635c-46ee-8100-1a5a4f3700a5".device = "/dev/disk/by-uuid/04715655-635c-46ee-8100-1a5a4f3700a5"; - networking.hostName = "nixos"; # Define your hostname. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Enable networking - networking.networkmanager.enable = true; - - # Set your time zone. - time.timeZone = "Europe/Copenhagen"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_DK.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "da_DK.UTF-8"; - LC_IDENTIFICATION = "da_DK.UTF-8"; - LC_MEASUREMENT = "da_DK.UTF-8"; - LC_MONETARY = "da_DK.UTF-8"; - LC_NAME = "da_DK.UTF-8"; - LC_NUMERIC = "da_DK.UTF-8"; - LC_PAPER = "da_DK.UTF-8"; - LC_TELEPHONE = "da_DK.UTF-8"; - LC_TIME = "da_DK.UTF-8"; - }; - - # Enable the X11 windowing system. - services.xserver.enable = true; - - # Enable the KDE Plasma Desktop Environment. - services.xserver.displayManager.sddm.enable = true; - services.xserver.desktopManager.plasma5.enable = true; - - # Configure keymap in X11 - services.xserver = { - layout = "us"; - xkbVariant = ""; - }; - - # Enable CUPS to print documents. - services.printing.enable = true; - - # Enable sound with pipewire. - sound.enable = true; - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; - }; - - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.dth = { - isNormalUser = true; - description = "dth"; - extraGroups = [ "networkmanager" "wheel" ]; - packages = with pkgs; [ - kate - # thunderbird - ]; - }; - - # Install firefox. - programs.firefox.enable = true; - - # Allow unfree packages - nixpkgs.config.allowUnfree = true; - - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - pkgs.git # version control - - pkgs.tmux # terminal multiplexer - pkgs.fzf # fuzzy matcher - - pkgs.vim # text editor: choose this - pkgs.neovim # or this - - pkgs.neofetch # system profile: choose this - pkgs.fastfetch # or this - - pkgs.tldr # community driven manpage alternative - - pkgs.thunderbird # email / calendar - pkgs.telegram-desktop # instant messager - - pkgs.gimp # image editor - pkgs.libsForQt5.kdenlive # video editor - - - pkgs.pyenv # python environment manager - pkgs.poetry # python package manager - pkgs.python3 # trusty old python - - gcc # gnu compiler collection (necessary for python) - pkg-config # allows packages to find information about other packages (necessary for python) - gnumake # python - zlib # python - - - # misc - cowsay - lolcat - wget + imports = [ + # include NixOS-WSL modules + + ./tmux.nix + ./neovim.nix ]; - # firefox smooth scrolling - environment.sessionVariables = { - MOZ_USE_XINPUT2 = "1"; - }; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - # services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; + wsl.enable = true; + wsl.defaultUser = "nixos"; + wsl.nativeSystemd = false; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave + # on your system were taken. It's perfectly fine and recommended to leave # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "23.11"; # Did you read the comment? + users.users.dth = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + initialPassword = "test"; + }; + + environment.systemPackages = with pkgs; [ + tmux + + vim + # neovim + + git + pyenv + poetry + + fastfetch + neofetch + + gimp + + cowsay + lolcat + ]; + + + } diff --git a/nixos/neovim.nix b/nixos/neovim.nix new file mode 100644 index 0000000..810d537 --- /dev/null +++ b/nixos/neovim.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: + +{ + programs.neovim = { + enable = true; + defaultEditor = true; + configure = { + # colorscheme blue + # colorscheme desert + customRC = '' + colorscheme peachpuff + set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:» + ''; + }; + }; +} + diff --git a/nixos/readme.md b/nixos/readme.md index 502d8c4..e394231 100644 --- a/nixos/readme.md +++ b/nixos/readme.md @@ -3,3 +3,9 @@ Copy local config to repo: ``` cp -r /etc/nixos/ ~/dotfiles/nixos ``` + + + +``` +sudo cp /home/nixos/dotfiles/nixos/tmux.nix /etc/nixos/tmux.nix +``` From a101d4f2d4766713e4a425ed44c5e04b11aeca5d Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 19 Aug 2024 09:52:28 +0000 Subject: [PATCH 02/71] :recycle: add git config autoSetupRemote --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3e14a03..6e56f31 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ cd dotfiles git config user.name "DannyDannyDanny" git config user.email "dth@taiga.ai" git config pull.rebase false +git config push.autoSetupRemote true # install dotfiles bash install.sh From ec1ee614493ec468e8c28ba03b0d0aca9659ac2a Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 19 Aug 2024 10:04:46 +0000 Subject: [PATCH 03/71] :art: reduce systemPackages --- nixos/configuration.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 23dd9b4..a0b6c95 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -34,20 +34,21 @@ }; environment.systemPackages = with pkgs; [ - tmux - - vim - # neovim + # tmux # activated in tmux.nix + # vim # using neovim in stead + # neovim # activated in neovim.nix git - pyenv - poetry + ripgrep + + # make default.nix in python project folders instead of using a top-level python environment manager + # pyenv + # poetry fastfetch neofetch - gimp - + # gimp # bloat cowsay lolcat ]; From e2819af7d0c8079ad1b51a032de3b9be3860bf0c Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Tue, 20 Aug 2024 13:30:08 +0000 Subject: [PATCH 04/71] :art: remove blankline --- nixos/tmux.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/tmux.nix b/nixos/tmux.nix index 2109ee0..b9f0c62 100644 --- a/nixos/tmux.nix +++ b/nixos/tmux.nix @@ -1,7 +1,6 @@ { config, pkgs, ... }: { - programs.tmux = { enable = true; clock24 = true; From 970b9ace996d2591cb25295b7e0e7843a37d8dfc Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Tue, 20 Aug 2024 13:30:36 +0000 Subject: [PATCH 05/71] :sparkles: use fish shell --- nixos/configuration.nix | 1 + nixos/fish.nix | 66 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 nixos/fish.nix diff --git a/nixos/configuration.nix b/nixos/configuration.nix index a0b6c95..888d9cd 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -13,6 +13,7 @@ ./tmux.nix ./neovim.nix + ./fish.nix ]; wsl.enable = true; diff --git a/nixos/fish.nix b/nixos/fish.nix new file mode 100644 index 0000000..de8b828 --- /dev/null +++ b/nixos/fish.nix @@ -0,0 +1,66 @@ +{ config, pkgs, ... }: + +{ + programs.fish = { + enable = true; + interactiveShellInit = '' + fish_vi_key_bindings + set fish_greeting 🐟: (set_color yellow; date +%T; set_color green; date --iso-8601; set_color normal) + + + # name: Default + # author: Lily Ballard + # edits: DannyDannyDanny + # ref: stackoverflow.com/a/61262358/5684214 + + function fish_prompt --description 'Write out the prompt' + set -l last_pipestatus $pipestatus + set -lx __fish_last_status $status # Export for __fish_print_pipestatus. + set -l normal (set_color normal) + set -q fish_color_status + or set -g fish_color_status red + + # Color the prompt differently when we're root + set -l color_cwd $fish_color_cwd + set -l suffix '>' + if functions -q fish_is_root_user; and fish_is_root_user + if set -q fish_color_cwd_root + set color_cwd $fish_color_cwd_root + end + set suffix '#' + end + + # Write pipestatus + # If the status was carried over (if no command is issued or if `set` leaves the status untouched), don't bold it. + set -l bold_flag --bold + set -q __fish_prompt_status_generation; or set -g __fish_prompt_status_generation $status_generation + if test $__fish_prompt_status_generation = $status_generation + set bold_flag + end + set __fish_prompt_status_generation $status_generation + set -l status_color (set_color $fish_color_status) + set -l statusb_color (set_color $bold_flag $fish_color_status) + set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus) + set -l nix_shell_info ( + if test -n "$IN_NIX_SHELL" + echo -n "🐚 " + end + ) + + echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$prompt_status $nix_shell_info $suffix " " + end + + ''; + }; + + programs.bash = { + interactiveShellInit = '' + if [[ -z ''${BASH_EXECUTION_STRING} ]] + then + shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" + exec ${pkgs.fish}/bin/fish $LOGIN_OPTION + fi + ''; + }; +} + From b895c72205dc52b09fb6f8a5a8d586f3cc706fcb Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Tue, 20 Aug 2024 14:23:58 +0000 Subject: [PATCH 06/71] :bug: fix bash launching fish --- nixos/fish.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nixos/fish.nix b/nixos/fish.nix index de8b828..440a3db 100644 --- a/nixos/fish.nix +++ b/nixos/fish.nix @@ -55,7 +55,12 @@ programs.bash = { interactiveShellInit = '' - if [[ -z ''${BASH_EXECUTION_STRING} ]] + # the first arguement in the if statement check that the parent process is not a fish shell. + # this allows spawning a bash shell inside a fish shell without the inner-most bash shell launching a fish shell + # however this also means that nix-shell starts a bash shell unless you use `nix-shell [args] --run fish` + # or run `fish` as the first command when entering nix-shell + + if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] then shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" exec ${pkgs.fish}/bin/fish $LOGIN_OPTION From f4f57b814239c97aee950861c08e03fd75523e7b Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 28 Oct 2024 15:25:47 +0000 Subject: [PATCH 07/71] chore: update neovim / tmux nix :pushpin: --- nixos/neovim.nix | 32 ++++++++++++++++++++++++++++---- nixos/tmux.nix | 7 ++++--- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/nixos/neovim.nix b/nixos/neovim.nix index 810d537..3efcd29 100644 --- a/nixos/neovim.nix +++ b/nixos/neovim.nix @@ -5,12 +5,36 @@ enable = true; defaultEditor = true; configure = { - # colorscheme blue - # colorscheme desert customRC = '' - colorscheme peachpuff - set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:» + set title + set bg=light + set go=a + set mouse=a + set nohlsearch + + colorscheme gruvbox + + set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:» + set clipboard+=unnamedplus + + " Replace-all is aliased to S. + nnoremap S :%s//g ''; + # vimPlugins inspired from Alexnortung + # https://discourse.nixos.org/t/neovim-no-longer-uses-config-or-plugins/13399/4 + packages.nix = with pkgs.vimPlugins; { + start = [ + vim-surround # Shortcuts for setting () {} etc. + # coc-nvim coc-git coc-highlight coc-python coc-rls coc-vetur coc-vimtex coc-yaml coc-html coc-json # auto completion + vim-nix # nix highlight + vimtex # latex stuff + fzf-vim # fuzzy finder through vim + nerdtree # file structure inside nvim + rainbow # Color parenthesis + gruvbox-nvim # theme + ]; + opt = []; + }; }; }; } diff --git a/nixos/tmux.nix b/nixos/tmux.nix index b9f0c62..ce1c107 100644 --- a/nixos/tmux.nix +++ b/nixos/tmux.nix @@ -4,19 +4,20 @@ programs.tmux = { enable = true; clock24 = true; + escapeTime = 20; extraConfig = '' - # remap prefix from ^+A to ^+B (for nested tmux sessions) + # remap prefix from ^+B to alt-f unbind C-b set -g prefix M-f bind M-f send-prefix # nvim 'checkhealth' advice set-option -g focus-events on - set-option -g default-terminal "screen-256color" set-option -sa terminal-overrides ',xterm-256color:RGB' + set-option -g default-terminal "screen-256color" # enable mouse support for switching panes/windows - # set -g mouse on + set -g mouse on # extend history set -g history-limit 100000 From 71074593000865a5a8e6cbb0821abb398ef6abb6 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 28 Oct 2024 15:32:22 +0000 Subject: [PATCH 08/71] chore: backup nixos configs :pushpin: --- nixos/configuration.nix | 28 +++++++++++++++++++++++----- nixos/neovim.nix | 37 +++++++++++++++++++++++++++---------- nixos/tmux.nix | 4 ++-- 3 files changed, 52 insertions(+), 17 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 888d9cd..e4c0d8b 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -20,13 +20,24 @@ wsl.defaultUser = "nixos"; wsl.nativeSystemd = false; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; # for vscode remote server + + # TODO: move to home manager (?) + programs = { + direnv = { + enable = true; + # enableFishIntegration = true; + nix-direnv.enable = true; + }; + }; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It's perfectly fine and recommended to leave # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "23.11"; # Did you read the comment? + system.stateVersion = "24.05"; # Did you read the comment? users.users.dth = { isNormalUser = true; @@ -34,6 +45,11 @@ initialPassword = "test"; }; + nixpkgs.config.allowUnfree = true; + environment.variables = { + DBT_USER = "DNTH"; + }; + environment.systemPackages = with pkgs; [ # tmux # activated in tmux.nix # vim # using neovim in stead @@ -41,19 +57,21 @@ git ripgrep + wget # for vscode-server + busybox # useful programs e.g. tree, unzip etc # make default.nix in python project folders instead of using a top-level python environment manager # pyenv # poetry - fastfetch - neofetch + neofetch # system info # gimp # bloat + # blender # bloat + # inkscape # bloat + cowsay lolcat ]; - - } diff --git a/nixos/neovim.nix b/nixos/neovim.nix index 3efcd29..ac1942c 100644 --- a/nixos/neovim.nix +++ b/nixos/neovim.nix @@ -14,24 +14,41 @@ colorscheme gruvbox - set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:» - set clipboard+=unnamedplus + " relative line numbering when leaving insert mode + set relativenumber + autocmd InsertEnter * :set number norelativenumber + autocmd InsertLeave * :set nonumber relativenumber - " Replace-all is aliased to S. + " netrw (dir listing) settings + let g:netrw_liststyle = 3 + let g:netrw_banner = 0 + let g:netrw_browse_split = 3 + let g:netrw_winsize = 25 " % of page + + set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:» + set clipboard+=unnamedplus + + " Replace-all is aliased to S. nnoremap S :%s//g + + " spellcheck + set spell spelllang=en_us + setlocal spell! spelllang=en_us ''; # vimPlugins inspired from Alexnortung # https://discourse.nixos.org/t/neovim-no-longer-uses-config-or-plugins/13399/4 packages.nix = with pkgs.vimPlugins; { start = [ - vim-surround # Shortcuts for setting () {} etc. + vim-surround # shortcuts for setting () {} etc. # coc-nvim coc-git coc-highlight coc-python coc-rls coc-vetur coc-vimtex coc-yaml coc-html coc-json # auto completion - vim-nix # nix highlight - vimtex # latex stuff - fzf-vim # fuzzy finder through vim - nerdtree # file structure inside nvim - rainbow # Color parenthesis - gruvbox-nvim # theme + vim-nix # nix highlight + vimtex # latex stuff + fzf-vim # fuzzy finder through vim + nerdtree # file structure inside nvim + rainbow # color parenthesis + gruvbox-nvim # theme + goyo-vim # write prose + limelight-vim # prose paragraph highlighter ]; opt = []; }; diff --git a/nixos/tmux.nix b/nixos/tmux.nix index ce1c107..1d37111 100644 --- a/nixos/tmux.nix +++ b/nixos/tmux.nix @@ -4,7 +4,7 @@ programs.tmux = { enable = true; clock24 = true; - escapeTime = 20; + # escapeTime = 20; extraConfig = '' # remap prefix from ^+B to alt-f unbind C-b @@ -27,7 +27,7 @@ bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -i --clipboard" # reduce escape time - set-option -sg escape-time 20 + set -sg escape-time 20 # pane movement shortcuts bind h select-pane -L From f1ff93923bece9bf7d9d07c4b0aa0fd3b835409c Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Tue, 5 Nov 2024 08:19:57 +0000 Subject: [PATCH 09/71] chore: disable wsl old on systemd :hammer: --- nixos/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index e4c0d8b..082f3bb 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -18,7 +18,7 @@ wsl.enable = true; wsl.defaultUser = "nixos"; - wsl.nativeSystemd = false; + # wsl.nativeSystemd = false; # This (old) method of running systemd in a container (syschdemd) is deprecated. nix.settings.experimental-features = [ "nix-command" "flakes" ]; # for vscode remote server From 3752334472273cf0bd662a44081d216009122ded Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Tue, 5 Nov 2024 08:26:16 +0000 Subject: [PATCH 10/71] doc: editing nixos config files in repo :memo: --- nixos/readme.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/nixos/readme.md b/nixos/readme.md index e394231..beec63f 100644 --- a/nixos/readme.md +++ b/nixos/readme.md @@ -1,11 +1,8 @@ -Copy local config to repo: +Make edits in dotfiles repo and copy changes to config folders: ``` -cp -r /etc/nixos/ ~/dotfiles/nixos -``` - - - -``` -sudo cp /home/nixos/dotfiles/nixos/tmux.nix /etc/nixos/tmux.nix +sudo cp ~/dotfiles/nixos/uxplay.nix /etc/nixos/ +sudo cp ~/dotfiles/nixos/tmux.nix /etc/nixos/ +sudo cp ~/dotfiles/nixos/neovim.nix /etc/nixos/ +sudo cp ~/dotfiles/nixos/fish.nix /etc/nixos/ ``` From be0d093dc6ac8fe4fdf56e5df57d63a435b87e04 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 17 Jan 2025 11:37:48 +0000 Subject: [PATCH 11/71] :sparkles: set wsl nvim theme based on windows theme --- nixos/neovim.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/nixos/neovim.nix b/nixos/neovim.nix index ac1942c..a923d16 100644 --- a/nixos/neovim.nix +++ b/nixos/neovim.nix @@ -4,14 +4,32 @@ programs.neovim = { enable = true; defaultEditor = true; + # package = pkgs.neovim; configure = { customRC = '' set title - set bg=light set go=a set mouse=a set nohlsearch + lua << EOF + local hkey_current_user_path = 'HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize' + local ps_cmd = 'Get-ItemProperty -Path ' .. hkey_current_user_path .. ' -Name AppsUseLightTheme' + local parent_cmd = 'powershell.exe -Command "' .. ps_cmd .. '"' + local handle = io.popen(parent_cmd) + local result = handle:read("*a") + handle:close() + local apps_use_light_theme = string.match(result, "AppsUseLightTheme%s*:%s*(%d+)") + local use_dark_bg = apps_use_light_theme == '0' + print('use dark:', use_dark_bg) + + if use_dark_bg then + vim.cmd("set bg=dark") + else + vim.cmd("set bg=light") + end + EOF + colorscheme gruvbox " relative line numbering when leaving insert mode From 5ad6713b1467af7566b13d38c28d83d07b403bf4 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 17 Jan 2025 11:38:44 +0000 Subject: [PATCH 12/71] :art: indent code --- nixos/neovim.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/neovim.nix b/nixos/neovim.nix index a923d16..f4e77c5 100644 --- a/nixos/neovim.nix +++ b/nixos/neovim.nix @@ -43,10 +43,10 @@ let g:netrw_browse_split = 3 let g:netrw_winsize = 25 " % of page - set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:» - set clipboard+=unnamedplus + set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:» + set clipboard+=unnamedplus - " Replace-all is aliased to S. + " Replace-all is aliased to S. nnoremap S :%s//g " spellcheck @@ -64,7 +64,7 @@ fzf-vim # fuzzy finder through vim nerdtree # file structure inside nvim rainbow # color parenthesis - gruvbox-nvim # theme + gruvbox-nvim # theme goyo-vim # write prose limelight-vim # prose paragraph highlighter ]; From d6e98ac47e88c6b0606d4826a4f485bc2e53f5ce Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 17 Jan 2025 11:41:19 +0000 Subject: [PATCH 13/71] :memo: doc building nixos from dotfiles + overwriting resolv.conf --- nixos/readme.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/nixos/readme.md b/nixos/readme.md index beec63f..5e20a0b 100644 --- a/nixos/readme.md +++ b/nixos/readme.md @@ -1,8 +1,11 @@ -Make edits in dotfiles repo and copy changes to config folders: +Rebuild nixos and points to dotfiles dir: ``` -sudo cp ~/dotfiles/nixos/uxplay.nix /etc/nixos/ -sudo cp ~/dotfiles/nixos/tmux.nix /etc/nixos/ -sudo cp ~/dotfiles/nixos/neovim.nix /etc/nixos/ -sudo cp ~/dotfiles/nixos/fish.nix /etc/nixos/ +sudo nixos-rebuild switch --flake ~/dotfiles/nixos +``` + +Overwrite wsl `resolv.conf`: + +``` +cp ~/dotfiles/nixos/resolv.conf /etc/ ``` From f47659726b5dc549d1bd7181f0eac93641fa7442 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 17 Jan 2025 11:43:53 +0000 Subject: [PATCH 14/71] :sparkles: add default resolv.conf --- nixos/resolv.conf | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 nixos/resolv.conf diff --git a/nixos/resolv.conf b/nixos/resolv.conf new file mode 100644 index 0000000..4c23761 --- /dev/null +++ b/nixos/resolv.conf @@ -0,0 +1,2 @@ +# this file goes in /etc/resolv.conf +nameserver 1.1.1.1 From f32a5b33fa22ccfafd830cfe503a67750c25e1e9 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sat, 18 Jan 2025 07:57:27 +0000 Subject: [PATCH 15/71] :pushpin: add flake, tools, audio & good-to-haves :shrug: --- nixos/configuration.nix | 26 +++++-- nixos/flake.lock | 147 ++++++++++++++++++++++++++++++++++++++++ nixos/flake.nix | 30 ++++++++ 3 files changed, 197 insertions(+), 6 deletions(-) create mode 100644 nixos/flake.lock create mode 100644 nixos/flake.nix diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 082f3bb..46c25c0 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -9,8 +9,6 @@ { imports = [ - # include NixOS-WSL modules - ./tmux.nix ./neovim.nix ./fish.nix @@ -18,10 +16,10 @@ wsl.enable = true; wsl.defaultUser = "nixos"; - # wsl.nativeSystemd = false; # This (old) method of running systemd in a container (syschdemd) is deprecated. nix.settings.experimental-features = [ "nix-command" "flakes" ]; # for vscode remote server + programs.nix-ld.enable = true; # TODO: move to home manager (?) programs = { direnv = { @@ -45,6 +43,7 @@ initialPassword = "test"; }; + nixpkgs.hostPlatform = "x86_64-linux"; nixpkgs.config.allowUnfree = true; environment.variables = { DBT_USER = "DNTH"; @@ -55,18 +54,23 @@ # vim # using neovim in stead # neovim # activated in neovim.nix - git - ripgrep + git # version control + gh # github cli tool + + ripgrep # faster grep wget # for vscode-server busybox # useful programs e.g. tree, unzip etc + openssl # cryptography swiss army knife + xdg-utils # terminal desktop intergrations (i.e. allow terminal to open browser) # make default.nix in python project folders instead of using a top-level python environment manager # pyenv # poetry neofetch # system info + btop # resource monitor - # gimp # bloat + # gimp # bloat # blender # bloat # inkscape # bloat @@ -74,4 +78,14 @@ lolcat ]; + services.vscode-server.enable = true; + security.rtkit.enable = true; # realtime kit hands out realtime scheduling priority + services.pipewire = { + enable = true; # if not already enabled + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + }; } diff --git a/nixos/flake.lock b/nixos/flake.lock new file mode 100644 index 0000000..db57cf1 --- /dev/null +++ b/nixos/flake.lock @@ -0,0 +1,147 @@ +{ + "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixos-wsl": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1736095716, + "narHash": "sha256-csysw/Szu98QDiA2lhWk9seYOyCebeVEWL89zh1cduM=", + "owner": "nix-community", + "repo": "NixOS-WSL", + "rev": "63c3b4ed1712a3a0621002cd59bfdc80875ecbb0", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "main", + "repo": "NixOS-WSL", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1733384649, + "narHash": "sha256-K5DJ2LpPqht7K76bsxetI+YHhGGRyVteTPRQaIIKJpw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "190c31a89e5eec80dd6604d7f9e5af3802a58a13", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1737062831, + "narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1682134069, + "narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fd901ef4bf93499374c5af385b2943f5801c0833", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixos-wsl": "nixos-wsl", + "nixpkgs": "nixpkgs_2", + "vscode-server": "vscode-server" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "vscode-server": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1729422940, + "narHash": "sha256-DlvJv33ml5UTKgu4b0HauOfFIoDx6QXtbqUF3vWeRCY=", + "owner": "nix-community", + "repo": "nixos-vscode-server", + "rev": "8b6db451de46ecf9b4ab3d01ef76e59957ff549f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixos-vscode-server", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/nixos/flake.nix b/nixos/flake.nix new file mode 100644 index 0000000..8de68e8 --- /dev/null +++ b/nixos/flake.nix @@ -0,0 +1,30 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; + vscode-server.url = "github:nix-community/nixos-vscode-server"; + # for later + # home-manager.url = "github:nix-community/home-manager"; + # home-manager.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = { + nixpkgs, + nixos-wsl, + vscode-server, + self, + # home-manager, + ... + }: { + nixosConfigurations = { + nixos = nixpkgs.lib.nixosSystem { + modules = [ + nixos-wsl.nixosModules.default + vscode-server.nixosModules.default + ./configuration.nix + # home-manager.nixosModules.default + ]; + }; + }; + }; +} From e3886bbc9110bf9940d08361514d60d009677c1a Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sat, 18 Jan 2025 07:59:36 +0000 Subject: [PATCH 16/71] :sparkles: add desired wsl.conf (because it keeps getting overwritten) --- nixos/wsl.conf | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 nixos/wsl.conf diff --git a/nixos/wsl.conf b/nixos/wsl.conf new file mode 100644 index 0000000..202ffe7 --- /dev/null +++ b/nixos/wsl.conf @@ -0,0 +1,23 @@ +# this file goes here: /etc/wsl.conf +[automount] +enabled=true +ldconfig=false +mountFsTab=false +options=metadata,uid=1000,gid=100 +root=/mnt + +[boot] +command= +systemd=true + +[interop] +appendWindowsPath=true +enabled=true + +[network] +generateHosts=true +generateResolvConf=false +hostname=nixos + +[user] +default=nixos From 7b9f231771b36398706e45ea35869fcc7bbe5d81 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sat, 25 Jan 2025 16:00:49 +0000 Subject: [PATCH 17/71] :sparkles: add dark/light mode control from wsl --- bashscripts/wsl_theme.sh | 52 ++++++++++++++++++++++++++++++++++++++++ nixos/neovim.nix | 32 ++++++++++++++----------- 2 files changed, 70 insertions(+), 14 deletions(-) create mode 100644 bashscripts/wsl_theme.sh diff --git a/bashscripts/wsl_theme.sh b/bashscripts/wsl_theme.sh new file mode 100644 index 0000000..51eba02 --- /dev/null +++ b/bashscripts/wsl_theme.sh @@ -0,0 +1,52 @@ +color_scheme=$1 + +# write a file with the current theme here: +nvim_color_theme_path=~/.local/share/nvim_color_scheme + +# validate user input +if [[ "$color_scheme" != "dark" && "$color_scheme" != "light" ]]; then + echo "Error: Color scheme must be 'dark' or 'light'" >&2 + exit 1 +else + echo $color_scheme > $nvim_color_theme_path +fi + +# check that all relevant files exist +windows_username=$(powershell.exe '$env:UserName' | tr -d '\r\n') +dark_mode_config_path=~/python-projects/24_alacritty_windows_setup/gruvbox_material_medium_dark.toml +light_mode_config_path=~/python-projects/24_alacritty_windows_setup/gruvbox_material_medium_light.toml +if [ ! -f $light_mode_config_path ]; then + echo "error: light_mode_config_path missing" + echo "expected: $light_mode_config_path" + exit 1 +fi + +if [ ! -f $dark_mode_config_path ]; then + echo "error: dark_mode_config_path missing" + echo "expected: $dark_mode_config_path" + exit 1 +fi + +windows_alacritty_config_path="/mnt/c/Users/${windows_username}/AppData/Roaming/alacritty/alacritty.toml" +echo 'overwriting windows alacritty config' + +if [ $color_scheme = 'dark' ]; then + echo "going dark" + cp $dark_mode_config_path $windows_alacritty_config_path + + # explorer, browser etc + powershell.exe -Command "Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0" + # taskbar and start menu + powershell.exe -Command "Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 0" +fi + +if [ $color_scheme = 'light' ]; then + echo "going light" + cp $light_mode_config_path $windows_alacritty_config_path + + # explorer, browser etc + powershell.exe -Command "Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 1" + # taskbar and start menu + powershell.exe -Command "Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 1" +fi + diff --git a/nixos/neovim.nix b/nixos/neovim.nix index f4e77c5..0eda250 100644 --- a/nixos/neovim.nix +++ b/nixos/neovim.nix @@ -13,20 +13,24 @@ set nohlsearch lua << EOF - local hkey_current_user_path = 'HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize' - local ps_cmd = 'Get-ItemProperty -Path ' .. hkey_current_user_path .. ' -Name AppsUseLightTheme' - local parent_cmd = 'powershell.exe -Command "' .. ps_cmd .. '"' - local handle = io.popen(parent_cmd) - local result = handle:read("*a") - handle:close() - local apps_use_light_theme = string.match(result, "AppsUseLightTheme%s*:%s*(%d+)") - local use_dark_bg = apps_use_light_theme == '0' - print('use dark:', use_dark_bg) - - if use_dark_bg then - vim.cmd("set bg=dark") - else - vim.cmd("set bg=light") + local config_file = os.getenv("HOME")..'/.local/share/nvim_color_scheme' + local f=io.open(config_file, "r") + if f~=nil then + local system_theme = f:read() + -- f:close() + io.close(f) + if system_theme == 'dark' then + vim.cmd("set bg=dark") + elseif system_theme == 'light' then + vim.cmd("set bg=light") + else + print('warning: expected value "light" or "dark"') + print(' got:', system_theme) + print(' expected path:', file) + end + else + print('warning: nvim color scheme not found') + print(' expected path:', file) end EOF From 9aa4d56df8828d350d3c35f65bdbf4920bd03223 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Tue, 28 Jan 2025 08:50:57 +0000 Subject: [PATCH 18/71] :sparkles: set vim leader to ',' and map ',w' to save --- nixos/neovim.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/neovim.nix b/nixos/neovim.nix index 0eda250..d9f3ccd 100644 --- a/nixos/neovim.nix +++ b/nixos/neovim.nix @@ -11,6 +11,7 @@ set go=a set mouse=a set nohlsearch + let mapleader="," lua << EOF local config_file = os.getenv("HOME")..'/.local/share/nvim_color_scheme' @@ -53,6 +54,9 @@ " Replace-all is aliased to S. nnoremap S :%s//g + " save file with ,w + map w :w + " spellcheck set spell spelllang=en_us setlocal spell! spelllang=en_us From e3eb3d42eb6b7332bfe485d238b54877727be7a0 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Tue, 28 Jan 2025 08:56:00 +0000 Subject: [PATCH 19/71] :sparkles: add wsl-theme-change fish alias --- nixos/fish.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/fish.nix b/nixos/fish.nix index 440a3db..f0875f9 100644 --- a/nixos/fish.nix +++ b/nixos/fish.nix @@ -3,6 +3,9 @@ { programs.fish = { enable = true; + shellAliases = { + theme = "bash ~/dotfiles/bashscripts/wsl_theme.sh"; + }; interactiveShellInit = '' fish_vi_key_bindings set fish_greeting 🐟: (set_color yellow; date +%T; set_color green; date --iso-8601; set_color normal) From bae67430d57109eafec97a93a5b0694afef07905 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Tue, 18 Feb 2025 09:15:11 +0000 Subject: [PATCH 20/71] chore: add google nameserver to resolv.conf :art: --- nixos/resolv.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/resolv.conf b/nixos/resolv.conf index 4c23761..d3aeaf3 100644 --- a/nixos/resolv.conf +++ b/nixos/resolv.conf @@ -1,2 +1,5 @@ # this file goes in /etc/resolv.conf nameserver 1.1.1.1 +nameserver 8.8.8.8 +nameserver 4.4.4.4 + From 0be50f8a2e636d3050a06c08ebb733f9b413f5e1 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Tue, 18 Feb 2025 09:17:05 +0000 Subject: [PATCH 21/71] chore: hardwire nixos-wsl nameservers :art: --- nixos/configuration.nix | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 46c25c0..ab15ada 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -14,10 +14,21 @@ ./fish.nix ]; - wsl.enable = true; - wsl.defaultUser = "nixos"; + wsl = { + enable = true; + defaultUser = "nixos"; + # TODO: check that this actually works, if it does, remove this comment and resolv.conf + # if not, remove this part and add URLs below to resolv.conf + wslConf.network.generateResolvConf = false; + }; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; # for vscode remote server + networking = { + useDHCP = true; + # nameserver sources: https://dnsmap.io/articles/most-popular-dns-servers + nameservers = [ "84.200.69.80" "8.26.56.26" "1.1.1.1" "8.8.8.8" "64.6.65.6" "208.67.222.222" "209.244.0.3" ]; + }; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; programs.nix-ld.enable = true; # TODO: move to home manager (?) @@ -88,4 +99,5 @@ # If you want to use JACK applications, uncomment this #jack.enable = true; }; + } From 38516dbbb7fa7fe27fc86822f61dec7c5702b001 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Tue, 25 Feb 2025 16:27:52 +0000 Subject: [PATCH 22/71] doc: git config by git devs :memo: --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6e56f31..9ee0315 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,7 @@ git config user.name "DannyDannyDanny" git config user.email "dth@taiga.ai" git config pull.rebase false git config push.autoSetupRemote true +# more git config: https://blog.gitbutler.com/how-git-core-devs-configure-git/ # install dotfiles bash install.sh From 70d57433f464333ec9cddfe1138c454fa3b223ea Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Tue, 25 Feb 2025 16:28:39 +0000 Subject: [PATCH 23/71] feat: add tldr to nix packages :sparkles: --- nixos/configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index ab15ada..e0a1366 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -80,6 +80,7 @@ neofetch # system info btop # resource monitor + tldr # community alternative to man # gimp # bloat # blender # bloat From 2b06e6215e4e1a4c257ebf413e687f3b9a166635 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 11 May 2025 20:30:27 +0000 Subject: [PATCH 24/71] feat: launch ssh-agent + add github ssh key to agent on shell start :sparkles: --- nixos/fish.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nixos/fish.nix b/nixos/fish.nix index f0875f9..2ca1d1a 100644 --- a/nixos/fish.nix +++ b/nixos/fish.nix @@ -10,6 +10,14 @@ fish_vi_key_bindings set fish_greeting 🐟: (set_color yellow; date +%T; set_color green; date --iso-8601; set_color normal) + # Start SSH agent if not already running + if not pgrep -u (id -u) ssh-agent > /dev/null + eval (ssh-agent -c) + end + + # Add SSH keys to the agent + ssh-add ~/.ssh/id_*_github 2>/dev/null + # name: Default # author: Lily Ballard From 494f566ee9f7f6bfb2bf4e44918d0a78d5149683 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 16 Jun 2025 08:57:24 +0000 Subject: [PATCH 25/71] chore: bump nixos channel to 25.05 --- nixos/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index e0a1366..aecc821 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -46,7 +46,7 @@ # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "24.05"; # Did you read the comment? + system.stateVersion = "25.05"; # Did you read the comment? users.users.dth = { isNormalUser = true; From 3130cc581b7f3e53e00edfe0adbc69819c7bdfc3 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 16 Jun 2025 08:58:26 +0000 Subject: [PATCH 26/71] feat: add neovim vim-gitgutter :art: --- nixos/neovim.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/neovim.nix b/nixos/neovim.nix index d9f3ccd..37af03c 100644 --- a/nixos/neovim.nix +++ b/nixos/neovim.nix @@ -66,6 +66,8 @@ packages.nix = with pkgs.vimPlugins; { start = [ vim-surround # shortcuts for setting () {} etc. + vim-gitgutter # git diff in sign column + # vim-airline # nice and light status bar # doesn't work nicely with tmux # coc-nvim coc-git coc-highlight coc-python coc-rls coc-vetur coc-vimtex coc-yaml coc-html coc-json # auto completion vim-nix # nix highlight vimtex # latex stuff From b50517188eed4af04c56eea36536ef702acff8e0 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Thu, 26 Jun 2025 16:46:34 +0000 Subject: [PATCH 27/71] chore: remove ssh startup commands :fire: * they don't work anyway --- nixos/fish.nix | 9 --------- 1 file changed, 9 deletions(-) diff --git a/nixos/fish.nix b/nixos/fish.nix index 2ca1d1a..bb8c104 100644 --- a/nixos/fish.nix +++ b/nixos/fish.nix @@ -10,15 +10,6 @@ fish_vi_key_bindings set fish_greeting 🐟: (set_color yellow; date +%T; set_color green; date --iso-8601; set_color normal) - # Start SSH agent if not already running - if not pgrep -u (id -u) ssh-agent > /dev/null - eval (ssh-agent -c) - end - - # Add SSH keys to the agent - ssh-add ~/.ssh/id_*_github 2>/dev/null - - # name: Default # author: Lily Ballard # edits: DannyDannyDanny From bdfd2cd3f4893d79201eea48aed1ed5db1dc4133 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Thu, 3 Jul 2025 12:13:44 +0000 Subject: [PATCH 28/71] chore: remove previously used `resolv.conf` :fire: --- nixos/resolv.conf | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 nixos/resolv.conf diff --git a/nixos/resolv.conf b/nixos/resolv.conf deleted file mode 100644 index d3aeaf3..0000000 --- a/nixos/resolv.conf +++ /dev/null @@ -1,5 +0,0 @@ -# this file goes in /etc/resolv.conf -nameserver 1.1.1.1 -nameserver 8.8.8.8 -nameserver 4.4.4.4 - From f1521a16501d74e406fe0fba7877684dea7b8349 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 06:51:22 +0000 Subject: [PATCH 29/71] feat: replace gruvbox theme with catpuccin :art: --- nixos/neovim.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/neovim.nix b/nixos/neovim.nix index 37af03c..226c70b 100644 --- a/nixos/neovim.nix +++ b/nixos/neovim.nix @@ -35,7 +35,7 @@ end EOF - colorscheme gruvbox + colorscheme catppuccin " catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha " relative line numbering when leaving insert mode set relativenumber @@ -74,7 +74,8 @@ fzf-vim # fuzzy finder through vim nerdtree # file structure inside nvim rainbow # color parenthesis - gruvbox-nvim # theme + # gruvbox-nvim # theme + catppuccin-nvim # theme goyo-vim # write prose limelight-vim # prose paragraph highlighter ]; From 440c69b8629c3e215a903a163664aa24d7a7b62f Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 07:48:26 +0000 Subject: [PATCH 30/71] refactor(nvim): remove rel line no on insert mode :fire: --- nixos/neovim.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/nixos/neovim.nix b/nixos/neovim.nix index 226c70b..60cb050 100644 --- a/nixos/neovim.nix +++ b/nixos/neovim.nix @@ -37,11 +37,6 @@ colorscheme catppuccin " catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha - " relative line numbering when leaving insert mode - set relativenumber - autocmd InsertEnter * :set number norelativenumber - autocmd InsertLeave * :set nonumber relativenumber - " netrw (dir listing) settings let g:netrw_liststyle = 3 let g:netrw_banner = 0 From 0966e495b701bbe880a7c793e64310688bb3f69d Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 11:52:03 +0000 Subject: [PATCH 31/71] feat: add catpuccin theme to tmux :art: --- nixos/tmux.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/tmux.nix b/nixos/tmux.nix index 1d37111..bda4238 100644 --- a/nixos/tmux.nix +++ b/nixos/tmux.nix @@ -53,5 +53,9 @@ # fix ssh agent when tmux is detached # setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock ''; + plugins = [ + #pkgs.tmuxPlugins. + pkgs.tmuxPlugins.catppuccin + ]; }; } From a64186436564fd12f34dbac489909838847ae798 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 12:04:22 +0000 Subject: [PATCH 32/71] feat: move tmux extraConfig to NixOS options :art: --- nixos/tmux.nix | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/nixos/tmux.nix b/nixos/tmux.nix index bda4238..4684c2a 100644 --- a/nixos/tmux.nix +++ b/nixos/tmux.nix @@ -4,7 +4,11 @@ programs.tmux = { enable = true; clock24 = true; - # escapeTime = 20; + escapeTime = 20; + keyMode = "vi"; + historyLimit = 100000; + baseIndex = 1; + extraConfig = '' # remap prefix from ^+B to alt-f unbind C-b @@ -19,16 +23,6 @@ # enable mouse support for switching panes/windows set -g mouse on - # extend history - set -g history-limit 100000 - - # set vi keybindings - setw -g mode-keys vi - bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -i --clipboard" - - # reduce escape time - set -sg escape-time 20 - # pane movement shortcuts bind h select-pane -L bind j select-pane -D @@ -54,7 +48,6 @@ # setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock ''; plugins = [ - #pkgs.tmuxPlugins. pkgs.tmuxPlugins.catppuccin ]; }; From 1b31332c12dcd352893f1d911d8ba40662e027ef Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 16:27:14 +0000 Subject: [PATCH 33/71] feat: fzf, tmux plugins, neovim config cleanup :art: --- nixos/configuration.nix | 1 + nixos/neovim.nix | 1 - nixos/tmux.nix | 3 +++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index aecc821..effed48 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -81,6 +81,7 @@ neofetch # system info btop # resource monitor tldr # community alternative to man + fzf # fuzzy finder # gimp # bloat # blender # bloat diff --git a/nixos/neovim.nix b/nixos/neovim.nix index 60cb050..59f5f17 100644 --- a/nixos/neovim.nix +++ b/nixos/neovim.nix @@ -4,7 +4,6 @@ programs.neovim = { enable = true; defaultEditor = true; - # package = pkgs.neovim; configure = { customRC = '' set title diff --git a/nixos/tmux.nix b/nixos/tmux.nix index 4684c2a..c09e84b 100644 --- a/nixos/tmux.nix +++ b/nixos/tmux.nix @@ -48,7 +48,10 @@ # setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock ''; plugins = [ + # pkgs.tmuxPlugins.tmux-powerline # status bar pkgs.tmuxPlugins.catppuccin + pkgs.tmuxPlugins.tmux-fzf # search tmux commands (prefix + F) + pkgs.tmuxPlugins.extrakto # fuzzyfind text history (prefix + tab) ]; }; } From 371c895990919b3bbd6aebb1cf4ebcdb7e9af2f1 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 16:29:57 +0000 Subject: [PATCH 34/71] chore: remove old install scripts :fire: --- install.sh | 20 -------------------- install_fish.sh | 27 --------------------------- install_fzf.sh | 15 --------------- install_nvim.sh | 37 ------------------------------------- install_python.fish | 16 ---------------- install_tmux.sh | 25 ------------------------- 6 files changed, 140 deletions(-) delete mode 100755 install.sh delete mode 100644 install_fish.sh delete mode 100644 install_fzf.sh delete mode 100644 install_nvim.sh delete mode 100644 install_python.fish delete mode 100755 install_tmux.sh diff --git a/install.sh b/install.sh deleted file mode 100755 index 883f976..0000000 --- a/install.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# setup script for codespaces inspired by dcreager/dotfiles -set -e - -if [ -z "$USER" ]; then - USER=$(id -un) -fi - -echo >&2 "=====================================================================" -echo >&2 " Setting up codespaces environment" -echo >&2 " USER $USER" -echo >&2 " HOME $HOME" - -# Make passwordless sudo work -export SUDO_ASKPASS=/bin/true - -/bin/bash ./install_tmux.sh -/bin/bash ./install_fzf.sh -/bin/bash ./install_nvim.sh -/bin/bash ./install_fish.sh diff --git a/install_fish.sh b/install_fish.sh deleted file mode 100644 index 832cdca..0000000 --- a/install_fish.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -set -e - -echo >&2 "=====================================================================" -echo >&2 " >> installing fish" - -# TODO: autodetect debian11/12 -# echo 'deb http://download.opensuse.org/repositories/shells:/fish:/release:/3/Debian_12/ /' | \ -echo 'deb http://download.opensuse.org/repositories/shells:/fish:/release:/3/Debian_11/ /' | \ - sudo tee /etc/apt/sources.list.d/shells:fish:release:3.list - -# TODO: autodetect debian11/12 -# curl -fsSL https://download.opensuse.org/repositories/shells:fish:release:3/Debian_12/Release.key | \ -curl -fsSL https://download.opensuse.org/repositories/shells:fish:release:3/Debian_11/Release.key | \ - gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/shells_fish_release_3.gpg > /dev/null - -sudo apt update -sudo apt install -y fish - -echo >&2 " >>> changing shell to fish" -sudo chsh -s /usr/bin/fish $USER - -echo >&2 " >>> link config.fish from dotfiles" -mkdir -p ~/.config/fish -ln -s -f ~/dotfiles/.config/fish/config.fish ~/.config/fish/config.fish - -echo >&2 " >>> echo $0" diff --git a/install_fzf.sh b/install_fzf.sh deleted file mode 100644 index 655080d..0000000 --- a/install_fzf.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -set -e -FZF_VERSION=0.40.0 - -# Install fzf -echo >&2 "=====================================================================" -echo >&2 " >> installing fzf" -echo >&2 " >>> downloading" -curl -LO https://github.com/junegunn/fzf/releases/download/${FZF_VERSION}/fzf-${FZF_VERSION}-linux_amd64.tar.gz - -echo >&2 " >>> extracting" -tar xfv fzf-${FZF_VERSION}-linux_amd64.tar.gz - -echo >&2 " >>> moving fzf to /bin" -sudo mv fzf /bin diff --git a/install_nvim.sh b/install_nvim.sh deleted file mode 100644 index 99767d4..0000000 --- a/install_nvim.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -set -e -NVIM_VERSION=0.9.0 - -# Install neovim -echo >&2 "=====================================================================" -echo >&2 " >> installing nvim" -echo >&2 " >>> installing libfuse2" -sudo apt-get install -y libfuse2 -echo >&2 " >>> downloading nvim" -# TODO: remove test urls and use NVIM_VERSION variable -# curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage -curl -LO https://github.com/neovim/neovim/releases/download/v${NVIM_VERSION}/nvim.appimage -curl -LO https://github.com/neovim/neovim/releases/download/v0.9.0/nvim.appimage - -echo >&2 " >>> changing nvim.appimage mode bits (u+x)" -chmod u+x nvim.appimage - -echo >&2 " >>> extracting from ./nvim.appimage" -./nvim.appimage --appimage-extract - -echo >&2 " >>> extracted images version" -echo >&2 $(./squashfs-root/AppRun --version) - -echo >&2 " >>> moving squashfs-root" -sudo mv squashfs-root / - -echo >&2 " >>> exposing nvim globally" -# sudo ln -s /squashfs-root/AppRun /usr/bin/nvim -sudo ln -s /squashfs-root/AppRun /bin/nvim - -echo >&2 " >>> linking nvim config files" -mkdir -p ~/.config/nvim -ln -s -f ~/dotfiles/.config/nvim/init.vim ~/.config/nvim/init.vim -ln -s -f ~/dotfiles/.config/nvim/plugins.lua ~/.config/nvim/plugins.lua - -# TODO: move vimwiki setup from makefile to here diff --git a/install_python.fish b/install_python.fish deleted file mode 100644 index 38d3c65..0000000 --- a/install_python.fish +++ /dev/null @@ -1,16 +0,0 @@ -# TODO: turn this into an actual script -# TODO: rename to install_python.fish - -# curl https://pyenv.run | bash -# set -Ux PYENV_ROOT $HOME/.pyenv -# fish_add_path $PYENV_ROOT/bin - -# now add: -# pyenv init - | source -# to: -# ~/.config/fish/config.fish - -# install suggested build environment: -# sudo apt update; sudo apt install build-essential libssl-dev zlib1g-dev \ -# libbz2-dev libreadline-dev libsqlite3-dev curl \ -# libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev diff --git a/install_tmux.sh b/install_tmux.sh deleted file mode 100755 index b1806e6..0000000 --- a/install_tmux.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -set -e -TMUX_VERSION=3.3a - -echo >&2 "=====================================================================" -echo >&2 " >> installing tmux" -echo >&2 " >>> install tmux dependencies" -sudo apt install -y libevent-dev -echo >&2 " >>> downloading file" -curl -LO https://github.com/tmux/tmux/releases/download/${TMUX_VERSION}/tmux-${TMUX_VERSION}.tar.gz -echo >&2 " >>> decompressing" -tar -zxf tmux-${TMUX_VERSION}.tar.gz -echo >&2 " >>> changing into tmux src" -cd tmux-${TMUX_VERSION}/ -echo >&2 " >>> running .configure" -./configure -echo >&2 " >>> listing file in current dir" -echo >&2 $(ls -la) - -echo >&2 " >>> running .configure" -make && sudo make install - -echo >&2 " >>> linking tmux config from dotfiles" -mkdir -p ~/.config/tmux -ln -s -f ~/dotfiles/.tmux.conf ~/.config/tmux/tmux.conf From a8da77b596281814693ef484a31ec46423194af5 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 16:39:48 +0000 Subject: [PATCH 35/71] doc: merge readme from main :memo: --- README.md | 52 +++++++++++++++------------------------------------- 1 file changed, 15 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 9ee0315..88086be 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,8 @@ # dotfiles -This repo is an extension of [dannydannydanny/methodology](https://github.com/DannyDannyDanny/methodology/) +[`nixos`](https://nixos.org/) + [`tmux`](https://github.com/tmux/tmux/?tab=readme-ov-file#welcome-to-tmux) + [`fish`](https://fishshell.com/) + [`neovim`](https://neovim.io/) -1. Debian Setup (+ customizations) - * pure see [issue 3]([url](https://github.com/DannyDannyDanny/dotfiles/issues/3)) - * [wsl](#wsl) - * codespaces - * github actions -2. Core Tool Chain (fish, tmux, nvim, fzf) -3. Customizations (github via ssh, ...) +This repo is an extension of [dannydannydanny/methodology](https://github.com/DannyDannyDanny/methodology/) ## Roadmap: @@ -60,35 +54,19 @@ This repo is an extension of [dannydannydanny/methodology](https://github.com/Da ### WSL -``` -wsl --install --web-download -d Debian -# -# /dev/null -echo generateResolvConf = false | sudo tee -a /etc/wsl.conf > /dev/null - -# fix WSL nameserver -echo 'nameserver 8.8.8.8' | sudo tee -a /etc/resolv.conf > /dev/null -sudo apt update && sudo apt upgrade -y - -# install dependencies for dotfiles installation -sudo apt install -y git curl - -# install dependencies for tmux -sudo apt install -y build-essential ncurses-dev +Install via [nix-community/NixOS-WSL Quickstart](https://github.com/nix-community/NixOS-WSL?tab=readme-ov-file#quick-start) :white_check_mark: +Setup dotfiles / config via github: +```bash +# git and github CLI tool in a temp shell +nix-shell -p gh git +# authenticate +gh auth login +# clone dotfiles +gh repo clone dannydannydanny/dotfiles +# checkout the appropriate branch +git checkout feat/wsl-neovim-update +# rebuild system with +sudo nixos-rebuild switch --flake ~/dotfiles/nixos/ ``` ### Clone repo SSH method From c153e2b410ac4f7015d4d9b870af99c09008dddf Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 16:41:32 +0000 Subject: [PATCH 36/71] doc: remove `ubuntu.md` :fire: --- README.md | 1 - ubuntu.md | 65 ------------------------------------------------------- 2 files changed, 66 deletions(-) delete mode 100644 ubuntu.md diff --git a/README.md b/README.md index 88086be..679df4f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ This repo is an extension of [dannydannydanny/methodology](https://github.com/Da ## Roadmap: -* ~post OS install~ remove [ubuntu.md](ubuntu.md) * configure [firefox-scrolling](firefox-scrolling.md) via terminal * repurpose [server-ip-sync](server-ip-sync.md) * server cluster roadmap: [server](server.md) diff --git a/ubuntu.md b/ubuntu.md deleted file mode 100644 index 51b75a2..0000000 --- a/ubuntu.md +++ /dev/null @@ -1,65 +0,0 @@ -### Setup ssh key for connecting to other servers - -This next ssh key is generated for internal servers: - -``` -ssh-keygen -q -t ed25519 -N '' -f ~/.ssh/id_ed25519_mynetwork <</dev/null 2>&1 - -# older machines might not support ed25519, then use RSA with 4096 bit key -# ssh-keygen -q -t rsa -b 4096 -N '' -f ~/.ssh/id_rsa_mynetwork <</dev/null 2>&1 -``` - -The public ssh key is in `~/.ssh/id_*_mynetwork.pub`. -Copy the public key to machines which you want to access with this machine. -Inversely, if you want other machines to ssh to this machine, -copy their public keys to this machine. - -#### ssh resources -* [Digital Ocean ssh essentials](https://www.digitalocean.com/community/tutorials/ssh-essentials-working-with-ssh-servers-clients-and-keys) - -#### server-side setup checklist -* setup locales (LC_LANGUAGE, LC_ALL) -* install openssh-server -* enable ssh service on startup -* copy workstation public key to server -* ssh via key (i.e no password) -* disable password authentication - -## apt package - -startup installation for ubuntu clients. -open terminal, run one code snippet at the time and check that no errors occur: - -``` -#sudo apt-get install software-properties-common -sudo apt-get update -sudo apt-get install neovim -y - -# sudo apt install librewolf -y # add librewolf repo first -sudo apt install qutebrowser -y # minimal vim-binding browser -sudo apt install gnome-tweaks -y # tool to remap caps to ctrl -# sudo apt install alacritty -y # add alacritty repo first -# replace alacritty with stterm -sudo apt install jq -y # lightweight and flexible command-line JSON processor -sudo apt install make -y # utility to maintain shell program groups -sudo apt install curl -y # file transfer helper (also see wget) -sudo apt install ffmpeg -y # audio/video converter -sudo apt install keepass2 -y # password manager -sudo apt install zsh -y # install oh-my-zsh to set zsh as default shell - -# music setup -sudo apt install mpd -y # music player daemon -sudo apt install ncmpcpp -y # ncurses music player controller plus plus -``` - -## brew -Install [brew](https://brew.sh/) and `brew install yt-dlp` - -## Mail & Calendar -Use thunderbird to attach to just about any mail + cal clients - -To get reasonably formatted dates in thunderbird set the locale environment variable `LC_TIME`: -`sudo update-locale LC_TIME=en_DK.UTF-8` - -## Password Manager -use keepass :key: (with secret file) From 20897fe98a04d7eba4b521efb4183eabdd35edbd Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 16:44:33 +0000 Subject: [PATCH 37/71] doc: remove `server-ip-sync.md` :memo::fire: --- README.md | 1 - server-ip-sync.md | 100 ---------------------------------------------- 2 files changed, 101 deletions(-) delete mode 100644 server-ip-sync.md diff --git a/README.md b/README.md index 679df4f..5634366 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ This repo is an extension of [dannydannydanny/methodology](https://github.com/Da ## Roadmap: * configure [firefox-scrolling](firefox-scrolling.md) via terminal -* repurpose [server-ip-sync](server-ip-sync.md) * server cluster roadmap: [server](server.md) * add server-sync make-rule for ip-upload python cronjob * add server-sync make-rule for server ip fetching (and writing...) diff --git a/server-ip-sync.md b/server-ip-sync.md deleted file mode 100644 index 3b69727..0000000 --- a/server-ip-sync.md +++ /dev/null @@ -1,100 +0,0 @@ -## Requirements - -### Env file - -Make rules: -* [.] add make rules python cronjob for servers - * [.] make `.env`: `setup_server_ip_sync_dotenv_file` - * [.] make venv and install requirements: `setup_server_ip_sync_python_env` - * [ ] add oneliner to cron `/python server-ip-sync.py --upload` - -```makefile -" https://stackoverflow.com/a/9578959 -addcron: - CRONENTRY= - { crontab -l; echo "* * * * * path-to-venv/python >> ip.log" } | crontab - - -add_github_token: - echo "Visit github to generate new token:" - echo " github.com/settings/tokens/new" - @echo "Enter github token: "; \ - read token; \ - echo "Your token is ", $$(token) -``` - - -* [get token](https://github.com/settings/tokens/new) -* refernce [API description](https://docs.github.com/en/rest/gists#update-a-gist) - -```python -# template .env file -token='ghp_' # github token -gist_id='abc...123' # gist id -filename='' # nickname for the server (i.e iot-hub-server) -``` - -### python requirements - -Install [python-dotenv](https://pypi.org/project/python-dotenv/) - -``` -# %pip install python-dotenv -``` - -These imports are necessary for reading and updating gists - -```python -from dotenv import load_dotenv -# in-built libraries -import requests -import json -import os -``` - - -### Reading `.env` - -```python -# read env vars -# S/O https://stackoverflow.com/a/61029741 -load_dotenv() -token = os.getenv('token') -gist_id = os.getenv('gist_id') -filename = os.getenv('filename') -``` - - -### write current machine ip address to gist file - -```python -# fetch external ip address -# S/O https://stackoverflow.com/a/36205547 -ip_addr = requests.get('https://api.ipify.org').content.decode('utf8') - -# request gist changes -# S/O https://stackoverflow.com/a/65761251 -headers = {'Authorization': f'token {token}'} -request_url = f'https://api.github.com/gists/{gist_id}' -request_data = json.dumps({'files':{filename:{"content":ip_addr}}}) - -r = requests.patch( - url=request_url, - data=request_data, - headers=headers) -``` - - -### Read gist file content - -```python -### fetch gist file content - -headers = {'Authorization': f'token {token}'} -request_url = f'https://api.github.com/gists/{gist_id}' -request_data = json.dumps({'files':{filename:{"content":ip_addr}}}) -r = requests.get( - url=request_url, - data=request_data, - headers=headers) -gist_content = r.json()['files'][filename.strip()]['content'] -``` From cc4765c1e32cfd5ca9b8c85b0a752b9204caa120 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:06:09 +0000 Subject: [PATCH 38/71] chore: remove (imperative) makefile :fire: --- makefile | 120 ------------------------------------------------------- 1 file changed, 120 deletions(-) delete mode 100644 makefile diff --git a/makefile b/makefile deleted file mode 100644 index 614b9c6..0000000 --- a/makefile +++ /dev/null @@ -1,120 +0,0 @@ -setup_locale: - sudo ln -s -f ~/dotfiles/.locale.conf /etc/default/locale - -setup_zshrc: - ln -s -f ~/dotfiles/.zshrc ~/.zshrc - -setup_zsh_completions: - brew install zsh-completions - rm -f ~/.zcompdump - compinit - # src: https://apple.stackexchange.com/a/377857/200035 - -setup_alacritty_wsl: - cp ~/dotfiles/.config/alacritty/alacritty.yml /mnt/c/Users/dnth/AppData/Roaming/alacritty/alacritty.yml - -setup_alacritty: - mkdir -p ~/.config/alacritty - ln -s -f ~/dotfiles/.config/alacritty/alacritty.yml ~/.config/alacritty/alacritty.yml - -setup_python_and_poetry: - # TODO: make target not tested properly - # - sudo apt purge python3 python3-pip python3-openssl - sudo apt-get update - sudo apt-get upgrade - sudo apt -y install libssl-dev libffi-dev python3 python3-pip python3-openssl - # - # poetry install via https://python-poetry.org/docs/#installation - curl -sSL https://install.python-poetry.org | python3 - - sudo add-apt-repository ppa:deadsnakes/ppa - # - # additionally install 3.11 - # TODO: consider installing 3.11 first - sudo apt install python3.11 - # - # setup poetry - zsh - mkdir $ZSH_CUSTOM/plugins/poetry - poetry completions zsh > $ZSH_CUSTOM/plugins/poetry/_poetry - # - # setup_nvim_python_provider - cd ~/dotfiles/nvim_python_provider && poetry install - cd ~/dotfiles/nvim_python_provider && poetry run which python > /tmp/nvim_python_provider - ln -s -f $$(cat /tmp/nvim_python_provider) ~/.config/nvim/python - rm /tmp/nvim_python_provider - ~/config/nvim/python -m pip install pynvim - # "WARNING: in nvim run :checkhealth and check python provider status" - -setup_git: - git config --global user.name "DannyDannyDanny" - git config --global user.email "dth@taiga.ai" - git config --global pull.rebase false - -setup_brew: - sudo apt-get -y install build-essential procps curl file git - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)" - test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - # not too sure about this .bash_profile part - # slightly more sure about the ~/.profile part - test -r ~/.bash_profile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bash_profile - echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.profile - -setup_fzf: - brew install fzf - $(brew --prefix)/opt/fzf/install --key-bindings --completion --no-bash --no-fish --all - ln -s -f ~/dotfiles/.fzf.zsh ~/.fzf.zsh - -setup_vimwiki1: - rm -rf ~/.local/share/nvim/vimwiki/ - git clone git@github.com:DannyDannyDanny/vimwiki.git ~/vimwiki/ - - -setup_vimwiki2: - rm -rf ~/methodology/ - git clone git@github.com:DannyDannyDanny/methodology.git ~/methodology/ - - -setup_vimwiki3: - rm -rf ~/administration/ - git clone git@github.com:taigacompany/administration.git ~/administration/ - -setup_music: - mkdir -p ~/.config/mpd/playlists/ - mkdir -p ~/.mpd - ln -s -f ~/dotfiles/.config/mpd/mpd.conf ~/.config/mpd/mpd.conf - mkdir -p ~/.config/ncmpcpp/ - ln -s -f ~/dotfiles/.config/ncmpcpp/config ~/.config/ncmpcpp/config - -setup_editorconfig: - ln -s -f ~/dotfiles/.editorconfig ~/.editorconfig - -setup_nerdfonts: - git clone --depth 2 https://github.com/ryanoasis/nerd-fonts/ ~/nerd-fonts - cd ~/nerd-fonts && ./install.sh - -setup_server_ip_sync: - echo "Visit github to generate new token:" - echo " github.com/settings/tokens/new" - @echo "Enter github token: "; \ - read token; \ - echo "Your token is ", $$(token) - -setup_server_ip_sync_python_env: - mkdir -p ~/.venvs - python3 -m venv ~/.venvs/server_ip_sync - ~/.venvs/server_ip_sync/bin/pip install python-dotenv - echo "~/.venvs/server_ip_sync/bin/python server-ip-sync.py" >> ~/deleteme-server-in-sync.txt - - -git_overview: - cd ~ && find . -name .git -type d -prune - -setup_server_mynetwork: - mkdir -p ~/.ssh - ln -s -f ~/dotfiles/.ssh/authorized_keys ~/.ssh/authorized_keys - -setup_client_mynetwork: - ssh-keygen -q -t rsa -b 4096 -f ~/.ssh/id_rsa_mynetwork -q -N "" - cat ~/.ssh/id_rsa_mynetwork.pub >> ~/dotfiles/.ssh/authorized_keys - echo "run\ncd ~/dotfiles && git status" From 7b74d4050b79ab53841a9e3560adea9870be007e Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:11:12 +0000 Subject: [PATCH 39/71] doc: slim down README.md :fire: --- README.md | 71 ++++--------------------------------------------------- 1 file changed, 4 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index 5634366..10c51f7 100644 --- a/README.md +++ b/README.md @@ -8,45 +8,17 @@ This repo is an extension of [dannydannydanny/methodology](https://github.com/Da * configure [firefox-scrolling](firefox-scrolling.md) via terminal * server cluster roadmap: [server](server.md) - * add server-sync make-rule for ip-upload python cronjob - * add server-sync make-rule for server ip fetching (and writing...) -* **refine install scripts** - * :memo: add logging (to `/tmp/??`) - * :goal_net: add [error handling](https://tecadmin.net/bash-error-detection-and-handling-tips-and-tricks/) - (if one crashes, stop or continue print summary at the end) - * :art: check for `nvim checkhealth` status - * make tmux nice: https://www.youtube.com/watch?v=DzNmUNvnB04 -* **low-level configs:** - * config tmux-local vs tmux-remote - * remote nested sessions - * change tmux:pane-switching bindings from arrow keys to vim bindings -* **specific machine level debian config:** - * codespaces - * github actions - * local machine - * [debian swap space](https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-debian-11) - * server -* **music config** - * mpd, mpc, ncmpcpp - * test on new machine with music dir - * [fonts](https://www.programmingfonts.org/) - * how does this relate to nerdfonts? +* :art: check for `nvim checkhealth` status +* make tmux nice: https://www.youtube.com/watch?v=DzNmUNvnB04 +* [fonts](https://www.programmingfonts.org/) - how does this relate to nerdfonts? -## Debian Setup -### Windows +## Windows * disable system sounds: `start menu search: "change system sounds" -> set profile to None` * change language / keyboard layout to `en_US` -* get local admin rights * [install powertoys](https://docs.microsoft.com/en-us/windows/powertoys/install#install-with-windows-executable-file-via-github) * remap CAPS LOCK to L-CTRL -* tmux pasteboard should play with windows pasteboard - * configure nvim clipboard to use system clipboard - had to setup some windows yank script -* install portmaster network monitor - * https://safing.io/blog/2022/10/27/portmaster-reaches-1.0/ -* install basic miktex (for LaTeX) - * `apt install texlive texlive-latex-extra` (?) * install [alacritty](https://alacritty.org/) (use the installer, not portable) * add alacritty config: `/mnt/c/Users//AppData/Roaming/alacritty/alacritty.yml` @@ -105,38 +77,3 @@ bash install.sh cd .. ``` -### Clone repo HTTP method -``` -git clone https://github.com/DannyDannyDanny/dotfiles.git -``` - -### add sshd persistency - -* for bash use github docs: [auto-launching-ssh-agent-on-git-for-windows](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/working-with-ssh-key-passphrases#auto-launching-ssh-agent-on-git-for-windows) -* fish version ([src](https://gist.github.com/josh-padnick/c90183be3d0e1feb89afd7573505cab3?permalink_comment_id=3570155#gistcomment-3570155)) -* also run: `ssh-add ~/.ssh/id_*_github` - - -### fisher -``` -curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher -fisher install jorgebucaran/nvm.fish -``` - -*** - -* sort thse notes - * configure git (inspired by `make setup_git`) - * TODO: remove email from makefile - * install [build-essential](https://askubuntu.com/a/753113/882709) to get `make` - * install autohotkey - * add script: shift and space + caps and escape: `sas-cae.ahk` - * [neofetch](https://github.com/dylanaraps/neofetch/) -* linux main drive config: - * **desktop environment** journal: - I have been comfortly (but numbly) been running GNOME 43.9 for the past couple years. - Xfce 4.18 is a bit janky and requires significant customization (e.g. keyboard bindings, trackpad gestures) - to be usable. It is super lightweight and customizable and I can see myself going back - when it matures - or when limited by hardware. - Going to try KDE Plasma. I've been recommended it several times and KDE is also behind - Krita (painting program) and kdenlive (video editing program). From 675e78a56199ddbacc5976601bd6bf9d2efcf54d Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:16:35 +0000 Subject: [PATCH 40/71] chore: remove install script workflows :fire::recycle: --- .github/workflows/manual_worflow.yml | 14 ------------- .github/workflows/test_codespaces_install.yml | 21 ------------------- .github/workflows/test_install_fish.yml | 12 ----------- .github/workflows/test_install_fzf.yml | 12 ----------- .github/workflows/test_install_nvim.yml | 12 ----------- .github/workflows/test_install_tmux.yml | 12 ----------- 6 files changed, 83 deletions(-) delete mode 100644 .github/workflows/manual_worflow.yml delete mode 100644 .github/workflows/test_codespaces_install.yml delete mode 100644 .github/workflows/test_install_fish.yml delete mode 100644 .github/workflows/test_install_fzf.yml delete mode 100644 .github/workflows/test_install_nvim.yml delete mode 100644 .github/workflows/test_install_tmux.yml diff --git a/.github/workflows/manual_worflow.yml b/.github/workflows/manual_worflow.yml deleted file mode 100644 index cec9fba..0000000 --- a/.github/workflows/manual_worflow.yml +++ /dev/null @@ -1,14 +0,0 @@ -on: - workflow_dispatch: - -jobs: - manual_worflow: - name: manual workflow - runs-on: ubuntu-20.04 - steps: - - name: Run `lsb_release -a` - run: lsb_release -a - - name: Run `apt policy fish` - run: apt policy fish - - name: Run `cat /etc/os-release` - run: cat /etc/os-release diff --git a/.github/workflows/test_codespaces_install.yml b/.github/workflows/test_codespaces_install.yml deleted file mode 100644 index ab42633..0000000 --- a/.github/workflows/test_codespaces_install.yml +++ /dev/null @@ -1,21 +0,0 @@ -on: - push: - paths: - - install.sh - - install_tmux.sh - - install_nvim.sh - - install_fzf.sh - - install_fish.sh - -jobs: - install_codespaces_setup: - name: install codespaces setup - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v1 - - run: bash install.sh - - run: tmux -V - - run: nvim --version - - run: fzf --version - - run: fish --version - - run: echo $0 diff --git a/.github/workflows/test_install_fish.yml b/.github/workflows/test_install_fish.yml deleted file mode 100644 index 56e54ed..0000000 --- a/.github/workflows/test_install_fish.yml +++ /dev/null @@ -1,12 +0,0 @@ -on: - push: - paths: install_fish.sh - -jobs: - install_fish: - name: install fish - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v1 - - run: bash install_fish.sh - - run: fish --version diff --git a/.github/workflows/test_install_fzf.yml b/.github/workflows/test_install_fzf.yml deleted file mode 100644 index 7639f7c..0000000 --- a/.github/workflows/test_install_fzf.yml +++ /dev/null @@ -1,12 +0,0 @@ -on: - push: - paths: install_fzf.sh - -jobs: - install_fzf: - name: install fzf - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v1 - - run: bash install_fzf.sh - - run: fzf --version diff --git a/.github/workflows/test_install_nvim.yml b/.github/workflows/test_install_nvim.yml deleted file mode 100644 index 694a3a8..0000000 --- a/.github/workflows/test_install_nvim.yml +++ /dev/null @@ -1,12 +0,0 @@ -on: - push: - paths: install_nvim.sh - -jobs: - install_nvim: - name: install nvim - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v1 - - run: bash install_nvim.sh - - run: nvim --version diff --git a/.github/workflows/test_install_tmux.yml b/.github/workflows/test_install_tmux.yml deleted file mode 100644 index e8c6506..0000000 --- a/.github/workflows/test_install_tmux.yml +++ /dev/null @@ -1,12 +0,0 @@ -on: - push: - paths: install_tmux.sh - -jobs: - install_tmux: - name: install tmux - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v1 - - run: bash install_tmux.sh - - run: tmux -V From efd221bf5c1a25c9610a5e781c1b160c2fc7b199 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:17:38 +0000 Subject: [PATCH 41/71] chore: remove `wsl.conf` :fire: --- etc/wsl.conf | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 etc/wsl.conf diff --git a/etc/wsl.conf b/etc/wsl.conf deleted file mode 100644 index 29d1fc9..0000000 --- a/etc/wsl.conf +++ /dev/null @@ -1,2 +0,0 @@ -[network] -generateResolvConf = false From 4608eba4adea80faf713d27b842e98096cdf8754 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:20:34 +0000 Subject: [PATCH 42/71] chore: remove old dotfiles :fire: --- .config/alacritty/alacritty.yml | 162 -------------------------------- .config/fish/config.fish | 8 -- .config/lf/lf.zsh | 33 ------- .config/locale.conf | 17 ---- .config/mpd/mpd.conf | 52 ---------- .config/ncmpcpp/config | 27 ------ .config/nvim/init.vim | 72 -------------- .config/nvim/plugins.lua | 17 ---- 8 files changed, 388 deletions(-) delete mode 100644 .config/alacritty/alacritty.yml delete mode 100644 .config/fish/config.fish delete mode 100644 .config/lf/lf.zsh delete mode 100644 .config/locale.conf delete mode 100644 .config/mpd/mpd.conf delete mode 100644 .config/ncmpcpp/config delete mode 100644 .config/nvim/init.vim delete mode 100644 .config/nvim/plugins.lua diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml deleted file mode 100644 index f1b30be..0000000 --- a/.config/alacritty/alacritty.yml +++ /dev/null @@ -1,162 +0,0 @@ -# run `fc-list` to see available fonts -font: - normal: - family: NotoSansMono Nerd Font - style: Regular - bold: - family: NotoSansMono Nerd Font - style: Bold - italic: - family: NotoSansMono Nerd Font - style: Italic - bold_italic: - family: NotoSansMono Nerd Font - style: Bold Italic - size: 16 - - -schemes: - gruvbox_material_hard_dark: &gruvbox_material_hard_dark - primary: - background: '#1d2021' - foreground: '#d4be98' - normal: - black: '#32302f' - red: '#ea6962' - green: '#a9b665' - yellow: '#d8a657' - blue: '#7daea3' - magenta: '#d3869b' - cyan: '#89b482' - white: '#d4be98' - bright: - black: '#32302f' - red: '#ea6962' - green: '#a9b665' - yellow: '#d8a657' - blue: '#7daea3' - magenta: '#d3869b' - cyan: '#89b482' - white: '#d4be98' - gruvbox_material_medium_dark: &gruvbox_material_medium_dark - primary: - background: '#282828' - foreground: '#d4be98' - normal: - black: '#3c3836' - red: '#ea6962' - green: '#a9b665' - yellow: '#d8a657' - blue: '#7daea3' - magenta: '#d3869b' - cyan: '#89b482' - white: '#d4be98' - bright: - black: '#3c3836' - red: '#ea6962' - green: '#a9b665' - yellow: '#d8a657' - blue: '#7daea3' - magenta: '#d3869b' - cyan: '#89b482' - white: '#d4be98' - gruvbox_material_soft_dark: &gruvbox_material_soft_dark - primary: - background: '#32302f' - foreground: '#d4be98' - normal: - black: '#45403d' - red: '#ea6962' - green: '#a9b665' - yellow: '#d8a657' - blue: '#7daea3' - magenta: '#d3869b' - cyan: '#89b482' - white: '#d4be98' - bright: - black: '#45403d' - red: '#ea6962' - green: '#a9b665' - yellow: '#d8a657' - blue: '#7daea3' - magenta: '#d3869b' - cyan: '#89b482' - white: '#d4be98' - gruvbox_material_hard_light: &gruvbox_material_hard_light - primary: - background: '#f9f5d7' - foreground: '#654735' - normal: - black: '#654735' - red: '#c14a4a' - green: '#6c782e' - yellow: '#b47109' - blue: '#45707a' - magenta: '#945e80' - cyan: '#4c7a5d' - white: '#f2e5bc' - bright: - black: '#654735' - red: '#c14a4a' - green: '#6c782e' - yellow: '#b47109' - blue: '#45707a' - magenta: '#945e80' - cyan: '#4c7a5d' - white: '#f2e5bc' - gruvbox_material_medium_light: &gruvbox_material_medium_light - primary: - background: '#fbf1c7' - foreground: '#654735' - normal: - black: '#654735' - red: '#c14a4a' - green: '#6c782e' - yellow: '#b47109' - blue: '#45707a' - magenta: '#945e80' - cyan: '#4c7a5d' - white: '#eee0b7' - bright: - black: '#654735' - red: '#c14a4a' - green: '#6c782e' - yellow: '#b47109' - blue: '#45707a' - magenta: '#945e80' - cyan: '#4c7a5d' - white: '#eee0b7' - gruvbox_material_soft_light: &gruvbox_material_soft_light - primary: - background: '#f2e5bc' - foreground: '#654735' - normal: - black: '#654735' - red: '#c14a4a' - green: '#6c782e' - yellow: '#b47109' - blue: '#45707a' - magenta: '#945e80' - cyan: '#4c7a5d' - white: '#e6d5ae' - bright: - black: '#654735' - red: '#c14a4a' - green: '#6c782e' - yellow: '#b47109' - blue: '#45707a' - magenta: '#945e80' - cyan: '#4c7a5d' - white: '#e6d5ae' - - -# Apply the color scheme. -# colors: *gruvbox_material_hard_dark -# colors: *gruvbox_material_medium_dark -# colors: *gruvbox_material_soft_dark -# colors: *gruvbox_material_hard_light -# colors: *gruvbox_material_medium_light -# colors: *gruvbox_material_soft_light - -colors: *gruvbox_material_soft_light -# colors: *gruvbox_material_soft_dark diff --git a/.config/fish/config.fish b/.config/fish/config.fish deleted file mode 100644 index 57875f4..0000000 --- a/.config/fish/config.fish +++ /dev/null @@ -1,8 +0,0 @@ -if not pgrep --full ssh-agent | string collect > /dev/null - eval (ssh-agent -c) - set -Ux SSH_AGENT_PID $SSH_AGENT_PID - set -Ux SSH_AUTH_SOCK $SSH_AUTH_SOCK - # ssh-add ~/.ssh/id_*_github -end - -set -gx EDITOR nvim diff --git a/.config/lf/lf.zsh b/.config/lf/lf.zsh deleted file mode 100644 index be3650a..0000000 --- a/.config/lf/lf.zsh +++ /dev/null @@ -1,33 +0,0 @@ -#compdef lf - -# Autocompletion for zsh shell. -# src: https://github.com/gokcehan/lf/blob/f04401ba4d43f21a084e603a52cf20f80b0c437d/etc/lf.zsh -# -# You need to rename this file to _lf and add containing folder to $fpath in -# ~/.zshrc file: -# -# fpath=(/path/to/directory/containing/the/file $fpath) -# autoload -U compinit -# compinit -# - -local arguments - -arguments=( - '-command[command to execute on client initialization]' - '-config[path to the config file (instead of the usual paths)]' - '-cpuprofile[path to the file to write the CPU profile]' - '-doc[show documentation]' - '-last-dir-path[path to the file to write the last dir on exit (to use for cd)]' - '-log[path to the log file to write messages]' - '-memprofile[path to the file to write the memory profile]' - '-remote[send remote command to server]' - '-selection-path[path to the file to write selected files on open (to use as open file dialog)]' - '-server[start server (automatic)]' - '-single[start a client without server]' - '-version[show version]' - '-help[show help]' - '*:filename:_files' -) - -_arguments -s $arguments diff --git a/.config/locale.conf b/.config/locale.conf deleted file mode 100644 index da66a84..0000000 --- a/.config/locale.conf +++ /dev/null @@ -1,17 +0,0 @@ -## link to: /etc/default/locale - -LANG=en_US.UTF-8 -LANGUAGE=en_US:en -LC_CTYPE=en_US.UTF-8 -LC_NUMERIC=en_US.UTF-8 -LC_TIME=da_DK.UTF-8 -LC_COLLATE=en_US.UTF-8 -LC_MONETARY=da_DK.UTF-8 -LC_MESSAGES=en_US.UTF-8 -LC_PAPER=en_US.UTF-8" -LC_NAME=da_DK.UTF-8" -LC_ADDRESS=da_DK.UTF-8" -LC_TELEPHONE=da_DK.UTF-8" -LC_MEASUREMENT=da_DK.UTF-8" -LC_IDENTIFICATION=en_US.UTF-8" -LC_ALL=en_US.UTF-8 diff --git a/.config/mpd/mpd.conf b/.config/mpd/mpd.conf deleted file mode 100644 index b82cffb..0000000 --- a/.config/mpd/mpd.conf +++ /dev/null @@ -1,52 +0,0 @@ -# Recommended location for database -db_file "~/.config/mpd/database" - -# If running mpd using systemd, delete this line to log directly to systemd. -log_file "syslog" - -# The music directory is by default the XDG directory, uncomment to amend and choose a different directory -#music_directory "~/music" - -# Uncomment to refresh the database whenever files in the music_directory are changed -#auto_update "yes" - -# Uncomment to enable the functionalities -#playlist_directory "~/.config/mpd/playlists" -#pid_file "~/.config/mpd/pid" -#state_file "~/.config/mpd/state" -#sticker_file "~/.config/mpd/sticker.sql" - -audio_output { - type "pulse" - name "My pulse Device" - device "hw:0,0" # optional - format "44100:16:2" # optional - mixer_device "default" # optional - mixer_control "PCM" # optional - mixer_index "0" # optional -} -audio_output { - type "pulse" - name "MPD" -# server "remote_server" # optional -# sink "remote_server_sink" # optional -} -audio_output { -type "pulse" -name "My pulse EQ" -auto_resample "no" -use_mmap "yes" -device "plug:plugequal" -format "44100:16:2" # optional -mixer_device "default" # optional -mixer_control "PCM" # optional -mixer_index "0" # optional -} -mixer_type "software" - -audio_output { -type "fifo" -name "FIFO" -path "/tmp/mpd.fifo" -format "44100:16:2" -} diff --git a/.config/ncmpcpp/config b/.config/ncmpcpp/config deleted file mode 100644 index 91ef249..0000000 --- a/.config/ncmpcpp/config +++ /dev/null @@ -1,27 +0,0 @@ -mpd_music_dir = "~/Music/" -ncmpcpp_directory = "~/.config/ncmpcpp" -lyrics_directory = "~/.config/ncmpcpp/lyrics" -#execute_on_song_change = "~/.ncmpcpp/songchange.sh" - -## Unsupported mouse ## -mouse_support = "yes" -mouse_list_scroll_whole_page = "yes" - -## Navigation ## -cyclic_scrolling = "yes" -header_text_scrolling = "yes" -jump_to_now_playing_song_at_start = "yes" -lines_scrolled = "2" - -## Other ## -system_encoding = "utf-8" -regular_expressions = "extended" - -## -## Appearance -## Other ## -now_playing_prefix = "❥ " -progressbar_look = "───" -colors_enabled = "yes" -autocenter_mode = "yes" -centered_cursor = "yes" diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim deleted file mode 100644 index f3fb4c1..0000000 --- a/.config/nvim/init.vim +++ /dev/null @@ -1,72 +0,0 @@ -let mapleader ="," - -" show invisibles -set fileencoding=utf-8 -set list -set listchars=tab:→\ ,nbsp:␣,trail:•,precedes:«,extends:» - -" calendar setup -let g:calendar_first_day = 'monday' " set monday as first day of week -let g:calendar_week_number = 1 " add weeknumber - -" leader -map w :write - -" configs below are from LukeSmithxyz/LARBS -set title -set bg=light -set go=a -set mouse=a -set nohlsearch - -" clipboard + file name/path yanking -set clipboard+=unnamedplus -" yank file name -nmap yf :let @+ = expand("%") -" yank file full path -nmap yp :let @+ = expand("%:p") - - -" relative line numbering when leaving insert mode -set relativenumber -autocmd InsertEnter * :set number norelativenumber -autocmd InsertLeave * :set nonumber relativenumber - -" netrw (dir listing) settings -let g:netrw_liststyle = 3 -let g:netrw_banner = 0 -let g:netrw_browse_split = 3 -let g:netrw_winsize = 25 " % of page - -" Some basics: - nnoremap c "_c - set nocompatible - filetype plugin on - syntax on - set encoding=utf-8 -" Enable autocompletion: - set wildmode=longest,list,full -" Disables automatic commenting on newline: - autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o -" Perform dot commands over visual blocks: - vnoremap . :normal . -" Spell-check set to o, 'o' for 'orthography': - map o :setlocal spell! spelllang=en_us -" Splits open at the bottom and right, which is non-retarded, unlike vim defaults. - set splitbelow splitright - -" Shortcutting split navigation, saving a keypress: - map h - map j - map k - map l - -" Replace all is aliased to S. - nnoremap S :%s//g - -" Automatically deletes all trailing whitespace and newlines at end of file on save. & reset cursor position - autocmd BufWritePre * let currPos = getpos(".") - autocmd BufWritePre * %s/\s\+$//e - autocmd BufWritePre * %s/\n\+\%$//e - autocmd BufWritePre *.[ch] %s/\%$/\r/e - autocmd BufWritePre * cal cursor(currPos[1], currPos[2]) diff --git a/.config/nvim/plugins.lua b/.config/nvim/plugins.lua deleted file mode 100644 index c4a09bc..0000000 --- a/.config/nvim/plugins.lua +++ /dev/null @@ -1,17 +0,0 @@ -local iron = require "iron.core" -iron.setup({ - config = { - should_map_plug = false, - scratch_repl = true, - repl_definition = { - python = { - command = { "ipython" }, - format = require("iron.fts.common").bracketed_paste, - }, - }, - }, - keymaps = { - send_motion = "ctr", - visual_send = "ctr", - }, -}) From 9a259dd7beace243ff0f4a0c18bf5efc6826a9c1 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:21:10 +0000 Subject: [PATCH 43/71] chore: remove .locale.conf :fire: --- .locale.conf | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .locale.conf diff --git a/.locale.conf b/.locale.conf deleted file mode 100644 index e0beb56..0000000 --- a/.locale.conf +++ /dev/null @@ -1,2 +0,0 @@ -# File generated by update-locale -LC_TIME=en_DK.UTF-8 From e390e263b3afbfc94020d4deb18929e004306f76 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:22:38 +0000 Subject: [PATCH 44/71] chore: remove (old) music config :fire: --- music_conf/config | 8 - music_conf/guide.md | 10 - music_conf/mpd.conf | 837 -------------------------------------------- 3 files changed, 855 deletions(-) delete mode 100644 music_conf/config delete mode 100644 music_conf/guide.md delete mode 100644 music_conf/mpd.conf diff --git a/music_conf/config b/music_conf/config deleted file mode 100644 index c397891..0000000 --- a/music_conf/config +++ /dev/null @@ -1,8 +0,0 @@ -# Files -mpd_music_dir = "~/Music/musiclib" - lyrics_directory = ~/.ncmpcpp/lyrics - ncmpcpp_directory = ~/.ncmpcpp - mpd_host = "localhost" - mpd_port = "6600" - mpd_connection_timeout = "5" - mpd_crossfade_time = "5" diff --git a/music_conf/guide.md b/music_conf/guide.md deleted file mode 100644 index 863b705..0000000 --- a/music_conf/guide.md +++ /dev/null @@ -1,10 +0,0 @@ -install reqs: -* mpd -* ncmpcpp -* mpc - -config file locations -``` -.ncmpcpp/config -.mpd/mpd.conf -``` diff --git a/music_conf/mpd.conf b/music_conf/mpd.conf deleted file mode 100644 index a21723e..0000000 --- a/music_conf/mpd.conf +++ /dev/null @@ -1,837 +0,0 @@ -# An example configuration file for MPD. -# Read the user manual for documentation: http://www.musicpd.org/doc/user/ - - -# Files and directories ####################################################### -# -# This setting controls the top directory which MPD will search to discover the -# available audio files and add them to the daemon's online database. This -# setting defaults to the XDG directory, otherwise the music directory will be -# be disabled and audio files will only be accepted over ipc socket (using -# file:// protocol) or streaming files over an accepted protocol. -# -music_directory "~/Music/musiclib" -# -# -# This setting sets the MPD internal playlist directory. The purpose of this -# directory is storage for playlists created by MPD. The server will use -# playlist files not created by the server but only if they are in the MPD -# format. This setting defaults to playlist saving being disabled. -# -playlist_directory "~/.mpd/playlists" -# -# This setting sets the location of the MPD database. This file is used to -# load the database at server start up and store the database while the -# server is not up. This setting defaults to disabled which will allow -# MPD to accept files over ipc socket (using file:// protocol) or streaming -# files over an accepted protocol. -# -db_file "~/.mpd/database" - -# These settings are the locations for the daemon log files for the daemon. -# -# The special value "syslog" makes MPD use the local syslog daemon. This -# setting defaults to logging to syslog. -# -# If you use systemd, do not configure a log_file. With systemd, MPD -# defaults to the systemd journal, which is fine. -# -log_file "~/.mpd/log" - -# This setting sets the location of the file which stores the process ID -# for use of mpd --kill and some init scripts. This setting is disabled by -# default and the pid file will not be stored. -# -# If you use systemd, do not configure a pid_file. -# -pid_file "~/.mpd/pid" - -# This setting sets the location of the file which contains information about -# most variables to get MPD back into the same general shape it was in before -# it was brought down. This setting is disabled by default and the server -# state will be reset on server start up. -# -state_file "~/.mpd/state" -# -# The location of the sticker database. This is a database which -# manages dynamic information attached to songs. -# -sticker_file "~/.mpd/sticker.sql" -# -############################################################################### - - -# General music daemon options ################################################ -# -# This setting specifies the user that MPD will run as. MPD should never run as -# root and you may use this setting to make MPD change its user ID after -# initialization. This setting is disabled by default and MPD is run as the -# current user. -# -#user "nobody" -# -# This setting specifies the group that MPD will run as. If not specified -# primary group of user specified with "user" setting will be used (if set). -# This is useful if MPD needs to be a member of group such as "audio" to -# have permission to use sound card. -# -#group "nogroup" -# -# This setting sets the address for the daemon to listen on. Careful attention -# should be paid if this is assigned to anything other than the default, any. -# This setting can deny access to control of the daemon. Not effective if -# systemd socket activation is in use. -# -# For network -#bind_to_address "any" -# -# And for Unix Socket -#bind_to_address "~/.mpd/socket" -# -# This setting is the TCP port that is desired for the daemon to get assigned -# to. -# -#port "6600" -# -# Suppress all messages below the given threshold. Use "verbose" for -# troubleshooting. Available setting arguments are "notice", "info", "verbose", -# "warning" and "error". -# -#log_level "notice" -# -# Setting "restore_paused" to "yes" puts MPD into pause mode instead -# of starting playback after startup. -# -#restore_paused "no" -# -# This setting enables MPD to create playlists in a format usable by other -# music players. -# -#save_absolute_paths_in_playlists "no" -# -# This setting defines a list of tag types that will be extracted during the -# audio file discovery process. The complete list of possible values can be -# found in the user manual. -#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" -# -# This example just enables the "comment" tag without disabling all -# the other supported tags: -#metadata_to_use "+comment" -# -# This setting enables automatic update of MPD's database when files in -# music_directory are changed. -# -#auto_update "yes" -# -# Limit the depth of the directories being watched, 0 means only watch -# the music directory itself. There is no limit by default. -# -#auto_update_depth "3" -# -############################################################################### - - -# Symbolic link behavior ###################################################### -# -# If this setting is set to "yes", MPD will discover audio files by following -# symbolic links outside of the configured music_directory. -# -#follow_outside_symlinks "yes" -# -# If this setting is set to "yes", MPD will discover audio files by following -# symbolic links inside of the configured music_directory. -# -#follow_inside_symlinks "yes" -# -############################################################################### - - -# Zeroconf / Avahi Service Discovery ########################################## -# -# If this setting is set to "yes", service information will be published with -# Zeroconf / Avahi. -# -#zeroconf_enabled "yes" -# -# The argument to this setting will be the Zeroconf / Avahi unique name for -# this MPD server on the network. %h will be replaced with the hostname. -# -#zeroconf_name "Music Player @ %h" -# -############################################################################### - - -# Permissions ################################################################# -# -# If this setting is set, MPD will require password authorization. The password -# setting can be specified multiple times for different password profiles. -# -#password "password@read,add,control,admin" -# -# This setting specifies the permissions a user has who has not yet logged in. -# -#default_permissions "read,add,control,admin" -# -############################################################################### - - -# Database ####################################################################### -# -# An example of a database section instead of the old 'db_file' setting. -# It enables mounting other storages into the music directory. -# -#database { -# plugin "simple" -# path "~/.local/share/mpd/db -# cache_directory "~/.local/share/mpd/cache" -#} -# -# An example of database config for a satellite setup -# -#music_directory "nfs://fileserver.local/srv/mp3" -#database { -# plugin "proxy" -# host "other.mpd.host" -# port "6600" -#} - -# Input ####################################################################### -# -input { - plugin "curl" -# proxy "proxy.isp.com:8080" -# proxy_user "user" -# proxy_password "password" -} - -# -############################################################################### - -# Audio Output ################################################################ -# -# MPD supports various audio output types, as well as playing through multiple -# audio outputs at the same time, through multiple audio_output settings -# blocks. Setting this block is optional, though the server will only attempt -# autodetection for one sound card. -# -# An example of an ALSA output: -# -#audio_output { -# type "alsa" -# name "My ALSA Device" -## device "hw:0,0" # optional -## mixer_type "hardware" # optional -## mixer_device "default" # optional -## mixer_control "PCM" # optional -## mixer_index "0" # optional -#} -# -# An example of an OSS output: -# -#audio_output { -# type "oss" -# name "My OSS Device" -## device "/dev/dsp" # optional -## mixer_type "hardware" # optional -## mixer_device "/dev/mixer" # optional -## mixer_control "PCM" # optional -#} -# -# An example of a shout output (for streaming to Icecast): -# -#audio_output { -# type "shout" -# encoder "vorbis" # optional -# name "My Shout Stream" -# host "localhost" -# port "8000" -# mount "/mpd.ogg" -# password "hackme" -# quality "5.0" -# bitrate "128" -# format "44100:16:1" -## protocol "icecast2" # optional -## user "source" # optional -## description "My Stream Description" # optional -## url "http://example.com" # optional -## genre "jazz" # optional -## public "no" # optional -## timeout "2" # optional -## mixer_type "software" # optional -#} -# -# An example of a recorder output: -# -#audio_output { -# type "recorder" -# name "My recorder" -# encoder "vorbis" # optional, vorbis or lame -# path "/var/lib/mpd/recorder/mpd.ogg" -## quality "5.0" # do not define if bitrate is defined -# bitrate "128" # do not define if quality is defined -# format "44100:16:1" -#} -# -# An example of a httpd output (built-in HTTP streaming server): -# -#audio_output { -# type "httpd" -# name "My HTTP Stream" -# encoder "vorbis" # optional, vorbis or lame -# port "8000" -# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6 -## quality "5.0" # do not define if bitrate is defined -# bitrate "128" # do not define if quality is defined -# format "44100:16:1" -# max_clients "0" # optional 0=no limit -#} -# -# An example of a pulseaudio output (streaming to a remote pulseaudio server) -# -#audio_output { -# type "pulse" -# name "My Pulse Output" -## server "remote_server" # optional -## sink "remote_server_sink" # optional -## media_role "media_role" #optional -#} -# -# An example of a winmm output (Windows multimedia API). -# -#audio_output { -# type "winmm" -# name "My WinMM output" -## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional -# or -## device "0" # optional -## mixer_type "hardware" # optional -#} -# -# An example of a wasapi output (Windows multimedia API). -# -#audio_output { -# type "wasapi" -# name "My WASAPI output" -## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional -# or -## device "0" # optional -## Exclusive mode blocks all other audio source, and get best audio quality without resampling. -## exclusive "no" # optional -## Enumerate all devices in log. -## enumerate "no" # optional -#} -# -# An example of an openal output. -# -#audio_output { -# type "openal" -# name "My OpenAL output" -## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional -#} -# -# An example of an sndio output. -# -#audio_output { -# type "sndio" -# name "sndio output" -# mixer_type "hardware" -#} -# -# An example of an OS X output: -# -audio_output { - type "osx" - name "My OS X Device" -## device "Built-in Output" # optional -## channel_map "-1,-1,0,1" # optional -} -# -## Example "pipe" output: -# -#audio_output { -# type "pipe" -# name "my pipe" -# command "aplay -f cd 2>/dev/null" -## Or if you're want to use AudioCompress -# command "AudioCompress -m | aplay -f cd 2>/dev/null" -## Or to send raw PCM stream through PCM: -# command "nc example.org 8765" -# format "44100:16:2" -#} -# -## An example of a null output (for no audio output): -# -#audio_output { -# type "null" -# name "My Null Output" -# mixer_type "none" # optional -#} -# -############################################################################### - - -# Normalization automatic volume adjustments ################################## -# -# This setting specifies the type of ReplayGain to use. This setting can have -# the argument "off", "album", "track" or "auto". "auto" is a special mode that -# chooses between "track" and "album" depending on the current state of -# random playback. If random playback is enabled then "track" mode is used. -# See for -# more details about ReplayGain. -# This setting is off by default. -# -#replaygain "album" -# -# This setting sets the pre-amp used for files that have ReplayGain tags. By -# default this setting is disabled. -# -#replaygain_preamp "0" -# -# This setting sets the pre-amp used for files that do NOT have ReplayGain tags. -# By default this setting is disabled. -# -#replaygain_missing_preamp "0" -# -# This setting enables or disables ReplayGain limiting. -# MPD calculates actual amplification based on the ReplayGain tags -# and replaygain_preamp / replaygain_missing_preamp setting. -# If replaygain_limit is enabled MPD will never amplify audio signal -# above its original level. If replaygain_limit is disabled such amplification -# might occur. By default this setting is enabled. -# -#replaygain_limit "yes" -# -# This setting enables on-the-fly normalization volume adjustment. This will -# result in the volume of all playing audio to be adjusted so the output has -# equal "loudness". This setting is disabled by default. -# -#volume_normalization "no" -# -############################################################################### - -# Character Encoding ########################################################## -# -# If file or directory names do not display correctly for your locale then you -# may need to modify this setting. -# -#filesystem_charset "UTF-8" -# -############################################################################### -# An example configuration file for MPD. -# Read the user manual for documentation: http://www.musicpd.org/doc/user/ - - -# Files and directories ####################################################### -# -# This setting controls the top directory which MPD will search to discover the -# available audio files and add them to the daemon's online database. This -# setting defaults to the XDG directory, otherwise the music directory will be -# be disabled and audio files will only be accepted over ipc socket (using -# file:// protocol) or streaming files over an accepted protocol. -# -#music_directory "~/music" -# -# This setting sets the MPD internal playlist directory. The purpose of this -# directory is storage for playlists created by MPD. The server will use -# playlist files not created by the server but only if they are in the MPD -# format. This setting defaults to playlist saving being disabled. -# -#playlist_directory "~/.mpd/playlists" -# -# This setting sets the location of the MPD database. This file is used to -# load the database at server start up and store the database while the -# server is not up. This setting defaults to disabled which will allow -# MPD to accept files over ipc socket (using file:// protocol) or streaming -# files over an accepted protocol. -# -#db_file "~/.mpd/database" - -# These settings are the locations for the daemon log files for the daemon. -# -# The special value "syslog" makes MPD use the local syslog daemon. This -# setting defaults to logging to syslog. -# -# If you use systemd, do not configure a log_file. With systemd, MPD -# defaults to the systemd journal, which is fine. -# -#log_file "~/.mpd/log" - -# This setting sets the location of the file which stores the process ID -# for use of mpd --kill and some init scripts. This setting is disabled by -# default and the pid file will not be stored. -# -# If you use systemd, do not configure a pid_file. -# -#pid_file "~/.mpd/pid" - -# This setting sets the location of the file which contains information about -# most variables to get MPD back into the same general shape it was in before -# it was brought down. This setting is disabled by default and the server -# state will be reset on server start up. -# -#state_file "~/.mpd/state" -# -# The location of the sticker database. This is a database which -# manages dynamic information attached to songs. -# -#sticker_file "~/.mpd/sticker.sql" -# -############################################################################### - - -# General music daemon options ################################################ -# -# This setting specifies the user that MPD will run as. MPD should never run as -# root and you may use this setting to make MPD change its user ID after -# initialization. This setting is disabled by default and MPD is run as the -# current user. -# -#user "nobody" -# -# This setting specifies the group that MPD will run as. If not specified -# primary group of user specified with "user" setting will be used (if set). -# This is useful if MPD needs to be a member of group such as "audio" to -# have permission to use sound card. -# -#group "nogroup" -# -# This setting sets the address for the daemon to listen on. Careful attention -# should be paid if this is assigned to anything other than the default, any. -# This setting can deny access to control of the daemon. Not effective if -# systemd socket activation is in use. -# -# For network -#bind_to_address "any" -# -# And for Unix Socket -#bind_to_address "~/.mpd/socket" -# -# This setting is the TCP port that is desired for the daemon to get assigned -# to. -# -#port "6600" -# -# Suppress all messages below the given threshold. Use "verbose" for -# troubleshooting. Available setting arguments are "notice", "info", "verbose", -# "warning" and "error". -# -#log_level "notice" -# -# Setting "restore_paused" to "yes" puts MPD into pause mode instead -# of starting playback after startup. -# -#restore_paused "no" -# -# This setting enables MPD to create playlists in a format usable by other -# music players. -# -#save_absolute_paths_in_playlists "no" -# -# This setting defines a list of tag types that will be extracted during the -# audio file discovery process. The complete list of possible values can be -# found in the user manual. -#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" -# -# This example just enables the "comment" tag without disabling all -# the other supported tags: -#metadata_to_use "+comment" -# -# This setting enables automatic update of MPD's database when files in -# music_directory are changed. -# -#auto_update "yes" -# -# Limit the depth of the directories being watched, 0 means only watch -# the music directory itself. There is no limit by default. -# -#auto_update_depth "3" -# -############################################################################### - - -# Symbolic link behavior ###################################################### -# -# If this setting is set to "yes", MPD will discover audio files by following -# symbolic links outside of the configured music_directory. -# -#follow_outside_symlinks "yes" -# -# If this setting is set to "yes", MPD will discover audio files by following -# symbolic links inside of the configured music_directory. -# -#follow_inside_symlinks "yes" -# -############################################################################### - - -# Zeroconf / Avahi Service Discovery ########################################## -# -# If this setting is set to "yes", service information will be published with -# Zeroconf / Avahi. -# -#zeroconf_enabled "yes" -# -# The argument to this setting will be the Zeroconf / Avahi unique name for -# this MPD server on the network. %h will be replaced with the hostname. -# -#zeroconf_name "Music Player @ %h" -# -############################################################################### - - -# Permissions ################################################################# -# -# If this setting is set, MPD will require password authorization. The password -# setting can be specified multiple times for different password profiles. -# -#password "password@read,add,control,admin" -# -# This setting specifies the permissions a user has who has not yet logged in. -# -#default_permissions "read,add,control,admin" -# -############################################################################### - - -# Database ####################################################################### -# -# An example of a database section instead of the old 'db_file' setting. -# It enables mounting other storages into the music directory. -# -#database { -# plugin "simple" -# path "~/.local/share/mpd/db -# cache_directory "~/.local/share/mpd/cache" -#} -# -# An example of database config for a satellite setup -# -#music_directory "nfs://fileserver.local/srv/mp3" -#database { -# plugin "proxy" -# host "other.mpd.host" -# port "6600" -#} - -# Input ####################################################################### -# -input { - plugin "curl" -# proxy "proxy.isp.com:8080" -# proxy_user "user" -# proxy_password "password" -} - -# -############################################################################### - -# Audio Output ################################################################ -# -# MPD supports various audio output types, as well as playing through multiple -# audio outputs at the same time, through multiple audio_output settings -# blocks. Setting this block is optional, though the server will only attempt -# autodetection for one sound card. -# -# An example of an ALSA output: -# -#audio_output { -# type "alsa" -# name "My ALSA Device" -## device "hw:0,0" # optional -## mixer_type "hardware" # optional -## mixer_device "default" # optional -## mixer_control "PCM" # optional -## mixer_index "0" # optional -#} -# -# An example of an OSS output: -# -#audio_output { -# type "oss" -# name "My OSS Device" -## device "/dev/dsp" # optional -## mixer_type "hardware" # optional -## mixer_device "/dev/mixer" # optional -## mixer_control "PCM" # optional -#} -# -# An example of a shout output (for streaming to Icecast): -# -#audio_output { -# type "shout" -# encoder "vorbis" # optional -# name "My Shout Stream" -# host "localhost" -# port "8000" -# mount "/mpd.ogg" -# password "hackme" -# quality "5.0" -# bitrate "128" -# format "44100:16:1" -## protocol "icecast2" # optional -## user "source" # optional -## description "My Stream Description" # optional -## url "http://example.com" # optional -## genre "jazz" # optional -## public "no" # optional -## timeout "2" # optional -## mixer_type "software" # optional -#} -# -# An example of a recorder output: -# -#audio_output { -# type "recorder" -# name "My recorder" -# encoder "vorbis" # optional, vorbis or lame -# path "/var/lib/mpd/recorder/mpd.ogg" -## quality "5.0" # do not define if bitrate is defined -# bitrate "128" # do not define if quality is defined -# format "44100:16:1" -#} -# -# An example of a httpd output (built-in HTTP streaming server): -# -#audio_output { -# type "httpd" -# name "My HTTP Stream" -# encoder "vorbis" # optional, vorbis or lame -# port "8000" -# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6 -## quality "5.0" # do not define if bitrate is defined -# bitrate "128" # do not define if quality is defined -# format "44100:16:1" -# max_clients "0" # optional 0=no limit -#} -# -# An example of a pulseaudio output (streaming to a remote pulseaudio server) -# -#audio_output { -# type "pulse" -# name "My Pulse Output" -## server "remote_server" # optional -## sink "remote_server_sink" # optional -## media_role "media_role" #optional -#} -# -# An example of a winmm output (Windows multimedia API). -# -#audio_output { -# type "winmm" -# name "My WinMM output" -## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional -# or -## device "0" # optional -## mixer_type "hardware" # optional -#} -# -# An example of a wasapi output (Windows multimedia API). -# -#audio_output { -# type "wasapi" -# name "My WASAPI output" -## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional -# or -## device "0" # optional -## Exclusive mode blocks all other audio source, and get best audio quality without resampling. -## exclusive "no" # optional -## Enumerate all devices in log. -## enumerate "no" # optional -#} -# -# An example of an openal output. -# -#audio_output { -# type "openal" -# name "My OpenAL output" -## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional -#} -# -# An example of an sndio output. -# -#audio_output { -# type "sndio" -# name "sndio output" -# mixer_type "hardware" -#} -# -# An example of an OS X output: -# -#audio_output { -# type "osx" -# name "My OS X Device" -## device "Built-in Output" # optional -## channel_map "-1,-1,0,1" # optional -#} -# -## Example "pipe" output: -# -#audio_output { -# type "pipe" -# name "my pipe" -# command "aplay -f cd 2>/dev/null" -## Or if you're want to use AudioCompress -# command "AudioCompress -m | aplay -f cd 2>/dev/null" -## Or to send raw PCM stream through PCM: -# command "nc example.org 8765" -# format "44100:16:2" -#} -# -## An example of a null output (for no audio output): -# -#audio_output { -# type "null" -# name "My Null Output" -# mixer_type "none" # optional -#} -# -############################################################################### - - -# Normalization automatic volume adjustments ################################## -# -# This setting specifies the type of ReplayGain to use. This setting can have -# the argument "off", "album", "track" or "auto". "auto" is a special mode that -# chooses between "track" and "album" depending on the current state of -# random playback. If random playback is enabled then "track" mode is used. -# See for -# more details about ReplayGain. -# This setting is off by default. -# -#replaygain "album" -# -# This setting sets the pre-amp used for files that have ReplayGain tags. By -# default this setting is disabled. -# -#replaygain_preamp "0" -# -# This setting sets the pre-amp used for files that do NOT have ReplayGain tags. -# By default this setting is disabled. -# -#replaygain_missing_preamp "0" -# -# This setting enables or disables ReplayGain limiting. -# MPD calculates actual amplification based on the ReplayGain tags -# and replaygain_preamp / replaygain_missing_preamp setting. -# If replaygain_limit is enabled MPD will never amplify audio signal -# above its original level. If replaygain_limit is disabled such amplification -# might occur. By default this setting is enabled. -# -#replaygain_limit "yes" -# -# This setting enables on-the-fly normalization volume adjustment. This will -# result in the volume of all playing audio to be adjusted so the output has -# equal "loudness". This setting is disabled by default. -# -#volume_normalization "no" -# -############################################################################### - -# Character Encoding ########################################################## -# -# If file or directory names do not display correctly for your locale then you -# may need to modify this setting. -# -#filesystem_charset "UTF-8" -# -############################################################################### From e74d22e9889420c408c40eab12b21659cb244f43 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:25:22 +0000 Subject: [PATCH 45/71] chore: remove old nvim python providers :fire: --- nvim_python_provider/poetry.lock | 7 ------- nvim_python_provider/pyproject.toml | 13 ------------- 2 files changed, 20 deletions(-) delete mode 100644 nvim_python_provider/poetry.lock delete mode 100644 nvim_python_provider/pyproject.toml diff --git a/nvim_python_provider/poetry.lock b/nvim_python_provider/poetry.lock deleted file mode 100644 index 23aabce..0000000 --- a/nvim_python_provider/poetry.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. -package = [] - -[metadata] -lock-version = "2.0" -python-versions = "^3.8" -content-hash = "935b488be9f11b23f14aa1ce3bed4013d88bd77462534b5e4fe5bb82b485bfe9" diff --git a/nvim_python_provider/pyproject.toml b/nvim_python_provider/pyproject.toml deleted file mode 100644 index 6e424b2..0000000 --- a/nvim_python_provider/pyproject.toml +++ /dev/null @@ -1,13 +0,0 @@ -[tool.poetry] -name = "nvim-python-provider" -version = "0.1.0" -description = "poetry virtual environment for nvim" -authors = ["DannyDannyDanny "] - -[tool.poetry.dependencies] -python = "^3.8" - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" From 117f54d06483be0f867e1e51fd1347072f4ffb07 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:42:35 +0000 Subject: [PATCH 46/71] chore: remove fzf-zsh config :fire: --- .fzf.zsh | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .fzf.zsh diff --git a/.fzf.zsh b/.fzf.zsh deleted file mode 100644 index 10b65a6..0000000 --- a/.fzf.zsh +++ /dev/null @@ -1,13 +0,0 @@ -# Setup fzf -# --------- -if [[ ! "$PATH" == */home/linuxbrew/.linuxbrew/opt/fzf/bin* ]]; then - PATH="${PATH:+${PATH}:}/home/linuxbrew/.linuxbrew/opt/fzf/bin" -fi - -# Auto-completion -# --------------- -[[ $- == *i* ]] && source "/home/linuxbrew/.linuxbrew/opt/fzf/shell/completion.zsh" 2> /dev/null - -# Key bindings -# ------------ -source "/home/linuxbrew/.linuxbrew/opt/fzf/shell/key-bindings.zsh" From 37e399c43598a93abb681a86ff1bf842b6270280 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:53:50 +0000 Subject: [PATCH 47/71] chore: remove authorized ssh public keys :fire: --- .ssh/authorized_keys | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .ssh/authorized_keys diff --git a/.ssh/authorized_keys b/.ssh/authorized_keys deleted file mode 100644 index 3c70f68..0000000 --- a/.ssh/authorized_keys +++ /dev/null @@ -1,2 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDm6wZlW45N+K24nw6uspMDofP6X+2T11XI8o1Z10gfieX1miJMCaDzlOvATYOKe/bzdkCR7vd8qNyKeJn/cSS95tvOCFi+LjryPzPp1bwuSqZSvtUIb9RD11exlXcXSawVEDmpOOElOiJs7lK7gulB4McIc/Y+ZxrSgo86/mFDOchaE2fWScC/QFVbNRRyuHa2/jlHtQW4ROODJIJXsu9OVMfrTrEdkXuwkNQ6d1KKKC5/IxbvmUtFC0vWEY7vuRVTBgGWv32n9RIhYePbpQeW/l5PwvrE+C3LmCgcQhi7y5NoZNvAoN3wAknQPAGIn0gZ5WukOUGlUkAdRwyJ007kXgiyfMVFV57HioO441rsVFCrOhYcQOMBhmO2a0V/y4aRG1hd0DJY/dBCzh8vVxYMq02h2ta+Sg89uxlcn4DAl5z7KqEkbPFJnLA67xUHvnvOLzKY5PXI7/3m8mbvOleeNGOOiBGRitLT+PbbVRxUg6yxVyL4T9ewOA9uMo0e3tSmaSEMBS2c8DJ4p1GVoFWKm0WqMF3GRWNUyzGEUZqcWblYjssjmx0G9L7lwI8JXHLXrxkhqmZyCE2atag7oWfrUirnQlcPaUX7BgpJbmKPTFK39jiOgij62y7DcbbQwKhSV6Bx8mRjPOaDVJuDKxuW0wIXdW2GY033V8gxPhbdRQ== dth@dth-MacBookAir -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDJvu40o5q2Jy+aAE4jsITr5ertaY/ogxU9t05xoq52FPGcdPdV/4Mwh+XbLBej6WZX7+md+szKbV4lVuwMk/EaN6Hfi5UsX4UVLMgyPbedJGPbQpUFduB32XXB48mngWnEVDn98ohisfBBO8MttgXaoLK2GepCdSopIbF842VoliOqJrFDYYFkxMNfG+qNS4Ah1ZsIozBXzYur7G4IFqVUXATn/WTnQsWjLcXhFcNnqObZjYFVw33LLT2BIx9rkaXiIe0P9tvuYAyV5vDODY50Pfqu5bRuLU/mM/pzz2qIxu2oASLccII3WpiTcfNFpGfjqmT9/MAApO3l6XO6p1tByoKF/6EkehrpthxR5tnIte19So5ULB6c0yLqhNDYk3Gr4QfElZ7g+/22mn/i/edNVsmcesds59hsdTaKYR8LqnMQ6h5+5sOBPbFzD6M8zQy/ZWZLXsd2xlrDs51sDN+m2JjRIXhEOclr6C/TTu0H8abqQkRGXpjvuk8ZlwRya3hMvzCtx+mSbhWUg7JcW9exJNHZh7gWLgRDRj3YcnxSkWqrqkDvjVSAXkmmmq5EvqkpCTEIq0R+ZZH/MGFGC3H6yGDDXF94uJ1rlRaMiYyUfZNREt8iWbIaUf7eBx+v/QUQCPTAGTY8zVgxdMYCQmVtmGMmCvKG73z3xU/s1fTuLw== dth@DK023900WSL From 28b12f87ded86f247bc315872381a8604f26f9c0 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 18:01:22 +0000 Subject: [PATCH 48/71] chore: clean up old irrelevant notes :fire: --- .tmux.conf | 46 --------- .zshrc | 157 ------------------------------- README.md | 3 + brewfile | 56 ----------- gist-read-write.ipynb | 210 ------------------------------------------ sas-cae.ahk | 116 ----------------------- server.md | 42 --------- 7 files changed, 3 insertions(+), 627 deletions(-) delete mode 100644 .tmux.conf delete mode 100644 .zshrc delete mode 100644 brewfile delete mode 100644 gist-read-write.ipynb delete mode 100644 sas-cae.ahk delete mode 100644 server.md diff --git a/.tmux.conf b/.tmux.conf deleted file mode 100644 index f9eb7af..0000000 --- a/.tmux.conf +++ /dev/null @@ -1,46 +0,0 @@ -# remap prefix from ^+A to ^+B (for nested tmux sessions) -unbind C-b -set -g prefix M-f -bind M-f send-prefix - -# nvim 'checkhealth' advice -set-option -g focus-events on -set-option -g default-terminal "screen-256color" -set-option -sa terminal-overrides ',xterm-256color:RGB' - -# enable mouse support for switching panes/windows -# set -g mouse on - -# extend history -set -g history-limit 100000 - -# set vi keybindings -setw -g mode-keys vi -bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -i --clipboard" - -# reduce escape time -set-option -sg escape-time 20 - -# pane movement shortcuts -bind h select-pane -L -bind j select-pane -D -bind k select-pane -U -bind l select-pane -R - -# window selection -bind -r C-h select-window -t :- -bind -r C-l select-window -t :+ - -# Resize pane shortcuts -bind -r H resize-pane -L 10 -bind -r J resize-pane -D 10 -bind -r K resize-pane -U 10 -bind -r L resize-pane -R 10 - -# split with dash and vbar -bind | split-window -h -c "#{pane_current_path}" -bind - split-window -v -c "#{pane_current_path}" - -# server-tmux only: -# fix ssh agent when tmux is detached -# setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock diff --git a/.zshrc b/.zshrc deleted file mode 100644 index 0c4f009..0000000 --- a/.zshrc +++ /dev/null @@ -1,157 +0,0 @@ -# If you come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:/usr/local/bin:$PATH - -# Path to your oh-my-zsh installation. -export ZSH="$HOME/.oh-my-zsh" - -# Set name of the theme to load --- if set to "random", it will -# load a random theme each time oh-my-zsh is loaded, in which case, -# to know which specific one was loaded, run: echo $RANDOM_THEME -# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes -ZSH_THEME="ys" -# ZSH_THEME="xiong-chiamiov" - -# Set list of themes to pick from when loading at random -# Setting this variable when ZSH_THEME=random will cause zsh to load -# a theme from this variable instead of looking in $ZSH/themes/ -# If set to an empty array, this variable will have no effect. -# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) - -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" - -# Uncomment the following line to use hyphen-insensitive completion. -# Case-sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" - -# Uncomment one of the following lines to change the auto-update behavior -# zstyle ':omz:update' mode disabled # disable automatic updates -zstyle ':omz:update' mode auto # update automatically without asking -# zstyle ':omz:update' mode reminder # just remind me to update when it's time - -# Uncomment the following line to change how often to auto-update (in days). -# zstyle ':omz:update' frequency 13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - -# Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" - -# Uncomment the following line to display red dots whilst waiting for completion. -# You can also set it to another string to have that shown instead of the default red dots. -# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" -# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) -# COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="true" - -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# You can set one of the optional three formats: -# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, -# see 'man strftime' for details. -# HIST_STAMPS="mm/dd/yyyy" - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - -# Which plugins would you like to load? -# Standard plugins can be found in $ZSH/plugins/ -# Custom plugins may be added to $ZSH_CUSTOM/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. -plugins=(poetry git) - -source $ZSH/oh-my-zsh.sh - -# User configuration - -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -export EDITOR='nvim' -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" -# default docker -alias doco="docker compose" -# staging -alias docos="docker compose -f docker-compose.staging.yml" - -# use vim bindings -bindkey -v - -# fuzzy-finder -[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh - -# make brew accessible -test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)" -test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - -# TODO: remove lvim -# set PATH so it includes user's private ~/.local/bin if it exists -# lvim is installed to this directory (at least on ubuntu) -if [ -d "$HOME/.local/bin" ] ; then - PATH="$HOME/.local/bin:$PATH" -fi - -# zsh completions for lf -fpath=(~/.config/lf $fpath) - -# zsh auto-complete -if type brew &>/dev/null; then - FPATH=$(brew --prefix)/share/zsh-completions:$FPATH - - autoload -Uz compinit - compinit - fi - -# for poetry -fpath+=~/.zfunc -autoload -Uz compinit && compinit - -alias pbpaste="powershell.exe -noprofile Get-Clipboard" -alias pbcopy="clip.exe" - -# on exit from lf this function changes directory to last browser fir in lf -lfcd () { - tmp="$(mktemp)" - lf -last-dir-path="$tmp" "$@" - if [ -f "$tmp" ]; then - dir="$(cat "$tmp")" - rm -f "$tmp" - if [ -d "$dir" ]; then - if [ "$dir" != "$(pwd)" ]; then - cd "$dir" - fi - fi - fi -} diff --git a/README.md b/README.md index 10c51f7..a06316e 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ This repo is an extension of [dannydannydanny/methodology](https://github.com/Da * :art: check for `nvim checkhealth` status * make tmux nice: https://www.youtube.com/watch?v=DzNmUNvnB04 * [fonts](https://www.programmingfonts.org/) - how does this relate to nerdfonts? +* [HN: What's on your home server](https://news.ycombinator.com/item?id=34271167) +* Jetson Nano Developer Kit SD Card Image [link](https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit) +* Raspberry Pi OS Lite (32-bit) [link](https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-32-bit) ## Windows diff --git a/brewfile b/brewfile deleted file mode 100644 index 35acf0c..0000000 --- a/brewfile +++ /dev/null @@ -1,56 +0,0 @@ -# FOR MACOS -# 1. install bundle with brew: `$brew tap Homebrew/bundle` -# 2. Brew bundle: `$brew bundle` (must be run from same dir as file) -# or `brew bundle --file=~/.private/Brewfile` - -tap "homebrew/cask" -brew "tree" # CLI file tree -# brew "mas" # CLI wrapper for Mac App Store -brew "lf" # CLI file browser (gokcehan/lf/) -brew "diskonaut" # CLI disk usage visual treemap -brew "neovim" # always neovim, no macvim or regular vim -brew "tmux" # terminal multiplexer -brew "f3" # fight flash fraud (USB / SD card checker) -brew "task" # for nvim taskwiki -brew "pyenv" # python environment manager -brew "fzf" # fuzzy-finder -brew "ack" # grep replacer -# brew "handbrake" # video formatting (swap to ffmpeg?) -# brew "mutt" # CLI email cient (muttmua/mutt) -# brew "profanity" # XMPP client - - -# youtube downloader -#"yt-dlp/taps/yt-dlp" - -cask "basictex" # minimal Tex Distribution -# cask "mactex" # LaTeX Live distribution w GUI -# cask "tikzit" # tikz drawing gui -tap "zegervdv/zathura" # pdf-viewer -#cask "zathura" -cask "pgadmin4" # pgsql database admin tool -cask "macsvg" # svg editor -cask "balenaetcher" # burn iso to usb -# cask "karabiner-elements" -cask "telegram" -cask "shiftit" -cask "docker" -cask "vlc" -cask "disk-inventory-x" -cask "rekordbox" -cask "clickup" -cask "visual-studio-code" -cask "discord" -cask "qutebrowser" -# cask "firefox" -cask "waterfox" -cask "inkscape" # svg / pdf editor - -# cask "adium" -# # adium or pidgin? -# cask "pidgin" -# # Cask or brew install pidgin -# cask "fork" - -# terminal -cask "alacritty" # terminaL diff --git a/gist-read-write.ipynb b/gist-read-write.ipynb deleted file mode 100644 index 504bb47..0000000 --- a/gist-read-write.ipynb +++ /dev/null @@ -1,210 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "f2ec458c-c7a2-42ee-8816-b5ea8f8c0759", - "metadata": {}, - "outputs": [], - "source": [ - "# each computer should " - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "2075b6f7-9c53-454b-a6af-818f223f24b4", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "python version: 3.9\n" - ] - }, - { - "data": { - "text/plain": [ - "'id_rsa_mynetwork.pub'" - ] - }, - "execution_count": 1, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# %pip install python-dotenv\n", - "# make a new token on:\n", - "# https://github.com/settings/tokens/new\n", - "# scope should only include gist\n", - "'''\n", - "# template .env file\n", - "token='ghp_'\n", - "gist_id='abc...123'\n", - "filename=''\n", - "'''\n", - "\n", - "from dotenv import load_dotenv\n", - "import requests\n", - "import json\n", - "import os\n", - "from pathlib import Path\n", - "import sys\n", - "\n", - "# check python version\n", - "version = sys.version_info\n", - "required_version = (3, 6)\n", - "if not version >= required_version:\n", - " raise EnvironmentError(\n", - " f'detected python version {version} - must be at least 3.6!'\n", - " )\n", - "print(f'python version: {version.major}.{version.minor}')\n", - "\n", - "### write current machiens public key to gist file\n", - "\n", - "# read env vars\n", - "# S/O https://stackoverflow.com/a/61029741\n", - "load_dotenv()\n", - "token = os.getenv('token')\n", - "gist_id = os.getenv('gist_id')\n", - "ssh_filename = os.getenv('filename')\n", - "ssh_filename" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "0e534b35-8b71-4cb1-8dde-0eef9eb6dd36", - "metadata": {}, - "outputs": [], - "source": [ - "# get id_rsa_mynetwork public key\n", - "gist_filename = 'authorized-keys'\n", - "\n", - "\n", - "def append_gist(gist_id, data, append=False):\n", - " # request data\n", - " headers = {'Authorization': f'token {token}'}\n", - " request_url = f'https://api.github.com/gists/{gist_id}' \n", - "\n", - " # get gist contents (all-files)\n", - " request_data = json.dumps({'files':gist_filename})\n", - " r = requests.get(\n", - " url=request_url,\n", - " data=request_data,\n", - " headers=headers)\n", - " gist_content = r.json()\n", - " \n", - " # if gist file exists, get its data\n", - " if gist_filename in gist_content['files'].keys():\n", - " gist_text = gist_content['files'][gist_filename]['content']\n", - " # ... if not, set its data to empty-string\n", - " else:\n", - " gist_text = ''\n", - "\n", - " # if gist already contains data, exit\n", - " if data in gist_text:\n", - " return\n", - "\n", - " # append gist new contents to existing and patch\n", - " content = gist_text + '\\n'+ data\n", - " request_data = json.dumps({'files': {gist_filename: {\"content\": content}}})\n", - " r = requests.patch(\n", - " url=request_url,\n", - " data=request_data,\n", - " headers=headers)" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "93ae1879-f245-4478-98fe-0a62e72c00f6", - "metadata": {}, - "outputs": [], - "source": [ - "# get ssh public key\n", - "ssh_pub = Path.home().joinpath(f'.ssh/{ssh_filename}').read_text()\n", - "\n", - "# write ssh key to gist\n", - "append_gist(\n", - " gist_id=gist_id,\n", - " data=ssh_pub)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "fcda799c-3feb-4591-9582-f6187994fe36", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDm6wZlW45N+K24nw6uspMDofP6X+2T11XI8o1Z10gfieX1miJMCaDzlOvATYOKe/bzdkCR7vd8qNyKeJn/cSS95tvOCFi+LjryPzPp1bwuSqZSvtUIb9RD11exlXcXSawVEDmpOOElOiJs7lK7gulB4McIc/Y+ZxrSgo86/mFDOchaE2fWScC/QFVbNRRyuHa2/jlHtQW4ROODJIJXsu9OVMfrTrEdkXuwkNQ6d1KKKC5/IxbvmUtFC0vWEY7vuRVTBgGWv32n9RIhYePbpQeW/l5PwvrE+C3LmCgcQhi7y5NoZNvAoN3wAknQPAGIn0gZ5WukOUGlUkAdRwyJ007kXgiyfMVFV57HioO441rsVFCrOhYcQOMBhmO2a0V/y4aRG1hd0DJY/dBCzh8vVxYMq02h2ta+Sg89uxlcn4DAl5z7KqEkbPFJnLA67xUHvnvOLzKY5PXI7/3m8mbvOleeNGOOiBGRitLT+PbbVRxUg6yxVyL4T9ewOA9uMo0e3tSmaSEMBS2c8DJ4p1GVoFWKm0WqMF3GRWNUyzGEUZqcWblYjssjmx0G9L7lwI8JXHLXrxkhqmZyCE2atag7oWfrUirnQlcPaUX7BgpJbmKPTFK39jiOgij62y7DcbbQwKhSV6Bx8mRjPOaDVJuDKxuW0wIXdW2GY033V8gxPhbdRQ== dth@dth-MacBookAir\\n'" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "### fetch gist file content\n", - "\n", - "headers = {'Authorization': f'token {token}'}\n", - "request_url = f'https://api.github.com/gists/{gist_id}' \n", - "request_data = json.dumps({'files':gist_filename})\n", - "r = requests.get(\n", - " url=request_url,\n", - " data=request_data,\n", - " headers=headers)\n", - "gist_content = r.json()['files'][gist_filename]['content']\n", - "gist_content" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "07a9cbfe-8ab1-42d0-9810-cf2b68c97b5d", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'94.147.46.129'" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "gist_content" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.13" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/sas-cae.ahk b/sas-cae.ahk deleted file mode 100644 index a3ca434..0000000 --- a/sas-cae.ahk +++ /dev/null @@ -1,116 +0,0 @@ -; this file contains two mods: shift-and-space and control-and-escape - -; shift-and-space script -; source: https://stackoverflow.com/a/39226212 -#InputLevel, 10 ;set send level for the following code to 10 -$Space:: -#InputLevel ;set it back to default value of 0 for any remaining code -now := A_TickCount -while GetKeyState("Space", "P") ; to find out whether space-bar is held - if (A_TickCount-now > 120) ; this time is tested on asker's computer - { - SendInput {Shift Down} - KeyWait, Space - SendInput {Shift Up} - return - } - - -SendInput {Space} ; if key detected to be tapped, send space as per normal -return - - -; control-and-escape script -; source: https://gist.github.com/nocaoper/b872f97cda29bd8f0f2617606abd9fe4 -LShift & Capslock:: -SetCapsLockState, % (State:=!State) ? "on" : "alwaysoff" -Return - -g_AbortSendEsc := false - -#InstallKeybdHook -SetCapsLockState, alwaysoff -Capslock:: -g_DoNotAbortSendEsc := true -Send {LControl Down} -KeyWait, CapsLock -Send {LControl Up} -if ( A_PriorKey = "CapsLock") -{ - if(g_DoNotAbortSendEsc){ - Send {Esc} - } -} -return - -~*^a:: -~*^b:: -~*^c:: -~*^d:: -~*^e:: -~*^f:: -~*^g:: -~*^h:: -~*^i:: -~*^j:: -~*^k:: -~*^l:: -~*^m:: -~*^n:: -~*^o:: -~*^p:: -~*^q:: -~*^r:: -~*^s:: -~*^t:: -~*^u:: -~*^v:: -~*^w:: -~*^x:: -~*^y:: -~*^z:: -~*^1:: -~*^2:: -~*^3:: -~*^4:: -~*^5:: -~*^6:: -~*^7:: -~*^8:: -~*^9:: -~*^0:: -~*^Space:: -~*^Backspace:: -~*^Delete:: -~*^Insert:: -~*^Home:: -~*^End:: -~*^PgUp:: -~*^PgDn:: -~*^Tab:: -~*^Return:: -~*^,:: -~*^.:: -~*^/:: -~*^;:: -~*^':: -~*^[:: -~*^]:: -~*^\:: -~*^-:: -~*^=:: -~*^`:: -~*^F1:: -~*^F2:: -~*^F3:: -~*^F4:: -~*^F5:: -~*^F6:: -~*^F7:: -~*^F8:: -~*^F9:: -~*^F10:: -~*^F11:: -~*^F12:: - g_DoNotAbortSendEsc := false - return diff --git a/server.md b/server.md deleted file mode 100644 index ceb560b..0000000 --- a/server.md +++ /dev/null @@ -1,42 +0,0 @@ -# HOME SERVERS - -## Roadmap -* [ ] read [HN: What'ts on your home server](https://news.ycombinator.com/item?id=34271167) -* [.] auto-setup ssh + ngrok on all machines - * [X] client machines automation - * [X] read ssh commands in [ubuntu](ubuntu.md) - * [X] generate ssh key pair - * [X] ~~write public key to gist~~ - * [X] add ssh public keys to version control `dotfiles/.ssh/authorized_keys` - * [.] server machine - * [X] fetch keys and add to `.ssh/authorized_keys` - * [X] install [ngrok](https://ngrok.com/download) - * [X] setup [ngrok](https://dashboard.ngrok.com/get-started/setup) - * [ ] add make rule to [create ssh-credential](https://ngrok.com/docs/api#api-ssh-credentials) - * [ ] test ssh public key is added to [ngrok API](no-install grok.md) - * [ ] add make-rules to setup ssh - * [ ] setup [ngrok as service](https://stackoverflow.com/a/50808709) - * [ ] test setup - * [ ] install and setup `ngrok` on test machine - * [ ] add authorized keys to version control (?) - * [ ] repurpose [server-ip-sync](server-ip-sync.md) - * [ ] research replacing `ngrok` with [sish](https://github.com/antoniomika/sish) -* [X] set up lenovo machine as thin client - * [ ] run pop os?? -* [ ] keepass get comfy - * [ ] set up keepass on all devices - * [ ] set up ssh keys in keepass -* [.] set up home server cluster - * [ ] setup jetson OS (nvidia distro) - * [ ] Jetson Nano Developer Kit SD Card Image [link](https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit) - * [ ] Mac + Lenovo access - * [.] setup raspberry pi - * [X] install Raspberry Pi OS Lite (32-bit) [link](https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-32-bit) - * [ ] Mac + Lenovo access - * [ ] setup [sftp](https://linuxconfig.org/how-to-setup-sftp-server-on-ubuntu-22-04-jammy-jellyfish-linux) - * [.] reinstall OS on imac - * [.] obtain CD - * [ ] decide imac purpose - * [ ] decide what OS to run -* [ ] move music collection from e540 to HDD -* [ ] jailbreak iPads From 2f2513d705a1e6a9e012d9b6ccb18033e9081869 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 7 Jul 2025 12:49:07 +0000 Subject: [PATCH 49/71] chore: backup windows terminal settings :gear: --- assets/windows_terminal/settings.json | 161 ++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100755 assets/windows_terminal/settings.json diff --git a/assets/windows_terminal/settings.json b/assets/windows_terminal/settings.json new file mode 100755 index 0000000..574e49f --- /dev/null +++ b/assets/windows_terminal/settings.json @@ -0,0 +1,161 @@ +{ + "$help": "https://aka.ms/terminal-documentation", + "$schema": "https://aka.ms/terminal-profiles-schema", + "actions": [], + "copyFormatting": "none", + "copyOnSelect": false, + "defaultProfile": "{6a21a588-bf98-5ca4-a52a-c3ad3f190b1d}", + "keybindings": [ + { + "id": "Terminal.CopyToClipboard", + "keys": "ctrl+c" + }, + { + "id": "Terminal.DuplicatePaneAuto", + "keys": "alt+shift+d" + } + ], + "launchMode": "maximized", + "newTabMenu": [ + { + "type": "remainingProfiles" + } + ], + "profiles": { + "defaults": { + "colorScheme": "Catpuccin Mocha" + }, + "list": [ + { + "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", + "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", + "hidden": false, + "name": "Windows PowerShell" + }, + { + "commandline": "%SystemRoot%\\System32\\cmd.exe", + "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", + "hidden": false, + "name": "Command Prompt" + }, + { + "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", + "hidden": false, + "name": "Azure Cloud Shell", + "source": "Windows.Terminal.Azure" + }, + { + "guid": "{9a493e48-a210-5d3d-a1ec-282cca453333}", + "hidden": false, + "name": "NixOS", + "source": "Microsoft.WSL" + }, + { + "colorScheme": "Catppuccin Latte", + "guid": "{6a21a588-bf98-5ca4-a52a-c3ad3f190b1d}", + "hidden": false, + "name": "NixOS", + "source": "Microsoft.WSL" + }, + { + "guid": "{2d3748c3-0205-5111-ac60-e7d5d2087abe}", + "hidden": false, + "name": "Ubuntu", + "source": "Microsoft.WSL" + }, + { + "guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}", + "hidden": false, + "name": "Git Bash", + "source": "Git" + } + ] + }, + "schemes": [ + { + "name": "Catppuccin Mocha", + "cursorColor": "#F5E0DC", + "selectionBackground": "#585B70", + "background": "#1E1E2E", + "foreground": "#CDD6F4", + "black": "#45475A", + "red": "#F38BA8", + "green": "#A6E3A1", + "yellow": "#F9E2AF", + "blue": "#89B4FA", + "purple": "#F5C2E7", + "cyan": "#94E2D5", + "white": "#BAC2DE", + "brightBlack": "#585B70", + "brightRed": "#F38BA8", + "brightGreen": "#A6E3A1", + "brightYellow": "#F9E2AF", + "brightBlue": "#89B4FA", + "brightPurple": "#F5C2E7", + "brightCyan": "#94E2D5", + "brightWhite": "#A6ADC8" + }, + { + "name": "Catppuccin Latte", + "cursorColor": "#DC8A78", + "selectionBackground": "#ACB0BE", + "background": "#EFF1F5", + "foreground": "#4C4F69", + "black": "#5C5F77", + "red": "#D20F39", + "green": "#40A02B", + "yellow": "#DF8E1D", + "blue": "#1E66F5", + "purple": "#EA76CB", + "cyan": "#179299", + "white": "#ACB0BE", + "brightBlack": "#ACB0BE", + "brightRed": "#D20F39", + "brightGreen": "#40A02B", + "brightYellow": "#DF8E1D", + "brightBlue": "#1E66F5", + "brightPurple": "#EA76CB", + "brightCyan": "#179299", + "brightWhite": "#BCC0CC" + } + ], + "theme": "system", + "themes": [ + { + "name": "Catppuccin Mocha", + "tab": { + "background": "#1E1E2EFF", + "showCloseButton": "always", + "unfocusedBackground": null + }, + "tabRow": { + "background": "#181825FF", + "unfocusedBackground": "#11111BFF" + }, + "window": { + "applicationTheme": "dark" + } + }, + { + "name": "Catppuccin Latte", + "tab": { + "background": "#EFF1F5FF", + "iconStyle": "default", + "showCloseButton": "always", + "unfocusedBackground": null + }, + "tabRow": { + "background": "#E6E9EFFF", + "unfocusedBackground": "#DCE0E8FF" + }, + "window": { + "applicationTheme": "light", + "experimental.rainbowFrame": false, + "frame": null, + "unfocusedFrame": null, + "useMica": false + } + } + ], + "useAcrylicInTabRow": true +} \ No newline at end of file From 4b40ebb9f031c051fc5444c5195a763b8cd4ee77 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 7 Jul 2025 12:55:18 +0000 Subject: [PATCH 50/71] chore: create light/dark windows terminal settings :art: --- assets/windows_terminal/dark.settings.json | 161 ++++++++++++++++++ .../{settings.json => light.settings.json} | 6 +- 2 files changed, 164 insertions(+), 3 deletions(-) create mode 100644 assets/windows_terminal/dark.settings.json rename assets/windows_terminal/{settings.json => light.settings.json} (98%) diff --git a/assets/windows_terminal/dark.settings.json b/assets/windows_terminal/dark.settings.json new file mode 100644 index 0000000..31e1863 --- /dev/null +++ b/assets/windows_terminal/dark.settings.json @@ -0,0 +1,161 @@ +{ + "$help": "https://aka.ms/terminal-documentation", + "$schema": "https://aka.ms/terminal-profiles-schema", + "actions": [], + "copyFormatting": "none", + "copyOnSelect": false, + "defaultProfile": "{6a21a588-bf98-5ca4-a52a-c3ad3f190b1d}", + "keybindings": [ + { + "id": "Terminal.CopyToClipboard", + "keys": "ctrl+c" + }, + { + "id": "Terminal.DuplicatePaneAuto", + "keys": "alt+shift+d" + } + ], + "launchMode": "maximized", + "newTabMenu": [ + { + "type": "remainingProfiles" + } + ], + "profiles": { + "defaults": { + "colorScheme": "Catppuccin Mocha" + }, + "list": [ + { + "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", + "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", + "hidden": false, + "name": "Windows PowerShell" + }, + { + "commandline": "%SystemRoot%\\System32\\cmd.exe", + "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", + "hidden": false, + "name": "Command Prompt" + }, + { + "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", + "hidden": false, + "name": "Azure Cloud Shell", + "source": "Windows.Terminal.Azure" + }, + { + "guid": "{9a493e48-a210-5d3d-a1ec-282cca453333}", + "hidden": false, + "name": "NixOS", + "source": "Microsoft.WSL" + }, + { + "colorScheme": "Catppuccin Mocha", + "guid": "{6a21a588-bf98-5ca4-a52a-c3ad3f190b1d}", + "hidden": false, + "name": "NixOS", + "source": "Microsoft.WSL" + }, + { + "guid": "{2d3748c3-0205-5111-ac60-e7d5d2087abe}", + "hidden": false, + "name": "Ubuntu", + "source": "Microsoft.WSL" + }, + { + "guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}", + "hidden": false, + "name": "Git Bash", + "source": "Git" + } + ] + }, + "schemes": [ + { + "name": "Catppuccin Mocha", + "cursorColor": "#F5E0DC", + "selectionBackground": "#585B70", + "background": "#1E1E2E", + "foreground": "#CDD6F4", + "black": "#45475A", + "red": "#F38BA8", + "green": "#A6E3A1", + "yellow": "#F9E2AF", + "blue": "#89B4FA", + "purple": "#F5C2E7", + "cyan": "#94E2D5", + "white": "#BAC2DE", + "brightBlack": "#585B70", + "brightRed": "#F38BA8", + "brightGreen": "#A6E3A1", + "brightYellow": "#F9E2AF", + "brightBlue": "#89B4FA", + "brightPurple": "#F5C2E7", + "brightCyan": "#94E2D5", + "brightWhite": "#A6ADC8" + }, + { + "name": "Catppuccin Latte", + "cursorColor": "#DC8A78", + "selectionBackground": "#ACB0BE", + "background": "#EFF1F5", + "foreground": "#4C4F69", + "black": "#5C5F77", + "red": "#D20F39", + "green": "#40A02B", + "yellow": "#DF8E1D", + "blue": "#1E66F5", + "purple": "#EA76CB", + "cyan": "#179299", + "white": "#ACB0BE", + "brightBlack": "#ACB0BE", + "brightRed": "#D20F39", + "brightGreen": "#40A02B", + "brightYellow": "#DF8E1D", + "brightBlue": "#1E66F5", + "brightPurple": "#EA76CB", + "brightCyan": "#179299", + "brightWhite": "#BCC0CC" + } + ], + "theme": "system", + "themes": [ + { + "name": "Catppuccin Mocha", + "tab": { + "background": "#1E1E2EFF", + "showCloseButton": "always", + "unfocusedBackground": null + }, + "tabRow": { + "background": "#181825FF", + "unfocusedBackground": "#11111BFF" + }, + "window": { + "applicationTheme": "dark" + } + }, + { + "name": "Catppuccin Mocha", + "tab": { + "background": "#EFF1F5FF", + "iconStyle": "default", + "showCloseButton": "always", + "unfocusedBackground": null + }, + "tabRow": { + "background": "#E6E9EFFF", + "unfocusedBackground": "#DCE0E8FF" + }, + "window": { + "applicationTheme": "light", + "experimental.rainbowFrame": false, + "frame": null, + "unfocusedFrame": null, + "useMica": false + } + } + ], + "useAcrylicInTabRow": true +} diff --git a/assets/windows_terminal/settings.json b/assets/windows_terminal/light.settings.json similarity index 98% rename from assets/windows_terminal/settings.json rename to assets/windows_terminal/light.settings.json index 574e49f..2d23fcc 100755 --- a/assets/windows_terminal/settings.json +++ b/assets/windows_terminal/light.settings.json @@ -23,7 +23,7 @@ ], "profiles": { "defaults": { - "colorScheme": "Catpuccin Mocha" + "colorScheme": "Catppuccin Latte" }, "list": [ { @@ -51,7 +51,7 @@ "source": "Microsoft.WSL" }, { - "colorScheme": "Catppuccin Latte", + "colorScheme": "Catppuccin Mocha", "guid": "{6a21a588-bf98-5ca4-a52a-c3ad3f190b1d}", "hidden": false, "name": "NixOS", @@ -158,4 +158,4 @@ } ], "useAcrylicInTabRow": true -} \ No newline at end of file +} From f94f20e9c4ca273b6f71fbf7c600c201f43aae39 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 7 Jul 2025 13:30:24 +0000 Subject: [PATCH 51/71] fix: windows terminal settings for light mode :sun: --- assets/windows_terminal/light.settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/windows_terminal/light.settings.json b/assets/windows_terminal/light.settings.json index 2d23fcc..d6b1d1d 100755 --- a/assets/windows_terminal/light.settings.json +++ b/assets/windows_terminal/light.settings.json @@ -51,7 +51,7 @@ "source": "Microsoft.WSL" }, { - "colorScheme": "Catppuccin Mocha", + "colorScheme": "Catppuccin Latte", "guid": "{6a21a588-bf98-5ca4-a52a-c3ad3f190b1d}", "hidden": false, "name": "NixOS", From 8e77da043f209901b9f56d651621bfe689ce4513 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 7 Jul 2025 13:32:13 +0000 Subject: [PATCH 52/71] feat: rewrite WSL theme changer for windows 11 + windows terminal :sparkles: --- bashscripts/wsl_theme.sh | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/bashscripts/wsl_theme.sh b/bashscripts/wsl_theme.sh index 51eba02..bb9cefa 100644 --- a/bashscripts/wsl_theme.sh +++ b/bashscripts/wsl_theme.sh @@ -11,10 +11,13 @@ else echo $color_scheme > $nvim_color_theme_path fi +# cp $dark_mode_config_path $windows_terminal_settings_path # check that all relevant files exist windows_username=$(powershell.exe '$env:UserName' | tr -d '\r\n') -dark_mode_config_path=~/python-projects/24_alacritty_windows_setup/gruvbox_material_medium_dark.toml -light_mode_config_path=~/python-projects/24_alacritty_windows_setup/gruvbox_material_medium_light.toml +windows_terminal_settings_path="/mnt/c/Users/${windows_username}/AppData/Local/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/LocalState/settings.json" +dark_mode_config_path=~/dotfiles/assets/windows_terminal/dark.settings.json +light_mode_config_path=~/dotfiles/assets/windows_terminal/light.settings.json + if [ ! -f $light_mode_config_path ]; then echo "error: light_mode_config_path missing" echo "expected: $light_mode_config_path" @@ -27,26 +30,24 @@ if [ ! -f $dark_mode_config_path ]; then exit 1 fi -windows_alacritty_config_path="/mnt/c/Users/${windows_username}/AppData/Roaming/alacritty/alacritty.toml" -echo 'overwriting windows alacritty config' +if [ ! -f $dark_mode_config_path ]; then + echo "error: windows terminal settings path missing" + echo "expected: $windows_terminal_settings_path" + exit 1 +fi if [ $color_scheme = 'dark' ]; then - echo "going dark" - cp $dark_mode_config_path $windows_alacritty_config_path - - # explorer, browser etc - powershell.exe -Command "Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0" - # taskbar and start menu - powershell.exe -Command "Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 0" + cp $dark_mode_config_path $windows_terminal_settings_path + echo "going dark - opening settings" + powershell.exe -Command "start C:\Windows\Resources\Themes\dark.theme" + powershell.exe "timeout /t 3; taskkill /im systemsettings.exe /f" fi if [ $color_scheme = 'light' ]; then - echo "going light" - cp $light_mode_config_path $windows_alacritty_config_path - - # explorer, browser etc - powershell.exe -Command "Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 1" - # taskbar and start menu - powershell.exe -Command "Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 1" + cp $light_mode_config_path $windows_terminal_settings_path + echo "going light - opening settings" + powershell.exe -Command "start C:\Windows\Resources\Themes\aero.theme" + echo "closing settigns" + powershell.exe "timeout /t 3; taskkill /im systemsettings.exe /f" fi From b41cd954191b34c5cb912f540701787173cb3557 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 7 Jul 2025 13:55:27 +0000 Subject: [PATCH 53/71] chore: add neovim line numbering :art: --- nixos/neovim.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/neovim.nix b/nixos/neovim.nix index 59f5f17..ed64a44 100644 --- a/nixos/neovim.nix +++ b/nixos/neovim.nix @@ -10,6 +10,7 @@ set go=a set mouse=a set nohlsearch + set number let mapleader="," lua << EOF From 68502efec2fa7cf37a457ec2bbde495a05102d61 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Wed, 16 Jul 2025 13:59:18 +0000 Subject: [PATCH 54/71] feat: add multiple configurations :sparkles: --- README.md | 6 ++++-- nixos/flake.nix | 12 +++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a06316e..c267b98 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,10 @@ gh auth login gh repo clone dannydannydanny/dotfiles # checkout the appropriate branch git checkout feat/wsl-neovim-update -# rebuild system with -sudo nixos-rebuild switch --flake ~/dotfiles/nixos/ +# rebuild WSL nixos using +sudo nixos-rebuild switch --flake ~/dotfiles/nixos#wsl +# rebuild macbook nixos using +# sudo nixos-rebuild switch --flake ~/dotfiles/nixos#macbook ``` ### Clone repo SSH method diff --git a/nixos/flake.nix b/nixos/flake.nix index 8de68e8..8eb5abe 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -17,7 +17,17 @@ ... }: { nixosConfigurations = { - nixos = nixpkgs.lib.nixosSystem { + + wsl = nixpkgs.lib.nixosSystem { + modules = [ + nixos-wsl.nixosModules.default + vscode-server.nixosModules.default + ./configuration.nix + # home-manager.nixosModules.default + ]; + }; + + macbookair = nixpkgs.lib.nixosSystem { modules = [ nixos-wsl.nixosModules.default vscode-server.nixosModules.default From 0368fcce91c51d47f53381b311d7ebdc6901440f Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Wed, 16 Jul 2025 19:40:41 +0000 Subject: [PATCH 55/71] feat: WSL config to hosts/wsl.nix & extract shared modules :truck: --- nixos/flake.nix | 13 +++++++++++-- nixos/{configuration.nix => hosts/wsl.nix} | 7 ------- 2 files changed, 11 insertions(+), 9 deletions(-) rename nixos/{configuration.nix => hosts/wsl.nix} (96%) diff --git a/nixos/flake.nix b/nixos/flake.nix index 8eb5abe..1c4e895 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -19,22 +19,31 @@ nixosConfigurations = { wsl = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; modules = [ nixos-wsl.nixosModules.default vscode-server.nixosModules.default - ./configuration.nix + ./hosts/wsl.nix # previously configuration.nix + ./tmux.nix + ./neovim.nix + ./fish.nix # home-manager.nixosModules.default ]; }; macbookair = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; modules = [ nixos-wsl.nixosModules.default vscode-server.nixosModules.default - ./configuration.nix + # ./hosts/macbookair.nix # previously configuration.nix + ./tmux.nix + ./neovim.nix + ./fish.nix # home-manager.nixosModules.default ]; }; + }; }; } diff --git a/nixos/configuration.nix b/nixos/hosts/wsl.nix similarity index 96% rename from nixos/configuration.nix rename to nixos/hosts/wsl.nix index effed48..4a76710 100644 --- a/nixos/configuration.nix +++ b/nixos/hosts/wsl.nix @@ -8,12 +8,6 @@ { config, lib, pkgs, ... }: { - imports = [ - ./tmux.nix - ./neovim.nix - ./fish.nix - ]; - wsl = { enable = true; defaultUser = "nixos"; @@ -54,7 +48,6 @@ initialPassword = "test"; }; - nixpkgs.hostPlatform = "x86_64-linux"; nixpkgs.config.allowUnfree = true; environment.variables = { DBT_USER = "DNTH"; From 57c4f145ef215c0f52f1c1556c2f08d0ef1199b2 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Wed, 23 Jul 2025 11:57:54 +0000 Subject: [PATCH 56/71] doc: sometimes TODOs aren't for doing --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c267b98..1b97fc0 100644 --- a/README.md +++ b/README.md @@ -82,3 +82,5 @@ bash install.sh cd .. ``` +## Good Reads / Philosophy +* sometimes [`TODO`s arent for doing](https://sophiebits.com/2025/07/21/todos-arent-for-doing) From 832c0ec8e8c675500631d563ae4c387704a0b690 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 27 Jul 2025 16:06:02 +0200 Subject: [PATCH 57/71] merge: hardware config from main --- nixos/hardware-configuration.nix | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 nixos/hardware-configuration.nix diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix new file mode 100644 index 0000000..67723d9 --- /dev/null +++ b/nixos/hardware-configuration.nix @@ -0,0 +1,42 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" "wl" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/bf59e35a-f96d-489d-9b14-93f67d5e294d"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-5b4978ab-ee25-4a85-8f56-0bdbe932f154".device = "/dev/disk/by-uuid/5b4978ab-ee25-4a85-8f56-0bdbe932f154"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/691B-AF9A"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/08f3fa7a-1e84-4819-b696-1536bc44ef99"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0b1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} From 874bab83642abe495c4eada301160b0e46704309 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 27 Jul 2025 16:07:02 +0200 Subject: [PATCH 58/71] merge: nixos readme from main --- nixos/readme.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/nixos/readme.md b/nixos/readme.md index 5e20a0b..fb0150b 100644 --- a/nixos/readme.md +++ b/nixos/readme.md @@ -4,8 +4,3 @@ Rebuild nixos and points to dotfiles dir: sudo nixos-rebuild switch --flake ~/dotfiles/nixos ``` -Overwrite wsl `resolv.conf`: - -``` -cp ~/dotfiles/nixos/resolv.conf /etc/ -``` From 7670b2f3a1729305c85e4813ea73a35a24d39ceb Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 27 Jul 2025 16:08:35 +0200 Subject: [PATCH 59/71] merge: uxplay from main --- nixos/uxplay.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/uxplay.nix b/nixos/uxplay.nix index e9612b0..3ae199f 100644 --- a/nixos/uxplay.nix +++ b/nixos/uxplay.nix @@ -4,10 +4,9 @@ # also see: 24_nix_uxplay for script { config, pkgs, ... }: - { services.avahi = { - nssmdns = true; + nssmdns4 = true; enable = true; publish = { enable = true; From b1a6f526cf33072c3d1a559b79da2c1b13936387 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 27 Jul 2025 16:15:40 +0200 Subject: [PATCH 60/71] doc: build on different devices :memo: --- nixos/readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/readme.md b/nixos/readme.md index fb0150b..2ec2f5a 100644 --- a/nixos/readme.md +++ b/nixos/readme.md @@ -1,6 +1,8 @@ Rebuild nixos and points to dotfiles dir: ``` -sudo nixos-rebuild switch --flake ~/dotfiles/nixos +sudo nixos-rebuild switch --flake ~/dotfiles/nixos#macbook +# or +sudo nixos-rebuild switch --flake ~/dotfiles/nixos#wsl ``` From dcde5999e9f16ecf9a25adfa65b45ca709fb359c Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 28 Jul 2025 11:30:12 +0000 Subject: [PATCH 61/71] feat: mute windows after theme change :sparkles: --- bashscripts/wsl_theme.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bashscripts/wsl_theme.sh b/bashscripts/wsl_theme.sh index bb9cefa..a6e948d 100644 --- a/bashscripts/wsl_theme.sh +++ b/bashscripts/wsl_theme.sh @@ -51,3 +51,6 @@ if [ $color_scheme = 'light' ]; then powershell.exe "timeout /t 3; taskkill /im systemsettings.exe /f" fi +echo "setting Sound Schema to None" +powershell.exe -Command "Set-ItemProperty -Path HKCU:\AppEvents\Schemes -Name '(Default)' -Value 'No Sounds'" + From 3bad798a7ddded2689a9d4796d55e7cb3d48ddeb Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 28 Jul 2025 13:44:05 +0000 Subject: [PATCH 62/71] fix: setting sound scheme: No Sounds :bug: --- bashscripts/wsl_theme.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bashscripts/wsl_theme.sh b/bashscripts/wsl_theme.sh index a6e948d..dfc505c 100644 --- a/bashscripts/wsl_theme.sh +++ b/bashscripts/wsl_theme.sh @@ -52,5 +52,5 @@ if [ $color_scheme = 'light' ]; then fi echo "setting Sound Schema to None" -powershell.exe -Command "Set-ItemProperty -Path HKCU:\AppEvents\Schemes -Name '(Default)' -Value 'No Sounds'" +powershell.exe -Command "Set-ItemProperty -Path HKCU:\AppEvents\Schemes -Name '(Default)' -Value '.None'" From f0ad6397e1540185c2a8e9a72b55fadcc7860b8f Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Wed, 30 Jul 2025 10:50:16 +0000 Subject: [PATCH 63/71] doc: remove TODO reminder :memo::fire: --- nixos/hosts/wsl.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/nixos/hosts/wsl.nix b/nixos/hosts/wsl.nix index 4a76710..5e0c8f6 100644 --- a/nixos/hosts/wsl.nix +++ b/nixos/hosts/wsl.nix @@ -11,8 +11,6 @@ wsl = { enable = true; defaultUser = "nixos"; - # TODO: check that this actually works, if it does, remove this comment and resolv.conf - # if not, remove this part and add URLs below to resolv.conf wslConf.network.generateResolvConf = false; }; From d696afdd76652724489452a3ddd6b36f207a9e5a Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Thu, 31 Jul 2025 12:37:33 +0000 Subject: [PATCH 64/71] feat: add mpv music player :sparkles: --- nixos/hosts/wsl.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/hosts/wsl.nix b/nixos/hosts/wsl.nix index 5e0c8f6..289db8a 100644 --- a/nixos/hosts/wsl.nix +++ b/nixos/hosts/wsl.nix @@ -55,6 +55,7 @@ # tmux # activated in tmux.nix # vim # using neovim in stead # neovim # activated in neovim.nix + mpv # cli music player git # version control gh # github cli tool From 1cd1e5a15673aad408c574c1f9a2e39fee3fd90f Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Wed, 6 Aug 2025 11:08:19 +0000 Subject: [PATCH 65/71] feat: mute windows terminal :sparkles: --- assets/windows_terminal/dark.settings.json | 3 ++- assets/windows_terminal/light.settings.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/windows_terminal/dark.settings.json b/assets/windows_terminal/dark.settings.json index 31e1863..7bd977f 100644 --- a/assets/windows_terminal/dark.settings.json +++ b/assets/windows_terminal/dark.settings.json @@ -23,7 +23,8 @@ ], "profiles": { "defaults": { - "colorScheme": "Catppuccin Mocha" + "colorScheme": "Catppuccin Mocha", + "bellStyle": "none" }, "list": [ { diff --git a/assets/windows_terminal/light.settings.json b/assets/windows_terminal/light.settings.json index d6b1d1d..2cc43a3 100755 --- a/assets/windows_terminal/light.settings.json +++ b/assets/windows_terminal/light.settings.json @@ -23,7 +23,8 @@ ], "profiles": { "defaults": { - "colorScheme": "Catppuccin Latte" + "colorScheme": "Catppuccin Latte", + "bellStyle": "none" }, "list": [ { From 83cf70185538b7024ba61e47427baf19413e52d0 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sat, 23 Aug 2025 20:09:59 +0000 Subject: [PATCH 66/71] feat: add mpd / fzf music command :sparkles: --- nixos/fish.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/fish.nix b/nixos/fish.nix index bb8c104..defb961 100644 --- a/nixos/fish.nix +++ b/nixos/fish.nix @@ -5,6 +5,7 @@ enable = true; shellAliases = { theme = "bash ~/dotfiles/bashscripts/wsl_theme.sh"; + music = "mpv --no-video --log-file=~/music_history.log \"$(find /mnt/c/Users/DNTH/Music/ -type f \\( -name '*.mp3' -o -name '*.wav' -o -name '*.flac' -o -name '*.m4a' -o -name '*.ogg' \\) | fzf)\""; }; interactiveShellInit = '' fish_vi_key_bindings From c0f70818c56d57e07caf093a4d84676e04e54fba Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sat, 23 Aug 2025 20:10:28 +0000 Subject: [PATCH 67/71] feat: add jq :pushpin: --- nixos/hosts/wsl.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/hosts/wsl.nix b/nixos/hosts/wsl.nix index 289db8a..32229fd 100644 --- a/nixos/hosts/wsl.nix +++ b/nixos/hosts/wsl.nix @@ -74,6 +74,7 @@ btop # resource monitor tldr # community alternative to man fzf # fuzzy finder + jq # parse json # gimp # bloat # blender # bloat From a90fad2688b7c90cc6bcee155a40e5943648b86e Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sat, 23 Aug 2025 20:11:41 +0000 Subject: [PATCH 68/71] feat: add ollama :pushpin: --- nixos/hosts/wsl.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/hosts/wsl.nix b/nixos/hosts/wsl.nix index 32229fd..5d50802 100644 --- a/nixos/hosts/wsl.nix +++ b/nixos/hosts/wsl.nix @@ -57,6 +57,8 @@ # neovim # activated in neovim.nix mpv # cli music player + ollama # LLMs locally + git # version control gh # github cli tool From 4c5128a7a0beb5fe5face8feb70f7445a63f022a Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sat, 23 Aug 2025 20:19:12 +0000 Subject: [PATCH 69/71] refactor: ollama pkg with service :art: --- nixos/hosts/wsl.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/hosts/wsl.nix b/nixos/hosts/wsl.nix index 5d50802..15eca06 100644 --- a/nixos/hosts/wsl.nix +++ b/nixos/hosts/wsl.nix @@ -57,8 +57,6 @@ # neovim # activated in neovim.nix mpv # cli music player - ollama # LLMs locally - git # version control gh # github cli tool @@ -86,6 +84,7 @@ lolcat ]; + services.ollama.enable = true; services.vscode-server.enable = true; security.rtkit.enable = true; # realtime kit hands out realtime scheduling priority services.pipewire = { From 2301677859dcd0c37b20e339c19e36769c9dfe8a Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sat, 23 Aug 2025 21:04:14 +0000 Subject: [PATCH 70/71] feat(service): add Open-WebUI to WSL :pushpin: --- nixos/hosts/wsl.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/hosts/wsl.nix b/nixos/hosts/wsl.nix index 15eca06..ceaeb42 100644 --- a/nixos/hosts/wsl.nix +++ b/nixos/hosts/wsl.nix @@ -85,6 +85,8 @@ ]; services.ollama.enable = true; + services.open-webui = { enable = true; port = 8080; }; + services.vscode-server.enable = true; security.rtkit.enable = true; # realtime kit hands out realtime scheduling priority services.pipewire = { From 89791e46427b6c76ad1119bef2bcb8434c2679ce Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Tue, 9 Sep 2025 15:24:51 +0200 Subject: [PATCH 71/71] chore: remove wsl.conf --- nixos/wsl.conf | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 nixos/wsl.conf diff --git a/nixos/wsl.conf b/nixos/wsl.conf deleted file mode 100644 index 202ffe7..0000000 --- a/nixos/wsl.conf +++ /dev/null @@ -1,23 +0,0 @@ -# this file goes here: /etc/wsl.conf -[automount] -enabled=true -ldconfig=false -mountFsTab=false -options=metadata,uid=1000,gid=100 -root=/mnt - -[boot] -command= -systemd=true - -[interop] -appendWindowsPath=true -enabled=true - -[network] -generateHosts=true -generateResolvConf=false -hostname=nixos - -[user] -default=nixos