From 4d0e4d52f6210819b3bca90ffe963a732134cbbc Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 7 Feb 2025 18:36:36 +0100 Subject: [PATCH 01/64] :memo: doc: wifi issue --- nixos/configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index af7afb1..2a7fa0d 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -18,6 +18,7 @@ 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. + # NOTE: You can not use networking.networkmanager with networking.wireless # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary From 1f76a7bbeed2182133bd4a6cc72efc7e426a852a Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 7 Feb 2025 18:44:04 +0100 Subject: [PATCH 02/64] :art: update to fix nixos warnings :warning: --- nixos/configuration.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 2a7fa0d..9ec42db 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -50,13 +50,13 @@ services.xserver.enable = true; # Enable the KDE Plasma Desktop Environment. - services.xserver.displayManager.sddm.enable = true; + services.displayManager.sddm.enable = true; services.xserver.desktopManager.plasma5.enable = true; # Configure keymap in X11 services.xserver = { - layout = "us"; - xkbVariant = ""; + xkb.layout = "us"; + xkb.variant = ""; }; # Enable CUPS to print documents. From 7626aae56447241e55944d6fbe666e5ec358eda0 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 7 Feb 2025 18:46:15 +0100 Subject: [PATCH 03/64] :fire: deactivate uxplay --- nixos/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 9ec42db..4808b72 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -9,7 +9,7 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix ./tmux.nix - ./uxplay.nix + # ./uxplay.nix ]; # Bootloader. From 71ef9d3b07f2f11e83323f0c4e894dd7c71096d4 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 7 Feb 2025 18:48:17 +0100 Subject: [PATCH 04/64] :sparkles: enable pulseaudio --- nixos/configuration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 4808b72..9d5752f 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -63,8 +63,8 @@ services.printing.enable = true; # Enable sound with pipewire. - sound.enable = true; - hardware.pulseaudio.enable = false; + services.pulseaudio.enable = false; + hardware.alsa.enable = false; security.rtkit.enable = true; services.pipewire = { enable = true; From 945b689b68a877b6fbf246008bb843e7e984b006 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 7 Feb 2025 18:52:10 +0100 Subject: [PATCH 05/64] :sparkles: enable KDE partition-manager --- nixos/configuration.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 9d5752f..cd0c70c 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -96,6 +96,9 @@ # Install firefox. programs.firefox.enable = true; + # install kde partition manager + programs.partition-manager.enable = true; + # Allow unfree packages nixpkgs.config.allowUnfree = true; From cbca1f941e89b425ac7e732173a36d942f17d2b5 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 7 Feb 2025 18:59:27 +0100 Subject: [PATCH 06/64] :sparkles: update which packages --- nixos/configuration.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index cd0c70c..dee5851 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -88,8 +88,11 @@ description = "dth"; extraGroups = [ "networkmanager" "wheel" ]; packages = with pkgs; [ - kate - # thunderbird + vlc # video player + kate # editor + ripgrep # faster grep + + # thunderbird # bloat ]; }; @@ -121,8 +124,8 @@ pkgs.thunderbird # email / calendar pkgs.telegram-desktop # instant messager - pkgs.gimp # image editor - pkgs.libsForQt5.kdenlive # video editor + # pkgs.gimp # image editor + # pkgs.libsForQt5.kdenlive # video editor pkgs.pyenv # python environment manager From 82fe8b43a06d3336bcfeac7d76ba5f3ea9172be0 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 7 Feb 2025 19:01:36 +0100 Subject: [PATCH 07/64] :sparkles: add hardware config to version control --- 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 d12b93664d5d8eb71763ae9bf35ab7f1423d8722 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 7 Feb 2025 19:06:37 +0100 Subject: [PATCH 08/64] :art: use flakes in dotfiles --- nixos/flake.lock | 26 ++++++++++++++++++++++++++ nixos/flake.nix | 15 +++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 nixos/flake.lock create mode 100644 nixos/flake.nix diff --git a/nixos/flake.lock b/nixos/flake.lock new file mode 100644 index 0000000..1ff34bc --- /dev/null +++ b/nixos/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1738078788, + "narHash": "sha256-QyCJLV1v8ECVr/e2UVt+4atWHi9aTPUAhPjW3hW0Ja0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3dad8067aba6ecb98a1869c775dab7fef3a51dd1", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/nixos/flake.nix b/nixos/flake.nix new file mode 100644 index 0000000..028ab4f --- /dev/null +++ b/nixos/flake.nix @@ -0,0 +1,15 @@ + +{ + inputs.nixpkgs.url = "github:nixos/nixpkgs"; + + outputs = { self, nixpkgs }: { + nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./configuration.nix + ./hardware-configuration.nix + ]; + }; + }; +} + From e9609967676212afbf4cf91e151c52a7fc613adb Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 7 Feb 2025 19:07:15 +0100 Subject: [PATCH 09/64] :sparkles: add temp.disabled uxplay to flake.nix --- nixos/flake.nix | 1 + nixos/uxplay.nix | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/flake.nix b/nixos/flake.nix index 028ab4f..bf2742f 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -8,6 +8,7 @@ modules = [ ./configuration.nix ./hardware-configuration.nix + # ./uxplay.nix ]; }; }; 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 ce6249997e8fab981fe31b6d3d0e837b1845a4d3 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 7 Feb 2025 19:24:07 +0100 Subject: [PATCH 10/64] :sparkles: add fish config from wsl branch --- nixos/configuration.nix | 1 + nixos/fish.nix | 71 +++++++++++++++++++++++++++++++++++++++++ nixos/flake.nix | 1 + 3 files changed, 73 insertions(+) create mode 100644 nixos/fish.nix diff --git a/nixos/configuration.nix b/nixos/configuration.nix index dee5851..f28d089 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -10,6 +10,7 @@ ./hardware-configuration.nix ./tmux.nix # ./uxplay.nix + ./fish.nix ]; # Bootloader. diff --git a/nixos/fish.nix b/nixos/fish.nix new file mode 100644 index 0000000..440a3db --- /dev/null +++ b/nixos/fish.nix @@ -0,0 +1,71 @@ +{ 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 = '' + # 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 + fi + ''; + }; +} + diff --git a/nixos/flake.nix b/nixos/flake.nix index bf2742f..1290616 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -9,6 +9,7 @@ ./configuration.nix ./hardware-configuration.nix # ./uxplay.nix + ./fish.nix ]; }; }; From e14db4bfd43689e2874a62b3aca30a0cdf471825 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 9 Feb 2025 15:42:04 +0100 Subject: [PATCH 11/64] :sparkles: add (nerfed) neovim config from wsl branch --- nixos/configuration.nix | 4 +-- nixos/flake.nix | 1 + nixos/neovim.nix | 61 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 nixos/neovim.nix diff --git a/nixos/configuration.nix b/nixos/configuration.nix index f28d089..62ba3bb 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -11,6 +11,7 @@ ./tmux.nix # ./uxplay.nix ./fish.nix + ./neovim.nix ]; # Bootloader. @@ -114,9 +115,6 @@ 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 diff --git a/nixos/flake.nix b/nixos/flake.nix index 1290616..707c8ac 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -10,6 +10,7 @@ ./hardware-configuration.nix # ./uxplay.nix ./fish.nix + ./neovim.nix ]; }; }; diff --git a/nixos/neovim.nix b/nixos/neovim.nix new file mode 100644 index 0000000..b452eeb --- /dev/null +++ b/nixos/neovim.nix @@ -0,0 +1,61 @@ +{ config, pkgs, ... }: + +{ + programs.neovim = { + enable = true; + defaultEditor = true; + # package = pkgs.neovim; + configure = { + customRC = '' + set title + set go=a + set mouse=a + set nohlsearch + + set bg=dark + " set bg=light + + colorscheme gruvbox + + " 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 + + 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. + # 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 + goyo-vim # write prose + limelight-vim # prose paragraph highlighter + ]; + opt = []; + }; + }; + }; +} + From 3317d24ebe2db644f9e952b6d306cf7d2e0d73d9 Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Thu, 26 Jun 2025 14:30:46 +0200 Subject: [PATCH 12/64] doc: nix-community/NixOS-WSL quickstart :memo: --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3e14a03..35066bd 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ This repo is an extension of [dannydannydanny/methodology](https://github.com/Da ### WSL +Installation: [nix-community/NixOS-WSL Quickstart](https://github.com/nix-community/NixOS-WSL?tab=readme-ov-file#quick-start). ``` wsl --install --web-download -d Debian # From 75fd6193d53009a0a2f401459b95f19ba7f0c117 Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Fri, 27 Jun 2025 15:22:50 +0200 Subject: [PATCH 13/64] doc: wsl-nixos setup :snowflake: --- README.md | 43 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 35066bd..4f6a3a9 100644 --- a/README.md +++ b/README.md @@ -60,36 +60,19 @@ This repo is an extension of [dannydannydanny/methodology](https://github.com/Da ### WSL -Installation: [nix-community/NixOS-WSL Quickstart](https://github.com/nix-community/NixOS-WSL?tab=readme-ov-file#quick-start). -``` -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 abf3eeb817af9b8b0bd15ed4f253accb36c3242c Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Tue, 1 Jul 2025 15:33:20 +0200 Subject: [PATCH 14/64] doc: clean up readme top :memo: :art: --- README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 4f6a3a9..060241f 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: From b5c4565519c2e662139375417ae7dbce8f0a54a4 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Thu, 3 Jul 2025 12:02:55 +0000 Subject: [PATCH 15/64] merge README from WSL branch --- README.md | 54 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 060241f..9ee0315 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,15 @@ # dotfiles -[`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/) - This repo is an extension of [dannydannydanny/methodology](https://github.com/DannyDannyDanny/methodology/) +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, ...) + ## Roadmap: * ~post OS install~ remove [ubuntu.md](ubuntu.md) @@ -54,19 +60,35 @@ This repo is an extension of [dannydannydanny/methodology](https://github.com/Da ### WSL -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/ +``` +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 ``` ### Clone repo SSH method @@ -97,6 +119,8 @@ cd dotfiles 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 920030ad3db9d28ace9bbbf01afb5e654190e87a Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Thu, 3 Jul 2025 12:05:29 +0000 Subject: [PATCH 16/64] chore: merge wsl theme script from wsl branch --- bashscripts/wsl_theme.sh | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) 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 + From 8bbc550865140bb2c6a83faf3c5b97a4166a57fb Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Thu, 3 Jul 2025 12:11:04 +0000 Subject: [PATCH 17/64] merge fish and neovim from wsl branch --- nixos/fish.nix | 73 ++++++++++++++++++++++++++++++++++++++++ nixos/neovim.nix | 86 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100644 nixos/fish.nix create mode 100644 nixos/neovim.nix diff --git a/nixos/fish.nix b/nixos/fish.nix new file mode 100644 index 0000000..bb8c104 --- /dev/null +++ b/nixos/fish.nix @@ -0,0 +1,73 @@ +{ config, pkgs, ... }: + +{ + 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) + + # 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 = '' + # 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 + fi + ''; + }; +} + diff --git a/nixos/neovim.nix b/nixos/neovim.nix new file mode 100644 index 0000000..37af03c --- /dev/null +++ b/nixos/neovim.nix @@ -0,0 +1,86 @@ +{ config, pkgs, ... }: + +{ + programs.neovim = { + enable = true; + defaultEditor = true; + # package = pkgs.neovim; + configure = { + customRC = '' + set title + set go=a + set mouse=a + set nohlsearch + let mapleader="," + + lua << EOF + 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 + + colorscheme gruvbox + + " 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 + + set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:» + set clipboard+=unnamedplus + + " 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 + ''; + # 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-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 + 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 = []; + }; + }; + }; +} + From e9fd64a7cdfd0a39fbb8b0b66ef164ac576d8184 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Thu, 3 Jul 2025 14:20:40 +0200 Subject: [PATCH 18/64] doc: heading + NixOS WSL (restore from history) :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 0ed201053c6eeb41cf76d91d26c01af73a151ada Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 27 Jul 2025 14:04:52 +0200 Subject: [PATCH 19/64] chore: cleanup imports, enable flakes, and add system utilities :art: --- nixos/configuration.nix | 72 +++++++++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 27 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 62ba3bb..434cfda 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -5,13 +5,12 @@ { config, pkgs, ... }: { - imports = - [ # Include the results of the hardware scan. + imports = [ ./hardware-configuration.nix ./tmux.nix - # ./uxplay.nix - ./fish.nix ./neovim.nix + ./fish.nix + # ./uxplay.nix ]; # Bootloader. @@ -23,6 +22,8 @@ # NOTE: You can not use networking.networkmanager with networking.wireless # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + nix.settings.experimental-features = [ "nix-command" "flakes" ]; # for vscode remote server + # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; @@ -61,6 +62,16 @@ xkb.variant = ""; }; + programs.nix-ld.enable = true; + # TODO: move to home manager (?) + programs = { + direnv = { + enable = true; + enableFishIntegration = true; + nix-direnv.enable = true; + }; + }; + # Enable CUPS to print documents. services.printing.enable = true; @@ -89,11 +100,12 @@ isNormalUser = true; description = "dth"; extraGroups = [ "networkmanager" "wheel" ]; + # TODO: use home manager to define user packages packages = with pkgs; [ vlc # video player kate # editor ripgrep # faster grep - + nextcloud-client # private cloud # thunderbird # bloat ]; }; @@ -104,43 +116,49 @@ # install kde partition manager programs.partition-manager.enable = true; + # TODO: install gnome disk manager + # programs.gnome-disks.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 + # tmux # activated in tmux.nix + # vim # using neovim in stead + # neovim # activated in neovim.nix - pkgs.neofetch # system profile: choose this - pkgs.fastfetch # or this + git # version control + gh # github cli tool - pkgs.tldr # community driven manpage alternative + ripgrep # faster grep + 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) - pkgs.thunderbird # email / calendar - pkgs.telegram-desktop # instant messager + neofetch # system info + btop # resource monitor + wget # downloader + tldr # community driven manpage alternative - # pkgs.gimp # image editor - # pkgs.libsForQt5.kdenlive # video editor + ntfs3g # mount NTFS drives on linux + gptfdisk # formatting drives - like fdisk but better + # this stuff runs gparted + # gimp # bloat image editing + # blender # bloat 3D modelling + # inkscape # bloat vecor graphics / drawing + # kdenlive # bloat video editor - pkgs.pyenv # python environment manager - pkgs.poetry # python package manager - pkgs.python3 # trusty old python + # desktop applications + thunderbird # email / calendar + telegram-desktop # instant messager - gcc # gnu compiler collection (necessary for python) - pkg-config # allows packages to find information about other packages (necessary for python) - gnumake # python - zlib # python + cowsay + lolcat - - # misc - cowsay - lolcat - wget ]; # firefox smooth scrolling From 59172dae9d911ad893522825c324e3decec697c7 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 27 Jul 2025 14:18:12 +0200 Subject: [PATCH 20/64] feat: add xclip :sparkles: --- nixos/configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 434cfda..c33d7f7 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -137,6 +137,7 @@ 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) + xclip # terminal clipboard integration (i.e. allow terminal to r/w clipboard) neofetch # system info btop # resource monitor From 7d71fbd8890a2202b805903a9607685fcae34b47 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 16:29:57 +0000 Subject: [PATCH 21/64] 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 6eeb9457490c65a29c1934f319a50a88a1f52825 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 16:41:32 +0000 Subject: [PATCH 22/64] 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 9ff93acffcaaa84b902ebeaf07dfd920e0719637 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 16:44:33 +0000 Subject: [PATCH 23/64] 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 8c3355fcbec81eb0071d0d1b1ae9cbf870ae9958 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:06:09 +0000 Subject: [PATCH 24/64] 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 083a58c18f1253fe122861490cbf6243b037014d Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:11:12 +0000 Subject: [PATCH 25/64] 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 df917f964defe1e8ede0bf4d96432d99522f3eea Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:17:38 +0000 Subject: [PATCH 26/64] 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 8506e313bc354d338884746558aac505e179a0fa Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:20:34 +0000 Subject: [PATCH 27/64] 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 cac17156da1ff2d4d20bafd9564356ab8cad27db Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:21:10 +0000 Subject: [PATCH 28/64] 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 4559bce15fa7ca474e97ca0d91670b64446f7963 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:22:38 +0000 Subject: [PATCH 29/64] 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 3828b37893246ea14d9e19030b783898581e9d44 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:25:22 +0000 Subject: [PATCH 30/64] 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 015e00f50a197f152e90adbcecbd996d49c83901 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:42:35 +0000 Subject: [PATCH 31/64] 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 7c31b3078b5545a6a326bb06e5a21cd56bdb54e2 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:53:50 +0000 Subject: [PATCH 32/64] 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 009734b498de232eaa25dfce7186bfeabd16aa63 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 18:01:22 +0000 Subject: [PATCH 33/64] 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 f7635d6dc06b3c641410c17ac15fbcca0082cfee Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Fri, 4 Jul 2025 17:16:35 +0000 Subject: [PATCH 34/64] 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 dda6ad3b82861d78feaf97557636bcd016e30b53 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 7 Jul 2025 12:49:07 +0000 Subject: [PATCH 35/64] 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 7a4651cb774ff4b73eec7a8975a46b9130f78df7 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 7 Jul 2025 12:55:18 +0000 Subject: [PATCH 36/64] 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 3da223fe44eb555bb7270e17576313ca84ef3dcb Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 7 Jul 2025 13:30:24 +0000 Subject: [PATCH 37/64] 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 b95e2c89d8b55e2ac0ee4e472e18bffaa118e5bd Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 7 Jul 2025 13:32:13 +0000 Subject: [PATCH 38/64] 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 433c3b714fd3917f200f6b14b1b5f00e0aab9559 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 7 Jul 2025 13:55:27 +0000 Subject: [PATCH 39/64] 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 37af03c..6878e22 100644 --- a/nixos/neovim.nix +++ b/nixos/neovim.nix @@ -11,6 +11,7 @@ set go=a set mouse=a set nohlsearch + set number let mapleader="," lua << EOF From 3135fc27556a35bb739d1e2e77ff54410e07a7ff Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 27 Jul 2025 14:39:56 +0200 Subject: [PATCH 40/64] merge: README from wsl branch --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a06316e..1b97fc0 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 @@ -80,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 d34e9a4fd0608ce65ee55c3e9f965d42a896e997 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 27 Jul 2025 14:46:48 +0200 Subject: [PATCH 41/64] merge: hosts/wsl.nix from wsl branch :truck: --- nixos/hosts/wsl.nix | 98 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 nixos/hosts/wsl.nix diff --git a/nixos/hosts/wsl.nix b/nixos/hosts/wsl.nix new file mode 100644 index 0000000..4a76710 --- /dev/null +++ b/nixos/hosts/wsl.nix @@ -0,0 +1,98 @@ +# Edit this configuration file to define what should be installed on +# 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`). + +# NixOS-WSL specific options are documented on the NixOS-WSL repository: +# https://github.com/nix-community/NixOS-WSL + +{ config, lib, pkgs, ... }: + +{ + 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; + }; + + 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 (?) + 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 = "25.05"; # Did you read the comment? + + users.users.dth = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + 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 + # neovim # activated in neovim.nix + + 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 + tldr # community alternative to man + fzf # fuzzy finder + + # gimp # bloat + # blender # bloat + # inkscape # bloat + + cowsay + 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; + }; + +} From be6dd5974b43f241c0730886c36d83b53c5c4259 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 27 Jul 2025 14:48:08 +0200 Subject: [PATCH 42/64] merge: neovim.nix from wsl branch --- nixos/neovim.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/nixos/neovim.nix b/nixos/neovim.nix index 6878e22..ed64a44 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 @@ -36,12 +35,7 @@ end EOF - colorscheme gruvbox - - " relative line numbering when leaving insert mode - set relativenumber - autocmd InsertEnter * :set number norelativenumber - autocmd InsertLeave * :set nonumber relativenumber + colorscheme catppuccin " catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha " netrw (dir listing) settings let g:netrw_liststyle = 3 @@ -75,7 +69,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 156dca5cfa1da013c176899f4340bcc0abba6d3c Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 27 Jul 2025 14:51:29 +0200 Subject: [PATCH 43/64] merge: nixos readme from wsl branch --- nixos/readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/readme.md b/nixos/readme.md index 502d8c4..fb0150b 100644 --- a/nixos/readme.md +++ b/nixos/readme.md @@ -1,5 +1,6 @@ -Copy local config to repo: +Rebuild nixos and points to dotfiles dir: ``` -cp -r /etc/nixos/ ~/dotfiles/nixos +sudo nixos-rebuild switch --flake ~/dotfiles/nixos ``` + From 5e911e9233ff0045eea7f50ec296256cf876fb7f Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 27 Jul 2025 14:52:35 +0200 Subject: [PATCH 44/64] merge: tmux.nix from wsl branch --- nixos/tmux.nix | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/nixos/tmux.nix b/nixos/tmux.nix index 2109ee0..c09e84b 100644 --- a/nixos/tmux.nix +++ b/nixos/tmux.nix @@ -1,33 +1,27 @@ { config, pkgs, ... }: { - programs.tmux = { enable = true; clock24 = true; + escapeTime = 20; + keyMode = "vi"; + historyLimit = 100000; + baseIndex = 1; + 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 - - # 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 + set -g mouse on # pane movement shortcuts bind h select-pane -L @@ -53,5 +47,11 @@ # fix ssh agent when tmux is detached # 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 11c95e4e13baa08ab1ced8528d0df16fa496fb00 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 27 Jul 2025 14:53:53 +0200 Subject: [PATCH 45/64] merge: wsl.conf from wsl branch --- 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 bd98e174605f648f2f8dea67b37e676044ee6303 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 27 Jul 2025 16:15:40 +0200 Subject: [PATCH 46/64] 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 14bdd2db85b923628af14a16b2c4c054726b0c07 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 17 Aug 2025 20:39:27 +0200 Subject: [PATCH 47/64] feat: restructure flake into multi-host setup :art: --- nixos/flake.lock | 137 +++++++++++++++++++++++++-- nixos/flake.nix | 59 +++++++++--- nixos/hosts/macbookair.nix | 189 +++++++++++++++++++++++++++++++++++++ nixos/readme.md | 2 +- 4 files changed, 365 insertions(+), 22 deletions(-) create mode 100644 nixos/hosts/macbookair.nix diff --git a/nixos/flake.lock b/nixos/flake.lock index 1ff34bc..5c4b68b 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -1,23 +1,144 @@ { "nodes": { - "nixpkgs": { + "flake-compat": { + "flake": false, "locked": { - "lastModified": 1738078788, - "narHash": "sha256-QyCJLV1v8ECVr/e2UVt+4atWHi9aTPUAhPjW3hW0Ja0=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "3dad8067aba6ecb98a1869c775dab7fef3a51dd1", + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "type": "github" }, "original": { - "owner": "nixos", + "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": 1753450337, + "narHash": "sha256-l0QLEenVKuU6U2g1wI0zuf9IAm7QpisIbf8wAI6BUX4=", + "owner": "nix-community", + "repo": "NixOS-WSL", + "rev": "a8dfcd2962f6e788759a75b36ca86b14aa44d8e5", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "main", + "repo": "NixOS-WSL", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1751792365, + "narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1fd8bada0b6117e6c7eb54aad5813023eed37ccb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1753429684, + "narHash": "sha256-9h7+4/53cSfQ/uA3pSvCaBepmZaz/dLlLVJnbQ+SJjk=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "7fd36ee82c0275fb545775cc5e4d30542899511d", + "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": { - "nixpkgs": "nixpkgs" + "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": 1753541826, + "narHash": "sha256-foGgZu8+bCNIGeuDqQ84jNbmKZpd+JvnrL2WlyU4tuU=", + "owner": "nix-community", + "repo": "nixos-vscode-server", + "rev": "6d5f074e4811d143d44169ba4af09b20ddb6937d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixos-vscode-server", + "type": "github" } } }, diff --git a/nixos/flake.nix b/nixos/flake.nix index 707c8ac..c75fe80 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -1,18 +1,51 @@ - { - inputs.nixpkgs.url = "github:nixos/nixpkgs"; + 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 = { + + wsl = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + nixos-wsl.nixosModules.default + vscode-server.nixosModules.default + ./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 = [ + vscode-server.nixosModules.default + ./hosts/macbookair.nix # previously configuration.nix + ./hardware-configuration.nix + ./tmux.nix + ./neovim.nix + ./fish.nix + # home-manager.nixosModules.default + # ./configuration.nix # shouldn't this be necessary??? + # ./uxplay.nix + ]; + }; - outputs = { self, nixpkgs }: { - nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./configuration.nix - ./hardware-configuration.nix - # ./uxplay.nix - ./fish.nix - ./neovim.nix - ]; }; }; } - diff --git a/nixos/hosts/macbookair.nix b/nixos/hosts/macbookair.nix new file mode 100644 index 0000000..da11377 --- /dev/null +++ b/nixos/hosts/macbookair.nix @@ -0,0 +1,189 @@ +# 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’). + +{ config, pkgs, ... }: + +{ + # 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. + # NOTE: You can not use networking.networkmanager with networking.wireless + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; # for vscode remote server + + # 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.displayManager.sddm.enable = true; + services.xserver.desktopManager.plasma5.enable = true; + + # Configure keymap in X11 + services.xserver = { + xkb.layout = "us"; + xkb.variant = ""; + }; + + programs.nix-ld.enable = true; + # TODO: move to home manager (?) + programs = { + direnv = { + enable = true; + enableFishIntegration = true; + nix-direnv.enable = true; + }; + }; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Enable sound with pipewire. + services.pulseaudio.enable = false; + hardware.alsa.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" ]; + # TODO: use home manager to define user packages + packages = with pkgs; [ + vlc # video player + kate # editor + ripgrep # faster grep + nextcloud-client # private cloud + # thunderbird # bloat + ]; + }; + + # Install firefox. + programs.firefox.enable = true; + + # install kde partition manager + programs.partition-manager.enable = true; + + # TODO: install gnome disk manager + # programs.gnome-disks.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; [ + + # tmux # activated in tmux.nix + # vim # using neovim in stead + # neovim # activated in neovim.nix + + git # version control + gh # github cli tool + + ripgrep # faster grep + 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) + xclip # terminal clipboard integration (i.e. allow terminal to r/w clipboard) + + neofetch # system info + btop # resource monitor + wget # downloader + tldr # community driven manpage alternative + + ntfs3g # mount NTFS drives on linux + gptfdisk # formatting drives - like fdisk but better + # this stuff runs gparted + + # gimp # bloat image editing + # blender # bloat 3D modelling + # inkscape # bloat vecor graphics / drawing + # kdenlive # bloat video editor + + # desktop applications + thunderbird # email / calendar + telegram-desktop # instant messager + + cowsay + lolcat + + ]; + + # 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; + + # 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? + +} diff --git a/nixos/readme.md b/nixos/readme.md index 2ec2f5a..e19093b 100644 --- a/nixos/readme.md +++ b/nixos/readme.md @@ -1,7 +1,7 @@ Rebuild nixos and points to dotfiles dir: ``` -sudo nixos-rebuild switch --flake ~/dotfiles/nixos#macbook +sudo nixos-rebuild switch --flake ~/dotfiles/nixos#macbookair # or sudo nixos-rebuild switch --flake ~/dotfiles/nixos#wsl ``` From 1568654f0d7f3423fda05039bdf770de1b4ad63c Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 17 Aug 2025 20:40:54 +0200 Subject: [PATCH 48/64] feat: bump Plasma 6, add bad Wi-Fi, tweak packages :pushpin: --- nixos/hosts/macbookair.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/nixos/hosts/macbookair.nix b/nixos/hosts/macbookair.nix index da11377..4e8212e 100644 --- a/nixos/hosts/macbookair.nix +++ b/nixos/hosts/macbookair.nix @@ -46,7 +46,7 @@ # Enable the KDE Plasma Desktop Environment. services.displayManager.sddm.enable = true; - services.xserver.desktopManager.plasma5.enable = true; + services.desktopManager.plasma6.enable = true; # Configure keymap in X11 services.xserver = { @@ -95,9 +95,10 @@ # TODO: use home manager to define user packages packages = with pkgs; [ vlc # video player - kate # editor + # kate # editor ripgrep # faster grep nextcloud-client # private cloud + # digikam # photo / video management # thunderbird # bloat ]; }; @@ -113,6 +114,11 @@ # Allow unfree packages nixpkgs.config.allowUnfree = true; + nixpkgs.config.permittedInsecurePackages = [ + "broadcom-sta-6.30.223.271-57-6.12.40" + ]; + + boot.kernelModules = [ "wl" ]; # List packages installed in system profile. To search, run: # $ nix search wget @@ -142,8 +148,8 @@ # gimp # bloat image editing # blender # bloat 3D modelling - # inkscape # bloat vecor graphics / drawing - # kdenlive # bloat video editor + # inkscape # bloat vector graphics / drawing + kdePackages.kdenlive # bloat video editor # desktop applications thunderbird # email / calendar From 8942cdc3bcdaa764c763014c7f09e7308ae72202 Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Fri, 5 Sep 2025 11:12:53 +0200 Subject: [PATCH 49/64] feat: duplidate wsl nix (without wsl-specifics) :sparkles: --- nixos/hosts/macbook.nix | 90 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 nixos/hosts/macbook.nix diff --git a/nixos/hosts/macbook.nix b/nixos/hosts/macbook.nix new file mode 100644 index 0000000..df3f80e --- /dev/null +++ b/nixos/hosts/macbook.nix @@ -0,0 +1,90 @@ +# Edit this configuration file to define what should be installed on +# 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`). + +# NixOS-WSL specific options are documented on the NixOS-WSL repository: +# https://github.com/nix-community/NixOS-WSL + +{ config, lib, pkgs, ... }: + +{ + 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 (?) + 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 = "25.05"; # Did you read the comment? + + users.users.danny = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + 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 + # neovim # activated in neovim.nix + + # disabled git as it comes pre-installed on macos - delete or re-enable? + # 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 + tldr # community alternative to man + fzf # fuzzy finder + + # gimp # bloat + # blender # bloat + # inkscape # bloat + + cowsay + 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; + # }; +} From 44070bb012a3e91acad8e963e4cc912e835d6c3f Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Fri, 5 Sep 2025 11:14:07 +0200 Subject: [PATCH 50/64] chore: rename macbook.nix to macos.nix :truck: --- nixos/hosts/{macbook.nix => macos.nix} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename nixos/hosts/{macbook.nix => macos.nix} (100%) diff --git a/nixos/hosts/macbook.nix b/nixos/hosts/macos.nix similarity index 100% rename from nixos/hosts/macbook.nix rename to nixos/hosts/macos.nix From 6eb2da277fbaf3079ce1f00f8a2a40cb591c511a Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Fri, 5 Sep 2025 11:35:43 +0200 Subject: [PATCH 51/64] feat(flake): add nix-darwin config for macOS :apple: --- nixos/flake.nix | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/nixos/flake.nix b/nixos/flake.nix index c75fe80..af81dd2 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -3,6 +3,12 @@ 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"; + + # nix-darwin for macOS + # (follows nixpkgs so both use the same channel) + nix-darwin.url = "github:nix-darwin/nix-darwin/master"; + nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; + # for later # home-manager.url = "github:nix-community/home-manager"; # home-manager.inputs.nixpkgs.follows = "nixpkgs"; @@ -12,18 +18,18 @@ nixpkgs, nixos-wsl, vscode-server, + nix-darwin, self, # home-manager, ... }: { nixosConfigurations = { - wsl = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ nixos-wsl.nixosModules.default vscode-server.nixosModules.default - ./hosts/wsl.nix # previously configuration.nix + ./hosts/wsl.nix ./tmux.nix ./neovim.nix ./fish.nix @@ -35,17 +41,27 @@ system = "x86_64-linux"; modules = [ vscode-server.nixosModules.default - ./hosts/macbookair.nix # previously configuration.nix + ./hosts/macbookair.nix ./hardware-configuration.nix ./tmux.nix ./neovim.nix ./fish.nix # home-manager.nixosModules.default - # ./configuration.nix # shouldn't this be necessary??? + # ./configuration.nix # ./uxplay.nix ]; }; + }; + # macOS (nix-darwin) configuration + darwinConfigurations."Daniel-Macbook-Air" = nix-darwin.lib.darwinSystem { + modules = [ + # Ensure Apple Silicon platform + { nixpkgs.hostPlatform = "aarch64-darwin"; } + + # Your macOS module (you created it under nixos/hosts/macos.nix) + ./nixos/hosts/macos.nix + ]; }; }; } From dfd4a10c1ae986b3609ba28f7eabd13b79f06615 Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Fri, 5 Sep 2025 11:44:11 +0200 Subject: [PATCH 52/64] fix: macos.nix :bug: --- nixos/hosts/macos.nix | 126 +++++++++++++++++------------------------- 1 file changed, 52 insertions(+), 74 deletions(-) diff --git a/nixos/hosts/macos.nix b/nixos/hosts/macos.nix index df3f80e..2268f0d 100644 --- a/nixos/hosts/macos.nix +++ b/nixos/hosts/macos.nix @@ -1,90 +1,68 @@ -# Edit this configuration file to define what should be installed on -# 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`). - -# NixOS-WSL specific options are documented on the NixOS-WSL repository: -# https://github.com/nix-community/NixOS-WSL - { config, lib, pkgs, ... }: { - 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" ]; - }; + # Apple Silicon + nix-darwin basics + nixpkgs.hostPlatform = "aarch64-darwin"; + services.nix-daemon.enable = true; nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - programs.nix-ld.enable = true; - # 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 = "25.05"; # Did you read the comment? - - users.users.danny = { - isNormalUser = true; - extraGroups = [ "wheel" ]; - initialPassword = "test"; - }; - nixpkgs.config.allowUnfree = true; + + # Shells & dev ergonomics + programs.fish.enable = true; + environment.shells = [ pkgs.fish ]; + # If you want fish as default shell, uncomment: + # users.defaultUserShell = pkgs.fish; + + programs.direnv.enable = true; + programs.direnv.nix-direnv.enable = true; + + # Networking (macOS-safe) + networking = { + # Set if you want a specific hostname in macOS UI as well: + hostName = "Daniel-Macbook-Air"; + knownNetworkServices = [ "Wi-Fi" "Thunderbolt Bridge" ]; + dns = [ + "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" + ]; + }; + + # macOS niceties + security.pam.enableSudoTouchIdAuth = true; + + system.defaults = { + # Keyboard + NSGlobalDomain = { + ApplePressAndHoldEnabled = false; + InitialKeyRepeat = 15; + KeyRepeat = 2; + }; + + # Finder & Dock + finder.AppleShowAllExtensions = true; + dock.autohide = true; + dock.mru-spaces = false; + }; + + # Environment environment.variables = { DBT_USER = "DNTH"; }; environment.systemPackages = with pkgs; [ - # tmux # activated in tmux.nix - # vim # using neovim in stead - # neovim # activated in neovim.nix - - # disabled git as it comes pre-installed on macos - delete or re-enable? - # 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 - tldr # community alternative to man - fzf # fuzzy finder - - # gimp # bloat - # blender # bloat - # inkscape # bloat - + gh + ripgrep + wget + busybox + openssl + neofetch + btop + tldr + fzf cowsay 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; - # }; + # Keep for darwin as well (tracks defaults across upgrades) + system.stateVersion = "25.05"; } From 8007a8dfd3a468b242f31363710bd266d177b0f5 Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Mon, 8 Sep 2025 13:34:43 +0200 Subject: [PATCH 53/64] chore: move hostPlatform to macos.nix + doc: todo :truck::memo: --- nixos/flake.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nixos/flake.nix b/nixos/flake.nix index af81dd2..f293839 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -56,11 +56,8 @@ # macOS (nix-darwin) configuration darwinConfigurations."Daniel-Macbook-Air" = nix-darwin.lib.darwinSystem { modules = [ - # Ensure Apple Silicon platform - { nixpkgs.hostPlatform = "aarch64-darwin"; } - - # Your macOS module (you created it under nixos/hosts/macos.nix) ./nixos/hosts/macos.nix + # TODO: add tmux.nix, neovim.nix, fish.nix ]; }; }; From e5a7512a98a0d589b25f8620623ec87d5e205f99 Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Mon, 8 Sep 2025 13:40:09 +0200 Subject: [PATCH 54/64] feat(macos): improve nix-darwin config for stability and ergonomics :zap: --- nixos/hosts/macos.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/nixos/hosts/macos.nix b/nixos/hosts/macos.nix index 2268f0d..5431a8f 100644 --- a/nixos/hosts/macos.nix +++ b/nixos/hosts/macos.nix @@ -5,7 +5,17 @@ nixpkgs.hostPlatform = "aarch64-darwin"; services.nix-daemon.enable = true; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix = { + settings = { + experimental-features = [ "nix-command" "flakes" ]; + auto-optimise-store = true; + }; + gc = { + automatic = true; + interval = { Weekday = 0; Hour = 3; Minute = 0; }; + }; + }; + nixpkgs.config.allowUnfree = true; # Shells & dev ergonomics @@ -22,9 +32,6 @@ # Set if you want a specific hostname in macOS UI as well: hostName = "Daniel-Macbook-Air"; knownNetworkServices = [ "Wi-Fi" "Thunderbolt Bridge" ]; - dns = [ - "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" - ]; }; # macOS niceties @@ -54,6 +61,9 @@ ripgrep wget busybox + git + gnupg + coreutils openssl neofetch btop From 5a7a8b9f5f71c8e17634e094a20921e4dc6a64a5 Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Mon, 8 Sep 2025 13:52:32 +0200 Subject: [PATCH 55/64] fix(macos): relative path :bug: --- nixos/flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/flake.nix b/nixos/flake.nix index f293839..e182dfa 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -56,7 +56,7 @@ # macOS (nix-darwin) configuration darwinConfigurations."Daniel-Macbook-Air" = nix-darwin.lib.darwinSystem { modules = [ - ./nixos/hosts/macos.nix + ./hosts/macos.nix # TODO: add tmux.nix, neovim.nix, fish.nix ]; }; From 3a6fbd2f895a97ca742e4487dcc787a58b3a4321 Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Mon, 8 Sep 2025 13:55:39 +0200 Subject: [PATCH 56/64] fix(macos): set darwin state-version to 6 :bug: --- nixos/hosts/macos.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/hosts/macos.nix b/nixos/hosts/macos.nix index 5431a8f..6321b37 100644 --- a/nixos/hosts/macos.nix +++ b/nixos/hosts/macos.nix @@ -74,5 +74,7 @@ ]; # Keep for darwin as well (tracks defaults across upgrades) - system.stateVersion = "25.05"; + # current max per nix-darwin; bump only if a release notes says so + system.stateVersion = 6; + } From 948798af4ac8c3a32e71136a943de008c610b4a3 Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Mon, 8 Sep 2025 14:52:14 +0200 Subject: [PATCH 57/64] fix(darwin): migrate to new nix-darwin options & root activation :wrench: - set `nix.enable = true`; remove deprecated `services.nix-daemon.enable` :fire: - replace unsafe `nix.settings.auto-optimise-store` with `nix.optimise.automatic` - rename Touch ID option to `security.pam.services.sudo_local.touchIdAuth` - add `system.primaryUser = "danny"` so user-scoped macOS defaults apply under root activation - keep GC schedule; retain `nixpkgs.hostPlatform = "aarch64-darwin"` - (minor) expand `environment.systemPackages` with `git`, `gnupg`, `coreutils` This adapts the config to recent nix-darwin changes and fixes evaluation failures during `darwin-rebuild`. --- nixos/hosts/macos.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nixos/hosts/macos.nix b/nixos/hosts/macos.nix index 6321b37..e09a985 100644 --- a/nixos/hosts/macos.nix +++ b/nixos/hosts/macos.nix @@ -3,20 +3,22 @@ { # Apple Silicon + nix-darwin basics nixpkgs.hostPlatform = "aarch64-darwin"; - services.nix-daemon.enable = true; + nix.enable = true; nix = { settings = { experimental-features = [ "nix-command" "flakes" ]; - auto-optimise-store = true; }; gc = { automatic = true; interval = { Weekday = 0; Hour = 3; Minute = 0; }; }; + optimise.automatic = true; # replaces auto-optimise-store }; nixpkgs.config.allowUnfree = true; + + system.primaryUser = "danny"; # Shells & dev ergonomics programs.fish.enable = true; @@ -35,7 +37,7 @@ }; # macOS niceties - security.pam.enableSudoTouchIdAuth = true; + security.pam.services.sudo_local.touchIdAuth = true; system.defaults = { # Keyboard From e2f8ab3088d2fb3ac2f1702aec07ea376c584920 Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Mon, 8 Sep 2025 14:56:38 +0200 Subject: [PATCH 58/64] fix(macos): deactivate busybox :bug: --- nixos/hosts/macos.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/hosts/macos.nix b/nixos/hosts/macos.nix index e09a985..a200f22 100644 --- a/nixos/hosts/macos.nix +++ b/nixos/hosts/macos.nix @@ -62,7 +62,7 @@ gh ripgrep wget - busybox + # busybox #TODO: doesn't run on darwin git gnupg coreutils From 0701e6b107ef601d129a687a830b9b9300a4650c Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Mon, 8 Sep 2025 15:08:59 +0200 Subject: [PATCH 59/64] fix: nix management (now managed by Determinate Systems) :bug: --- nixos/hosts/macos.nix | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/nixos/hosts/macos.nix b/nixos/hosts/macos.nix index a200f22..0d1c7a6 100644 --- a/nixos/hosts/macos.nix +++ b/nixos/hosts/macos.nix @@ -3,18 +3,7 @@ { # Apple Silicon + nix-darwin basics nixpkgs.hostPlatform = "aarch64-darwin"; - nix.enable = true; - - nix = { - settings = { - experimental-features = [ "nix-command" "flakes" ]; - }; - gc = { - automatic = true; - interval = { Weekday = 0; Hour = 3; Minute = 0; }; - }; - optimise.automatic = true; # replaces auto-optimise-store - }; + nix.enable = false; # Determinate manages Nix nixpkgs.config.allowUnfree = true; From bfb924a610c373d438c88287591411f8973f0ee4 Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Mon, 8 Sep 2025 19:14:25 +0200 Subject: [PATCH 60/64] chore: re-enable `ApplePressAndHoldEnabled` :art: --- nixos/hosts/macos.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/hosts/macos.nix b/nixos/hosts/macos.nix index 0d1c7a6..2a29fb6 100644 --- a/nixos/hosts/macos.nix +++ b/nixos/hosts/macos.nix @@ -31,9 +31,9 @@ system.defaults = { # Keyboard NSGlobalDomain = { - ApplePressAndHoldEnabled = false; - InitialKeyRepeat = 15; - KeyRepeat = 2; + ApplePressAndHoldEnabled = true; + # InitialKeyRepeat = 15; + # KeyRepeat = 2; }; # Finder & Dock From ecade3a03e3361c444802dcd88815eef5b4b98b3 Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Mon, 8 Sep 2025 19:16:17 +0200 Subject: [PATCH 61/64] feat: add tmux, fish, nix configs to macos :apple::sparkles: --- nixos/flake.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/flake.nix b/nixos/flake.nix index e182dfa..50b6fdd 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -57,7 +57,9 @@ darwinConfigurations."Daniel-Macbook-Air" = nix-darwin.lib.darwinSystem { modules = [ ./hosts/macos.nix - # TODO: add tmux.nix, neovim.nix, fish.nix + ./tmux.nix + ./neovim.nix + ./fish.nix ]; }; }; From b7f63f305d22cb53eacd0f0e7a94387a609a44a7 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 8 Sep 2025 19:46:49 +0200 Subject: [PATCH 62/64] =?UTF-8?q?fix(neovim):=20guard=20NixOS=20module=20t?= =?UTF-8?q?o=20Linux=20for=20nix-darwin=20compatibility=20=F0=9F=94=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - wrap Neovim module in `lib.mkIf pkgs.stdenv.isLinux` (no-op on macOS) - add `lib` to module args - fix Lua message var: use `config_file` instead of undefined `file` - keep existing plugins and customRC on Linux unchanged --- nixos/hosts/macos.nix | 1 + nixos/neovim.nix | 141 +++++++++++++++++++++--------------------- 2 files changed, 73 insertions(+), 69 deletions(-) diff --git a/nixos/hosts/macos.nix b/nixos/hosts/macos.nix index 2a29fb6..f18411a 100644 --- a/nixos/hosts/macos.nix +++ b/nixos/hosts/macos.nix @@ -62,6 +62,7 @@ fzf cowsay lolcat + neovim ]; # Keep for darwin as well (tracks defaults across upgrades) diff --git a/nixos/neovim.nix b/nixos/neovim.nix index ed64a44..3d2b294 100644 --- a/nixos/neovim.nix +++ b/nixos/neovim.nix @@ -1,82 +1,85 @@ -{ config, pkgs, ... }: +{ lib, config, pkgs, ... }: { - programs.neovim = { - enable = true; - defaultEditor = true; - configure = { - customRC = '' - set title - set go=a - set mouse=a - set nohlsearch - set number - let mapleader="," + # Only apply the Neovim NixOS module options on Linux. + config = lib.mkIf pkgs.stdenv.isLinux { + programs.neovim = { + enable = true; + defaultEditor = true; - lua << EOF - 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 + configure = { + customRC = '' + set title + set go=a + set mouse=a + set nohlsearch + set number + let mapleader="," - colorscheme catppuccin " catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha + lua << EOF + 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() + 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:', config_file) + end + else + print('warning: nvim color scheme not found') + print(' expected path:', config_file) + end + EOF - " 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 + colorscheme catppuccin " catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha - set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:» - set clipboard+=unnamedplus + " 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 - " Replace-all is aliased to S. - nnoremap S :%s//g + set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:» + set clipboard+=unnamedplus - " save file with ,w - map w :w + " 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-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 - fzf-vim # fuzzy finder through vim - nerdtree # file structure inside nvim - rainbow # color parenthesis - # gruvbox-nvim # theme - catppuccin-nvim # theme - goyo-vim # write prose - limelight-vim # prose paragraph highlighter - ]; - opt = []; + " save file with ,w + map w :w + + " 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-gitgutter # git diff in sign column + # vim-airline # nice and light status bar (disabled for tmux) + # coc-nvim coc-* plugins (disabled for now) + vim-nix # nix highlight + vimtex # latex stuff + fzf-vim # fuzzy finder through vim + nerdtree # file structure inside nvim + rainbow # color parenthesis + # gruvbox-nvim # theme + catppuccin-nvim # theme + goyo-vim # write prose + limelight-vim # prose paragraph highlighter + ]; + opt = []; + }; }; }; }; } - From 7544e12117bd6a1133504acbbc3acf5bb858c92f Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 8 Sep 2025 20:41:49 +0200 Subject: [PATCH 63/64] chore: revert neovim changes, remove tmux + fish from nix-darwin :hammer: --- nixos/flake.lock | 22 ++++++++ nixos/flake.nix | 6 +- nixos/neovim.nix | 140 +++++++++++++++++++++++------------------------ 3 files changed, 94 insertions(+), 74 deletions(-) diff --git a/nixos/flake.lock b/nixos/flake.lock index 5c4b68b..78b1c2a 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -34,6 +34,27 @@ "type": "github" } }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1757130842, + "narHash": "sha256-4i7KKuXesSZGUv0cLPLfxbmF1S72Gf/3aSypgvVkwuA=", + "owner": "nix-darwin", + "repo": "nix-darwin", + "rev": "15f067638e2887c58c4b6ba1bdb65a0b61dc58c5", + "type": "github" + }, + "original": { + "owner": "nix-darwin", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, "nixos-wsl": { "inputs": { "flake-compat": "flake-compat", @@ -102,6 +123,7 @@ }, "root": { "inputs": { + "nix-darwin": "nix-darwin", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs_2", "vscode-server": "vscode-server" diff --git a/nixos/flake.nix b/nixos/flake.nix index 50b6fdd..5020174 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -57,8 +57,10 @@ darwinConfigurations."Daniel-Macbook-Air" = nix-darwin.lib.darwinSystem { modules = [ ./hosts/macos.nix - ./tmux.nix - ./neovim.nix + # TODO: nix-darwin lacks tmux options; move to Home Manager.x + # ./tmux.nix + # TODO: add neovim via homemanager, that should work the same for NixOS as Nix-Darwin + # ./neovim.nix # NOTE: Option only exists on NixOS. ./fish.nix ]; }; diff --git a/nixos/neovim.nix b/nixos/neovim.nix index 3d2b294..6fc589b 100644 --- a/nixos/neovim.nix +++ b/nixos/neovim.nix @@ -1,84 +1,80 @@ -{ lib, config, pkgs, ... }: +{ config, pkgs, ... }: { - # Only apply the Neovim NixOS module options on Linux. - config = lib.mkIf pkgs.stdenv.isLinux { - programs.neovim = { - enable = true; - defaultEditor = true; + programs.neovim = { + enable = true; + defaultEditor = true; + configure = { + customRC = '' + set title + set go=a + set mouse=a + set nohlsearch + set number + let mapleader="," - configure = { - customRC = '' - set title - set go=a - set mouse=a - set nohlsearch - set number - let mapleader="," + lua << EOF + 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 - lua << EOF - 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() - 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:', config_file) - end - else - print('warning: nvim color scheme not found') - print(' expected path:', config_file) - end - EOF + colorscheme catppuccin " catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha - colorscheme catppuccin " catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha + " 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 - " 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 - set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:» - set clipboard+=unnamedplus + " Replace-all is aliased to S. + nnoremap S :%s//g - " Replace-all is aliased to S. - nnoremap S :%s//g + " save file with ,w + map w :w - " save file with ,w - map w :w - - " 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-gitgutter # git diff in sign column - # vim-airline # nice and light status bar (disabled for tmux) - # coc-nvim coc-* plugins (disabled for now) - vim-nix # nix highlight - vimtex # latex stuff - fzf-vim # fuzzy finder through vim - nerdtree # file structure inside nvim - rainbow # color parenthesis - # gruvbox-nvim # theme - catppuccin-nvim # theme - goyo-vim # write prose - limelight-vim # prose paragraph highlighter - ]; - opt = []; - }; + " 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-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 + fzf-vim # fuzzy finder through vim + nerdtree # file structure inside nvim + rainbow # color parenthesis + # gruvbox-nvim # theme + catppuccin-nvim # theme + goyo-vim # write prose + limelight-vim # prose paragraph highlighter + ]; + opt = []; }; }; }; From 64dff944ae28317cc6be981b7a76c9dd5caa7e89 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 8 Sep 2025 20:48:13 +0200 Subject: [PATCH 64/64] chore: nice apple configs :apple: :sparkles: --- nixos/hosts/macos.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos/hosts/macos.nix b/nixos/hosts/macos.nix index f18411a..f55869c 100644 --- a/nixos/hosts/macos.nix +++ b/nixos/hosts/macos.nix @@ -31,9 +31,11 @@ system.defaults = { # Keyboard NSGlobalDomain = { + AppleShowAllExtensions = true; ApplePressAndHoldEnabled = true; - # InitialKeyRepeat = 15; - # KeyRepeat = 2; + "com.apple.mouse.tapBehavior" = 1; + "com.apple.sound.beep.volume" = 0.0; + "com.apple.sound.beep.feedback" = 0; }; # Finder & Dock