From d0003174dc04007c1dec936c95fab9b4dbc16551 Mon Sep 17 00:00:00 2001 From: cobertos Date: Wed, 29 Jul 2026 20:03:59 -0400 Subject: [PATCH 01/11] Update readme --- README.md | 96 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 6a44c41..479db93 100644 --- a/README.md +++ b/README.md @@ -1,84 +1,98 @@ # Dot Files -systemctl --user start activitywatch.target This repo contains: -* My home-manager configuration as a nix flake * My dotfiles and various configs -* A [dockerfile](./dev.Dockerfile) that builds an isolated development container with home-manager, nix, and my dotfiles in various flavors +* Nix-flake-based home-manager configurations for installing it all (multiple flavors) +* A [Dockerfile](./dev.Dockerfile) that builds a few flavors of development containers based on the above -Are these really just dotfiles anymore...? +It's not really just dotfiles anymore but... -## Guiding Principles +### Guiding Principles * **Linking** - Symlinks over copying * **Public** - Private keys and licenses are separate. -* **Reproducible** - `home-manager` does so much heavy lifting and there's only a few manual tweaks. +* **Reproducible** - `home-manager` does 97% of the heavy lifting * **Multi-environment** - There are multiple `home-manager` profiles that can be used -## Software +## Flavors -Deep configurations for: -* [micro-editor](https://micro-editor.github.io/) (instead of Sublime Text) -* [git](https://git-scm.com/) -* bash -* [firefox](https://firefox.com) -* [fd](https://github.com/sharkdp/fd) +### `bare` -Other installed software: -* [flameshot](https://flameshot.org/) -* [ffmpeg](https://www.ffmpeg.org/) -* [activitywatch](https://activitywatch.net/) +Bare essentials for servers + +* [fd](https://github.com/sharkdp/fd) - for file searching +* [micro-editor](https://micro-editor.github.io/) + [many customizations](./nix/hm-micro-editor.nix) - for terminal IDE +* [other small, expected utilities](./bare.nix) + +### `desktop-niri` + +Main desktop, using the Niri window manager + +* [firefox](https://firefox.com) + [configuration](./nix/hm-firefox.nix) +* [niri](https://niri-wm.github.io/niri/index.html) - window manager + * + [waybar](https://github.com/alexays/waybar) - for taskbar + * + [niri_window_buttons](https://github.com/adelmonte/niri_window_buttons) - for taskbar windows _in sort order_ + * + [nirimon](https://github.com/stepbrobd/nirimon) - to configure displays + * + fuzzel - for launcher + * + swaybg - for backdrops + * + grim + slurp + satty - for screenshot editing, replaces Flameshot for me + * +* [activitywatch](https://activitywatch.net/) + watchers +* [kmonad](https://github.com/kmonad/kmonad) + [configuration](./kmonad.kbd) for custom macro pad inputs +* [sublime text](https://www.sublimetext.com/) + [packages configured through Nix](./nix/hm-sublime-text.nix) +* [other utilities](./desktop-niri.nix) + +### ~~`desktop-x11-generic`~~ +legacy, might use again, who knows + +### ~~`claude`~~ +legacy ## Usage (from a bare system) ```bash cd ~ sudo apt update && sudo apt install git -git clone https://github.com/Cobertos/dotfiles.git +git clone https://gitdab.com/cobertos/dotfiles.git cd dotfiles # Installs nix ./dev.sh -# Run home-manager (replace with one of "bare","home", etc...) +# Run home-manager (replace with one of "bare","desktop-niri", etc...) nix run home-manager/master -- switch -b backup --flake .# # Run activitywatch target if not relogging systemctl --user start activitywatch.target ``` -## Manual steps +and then there are some manual steps: + * Firefox * Install extensions -* Migrate from old computer - * Insomnia configs (all the sqlite databases in Insomnia's home directory) - * .ssh keys - * Any environment variables holding keys - * Firefox/Chrome/wherever history -* Setup filesystem favorites -### Linux specific manually -* Configure Linux Mint Desktop - * Change the theme to Dark (for Window borders, controls, and desktop) - * Change wallpapers/backgrouns to the folder that has them all in it - * Add a panel to every monitor, without grouped list applet merging and with window titles - * Change the Linux Mint start menu icon - -## TODO: Future Support +### TODO: Future Support +* Loose ends: Need to install nemo (file manager), gtk (+gtk configs) * Blender * OBS (and prefs to record into Seafile?) * Voicemeeter Banana (Linux / Ubuntu equivalent?) * Setup correct file associations (for .xml, .html, etc...) * VLC Plugins * Audacity and configurations -* Make sure that Chrome/Firefox syncs settings for refined GitHub (looks like it worked) * /etc/hosts and C:\Windows\System32\drivers\etc\hosts or wherever it is in Windows * Seafile notifications disabling? * Configure keybindings (like for flameshot) -* Add a little indicator to PS1 when dotfiles is out of date * Make `findcode` better/nicer. Can we have some sort of indexing search? * Put Userscripts for Tampermonkey in here (or maybe submodule? would be nice to use their WebDAV interface) -* Switch pip over to use the --user flag, or make it an option? Not sure what pipx needs? +* Migrate from old computer + * Insomnia configs (all the sqlite databases in Insomnia's home directory) + * .ssh keys + * Any environment variables holding keys + * Firefox/Chrome/wherever history +* Setup filesystem favorites +* Add all my wallpapers +* Make wallpapers rotate -## Historical versions of the dotfiles -* My dotfiles [when they worked using a custom Python library](https://github.com/Cobertos/dotfiles/tree/departing-python) -* My dotfiles [when they were all Ansible](https://github.com/Cobertos/dotfiles/tree/ansible) -* My dotfiles [when they were mainly Windows-based dotfiles](https://github.com/Cobertos/dotfiles/tree/windows-df-old) + +### Historical versions of the dotfiles +* [when they worked using a custom Python library](https://gitdab.com/Cobertos/dotfiles/tree/departing-python) +* [when they were all Ansible](https://gitdab.com/Cobertos/dotfiles/tree/ansible) +* [when they were mainly Windows-based dotfiles](https://gitdab.com/Cobertos/dotfiles/tree/windows-df-old) From f1bf482619e3ce4530e459c5ea06af215e9bffb0 Mon Sep 17 00:00:00 2001 From: cobertos Date: Thu, 30 Jul 2026 00:48:52 -0400 Subject: [PATCH 02/11] Add missing packages to desktop-niri.nix, move flameshot config to correct .nix --- desktop-niri.nix | 5 +++-- desktop-x11-generic.nix | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/desktop-niri.nix b/desktop-niri.nix index 0fda9f3..1502c18 100644 --- a/desktop-niri.nix +++ b/desktop-niri.nix @@ -32,6 +32,9 @@ niri ycwd # For keybind to open new terminal in the same cwd as focused one + alacritty + fuzzel + # Statusbar waybar font-awesome # for waybar @@ -67,8 +70,6 @@ home.file.".config/waybar/style.css".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/waybar/style.css"; home.file.".config/waybar/power_menu.xml".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/waybar/power_menu.xml"; - home.file.".config/flameshot/flameshot.ini".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/flameshot/flameshot.ini"; - home.file.".config/niri/config.kdl".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/niri/config.kdl"; home.file.".config/nirimon/profiles".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/nirimon/profiles"; diff --git a/desktop-x11-generic.nix b/desktop-x11-generic.nix index a5cd4d9..b71aa55 100644 --- a/desktop-x11-generic.nix +++ b/desktop-x11-generic.nix @@ -22,4 +22,6 @@ aw-watcher-window = {}; }; }; + + home.file.".config/flameshot/flameshot.ini".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/flameshot/flameshot.ini"; } From 9380afef89cee36fca41a775f501e8ad324f5bd5 Mon Sep 17 00:00:00 2001 From: cobertos Date: Thu, 30 Jul 2026 00:49:50 -0400 Subject: [PATCH 03/11] Remove unused desktop files --- desktop/krita.desktop | 12 ------------ desktop/obsidian.desktop | 11 ----------- 2 files changed, 23 deletions(-) delete mode 100644 desktop/krita.desktop delete mode 100644 desktop/obsidian.desktop diff --git a/desktop/krita.desktop b/desktop/krita.desktop deleted file mode 100644 index 89082e8..0000000 --- a/desktop/krita.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Name=Krita -Icon=krita -Exec=/home/cobertos/bin/krita-5.1.5-x86_64.appimage %F -StartupNotify=true -Terminal=false -Type=Application -StartupWMClass=krita -X-AppImage-Version=5.1.5 -Comment=Digital Painting -Categories=Qt;KDE;Office;Graphics; -MimeType=application/x-krita;image/openraster;application/x-krita-paintoppreset; diff --git a/desktop/obsidian.desktop b/desktop/obsidian.desktop deleted file mode 100644 index 1a30546..0000000 --- a/desktop/obsidian.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Name=Obsidian -Icon=obsidian -Exec=/home/cobertos/bin/Obsidian-1.4.16.AppImage %u -Terminal=false -Type=Application -StartupWMClass=obsidian -X-AppImage-Version=1.4.16 -Comment=Obsidian -Categories=Office; -MimeType=text/html;x-scheme-handler/obsidian; \ No newline at end of file From 4e02ed1a50c800342b5e27e27c1e016c24914b51 Mon Sep 17 00:00:00 2001 From: cobertos Date: Thu, 30 Jul 2026 00:51:44 -0400 Subject: [PATCH 04/11] Move git config into .config --- {git => .config/git}/.gitignore | 0 bare.nix | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename {git => .config/git}/.gitignore (100%) diff --git a/git/.gitignore b/.config/git/.gitignore similarity index 100% rename from git/.gitignore rename to .config/git/.gitignore diff --git a/bare.nix b/bare.nix index 56017af..70137ea 100644 --- a/bare.nix +++ b/bare.nix @@ -78,7 +78,7 @@ settings = { user.name = identity.git.name; user.email = identity.git.email; - core.excludesfile = "${dotfilesPath}/.gitignore"; + core.excludesfile = "${dotfilesPath}/.config/git/.gitignore"; core.editor = "micro"; init.defaultBranch = identity.git.defaultBranch; }; From afcfa9974eebef8facdb00f60802dc34840a7be3 Mon Sep 17 00:00:00 2001 From: cobertos Date: Thu, 30 Jul 2026 00:55:46 -0400 Subject: [PATCH 05/11] Fix up ignores --- .dockerignore | 5 +---- .gitignore | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.dockerignore b/.dockerignore index 0908068..e594e68 100644 --- a/.dockerignore +++ b/.dockerignore @@ -16,9 +16,6 @@ Package Control.cache/ Package Control.ca-certs/ # Other old shit -bepis-old-fix.sh -.gitconfig # We use nix now..., but old systems still need the symlink, so just dont put in the container -desktop/ krita/ # Anything else with ignore. prefix in the name @@ -37,4 +34,4 @@ README.md # Ignore things that docker will have to fill itself when building (and dont # come by default) -username.nix +config.nix diff --git a/.gitignore b/.gitignore index c904007..12144e2 100644 --- a/.gitignore +++ b/.gitignore @@ -15,8 +15,5 @@ Package Control.user-ca-bundle Package Control.cache/ Package Control.ca-certs/ -# Other old shit -bepis-old-fix.sh - # Anything else with ignore. prefix in the name -ignore.* \ No newline at end of file +ignore.* From 0930a00e2b5618d56a50fa72196ec123629090ed Mon Sep 17 00:00:00 2001 From: cobertos Date: Thu, 30 Jul 2026 03:52:30 -0400 Subject: [PATCH 06/11] Fix needing nixGL on non-NixOS, add niri.service systemd service WITH PATH environment --- desktop-niri.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/desktop-niri.nix b/desktop-niri.nix index 1502c18..c534d32 100644 --- a/desktop-niri.nix +++ b/desktop-niri.nix @@ -66,12 +66,28 @@ #dejavu_fonts ]; + # TODO: Document this + targets.genericLinux.enable = true; + + home.file.".config/waybar/config.jsonc".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/waybar/config.jsonc"; home.file.".config/waybar/style.css".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/waybar/style.css"; home.file.".config/waybar/power_menu.xml".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/waybar/power_menu.xml"; home.file.".config/niri/config.kdl".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/niri/config.kdl"; + # Register with systemd + #systemd.user.enable = true; + #systemd.user.packages = [ pkgs.niri ]; + systemd.user.services.niri.Service = { + ExecStart = "${pkgs.niri}/bin/niri --session"; + Type = "notify"; + Environment = [ + ''PATH=/home/%u/.nix-profile/bin:/usr/local/bin:/usr/bin:/bin'' + ]; + }; + + home.file.".config/nirimon/profiles".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/nirimon/profiles"; services.activitywatch = { From 9ea5fba614ee672498bf34921ee7b96afbad1f4c Mon Sep 17 00:00:00 2001 From: cobertos Date: Thu, 30 Jul 2026 03:52:36 -0400 Subject: [PATCH 07/11] Update ignore files --- .dockerignore | 2 ++ .gitignore | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.dockerignore b/.dockerignore index e594e68..107f9f1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -15,6 +15,8 @@ Package Control.user-ca-bundle Package Control.cache/ Package Control.ca-certs/ +nix-installer + # Other old shit krita/ diff --git a/.gitignore b/.gitignore index 12144e2..f052e79 100644 --- a/.gitignore +++ b/.gitignore @@ -15,5 +15,7 @@ Package Control.user-ca-bundle Package Control.cache/ Package Control.ca-certs/ +nix-installer + # Anything else with ignore. prefix in the name ignore.* From 7cc03ed9b0c10ae38adcbd926d5a08d7957ffb51 Mon Sep 17 00:00:00 2001 From: cobertos Date: Thu, 30 Jul 2026 04:00:34 -0400 Subject: [PATCH 08/11] Note activity watch extension for FF --- nix/hm-firefox.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/hm-firefox.nix b/nix/hm-firefox.nix index 6b6e5a3..5b5da07 100644 --- a/nix/hm-firefox.nix +++ b/nix/hm-firefox.nix @@ -44,6 +44,7 @@ # return youtube dislike # facebook container # firefox multi account containers (MAC) + # activity watch # # # deferred on these ones for now: From bea755598830b6e1015b2202653dc234bb0c7d06 Mon Sep 17 00:00:00 2001 From: cobertos Date: Thu, 30 Jul 2026 04:03:59 -0400 Subject: [PATCH 09/11] Add waybar to niri startup --- .config/niri/config.kdl | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/niri/config.kdl b/.config/niri/config.kdl index a8b6db2..ed175a9 100644 --- a/.config/niri/config.kdl +++ b/.config/niri/config.kdl @@ -2,6 +2,7 @@ // https://niri-wm.github.io/niri/Configuration:-Introduction spawn-at-startup "swaybg --image ./wallpapers/3_hypno_chimmie_firefly_videorelaxant6025.png" +spawn-at-startup "waybar" input { keyboard { From df658a300555ccb045d40bb2add504aaff76a55a Mon Sep 17 00:00:00 2001 From: cobertos Date: Thu, 30 Jul 2026 04:28:51 -0400 Subject: [PATCH 10/11] Fix nix not on niri-session PATH; add gtk theming --- .config/niri/config.kdl | 3 ++- desktop-niri.nix | 25 ++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.config/niri/config.kdl b/.config/niri/config.kdl index ed175a9..f7cce16 100644 --- a/.config/niri/config.kdl +++ b/.config/niri/config.kdl @@ -1,7 +1,8 @@ // Check the wiki for a full description of the configuration: // https://niri-wm.github.io/niri/Configuration:-Introduction -spawn-at-startup "swaybg --image ./wallpapers/3_hypno_chimmie_firefly_videorelaxant6025.png" +// TODO: Fix hardcoded path +spawn-at-startup "swaybg --image /home/cobertos/dotfiles/.config/niri/wallpapers/3_hypno_chimmie_firefly_videorelaxant6025.png" spawn-at-startup "waybar" input { diff --git a/desktop-niri.nix b/desktop-niri.nix index c534d32..4da2695 100644 --- a/desktop-niri.nix +++ b/desktop-niri.nix @@ -76,6 +76,29 @@ home.file.".config/niri/config.kdl".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/niri/config.kdl"; + # enable gtk + gtk = { + enable = true; + colorScheme = "dark"; + theme = { + name = "Mint-X-Dark"; + package = pkgs.mint-themes; + }; + iconTheme = { + name = "Adwaita"; + package = pkgs.adwaita-icon-theme; + }; + font = { + name = "DejaVu Sans"; + package = pkgs.dejavu_fonts; + size = 9; + }; + # cursorTheme = { + # name = "Vanilla-DMZ"; + # package = pkgs.vanilla-dmz; + # }; + }; + # Register with systemd #systemd.user.enable = true; #systemd.user.packages = [ pkgs.niri ]; @@ -83,7 +106,7 @@ ExecStart = "${pkgs.niri}/bin/niri --session"; Type = "notify"; Environment = [ - ''PATH=/home/%u/.nix-profile/bin:/usr/local/bin:/usr/bin:/bin'' + ''PATH=/home/%u/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/bin'' ]; }; From d74afee854642961d7187250b354acdedf4fe665 Mon Sep 17 00:00:00 2001 From: cobertos Date: Thu, 30 Jul 2026 04:37:07 -0400 Subject: [PATCH 11/11] Document activitywatch a bit --- desktop-niri.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/desktop-niri.nix b/desktop-niri.nix index 4da2695..d0474df 100644 --- a/desktop-niri.nix +++ b/desktop-niri.nix @@ -116,8 +116,12 @@ services.activitywatch = { enable = true; watchers = { - #aw-watcher-afk = {}; - #aw-watcher-window = {}; + # Only work on X11 + # aw-watcher-window = {}; + # aw-watcher-afk = {}; + # This one adds an afk watcher too! But it has issues if Wayland is inhibited from + # being idle (which happens if you leave music running and walk away, but I rarely do + # this) aw-watcher-window-wayland = { package = pkgs.aw-watcher-window-wayland; };