From a0e3d792a979bc736cd58920cdbf932293bbe11f Mon Sep 17 00:00:00 2001 From: Dennis Date: Tue, 3 Mar 2026 10:46:08 +0100 Subject: [PATCH 01/77] move to backup --- AGENTS.md => bak/AGENTS.md | 0 Justfile => bak/Justfile | 0 README.md => bak/README.md | 0 flake.lock => bak/flake.lock | 0 bak/flake.nix | 109 ++++++++++++++++++ {home => bak/home}/darwin-work.nix | 0 {home => bak/home}/darwin.nix | 0 {home => bak/home}/deck.nix | 0 {home => bak/home}/linux.nix | 0 {home => bak/home}/server.nix | 0 {hosts => bak/hosts}/dnsc-air/default.nix | 0 {hosts => bak/hosts}/dnsc-machine/default.nix | 0 .../dnsc-machine/hardware-configuration.nix | 0 {hosts => bak/hosts}/dnsc-server/default.nix | 0 .../dnsc-server/hardware-configuration.nix | 0 {hosts => bak/hosts}/dnsc-vps-sm/default.nix | 0 .../dnsc-vps-sm/hardware-configuration.nix | 0 .../hosts}/dnsc-vps-sm/networking.nix | 0 {hosts => bak/hosts}/dnsc-work/default.nix | 0 .../modules}/actual-server/default.nix | 0 .../modules}/aerospace/default.nix | 0 {modules => bak/modules}/atuin/default.nix | 0 {modules => bak/modules}/backrest/default.nix | 0 {modules => bak/modules}/base/default.nix | 0 {modules => bak/modules}/bash/bin/ff.sh | 0 {modules => bak/modules}/bash/default.nix | 0 {modules => bak/modules}/cockpit/default.nix | 0 {modules => bak/modules}/direnv/default.nix | 0 {modules => bak/modules}/docker/default.nix | 0 {modules => bak/modules}/firefox/default.nix | 0 {modules => bak/modules}/fish/default.nix | 0 {modules => bak/modules}/fish/ff.bash | 0 {modules => bak/modules}/ghostty/default.nix | 0 {modules => bak/modules}/ghostty/linux.nix | 0 {modules => bak/modules}/git/default.nix | 0 {modules => bak/modules}/glance/default.nix | 0 {modules => bak/modules}/homebrew/default.nix | 0 {modules => bak/modules}/homepage/default.nix | 0 {modules => bak/modules}/immich/default.nix | 0 {modules => bak/modules}/jellyfin/default.nix | 0 {modules => bak/modules}/keyd/default.nix | 0 {modules => bak/modules}/lazygit/default.nix | 0 .../modules}/librewolf/default.nix | 0 {modules => bak/modules}/macos/default.nix | 0 {modules => bak/modules}/nixvim/ai.nix | 0 .../modules}/nixvim/colorscheme.nix | 0 .../modules}/nixvim/completion.nix | 0 {modules => bak/modules}/nixvim/default.nix | 0 {modules => bak/modules}/nixvim/editing.nix | 0 .../modules}/nixvim/extraFiles/palette.lua | 0 .../modules}/nixvim/extraFiles/winterly.lua | 0 {modules => bak/modules}/nixvim/formatter.nix | 0 {modules => bak/modules}/nixvim/git.nix | 0 .../modules}/nixvim/keybindings.nix | 0 {modules => bak/modules}/nixvim/lsp.nix | 0 {modules => bak/modules}/nixvim/options.nix | 0 {modules => bak/modules}/nixvim/picker.nix | 0 .../modules}/nixvim/statusline.nix | 0 .../nvim/config/after/ftplugin/markdown.vim | 0 .../nvim/config/after/ftplugin/odin.vim | 0 .../nvim/config/after/ftplugin/vimwiki.vim | 0 .../modules}/nvim/config/colors/winterly.lua | 0 .../nvim/config/ftdetect/fastlane.vim | 0 {modules => bak/modules}/nvim/config/init.lua | 0 .../modules}/nvim/config/lazy-lock.json | 0 .../modules}/nvim/config/lsp/astro.lua | 0 .../modules}/nvim/config/lsp/biome.lua | 0 .../modules}/nvim/config/lsp/eslint.lua | 0 .../modules}/nvim/config/lsp/gopls.lua | 0 .../modules}/nvim/config/lsp/jsonls.lua | 0 .../modules}/nvim/config/lsp/lua_ls.lua | 0 .../modules}/nvim/config/lsp/nil_ls.lua | 0 .../modules}/nvim/config/lsp/tailwindcss.lua | 0 .../modules}/nvim/config/lsp/ts_ls.lua | 0 .../modules}/nvim/config/lua/dnsc/keymaps.lua | 0 .../modules}/nvim/config/lua/dnsc/lazy.lua | 0 .../modules}/nvim/config/lua/dnsc/lsp.lua | 0 .../modules}/nvim/config/lua/dnsc/palette.lua | 0 .../modules}/nvim/config/lua/dnsc/utils.lua | 0 .../nvim/config/lua/plugins/blink.lua | 0 .../nvim/config/lua/plugins/codecompanion.lua | 0 .../nvim/config/lua/plugins/conform.lua | 0 .../nvim/config/lua/plugins/dispatch.lua | 0 .../nvim/config/lua/plugins/flash.lua | 0 .../nvim/config/lua/plugins/gitportal.lua | 0 .../nvim/config/lua/plugins/helpers.lua | 0 .../nvim/config/lua/plugins/lualine.lua | 0 .../nvim/config/lua/plugins/markdown.lua | 0 .../nvim/config/lua/plugins/mini.pairs.lua | 0 .../nvim/config/lua/plugins/nvim-surround.lua | 0 .../modules}/nvim/config/lua/plugins/oil.lua | 0 .../nvim/config/lua/plugins/schemastore.lua | 0 .../nvim/config/lua/plugins/snacks.lua | 0 .../nvim/config/lua/plugins/substitute.lua | 0 .../nvim/config/lua/plugins/treesitter.lua | 0 .../nvim/config/lua/plugins/which-key.lua | 0 .../modules}/nvim/config/stylua.toml | 0 {modules => bak/modules}/nvim/deck.nix | 0 {modules => bak/modules}/nvim/default.nix | 0 {modules => bak/modules}/openssh/default.nix | 0 {modules => bak/modules}/raycast/default.nix | 0 .../modules}/raycast/scripts/add-to-inbox.sh | 0 .../modules}/raycast/scripts/emacsclient.sh | 0 .../modules}/raycast/scripts/open-agenda.sh | 0 {modules => bak/modules}/restic/default.nix | 0 {modules => bak/modules}/samba/default.nix | 0 {modules => bak/modules}/ssh/default.nix | 0 {modules => bak/modules}/steam/default.nix | 0 .../modules}/syncthing/default.nix | 0 {modules => bak/modules}/tmux/default.nix | 0 {modules => bak/modules}/tmux/server.nix | 0 .../tmuxinator/personal-layouts/dnsc.yml | 0 .../tmuxinator/personal-layouts/main.yml | 0 .../personal-layouts/nix-config.yml | 0 .../tmuxinator/personal-layouts/notes.yml | 0 .../tmuxinator/personal-layouts/proglog.yml | 0 .../modules}/tmuxinator/personal.nix | 0 .../tmuxinator/work-layouts/devtools.yml | 0 .../work-layouts/k8s-admin-certification.yml | 0 .../modules}/tmuxinator/work-layouts/main.yml | 0 .../tmuxinator/work-layouts/nix-config.yml | 0 .../tmuxinator/work-layouts/notes.yml | 0 .../tmuxinator/work-layouts/ride-charts.yml | 0 .../modules}/tmuxinator/work-layouts/ride.yml | 0 {modules => bak/modules}/tmuxinator/work.nix | 0 .../modules}/ungoogled-chromium/default.nix | 0 {modules => bak/modules}/unix/audio.nix | 0 {modules => bak/modules}/unix/base.nix | 0 {modules => bak/modules}/unix/bluetooth.nix | 0 {modules => bak/modules}/unix/default.nix | 0 {modules => bak/modules}/unix/nvidia.nix | 0 {modules => bak/modules}/unix/printing.nix | 0 {modules => bak/modules}/unix/shell.nix | 0 {modules => bak/modules}/unix/tablet.nix | 0 {modules => bak/modules}/ups/default.nix | 0 .../modules}/uptime-kuma/default.nix | 0 .../modules}/vaultwarden/default.nix | 0 .../modules}/wezterm/config/appearance.lua | 0 .../modules}/wezterm/config/helpers.lua | 0 .../modules}/wezterm/config/keybindings.lua | 0 .../modules}/wezterm/config/overrides.lua | 0 .../modules}/wezterm/config/projects.lua | 0 .../modules}/wezterm/config/startup.lua | 0 .../modules}/wezterm/config/tab_bar.lua | 0 .../modules}/wezterm/config/theme.lua | 0 .../modules}/wezterm/config/wezterm.lua | 0 {modules => bak/modules}/wezterm/default.nix | 0 {modules => bak/modules}/wm/awww/default.nix | 0 .../modules}/wm/awww/scripts/random-bg.sh | 0 .../modules}/wm/cliphist/default.nix | 0 {modules => bak/modules}/wm/default.nix | 0 .../modules}/wm/fuzzel/default.nix | 0 .../wm/fuzzel/scripts/fuzzel-cliphist.sh | 0 .../wm/fuzzel/scripts/fuzzel-projects.sh | 0 .../modules}/wm/fuzzel/scripts/fuzzel-ssh.sh | 0 .../modules}/wm/ironbar/config/config.toml | 0 .../modules}/wm/ironbar/config/style.css | 0 .../modules}/wm/ironbar/default.nix | 0 {modules => bak/modules}/wm/ly/default.nix | 0 .../modules}/wm/niri-system/default.nix | 0 .../modules}/wm/niri/config/config.kdl | 0 {modules => bak/modules}/wm/niri/default.nix | 0 .../modules}/wm/noctalia/default.nix | 0 .../modules}/wm/swaync/config.json | 0 .../modules}/wm/swaync/default.nix | 0 {modules => bak/modules}/wm/swaync/style.css | 0 .../modules}/wm/waybar/config/config.jsonc | 0 .../modules}/wm/waybar/config/power_menu.xml | 0 .../modules}/wm/waybar/config/style.css | 0 .../modules}/wm/waybar/default.nix | 0 {modules => bak/modules}/zellij/config.kdl | 0 {modules => bak/modules}/zellij/default.nix | 0 {modules => bak/modules}/zen/default.nix | 0 {modules => bak/modules}/zoxide/default.nix | 0 {secrets => bak/secrets}/restic/password.age | 0 {secrets => bak/secrets}/secrets.nix | 0 {secrets => bak/secrets}/vaultwarden/env.age | Bin .../server-files}/account.sqlite | Bin flake.nix | 109 +----------------- modules/hosts/dnsc-air.nix | 0 modules/neovim/default.nix | 34 ++++++ modules/systems.nix | 7 ++ 182 files changed, 156 insertions(+), 103 deletions(-) rename AGENTS.md => bak/AGENTS.md (100%) rename Justfile => bak/Justfile (100%) rename README.md => bak/README.md (100%) rename flake.lock => bak/flake.lock (100%) create mode 100644 bak/flake.nix rename {home => bak/home}/darwin-work.nix (100%) rename {home => bak/home}/darwin.nix (100%) rename {home => bak/home}/deck.nix (100%) rename {home => bak/home}/linux.nix (100%) rename {home => bak/home}/server.nix (100%) rename {hosts => bak/hosts}/dnsc-air/default.nix (100%) rename {hosts => bak/hosts}/dnsc-machine/default.nix (100%) rename {hosts => bak/hosts}/dnsc-machine/hardware-configuration.nix (100%) rename {hosts => bak/hosts}/dnsc-server/default.nix (100%) rename {hosts => bak/hosts}/dnsc-server/hardware-configuration.nix (100%) rename {hosts => bak/hosts}/dnsc-vps-sm/default.nix (100%) rename {hosts => bak/hosts}/dnsc-vps-sm/hardware-configuration.nix (100%) rename {hosts => bak/hosts}/dnsc-vps-sm/networking.nix (100%) rename {hosts => bak/hosts}/dnsc-work/default.nix (100%) rename {modules => bak/modules}/actual-server/default.nix (100%) rename {modules => bak/modules}/aerospace/default.nix (100%) rename {modules => bak/modules}/atuin/default.nix (100%) rename {modules => bak/modules}/backrest/default.nix (100%) rename {modules => bak/modules}/base/default.nix (100%) rename {modules => bak/modules}/bash/bin/ff.sh (100%) rename {modules => bak/modules}/bash/default.nix (100%) rename {modules => bak/modules}/cockpit/default.nix (100%) rename {modules => bak/modules}/direnv/default.nix (100%) rename {modules => bak/modules}/docker/default.nix (100%) rename {modules => bak/modules}/firefox/default.nix (100%) rename {modules => bak/modules}/fish/default.nix (100%) rename {modules => bak/modules}/fish/ff.bash (100%) rename {modules => bak/modules}/ghostty/default.nix (100%) rename {modules => bak/modules}/ghostty/linux.nix (100%) rename {modules => bak/modules}/git/default.nix (100%) rename {modules => bak/modules}/glance/default.nix (100%) rename {modules => bak/modules}/homebrew/default.nix (100%) rename {modules => bak/modules}/homepage/default.nix (100%) rename {modules => bak/modules}/immich/default.nix (100%) rename {modules => bak/modules}/jellyfin/default.nix (100%) rename {modules => bak/modules}/keyd/default.nix (100%) rename {modules => bak/modules}/lazygit/default.nix (100%) rename {modules => bak/modules}/librewolf/default.nix (100%) rename {modules => bak/modules}/macos/default.nix (100%) rename {modules => bak/modules}/nixvim/ai.nix (100%) rename {modules => bak/modules}/nixvim/colorscheme.nix (100%) rename {modules => bak/modules}/nixvim/completion.nix (100%) rename {modules => bak/modules}/nixvim/default.nix (100%) rename {modules => bak/modules}/nixvim/editing.nix (100%) rename {modules => bak/modules}/nixvim/extraFiles/palette.lua (100%) rename {modules => bak/modules}/nixvim/extraFiles/winterly.lua (100%) rename {modules => bak/modules}/nixvim/formatter.nix (100%) rename {modules => bak/modules}/nixvim/git.nix (100%) rename {modules => bak/modules}/nixvim/keybindings.nix (100%) rename {modules => bak/modules}/nixvim/lsp.nix (100%) rename {modules => bak/modules}/nixvim/options.nix (100%) rename {modules => bak/modules}/nixvim/picker.nix (100%) rename {modules => bak/modules}/nixvim/statusline.nix (100%) rename {modules => bak/modules}/nvim/config/after/ftplugin/markdown.vim (100%) rename {modules => bak/modules}/nvim/config/after/ftplugin/odin.vim (100%) rename {modules => bak/modules}/nvim/config/after/ftplugin/vimwiki.vim (100%) rename {modules => bak/modules}/nvim/config/colors/winterly.lua (100%) rename {modules => bak/modules}/nvim/config/ftdetect/fastlane.vim (100%) rename {modules => bak/modules}/nvim/config/init.lua (100%) rename {modules => bak/modules}/nvim/config/lazy-lock.json (100%) rename {modules => bak/modules}/nvim/config/lsp/astro.lua (100%) rename {modules => bak/modules}/nvim/config/lsp/biome.lua (100%) rename {modules => bak/modules}/nvim/config/lsp/eslint.lua (100%) rename {modules => bak/modules}/nvim/config/lsp/gopls.lua (100%) rename {modules => bak/modules}/nvim/config/lsp/jsonls.lua (100%) rename {modules => bak/modules}/nvim/config/lsp/lua_ls.lua (100%) rename {modules => bak/modules}/nvim/config/lsp/nil_ls.lua (100%) rename {modules => bak/modules}/nvim/config/lsp/tailwindcss.lua (100%) rename {modules => bak/modules}/nvim/config/lsp/ts_ls.lua (100%) rename {modules => bak/modules}/nvim/config/lua/dnsc/keymaps.lua (100%) rename {modules => bak/modules}/nvim/config/lua/dnsc/lazy.lua (100%) rename {modules => bak/modules}/nvim/config/lua/dnsc/lsp.lua (100%) rename {modules => bak/modules}/nvim/config/lua/dnsc/palette.lua (100%) rename {modules => bak/modules}/nvim/config/lua/dnsc/utils.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/blink.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/codecompanion.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/conform.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/dispatch.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/flash.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/gitportal.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/helpers.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/lualine.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/markdown.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/mini.pairs.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/nvim-surround.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/oil.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/schemastore.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/snacks.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/substitute.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/treesitter.lua (100%) rename {modules => bak/modules}/nvim/config/lua/plugins/which-key.lua (100%) rename {modules => bak/modules}/nvim/config/stylua.toml (100%) rename {modules => bak/modules}/nvim/deck.nix (100%) rename {modules => bak/modules}/nvim/default.nix (100%) rename {modules => bak/modules}/openssh/default.nix (100%) rename {modules => bak/modules}/raycast/default.nix (100%) rename {modules => bak/modules}/raycast/scripts/add-to-inbox.sh (100%) rename {modules => bak/modules}/raycast/scripts/emacsclient.sh (100%) rename {modules => bak/modules}/raycast/scripts/open-agenda.sh (100%) rename {modules => bak/modules}/restic/default.nix (100%) rename {modules => bak/modules}/samba/default.nix (100%) rename {modules => bak/modules}/ssh/default.nix (100%) rename {modules => bak/modules}/steam/default.nix (100%) rename {modules => bak/modules}/syncthing/default.nix (100%) rename {modules => bak/modules}/tmux/default.nix (100%) rename {modules => bak/modules}/tmux/server.nix (100%) rename {modules => bak/modules}/tmuxinator/personal-layouts/dnsc.yml (100%) rename {modules => bak/modules}/tmuxinator/personal-layouts/main.yml (100%) rename {modules => bak/modules}/tmuxinator/personal-layouts/nix-config.yml (100%) rename {modules => bak/modules}/tmuxinator/personal-layouts/notes.yml (100%) rename {modules => bak/modules}/tmuxinator/personal-layouts/proglog.yml (100%) rename {modules => bak/modules}/tmuxinator/personal.nix (100%) rename {modules => bak/modules}/tmuxinator/work-layouts/devtools.yml (100%) rename {modules => bak/modules}/tmuxinator/work-layouts/k8s-admin-certification.yml (100%) rename {modules => bak/modules}/tmuxinator/work-layouts/main.yml (100%) rename {modules => bak/modules}/tmuxinator/work-layouts/nix-config.yml (100%) rename {modules => bak/modules}/tmuxinator/work-layouts/notes.yml (100%) rename {modules => bak/modules}/tmuxinator/work-layouts/ride-charts.yml (100%) rename {modules => bak/modules}/tmuxinator/work-layouts/ride.yml (100%) rename {modules => bak/modules}/tmuxinator/work.nix (100%) rename {modules => bak/modules}/ungoogled-chromium/default.nix (100%) rename {modules => bak/modules}/unix/audio.nix (100%) rename {modules => bak/modules}/unix/base.nix (100%) rename {modules => bak/modules}/unix/bluetooth.nix (100%) rename {modules => bak/modules}/unix/default.nix (100%) rename {modules => bak/modules}/unix/nvidia.nix (100%) rename {modules => bak/modules}/unix/printing.nix (100%) rename {modules => bak/modules}/unix/shell.nix (100%) rename {modules => bak/modules}/unix/tablet.nix (100%) rename {modules => bak/modules}/ups/default.nix (100%) rename {modules => bak/modules}/uptime-kuma/default.nix (100%) rename {modules => bak/modules}/vaultwarden/default.nix (100%) rename {modules => bak/modules}/wezterm/config/appearance.lua (100%) rename {modules => bak/modules}/wezterm/config/helpers.lua (100%) rename {modules => bak/modules}/wezterm/config/keybindings.lua (100%) rename {modules => bak/modules}/wezterm/config/overrides.lua (100%) rename {modules => bak/modules}/wezterm/config/projects.lua (100%) rename {modules => bak/modules}/wezterm/config/startup.lua (100%) rename {modules => bak/modules}/wezterm/config/tab_bar.lua (100%) rename {modules => bak/modules}/wezterm/config/theme.lua (100%) rename {modules => bak/modules}/wezterm/config/wezterm.lua (100%) rename {modules => bak/modules}/wezterm/default.nix (100%) rename {modules => bak/modules}/wm/awww/default.nix (100%) rename {modules => bak/modules}/wm/awww/scripts/random-bg.sh (100%) rename {modules => bak/modules}/wm/cliphist/default.nix (100%) rename {modules => bak/modules}/wm/default.nix (100%) rename {modules => bak/modules}/wm/fuzzel/default.nix (100%) rename {modules => bak/modules}/wm/fuzzel/scripts/fuzzel-cliphist.sh (100%) rename {modules => bak/modules}/wm/fuzzel/scripts/fuzzel-projects.sh (100%) rename {modules => bak/modules}/wm/fuzzel/scripts/fuzzel-ssh.sh (100%) rename {modules => bak/modules}/wm/ironbar/config/config.toml (100%) rename {modules => bak/modules}/wm/ironbar/config/style.css (100%) rename {modules => bak/modules}/wm/ironbar/default.nix (100%) rename {modules => bak/modules}/wm/ly/default.nix (100%) rename {modules => bak/modules}/wm/niri-system/default.nix (100%) rename {modules => bak/modules}/wm/niri/config/config.kdl (100%) rename {modules => bak/modules}/wm/niri/default.nix (100%) rename {modules => bak/modules}/wm/noctalia/default.nix (100%) rename {modules => bak/modules}/wm/swaync/config.json (100%) rename {modules => bak/modules}/wm/swaync/default.nix (100%) rename {modules => bak/modules}/wm/swaync/style.css (100%) rename {modules => bak/modules}/wm/waybar/config/config.jsonc (100%) rename {modules => bak/modules}/wm/waybar/config/power_menu.xml (100%) rename {modules => bak/modules}/wm/waybar/config/style.css (100%) rename {modules => bak/modules}/wm/waybar/default.nix (100%) rename {modules => bak/modules}/zellij/config.kdl (100%) rename {modules => bak/modules}/zellij/default.nix (100%) rename {modules => bak/modules}/zen/default.nix (100%) rename {modules => bak/modules}/zoxide/default.nix (100%) rename {secrets => bak/secrets}/restic/password.age (100%) rename {secrets => bak/secrets}/secrets.nix (100%) rename {secrets => bak/secrets}/vaultwarden/env.age (100%) rename {server-files => bak/server-files}/account.sqlite (100%) create mode 100644 modules/hosts/dnsc-air.nix create mode 100644 modules/neovim/default.nix create mode 100644 modules/systems.nix diff --git a/AGENTS.md b/bak/AGENTS.md similarity index 100% rename from AGENTS.md rename to bak/AGENTS.md diff --git a/Justfile b/bak/Justfile similarity index 100% rename from Justfile rename to bak/Justfile diff --git a/README.md b/bak/README.md similarity index 100% rename from README.md rename to bak/README.md diff --git a/flake.lock b/bak/flake.lock similarity index 100% rename from flake.lock rename to bak/flake.lock diff --git a/bak/flake.nix b/bak/flake.nix new file mode 100644 index 0000000..014bab0 --- /dev/null +++ b/bak/flake.nix @@ -0,0 +1,109 @@ +{ + description = "dnsc-server NixOS flake"; + + inputs = { + agenix.url = "github:ryantm/agenix"; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nix-darwin.url = "github:LnL7/nix-darwin/master"; + nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; + ip-whitelist.url = "github:Oak-Digital/nixos-ip-whitelist-firewall"; + nix-homebrew.url = "github:zhaofengli/nix-homebrew"; + zellij-switch.url = "github:mostafaqanbaryan/zellij-switch"; + zen-browser.url = "github:0xc000022070/zen-browser-flake"; + firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; + nixvim.url = "github:nix-community/nixvim"; + noctalia = { + url = "github:noctalia-dev/noctalia-shell"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = + { + self, + nixpkgs, + home-manager, + nix-darwin, + nix-homebrew, + agenix, + zellij-switch, + nixvim, + noctalia, + ... + }@inputs: + let + inherit (self) outputs; + in + { + # Custom nixosModules + nixosModules.base = import ./modules/base; + nixosModules.macos = import ./modules/macos; + nixosModules.homebrew = import ./modules/homebrew; + nixosModules.aerospace = import ./modules/aerospace; + nixosModules.keyd = import ./modules/keyd; + nixosModules.ly = import ./modules/wm/ly; + nixosModules.unix = import ./modules/unix; + nixosModules.nvidia = import ./modules/unix/nvidia.nix; + nixosModules.bluetooth = import ./modules/unix/bluetooth.nix; + nixosModules.audio = import ./modules/unix/audio.nix; + nixosModules.printing = import ./modules/unix/printing.nix; + nixosModules.tablet = import ./modules/unix/tablet.nix; + nixosModules.steam = import ./modules/steam; + nixosModules.niriSystem = import ./modules/wm/niri-system; + nixosModules.direnv = import ./modules/direnv; + + nixosConfigurations.dnsc-machine = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs outputs; }; + modules = [ + ./hosts/dnsc-machine + ]; + }; + + nixosConfigurations.dnsc-server = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs outputs; }; + modules = [ + ./hosts/dnsc-server + agenix.nixosModules.default + ]; + }; + + nixosConfigurations.dnsc-vps-sm = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs outputs; }; + modules = [ + ./hosts/dnsc-vps-sm + agenix.nixosModules.default + ]; + }; + + darwinConfigurations.dnsc-air = nix-darwin.lib.darwinSystem { + system = "aarch64-darwin"; + specialArgs = { inherit inputs outputs; }; + modules = [ + nix-homebrew.darwinModules.nix-homebrew + ./hosts/dnsc-air + ]; + }; + + darwinConfigurations.dnsc-work = nix-darwin.lib.darwinSystem { + system = "aarch64-darwin"; + specialArgs = { inherit inputs outputs; }; + modules = [ + nix-homebrew.darwinModules.nix-homebrew + ./hosts/dnsc-work + ]; + }; + + homeConfigurations."dnsc-deck" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; + modules = [ ./home/deck.nix ]; + }; + }; +} diff --git a/home/darwin-work.nix b/bak/home/darwin-work.nix similarity index 100% rename from home/darwin-work.nix rename to bak/home/darwin-work.nix diff --git a/home/darwin.nix b/bak/home/darwin.nix similarity index 100% rename from home/darwin.nix rename to bak/home/darwin.nix diff --git a/home/deck.nix b/bak/home/deck.nix similarity index 100% rename from home/deck.nix rename to bak/home/deck.nix diff --git a/home/linux.nix b/bak/home/linux.nix similarity index 100% rename from home/linux.nix rename to bak/home/linux.nix diff --git a/home/server.nix b/bak/home/server.nix similarity index 100% rename from home/server.nix rename to bak/home/server.nix diff --git a/hosts/dnsc-air/default.nix b/bak/hosts/dnsc-air/default.nix similarity index 100% rename from hosts/dnsc-air/default.nix rename to bak/hosts/dnsc-air/default.nix diff --git a/hosts/dnsc-machine/default.nix b/bak/hosts/dnsc-machine/default.nix similarity index 100% rename from hosts/dnsc-machine/default.nix rename to bak/hosts/dnsc-machine/default.nix diff --git a/hosts/dnsc-machine/hardware-configuration.nix b/bak/hosts/dnsc-machine/hardware-configuration.nix similarity index 100% rename from hosts/dnsc-machine/hardware-configuration.nix rename to bak/hosts/dnsc-machine/hardware-configuration.nix diff --git a/hosts/dnsc-server/default.nix b/bak/hosts/dnsc-server/default.nix similarity index 100% rename from hosts/dnsc-server/default.nix rename to bak/hosts/dnsc-server/default.nix diff --git a/hosts/dnsc-server/hardware-configuration.nix b/bak/hosts/dnsc-server/hardware-configuration.nix similarity index 100% rename from hosts/dnsc-server/hardware-configuration.nix rename to bak/hosts/dnsc-server/hardware-configuration.nix diff --git a/hosts/dnsc-vps-sm/default.nix b/bak/hosts/dnsc-vps-sm/default.nix similarity index 100% rename from hosts/dnsc-vps-sm/default.nix rename to bak/hosts/dnsc-vps-sm/default.nix diff --git a/hosts/dnsc-vps-sm/hardware-configuration.nix b/bak/hosts/dnsc-vps-sm/hardware-configuration.nix similarity index 100% rename from hosts/dnsc-vps-sm/hardware-configuration.nix rename to bak/hosts/dnsc-vps-sm/hardware-configuration.nix diff --git a/hosts/dnsc-vps-sm/networking.nix b/bak/hosts/dnsc-vps-sm/networking.nix similarity index 100% rename from hosts/dnsc-vps-sm/networking.nix rename to bak/hosts/dnsc-vps-sm/networking.nix diff --git a/hosts/dnsc-work/default.nix b/bak/hosts/dnsc-work/default.nix similarity index 100% rename from hosts/dnsc-work/default.nix rename to bak/hosts/dnsc-work/default.nix diff --git a/modules/actual-server/default.nix b/bak/modules/actual-server/default.nix similarity index 100% rename from modules/actual-server/default.nix rename to bak/modules/actual-server/default.nix diff --git a/modules/aerospace/default.nix b/bak/modules/aerospace/default.nix similarity index 100% rename from modules/aerospace/default.nix rename to bak/modules/aerospace/default.nix diff --git a/modules/atuin/default.nix b/bak/modules/atuin/default.nix similarity index 100% rename from modules/atuin/default.nix rename to bak/modules/atuin/default.nix diff --git a/modules/backrest/default.nix b/bak/modules/backrest/default.nix similarity index 100% rename from modules/backrest/default.nix rename to bak/modules/backrest/default.nix diff --git a/modules/base/default.nix b/bak/modules/base/default.nix similarity index 100% rename from modules/base/default.nix rename to bak/modules/base/default.nix diff --git a/modules/bash/bin/ff.sh b/bak/modules/bash/bin/ff.sh similarity index 100% rename from modules/bash/bin/ff.sh rename to bak/modules/bash/bin/ff.sh diff --git a/modules/bash/default.nix b/bak/modules/bash/default.nix similarity index 100% rename from modules/bash/default.nix rename to bak/modules/bash/default.nix diff --git a/modules/cockpit/default.nix b/bak/modules/cockpit/default.nix similarity index 100% rename from modules/cockpit/default.nix rename to bak/modules/cockpit/default.nix diff --git a/modules/direnv/default.nix b/bak/modules/direnv/default.nix similarity index 100% rename from modules/direnv/default.nix rename to bak/modules/direnv/default.nix diff --git a/modules/docker/default.nix b/bak/modules/docker/default.nix similarity index 100% rename from modules/docker/default.nix rename to bak/modules/docker/default.nix diff --git a/modules/firefox/default.nix b/bak/modules/firefox/default.nix similarity index 100% rename from modules/firefox/default.nix rename to bak/modules/firefox/default.nix diff --git a/modules/fish/default.nix b/bak/modules/fish/default.nix similarity index 100% rename from modules/fish/default.nix rename to bak/modules/fish/default.nix diff --git a/modules/fish/ff.bash b/bak/modules/fish/ff.bash similarity index 100% rename from modules/fish/ff.bash rename to bak/modules/fish/ff.bash diff --git a/modules/ghostty/default.nix b/bak/modules/ghostty/default.nix similarity index 100% rename from modules/ghostty/default.nix rename to bak/modules/ghostty/default.nix diff --git a/modules/ghostty/linux.nix b/bak/modules/ghostty/linux.nix similarity index 100% rename from modules/ghostty/linux.nix rename to bak/modules/ghostty/linux.nix diff --git a/modules/git/default.nix b/bak/modules/git/default.nix similarity index 100% rename from modules/git/default.nix rename to bak/modules/git/default.nix diff --git a/modules/glance/default.nix b/bak/modules/glance/default.nix similarity index 100% rename from modules/glance/default.nix rename to bak/modules/glance/default.nix diff --git a/modules/homebrew/default.nix b/bak/modules/homebrew/default.nix similarity index 100% rename from modules/homebrew/default.nix rename to bak/modules/homebrew/default.nix diff --git a/modules/homepage/default.nix b/bak/modules/homepage/default.nix similarity index 100% rename from modules/homepage/default.nix rename to bak/modules/homepage/default.nix diff --git a/modules/immich/default.nix b/bak/modules/immich/default.nix similarity index 100% rename from modules/immich/default.nix rename to bak/modules/immich/default.nix diff --git a/modules/jellyfin/default.nix b/bak/modules/jellyfin/default.nix similarity index 100% rename from modules/jellyfin/default.nix rename to bak/modules/jellyfin/default.nix diff --git a/modules/keyd/default.nix b/bak/modules/keyd/default.nix similarity index 100% rename from modules/keyd/default.nix rename to bak/modules/keyd/default.nix diff --git a/modules/lazygit/default.nix b/bak/modules/lazygit/default.nix similarity index 100% rename from modules/lazygit/default.nix rename to bak/modules/lazygit/default.nix diff --git a/modules/librewolf/default.nix b/bak/modules/librewolf/default.nix similarity index 100% rename from modules/librewolf/default.nix rename to bak/modules/librewolf/default.nix diff --git a/modules/macos/default.nix b/bak/modules/macos/default.nix similarity index 100% rename from modules/macos/default.nix rename to bak/modules/macos/default.nix diff --git a/modules/nixvim/ai.nix b/bak/modules/nixvim/ai.nix similarity index 100% rename from modules/nixvim/ai.nix rename to bak/modules/nixvim/ai.nix diff --git a/modules/nixvim/colorscheme.nix b/bak/modules/nixvim/colorscheme.nix similarity index 100% rename from modules/nixvim/colorscheme.nix rename to bak/modules/nixvim/colorscheme.nix diff --git a/modules/nixvim/completion.nix b/bak/modules/nixvim/completion.nix similarity index 100% rename from modules/nixvim/completion.nix rename to bak/modules/nixvim/completion.nix diff --git a/modules/nixvim/default.nix b/bak/modules/nixvim/default.nix similarity index 100% rename from modules/nixvim/default.nix rename to bak/modules/nixvim/default.nix diff --git a/modules/nixvim/editing.nix b/bak/modules/nixvim/editing.nix similarity index 100% rename from modules/nixvim/editing.nix rename to bak/modules/nixvim/editing.nix diff --git a/modules/nixvim/extraFiles/palette.lua b/bak/modules/nixvim/extraFiles/palette.lua similarity index 100% rename from modules/nixvim/extraFiles/palette.lua rename to bak/modules/nixvim/extraFiles/palette.lua diff --git a/modules/nixvim/extraFiles/winterly.lua b/bak/modules/nixvim/extraFiles/winterly.lua similarity index 100% rename from modules/nixvim/extraFiles/winterly.lua rename to bak/modules/nixvim/extraFiles/winterly.lua diff --git a/modules/nixvim/formatter.nix b/bak/modules/nixvim/formatter.nix similarity index 100% rename from modules/nixvim/formatter.nix rename to bak/modules/nixvim/formatter.nix diff --git a/modules/nixvim/git.nix b/bak/modules/nixvim/git.nix similarity index 100% rename from modules/nixvim/git.nix rename to bak/modules/nixvim/git.nix diff --git a/modules/nixvim/keybindings.nix b/bak/modules/nixvim/keybindings.nix similarity index 100% rename from modules/nixvim/keybindings.nix rename to bak/modules/nixvim/keybindings.nix diff --git a/modules/nixvim/lsp.nix b/bak/modules/nixvim/lsp.nix similarity index 100% rename from modules/nixvim/lsp.nix rename to bak/modules/nixvim/lsp.nix diff --git a/modules/nixvim/options.nix b/bak/modules/nixvim/options.nix similarity index 100% rename from modules/nixvim/options.nix rename to bak/modules/nixvim/options.nix diff --git a/modules/nixvim/picker.nix b/bak/modules/nixvim/picker.nix similarity index 100% rename from modules/nixvim/picker.nix rename to bak/modules/nixvim/picker.nix diff --git a/modules/nixvim/statusline.nix b/bak/modules/nixvim/statusline.nix similarity index 100% rename from modules/nixvim/statusline.nix rename to bak/modules/nixvim/statusline.nix diff --git a/modules/nvim/config/after/ftplugin/markdown.vim b/bak/modules/nvim/config/after/ftplugin/markdown.vim similarity index 100% rename from modules/nvim/config/after/ftplugin/markdown.vim rename to bak/modules/nvim/config/after/ftplugin/markdown.vim diff --git a/modules/nvim/config/after/ftplugin/odin.vim b/bak/modules/nvim/config/after/ftplugin/odin.vim similarity index 100% rename from modules/nvim/config/after/ftplugin/odin.vim rename to bak/modules/nvim/config/after/ftplugin/odin.vim diff --git a/modules/nvim/config/after/ftplugin/vimwiki.vim b/bak/modules/nvim/config/after/ftplugin/vimwiki.vim similarity index 100% rename from modules/nvim/config/after/ftplugin/vimwiki.vim rename to bak/modules/nvim/config/after/ftplugin/vimwiki.vim diff --git a/modules/nvim/config/colors/winterly.lua b/bak/modules/nvim/config/colors/winterly.lua similarity index 100% rename from modules/nvim/config/colors/winterly.lua rename to bak/modules/nvim/config/colors/winterly.lua diff --git a/modules/nvim/config/ftdetect/fastlane.vim b/bak/modules/nvim/config/ftdetect/fastlane.vim similarity index 100% rename from modules/nvim/config/ftdetect/fastlane.vim rename to bak/modules/nvim/config/ftdetect/fastlane.vim diff --git a/modules/nvim/config/init.lua b/bak/modules/nvim/config/init.lua similarity index 100% rename from modules/nvim/config/init.lua rename to bak/modules/nvim/config/init.lua diff --git a/modules/nvim/config/lazy-lock.json b/bak/modules/nvim/config/lazy-lock.json similarity index 100% rename from modules/nvim/config/lazy-lock.json rename to bak/modules/nvim/config/lazy-lock.json diff --git a/modules/nvim/config/lsp/astro.lua b/bak/modules/nvim/config/lsp/astro.lua similarity index 100% rename from modules/nvim/config/lsp/astro.lua rename to bak/modules/nvim/config/lsp/astro.lua diff --git a/modules/nvim/config/lsp/biome.lua b/bak/modules/nvim/config/lsp/biome.lua similarity index 100% rename from modules/nvim/config/lsp/biome.lua rename to bak/modules/nvim/config/lsp/biome.lua diff --git a/modules/nvim/config/lsp/eslint.lua b/bak/modules/nvim/config/lsp/eslint.lua similarity index 100% rename from modules/nvim/config/lsp/eslint.lua rename to bak/modules/nvim/config/lsp/eslint.lua diff --git a/modules/nvim/config/lsp/gopls.lua b/bak/modules/nvim/config/lsp/gopls.lua similarity index 100% rename from modules/nvim/config/lsp/gopls.lua rename to bak/modules/nvim/config/lsp/gopls.lua diff --git a/modules/nvim/config/lsp/jsonls.lua b/bak/modules/nvim/config/lsp/jsonls.lua similarity index 100% rename from modules/nvim/config/lsp/jsonls.lua rename to bak/modules/nvim/config/lsp/jsonls.lua diff --git a/modules/nvim/config/lsp/lua_ls.lua b/bak/modules/nvim/config/lsp/lua_ls.lua similarity index 100% rename from modules/nvim/config/lsp/lua_ls.lua rename to bak/modules/nvim/config/lsp/lua_ls.lua diff --git a/modules/nvim/config/lsp/nil_ls.lua b/bak/modules/nvim/config/lsp/nil_ls.lua similarity index 100% rename from modules/nvim/config/lsp/nil_ls.lua rename to bak/modules/nvim/config/lsp/nil_ls.lua diff --git a/modules/nvim/config/lsp/tailwindcss.lua b/bak/modules/nvim/config/lsp/tailwindcss.lua similarity index 100% rename from modules/nvim/config/lsp/tailwindcss.lua rename to bak/modules/nvim/config/lsp/tailwindcss.lua diff --git a/modules/nvim/config/lsp/ts_ls.lua b/bak/modules/nvim/config/lsp/ts_ls.lua similarity index 100% rename from modules/nvim/config/lsp/ts_ls.lua rename to bak/modules/nvim/config/lsp/ts_ls.lua diff --git a/modules/nvim/config/lua/dnsc/keymaps.lua b/bak/modules/nvim/config/lua/dnsc/keymaps.lua similarity index 100% rename from modules/nvim/config/lua/dnsc/keymaps.lua rename to bak/modules/nvim/config/lua/dnsc/keymaps.lua diff --git a/modules/nvim/config/lua/dnsc/lazy.lua b/bak/modules/nvim/config/lua/dnsc/lazy.lua similarity index 100% rename from modules/nvim/config/lua/dnsc/lazy.lua rename to bak/modules/nvim/config/lua/dnsc/lazy.lua diff --git a/modules/nvim/config/lua/dnsc/lsp.lua b/bak/modules/nvim/config/lua/dnsc/lsp.lua similarity index 100% rename from modules/nvim/config/lua/dnsc/lsp.lua rename to bak/modules/nvim/config/lua/dnsc/lsp.lua diff --git a/modules/nvim/config/lua/dnsc/palette.lua b/bak/modules/nvim/config/lua/dnsc/palette.lua similarity index 100% rename from modules/nvim/config/lua/dnsc/palette.lua rename to bak/modules/nvim/config/lua/dnsc/palette.lua diff --git a/modules/nvim/config/lua/dnsc/utils.lua b/bak/modules/nvim/config/lua/dnsc/utils.lua similarity index 100% rename from modules/nvim/config/lua/dnsc/utils.lua rename to bak/modules/nvim/config/lua/dnsc/utils.lua diff --git a/modules/nvim/config/lua/plugins/blink.lua b/bak/modules/nvim/config/lua/plugins/blink.lua similarity index 100% rename from modules/nvim/config/lua/plugins/blink.lua rename to bak/modules/nvim/config/lua/plugins/blink.lua diff --git a/modules/nvim/config/lua/plugins/codecompanion.lua b/bak/modules/nvim/config/lua/plugins/codecompanion.lua similarity index 100% rename from modules/nvim/config/lua/plugins/codecompanion.lua rename to bak/modules/nvim/config/lua/plugins/codecompanion.lua diff --git a/modules/nvim/config/lua/plugins/conform.lua b/bak/modules/nvim/config/lua/plugins/conform.lua similarity index 100% rename from modules/nvim/config/lua/plugins/conform.lua rename to bak/modules/nvim/config/lua/plugins/conform.lua diff --git a/modules/nvim/config/lua/plugins/dispatch.lua b/bak/modules/nvim/config/lua/plugins/dispatch.lua similarity index 100% rename from modules/nvim/config/lua/plugins/dispatch.lua rename to bak/modules/nvim/config/lua/plugins/dispatch.lua diff --git a/modules/nvim/config/lua/plugins/flash.lua b/bak/modules/nvim/config/lua/plugins/flash.lua similarity index 100% rename from modules/nvim/config/lua/plugins/flash.lua rename to bak/modules/nvim/config/lua/plugins/flash.lua diff --git a/modules/nvim/config/lua/plugins/gitportal.lua b/bak/modules/nvim/config/lua/plugins/gitportal.lua similarity index 100% rename from modules/nvim/config/lua/plugins/gitportal.lua rename to bak/modules/nvim/config/lua/plugins/gitportal.lua diff --git a/modules/nvim/config/lua/plugins/helpers.lua b/bak/modules/nvim/config/lua/plugins/helpers.lua similarity index 100% rename from modules/nvim/config/lua/plugins/helpers.lua rename to bak/modules/nvim/config/lua/plugins/helpers.lua diff --git a/modules/nvim/config/lua/plugins/lualine.lua b/bak/modules/nvim/config/lua/plugins/lualine.lua similarity index 100% rename from modules/nvim/config/lua/plugins/lualine.lua rename to bak/modules/nvim/config/lua/plugins/lualine.lua diff --git a/modules/nvim/config/lua/plugins/markdown.lua b/bak/modules/nvim/config/lua/plugins/markdown.lua similarity index 100% rename from modules/nvim/config/lua/plugins/markdown.lua rename to bak/modules/nvim/config/lua/plugins/markdown.lua diff --git a/modules/nvim/config/lua/plugins/mini.pairs.lua b/bak/modules/nvim/config/lua/plugins/mini.pairs.lua similarity index 100% rename from modules/nvim/config/lua/plugins/mini.pairs.lua rename to bak/modules/nvim/config/lua/plugins/mini.pairs.lua diff --git a/modules/nvim/config/lua/plugins/nvim-surround.lua b/bak/modules/nvim/config/lua/plugins/nvim-surround.lua similarity index 100% rename from modules/nvim/config/lua/plugins/nvim-surround.lua rename to bak/modules/nvim/config/lua/plugins/nvim-surround.lua diff --git a/modules/nvim/config/lua/plugins/oil.lua b/bak/modules/nvim/config/lua/plugins/oil.lua similarity index 100% rename from modules/nvim/config/lua/plugins/oil.lua rename to bak/modules/nvim/config/lua/plugins/oil.lua diff --git a/modules/nvim/config/lua/plugins/schemastore.lua b/bak/modules/nvim/config/lua/plugins/schemastore.lua similarity index 100% rename from modules/nvim/config/lua/plugins/schemastore.lua rename to bak/modules/nvim/config/lua/plugins/schemastore.lua diff --git a/modules/nvim/config/lua/plugins/snacks.lua b/bak/modules/nvim/config/lua/plugins/snacks.lua similarity index 100% rename from modules/nvim/config/lua/plugins/snacks.lua rename to bak/modules/nvim/config/lua/plugins/snacks.lua diff --git a/modules/nvim/config/lua/plugins/substitute.lua b/bak/modules/nvim/config/lua/plugins/substitute.lua similarity index 100% rename from modules/nvim/config/lua/plugins/substitute.lua rename to bak/modules/nvim/config/lua/plugins/substitute.lua diff --git a/modules/nvim/config/lua/plugins/treesitter.lua b/bak/modules/nvim/config/lua/plugins/treesitter.lua similarity index 100% rename from modules/nvim/config/lua/plugins/treesitter.lua rename to bak/modules/nvim/config/lua/plugins/treesitter.lua diff --git a/modules/nvim/config/lua/plugins/which-key.lua b/bak/modules/nvim/config/lua/plugins/which-key.lua similarity index 100% rename from modules/nvim/config/lua/plugins/which-key.lua rename to bak/modules/nvim/config/lua/plugins/which-key.lua diff --git a/modules/nvim/config/stylua.toml b/bak/modules/nvim/config/stylua.toml similarity index 100% rename from modules/nvim/config/stylua.toml rename to bak/modules/nvim/config/stylua.toml diff --git a/modules/nvim/deck.nix b/bak/modules/nvim/deck.nix similarity index 100% rename from modules/nvim/deck.nix rename to bak/modules/nvim/deck.nix diff --git a/modules/nvim/default.nix b/bak/modules/nvim/default.nix similarity index 100% rename from modules/nvim/default.nix rename to bak/modules/nvim/default.nix diff --git a/modules/openssh/default.nix b/bak/modules/openssh/default.nix similarity index 100% rename from modules/openssh/default.nix rename to bak/modules/openssh/default.nix diff --git a/modules/raycast/default.nix b/bak/modules/raycast/default.nix similarity index 100% rename from modules/raycast/default.nix rename to bak/modules/raycast/default.nix diff --git a/modules/raycast/scripts/add-to-inbox.sh b/bak/modules/raycast/scripts/add-to-inbox.sh similarity index 100% rename from modules/raycast/scripts/add-to-inbox.sh rename to bak/modules/raycast/scripts/add-to-inbox.sh diff --git a/modules/raycast/scripts/emacsclient.sh b/bak/modules/raycast/scripts/emacsclient.sh similarity index 100% rename from modules/raycast/scripts/emacsclient.sh rename to bak/modules/raycast/scripts/emacsclient.sh diff --git a/modules/raycast/scripts/open-agenda.sh b/bak/modules/raycast/scripts/open-agenda.sh similarity index 100% rename from modules/raycast/scripts/open-agenda.sh rename to bak/modules/raycast/scripts/open-agenda.sh diff --git a/modules/restic/default.nix b/bak/modules/restic/default.nix similarity index 100% rename from modules/restic/default.nix rename to bak/modules/restic/default.nix diff --git a/modules/samba/default.nix b/bak/modules/samba/default.nix similarity index 100% rename from modules/samba/default.nix rename to bak/modules/samba/default.nix diff --git a/modules/ssh/default.nix b/bak/modules/ssh/default.nix similarity index 100% rename from modules/ssh/default.nix rename to bak/modules/ssh/default.nix diff --git a/modules/steam/default.nix b/bak/modules/steam/default.nix similarity index 100% rename from modules/steam/default.nix rename to bak/modules/steam/default.nix diff --git a/modules/syncthing/default.nix b/bak/modules/syncthing/default.nix similarity index 100% rename from modules/syncthing/default.nix rename to bak/modules/syncthing/default.nix diff --git a/modules/tmux/default.nix b/bak/modules/tmux/default.nix similarity index 100% rename from modules/tmux/default.nix rename to bak/modules/tmux/default.nix diff --git a/modules/tmux/server.nix b/bak/modules/tmux/server.nix similarity index 100% rename from modules/tmux/server.nix rename to bak/modules/tmux/server.nix diff --git a/modules/tmuxinator/personal-layouts/dnsc.yml b/bak/modules/tmuxinator/personal-layouts/dnsc.yml similarity index 100% rename from modules/tmuxinator/personal-layouts/dnsc.yml rename to bak/modules/tmuxinator/personal-layouts/dnsc.yml diff --git a/modules/tmuxinator/personal-layouts/main.yml b/bak/modules/tmuxinator/personal-layouts/main.yml similarity index 100% rename from modules/tmuxinator/personal-layouts/main.yml rename to bak/modules/tmuxinator/personal-layouts/main.yml diff --git a/modules/tmuxinator/personal-layouts/nix-config.yml b/bak/modules/tmuxinator/personal-layouts/nix-config.yml similarity index 100% rename from modules/tmuxinator/personal-layouts/nix-config.yml rename to bak/modules/tmuxinator/personal-layouts/nix-config.yml diff --git a/modules/tmuxinator/personal-layouts/notes.yml b/bak/modules/tmuxinator/personal-layouts/notes.yml similarity index 100% rename from modules/tmuxinator/personal-layouts/notes.yml rename to bak/modules/tmuxinator/personal-layouts/notes.yml diff --git a/modules/tmuxinator/personal-layouts/proglog.yml b/bak/modules/tmuxinator/personal-layouts/proglog.yml similarity index 100% rename from modules/tmuxinator/personal-layouts/proglog.yml rename to bak/modules/tmuxinator/personal-layouts/proglog.yml diff --git a/modules/tmuxinator/personal.nix b/bak/modules/tmuxinator/personal.nix similarity index 100% rename from modules/tmuxinator/personal.nix rename to bak/modules/tmuxinator/personal.nix diff --git a/modules/tmuxinator/work-layouts/devtools.yml b/bak/modules/tmuxinator/work-layouts/devtools.yml similarity index 100% rename from modules/tmuxinator/work-layouts/devtools.yml rename to bak/modules/tmuxinator/work-layouts/devtools.yml diff --git a/modules/tmuxinator/work-layouts/k8s-admin-certification.yml b/bak/modules/tmuxinator/work-layouts/k8s-admin-certification.yml similarity index 100% rename from modules/tmuxinator/work-layouts/k8s-admin-certification.yml rename to bak/modules/tmuxinator/work-layouts/k8s-admin-certification.yml diff --git a/modules/tmuxinator/work-layouts/main.yml b/bak/modules/tmuxinator/work-layouts/main.yml similarity index 100% rename from modules/tmuxinator/work-layouts/main.yml rename to bak/modules/tmuxinator/work-layouts/main.yml diff --git a/modules/tmuxinator/work-layouts/nix-config.yml b/bak/modules/tmuxinator/work-layouts/nix-config.yml similarity index 100% rename from modules/tmuxinator/work-layouts/nix-config.yml rename to bak/modules/tmuxinator/work-layouts/nix-config.yml diff --git a/modules/tmuxinator/work-layouts/notes.yml b/bak/modules/tmuxinator/work-layouts/notes.yml similarity index 100% rename from modules/tmuxinator/work-layouts/notes.yml rename to bak/modules/tmuxinator/work-layouts/notes.yml diff --git a/modules/tmuxinator/work-layouts/ride-charts.yml b/bak/modules/tmuxinator/work-layouts/ride-charts.yml similarity index 100% rename from modules/tmuxinator/work-layouts/ride-charts.yml rename to bak/modules/tmuxinator/work-layouts/ride-charts.yml diff --git a/modules/tmuxinator/work-layouts/ride.yml b/bak/modules/tmuxinator/work-layouts/ride.yml similarity index 100% rename from modules/tmuxinator/work-layouts/ride.yml rename to bak/modules/tmuxinator/work-layouts/ride.yml diff --git a/modules/tmuxinator/work.nix b/bak/modules/tmuxinator/work.nix similarity index 100% rename from modules/tmuxinator/work.nix rename to bak/modules/tmuxinator/work.nix diff --git a/modules/ungoogled-chromium/default.nix b/bak/modules/ungoogled-chromium/default.nix similarity index 100% rename from modules/ungoogled-chromium/default.nix rename to bak/modules/ungoogled-chromium/default.nix diff --git a/modules/unix/audio.nix b/bak/modules/unix/audio.nix similarity index 100% rename from modules/unix/audio.nix rename to bak/modules/unix/audio.nix diff --git a/modules/unix/base.nix b/bak/modules/unix/base.nix similarity index 100% rename from modules/unix/base.nix rename to bak/modules/unix/base.nix diff --git a/modules/unix/bluetooth.nix b/bak/modules/unix/bluetooth.nix similarity index 100% rename from modules/unix/bluetooth.nix rename to bak/modules/unix/bluetooth.nix diff --git a/modules/unix/default.nix b/bak/modules/unix/default.nix similarity index 100% rename from modules/unix/default.nix rename to bak/modules/unix/default.nix diff --git a/modules/unix/nvidia.nix b/bak/modules/unix/nvidia.nix similarity index 100% rename from modules/unix/nvidia.nix rename to bak/modules/unix/nvidia.nix diff --git a/modules/unix/printing.nix b/bak/modules/unix/printing.nix similarity index 100% rename from modules/unix/printing.nix rename to bak/modules/unix/printing.nix diff --git a/modules/unix/shell.nix b/bak/modules/unix/shell.nix similarity index 100% rename from modules/unix/shell.nix rename to bak/modules/unix/shell.nix diff --git a/modules/unix/tablet.nix b/bak/modules/unix/tablet.nix similarity index 100% rename from modules/unix/tablet.nix rename to bak/modules/unix/tablet.nix diff --git a/modules/ups/default.nix b/bak/modules/ups/default.nix similarity index 100% rename from modules/ups/default.nix rename to bak/modules/ups/default.nix diff --git a/modules/uptime-kuma/default.nix b/bak/modules/uptime-kuma/default.nix similarity index 100% rename from modules/uptime-kuma/default.nix rename to bak/modules/uptime-kuma/default.nix diff --git a/modules/vaultwarden/default.nix b/bak/modules/vaultwarden/default.nix similarity index 100% rename from modules/vaultwarden/default.nix rename to bak/modules/vaultwarden/default.nix diff --git a/modules/wezterm/config/appearance.lua b/bak/modules/wezterm/config/appearance.lua similarity index 100% rename from modules/wezterm/config/appearance.lua rename to bak/modules/wezterm/config/appearance.lua diff --git a/modules/wezterm/config/helpers.lua b/bak/modules/wezterm/config/helpers.lua similarity index 100% rename from modules/wezterm/config/helpers.lua rename to bak/modules/wezterm/config/helpers.lua diff --git a/modules/wezterm/config/keybindings.lua b/bak/modules/wezterm/config/keybindings.lua similarity index 100% rename from modules/wezterm/config/keybindings.lua rename to bak/modules/wezterm/config/keybindings.lua diff --git a/modules/wezterm/config/overrides.lua b/bak/modules/wezterm/config/overrides.lua similarity index 100% rename from modules/wezterm/config/overrides.lua rename to bak/modules/wezterm/config/overrides.lua diff --git a/modules/wezterm/config/projects.lua b/bak/modules/wezterm/config/projects.lua similarity index 100% rename from modules/wezterm/config/projects.lua rename to bak/modules/wezterm/config/projects.lua diff --git a/modules/wezterm/config/startup.lua b/bak/modules/wezterm/config/startup.lua similarity index 100% rename from modules/wezterm/config/startup.lua rename to bak/modules/wezterm/config/startup.lua diff --git a/modules/wezterm/config/tab_bar.lua b/bak/modules/wezterm/config/tab_bar.lua similarity index 100% rename from modules/wezterm/config/tab_bar.lua rename to bak/modules/wezterm/config/tab_bar.lua diff --git a/modules/wezterm/config/theme.lua b/bak/modules/wezterm/config/theme.lua similarity index 100% rename from modules/wezterm/config/theme.lua rename to bak/modules/wezterm/config/theme.lua diff --git a/modules/wezterm/config/wezterm.lua b/bak/modules/wezterm/config/wezterm.lua similarity index 100% rename from modules/wezterm/config/wezterm.lua rename to bak/modules/wezterm/config/wezterm.lua diff --git a/modules/wezterm/default.nix b/bak/modules/wezterm/default.nix similarity index 100% rename from modules/wezterm/default.nix rename to bak/modules/wezterm/default.nix diff --git a/modules/wm/awww/default.nix b/bak/modules/wm/awww/default.nix similarity index 100% rename from modules/wm/awww/default.nix rename to bak/modules/wm/awww/default.nix diff --git a/modules/wm/awww/scripts/random-bg.sh b/bak/modules/wm/awww/scripts/random-bg.sh similarity index 100% rename from modules/wm/awww/scripts/random-bg.sh rename to bak/modules/wm/awww/scripts/random-bg.sh diff --git a/modules/wm/cliphist/default.nix b/bak/modules/wm/cliphist/default.nix similarity index 100% rename from modules/wm/cliphist/default.nix rename to bak/modules/wm/cliphist/default.nix diff --git a/modules/wm/default.nix b/bak/modules/wm/default.nix similarity index 100% rename from modules/wm/default.nix rename to bak/modules/wm/default.nix diff --git a/modules/wm/fuzzel/default.nix b/bak/modules/wm/fuzzel/default.nix similarity index 100% rename from modules/wm/fuzzel/default.nix rename to bak/modules/wm/fuzzel/default.nix diff --git a/modules/wm/fuzzel/scripts/fuzzel-cliphist.sh b/bak/modules/wm/fuzzel/scripts/fuzzel-cliphist.sh similarity index 100% rename from modules/wm/fuzzel/scripts/fuzzel-cliphist.sh rename to bak/modules/wm/fuzzel/scripts/fuzzel-cliphist.sh diff --git a/modules/wm/fuzzel/scripts/fuzzel-projects.sh b/bak/modules/wm/fuzzel/scripts/fuzzel-projects.sh similarity index 100% rename from modules/wm/fuzzel/scripts/fuzzel-projects.sh rename to bak/modules/wm/fuzzel/scripts/fuzzel-projects.sh diff --git a/modules/wm/fuzzel/scripts/fuzzel-ssh.sh b/bak/modules/wm/fuzzel/scripts/fuzzel-ssh.sh similarity index 100% rename from modules/wm/fuzzel/scripts/fuzzel-ssh.sh rename to bak/modules/wm/fuzzel/scripts/fuzzel-ssh.sh diff --git a/modules/wm/ironbar/config/config.toml b/bak/modules/wm/ironbar/config/config.toml similarity index 100% rename from modules/wm/ironbar/config/config.toml rename to bak/modules/wm/ironbar/config/config.toml diff --git a/modules/wm/ironbar/config/style.css b/bak/modules/wm/ironbar/config/style.css similarity index 100% rename from modules/wm/ironbar/config/style.css rename to bak/modules/wm/ironbar/config/style.css diff --git a/modules/wm/ironbar/default.nix b/bak/modules/wm/ironbar/default.nix similarity index 100% rename from modules/wm/ironbar/default.nix rename to bak/modules/wm/ironbar/default.nix diff --git a/modules/wm/ly/default.nix b/bak/modules/wm/ly/default.nix similarity index 100% rename from modules/wm/ly/default.nix rename to bak/modules/wm/ly/default.nix diff --git a/modules/wm/niri-system/default.nix b/bak/modules/wm/niri-system/default.nix similarity index 100% rename from modules/wm/niri-system/default.nix rename to bak/modules/wm/niri-system/default.nix diff --git a/modules/wm/niri/config/config.kdl b/bak/modules/wm/niri/config/config.kdl similarity index 100% rename from modules/wm/niri/config/config.kdl rename to bak/modules/wm/niri/config/config.kdl diff --git a/modules/wm/niri/default.nix b/bak/modules/wm/niri/default.nix similarity index 100% rename from modules/wm/niri/default.nix rename to bak/modules/wm/niri/default.nix diff --git a/modules/wm/noctalia/default.nix b/bak/modules/wm/noctalia/default.nix similarity index 100% rename from modules/wm/noctalia/default.nix rename to bak/modules/wm/noctalia/default.nix diff --git a/modules/wm/swaync/config.json b/bak/modules/wm/swaync/config.json similarity index 100% rename from modules/wm/swaync/config.json rename to bak/modules/wm/swaync/config.json diff --git a/modules/wm/swaync/default.nix b/bak/modules/wm/swaync/default.nix similarity index 100% rename from modules/wm/swaync/default.nix rename to bak/modules/wm/swaync/default.nix diff --git a/modules/wm/swaync/style.css b/bak/modules/wm/swaync/style.css similarity index 100% rename from modules/wm/swaync/style.css rename to bak/modules/wm/swaync/style.css diff --git a/modules/wm/waybar/config/config.jsonc b/bak/modules/wm/waybar/config/config.jsonc similarity index 100% rename from modules/wm/waybar/config/config.jsonc rename to bak/modules/wm/waybar/config/config.jsonc diff --git a/modules/wm/waybar/config/power_menu.xml b/bak/modules/wm/waybar/config/power_menu.xml similarity index 100% rename from modules/wm/waybar/config/power_menu.xml rename to bak/modules/wm/waybar/config/power_menu.xml diff --git a/modules/wm/waybar/config/style.css b/bak/modules/wm/waybar/config/style.css similarity index 100% rename from modules/wm/waybar/config/style.css rename to bak/modules/wm/waybar/config/style.css diff --git a/modules/wm/waybar/default.nix b/bak/modules/wm/waybar/default.nix similarity index 100% rename from modules/wm/waybar/default.nix rename to bak/modules/wm/waybar/default.nix diff --git a/modules/zellij/config.kdl b/bak/modules/zellij/config.kdl similarity index 100% rename from modules/zellij/config.kdl rename to bak/modules/zellij/config.kdl diff --git a/modules/zellij/default.nix b/bak/modules/zellij/default.nix similarity index 100% rename from modules/zellij/default.nix rename to bak/modules/zellij/default.nix diff --git a/modules/zen/default.nix b/bak/modules/zen/default.nix similarity index 100% rename from modules/zen/default.nix rename to bak/modules/zen/default.nix diff --git a/modules/zoxide/default.nix b/bak/modules/zoxide/default.nix similarity index 100% rename from modules/zoxide/default.nix rename to bak/modules/zoxide/default.nix diff --git a/secrets/restic/password.age b/bak/secrets/restic/password.age similarity index 100% rename from secrets/restic/password.age rename to bak/secrets/restic/password.age diff --git a/secrets/secrets.nix b/bak/secrets/secrets.nix similarity index 100% rename from secrets/secrets.nix rename to bak/secrets/secrets.nix diff --git a/secrets/vaultwarden/env.age b/bak/secrets/vaultwarden/env.age similarity index 100% rename from secrets/vaultwarden/env.age rename to bak/secrets/vaultwarden/env.age diff --git a/server-files/account.sqlite b/bak/server-files/account.sqlite similarity index 100% rename from server-files/account.sqlite rename to bak/server-files/account.sqlite diff --git a/flake.nix b/flake.nix index 014bab0..e341279 100644 --- a/flake.nix +++ b/flake.nix @@ -1,109 +1,12 @@ { - description = "dnsc-server NixOS flake"; + description = "dnsc IaC config utilizing, Nix (flakes), NixOS, Nix Darwin and flake-parts"; inputs = { - agenix.url = "github:ryantm/agenix"; - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11"; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - nix-darwin.url = "github:LnL7/nix-darwin/master"; - nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; - ip-whitelist.url = "github:Oak-Digital/nixos-ip-whitelist-firewall"; - nix-homebrew.url = "github:zhaofengli/nix-homebrew"; - zellij-switch.url = "github:mostafaqanbaryan/zellij-switch"; - zen-browser.url = "github:0xc000022070/zen-browser-flake"; - firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; - nixvim.url = "github:nix-community/nixvim"; - noctalia = { - url = "github:noctalia-dev/noctalia-shell"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + flake-parts.url = "github:hercules-ci/flake-parts"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + import-tree.url = "github:vic/import-tree"; + flake-file.url = "github:vic/flake-file"; }; - outputs = - { - self, - nixpkgs, - home-manager, - nix-darwin, - nix-homebrew, - agenix, - zellij-switch, - nixvim, - noctalia, - ... - }@inputs: - let - inherit (self) outputs; - in - { - # Custom nixosModules - nixosModules.base = import ./modules/base; - nixosModules.macos = import ./modules/macos; - nixosModules.homebrew = import ./modules/homebrew; - nixosModules.aerospace = import ./modules/aerospace; - nixosModules.keyd = import ./modules/keyd; - nixosModules.ly = import ./modules/wm/ly; - nixosModules.unix = import ./modules/unix; - nixosModules.nvidia = import ./modules/unix/nvidia.nix; - nixosModules.bluetooth = import ./modules/unix/bluetooth.nix; - nixosModules.audio = import ./modules/unix/audio.nix; - nixosModules.printing = import ./modules/unix/printing.nix; - nixosModules.tablet = import ./modules/unix/tablet.nix; - nixosModules.steam = import ./modules/steam; - nixosModules.niriSystem = import ./modules/wm/niri-system; - nixosModules.direnv = import ./modules/direnv; - - nixosConfigurations.dnsc-machine = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs outputs; }; - modules = [ - ./hosts/dnsc-machine - ]; - }; - - nixosConfigurations.dnsc-server = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs outputs; }; - modules = [ - ./hosts/dnsc-server - agenix.nixosModules.default - ]; - }; - - nixosConfigurations.dnsc-vps-sm = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs outputs; }; - modules = [ - ./hosts/dnsc-vps-sm - agenix.nixosModules.default - ]; - }; - - darwinConfigurations.dnsc-air = nix-darwin.lib.darwinSystem { - system = "aarch64-darwin"; - specialArgs = { inherit inputs outputs; }; - modules = [ - nix-homebrew.darwinModules.nix-homebrew - ./hosts/dnsc-air - ]; - }; - - darwinConfigurations.dnsc-work = nix-darwin.lib.darwinSystem { - system = "aarch64-darwin"; - specialArgs = { inherit inputs outputs; }; - modules = [ - nix-homebrew.darwinModules.nix-homebrew - ./hosts/dnsc-work - ]; - }; - - homeConfigurations."dnsc-deck" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.x86_64-linux; - modules = [ ./home/deck.nix ]; - }; - }; + outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules); } diff --git a/modules/hosts/dnsc-air.nix b/modules/hosts/dnsc-air.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix new file mode 100644 index 0000000..73e4c72 --- /dev/null +++ b/modules/neovim/default.nix @@ -0,0 +1,34 @@ +{ + inputs, + lib, + config, + ... +}: + +with lib; + +let + cfg = config.neovim; +in +{ + options.neovim = { + enable = mkOption { + type = types.bool; + default = false; + description = "Enable neovim"; + }; + extraPackages = mkOption { + type = types.listOf types.package; + default = [ ]; + description = "Additional packages to install alongside neovim on the system."; + }; + }; + + flake-file.inputs.nixvim.url = "github:nix-community/nixvim"; + flake.modules.homeManager.neovim = { + imports = [ inputs.nixvim.homeModules.nixvim ]; + programs.nixvim = { + enable = cfg.enable; + }; + }; +} diff --git a/modules/systems.nix b/modules/systems.nix new file mode 100644 index 0000000..9cfcc0c --- /dev/null +++ b/modules/systems.nix @@ -0,0 +1,7 @@ +{ + # Currently using ARM on MacOS and x86 on Linux + systems = [ + "aarch64-darwin" + "x86_64-linux" + ]; +} From 2ac5d0321b45ff38a962b1ab59dc65a5a4901898 Mon Sep 17 00:00:00 2001 From: Dennis Date: Tue, 3 Mar 2026 13:46:54 +0100 Subject: [PATCH 02/77] sets up basic structure --- flake.nix | 30 +- modules/config.nix | 20 ++ modules/hosts/dnsc-air.nix | 36 +++ modules/neovim/colorscheme.nix | 16 ++ modules/neovim/completion.nix | 32 +++ modules/neovim/default.nix | 29 +- modules/neovim/editing.nix | 82 ++++++ modules/neovim/extraFiles/palette.lua | 33 +++ modules/neovim/extraFiles/winterly.lua | 368 +++++++++++++++++++++++++ modules/neovim/formatter.nix | 57 ++++ modules/neovim/git.nix | 33 +++ modules/neovim/keybindings.nix | 134 +++++++++ modules/neovim/lsp.nix | 202 ++++++++++++++ modules/neovim/options.nix | 52 ++++ modules/neovim/picker.nix | 174 ++++++++++++ modules/neovim/statusline.nix | 99 +++++++ modules/systems.nix | 7 - 17 files changed, 1368 insertions(+), 36 deletions(-) create mode 100644 modules/config.nix create mode 100644 modules/neovim/colorscheme.nix create mode 100644 modules/neovim/completion.nix create mode 100644 modules/neovim/editing.nix create mode 100644 modules/neovim/extraFiles/palette.lua create mode 100644 modules/neovim/extraFiles/winterly.lua create mode 100644 modules/neovim/formatter.nix create mode 100644 modules/neovim/git.nix create mode 100644 modules/neovim/keybindings.nix create mode 100644 modules/neovim/lsp.nix create mode 100644 modules/neovim/options.nix create mode 100644 modules/neovim/picker.nix create mode 100644 modules/neovim/statusline.nix delete mode 100644 modules/systems.nix diff --git a/flake.nix b/flake.nix index e341279..0c9ac25 100644 --- a/flake.nix +++ b/flake.nix @@ -1,12 +1,30 @@ { - description = "dnsc IaC config utilizing, Nix (flakes), NixOS, Nix Darwin and flake-parts"; - inputs = { - flake-parts.url = "github:hercules-ci/flake-parts"; - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-parts = { + inputs.nixpkgs-lib.follows = "nixpkgs-lib"; + url = "github:hercules-ci/flake-parts"; + }; + home-manager = { + inputs.nixpkgs.follows = "nixpkgs"; + url = "github:nix-community/home-manager"; + }; import-tree.url = "github:vic/import-tree"; - flake-file.url = "github:vic/flake-file"; + nix-darwin = { + inputs.nixpkgs.follows = "nixpkgs"; + url = "github:LnL7/nix-darwin/master"; + }; + nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"; + nixpkgs-lib.follows = "nixpkgs"; + nixvim.url = "github:nix-community/nixvim"; }; - outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules); + outputs = + inputs: + inputs.flake-parts.lib.mkFlake { + inherit inputs; + systems = [ + "aarch64-darwin" + "x86_64-linux" + ]; + } (inputs.import-tree ./modules); } diff --git a/modules/config.nix b/modules/config.nix new file mode 100644 index 0000000..5850750 --- /dev/null +++ b/modules/config.nix @@ -0,0 +1,20 @@ +{ lib, ... }: +{ + options.flake.globalConfig = { + username = lib.mkOption { + type = lib.types.str; + default = "dennis"; + description = "Primary username for the system"; + }; + fullname = lib.mkOption { + type = lib.types.str; + default = "Dennis Schoepf"; + description = "Full Name of the user"; + }; + email = lib.mkOption { + type = lib.types.str; + default = "me@dnsc.io"; + description = "Full Name of the user"; + }; + }; +} diff --git a/modules/hosts/dnsc-air.nix b/modules/hosts/dnsc-air.nix index e69de29..3da8700 100644 --- a/modules/hosts/dnsc-air.nix +++ b/modules/hosts/dnsc-air.nix @@ -0,0 +1,36 @@ +{ + inputs, + config, + ... +}: +let + username = config.flake.globalConfig.username; +in +{ + flake.darwinConfigurations.dnsc-air = inputs.nix-darwin.lib.darwinSystem { + system = "aarch64-darwin"; + specialArgs = { inherit inputs; }; + modules = [ + inputs.home-manager.darwinModules.home-manager + { + networking.hostName = "dnsc-air"; + networking.computerName = "dnsc-air"; + users.users.${username}.home = "/Users/${username}"; + nix.enable = false; + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + home-manager = { + useGlobalPkgs = true; + backupFileExtension = "backup"; + users.${username} = { + imports = [ config.flake.modules.homeManager.neovim ]; + home.stateVersion = "24.11"; + }; + }; + } + ]; + }; +} diff --git a/modules/neovim/colorscheme.nix b/modules/neovim/colorscheme.nix new file mode 100644 index 0000000..5b8a799 --- /dev/null +++ b/modules/neovim/colorscheme.nix @@ -0,0 +1,16 @@ +{ ... }: +{ + flake.modules.homeManager.neovim-colorscheme = { + programs.nixvim = { + colorscheme = "winterly"; + + # Make palette available to this module but + # also for other configuration (e.g. lualine) + extraFiles."lua/dnsc/palette.lua".source = ./extraFiles/palette.lua; + + # Set custorscheme in neovims runtimepath so that neovim + # discovers it automatically + extraFiles."colors/winterly.lua".source = ./extraFiles/winterly.lua; + }; + }; +} diff --git a/modules/neovim/completion.nix b/modules/neovim/completion.nix new file mode 100644 index 0000000..ccbb93f --- /dev/null +++ b/modules/neovim/completion.nix @@ -0,0 +1,32 @@ +{ ... }: +{ + flake.modules.homeManager.neovim-completion = { + programs.nixvim.plugins.blink-cmp = { + enable = true; + settings = { + keymap = { + preset = "enter"; + "" = [ + "select_next" + "fallback" + ]; + "" = [ + "select_prev" + "fallback" + ]; + "" = [ + "select_and_accept" + ]; + "" = [ + "show_documentation" + "hide_documentation" + ]; + }; + appearance.nerd_font_variant = "mono"; + completion.documentation.auto_show = false; + signature.enabled = true; + cmdline.completion.menu.auto_show = true; + }; + }; + }; +} diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 73e4c72..c5ffad7 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -1,34 +1,17 @@ { inputs, - lib, - config, + pkgs, ... }: - -with lib; - -let - cfg = config.neovim; -in { - options.neovim = { - enable = mkOption { - type = types.bool; - default = false; - description = "Enable neovim"; - }; - extraPackages = mkOption { - type = types.listOf types.package; - default = [ ]; - description = "Additional packages to install alongside neovim on the system."; - }; - }; - - flake-file.inputs.nixvim.url = "github:nix-community/nixvim"; flake.modules.homeManager.neovim = { imports = [ inputs.nixvim.homeModules.nixvim ]; programs.nixvim = { - enable = cfg.enable; + enable = true; + defaultEditor = true; + package = pkgs.neovim-unwrapped; + vimAlias = true; + vimdiffAlias = true; }; }; } diff --git a/modules/neovim/editing.nix b/modules/neovim/editing.nix new file mode 100644 index 0000000..f9775da --- /dev/null +++ b/modules/neovim/editing.nix @@ -0,0 +1,82 @@ +{ pkgs, ... }: +{ + flake.modules.homeManager.neovim-editing = { + programs.nixvim = { + plugins.sleuth.enable = true; + plugins.nvim-surround.enable = true; + plugins.flash.enable = true; + + plugins.blink-pairs = { + enable = true; + }; + + plugins.treesitter = { + enable = true; + highlight.enable = true; + indent.enable = true; + folding.enable = true; + + grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ + angular + bash + css + html + javascript + jsdoc + json + lua + make + markdown + markdown_inline + go + gomod + gotmpl + python + styled + tsx + typescript + nix + regex + toml + vim + vimdoc + xml + yaml + ]; + }; + + plugins.substitute = { + enable = true; + luaConfig.post = /* lua */ '' + local sub = require("substitute") + vim.keymap.set("n", "s", sub.operator, { noremap = true }) + vim.keymap.set("n", "ss", sub.line, { noremap = true }) + vim.keymap.set("n", "S", sub.eol, { noremap = true }) + vim.keymap.set("x", "s", sub.visual, { noremap = true }) + ''; + }; + + extraPlugins = [ + pkgs.vimPlugins.vim-cool + ]; + + autoCmd = [ + { + callback.__raw = "function() vim.highlight.on_yank() end"; + event = [ + "TextYankPost" + ]; + } + { + event = [ "FileType" ]; + pattern = "qf"; + callback.__raw = /* lua */ '' + function() + vim.keymap.set("n", "", "", { buffer = true }) + end + ''; + } + ]; + }; + }; +} diff --git a/modules/neovim/extraFiles/palette.lua b/modules/neovim/extraFiles/palette.lua new file mode 100644 index 0000000..1ab3504 --- /dev/null +++ b/modules/neovim/extraFiles/palette.lua @@ -0,0 +1,33 @@ +return { + fg = "#ffffff", + fg_alt = "#bf8a9f", + fg_dim = "#807c9f", + bg = "#0f0b15", + bg_secondary = "#1d202f", + grey = "#807c9f", + grey_bright = "#807c9f", + red = "#f47359", + red_bright = "#ff6a7a", + red_subtle_bg = "#67182f", + green = "#29a444", + green_bright = "#00a392", + green_subtle_bg = "#10452f", + yellow = "#b58a52", + yellow_bright = "#df9080", + yellow_brighter = "#FCC1B6", + yellow_subtle_bg = "#54362a", + blue = "#3f95f6", + blue_bright = "#029fff", + blue_subtle_bg = "#2a346e", + blue_subtle_dark_bg = "#003045", + magenta = "#d369af", + magenta_bright = "#af85ea", + magenta_brighter = "#c57faf", + magenta_subtle_bg = "#572454", + magenta_subtle_bg_darker = "#331531", + cyan = "#4fbaef", + cyan_bright = "#35afbf", + cyan_subtle_bg = "#133d56", + silver = "#b8c6d5", + silver_bright = "#ffffff", +} diff --git a/modules/neovim/extraFiles/winterly.lua b/modules/neovim/extraFiles/winterly.lua new file mode 100644 index 0000000..d3b6a51 --- /dev/null +++ b/modules/neovim/extraFiles/winterly.lua @@ -0,0 +1,368 @@ +local palette = require("dnsc.palette") + +vim.cmd.highlight("clear") +vim.g.colors_name = "winterly" + +local hi = function(name, val) + -- Force links + val.force = true + + -- Make sure that `cterm` attribute is not populated from `gui` + val.cterm = val.cterm or {} ---@type vim.api.keyset.highlight + + -- Define global highlight + vim.api.nvim_set_hl(0, name, val) +end + +-- General +hi("Normal", { fg = palette.fg }) + +hi("Conceal", { fg = palette.silver, bg = palette.grey, ctermfg = "LightGrey", ctermbg = "DarkGrey" }) +hi("Cursor", { bg = palette.magenta_bright }) +hi("DiffText", { bg = palette.yellow_subtle_bg, bold = true, ctermbg = "DarkYellow", cterm = { bold = true } }) +hi("ErrorMsg", { fg = palette.red_bright, bg = palette.red_subtle_bg, ctermfg = "White", ctermbg = "DarkRed" }) +hi("IncSearch", { bg = palette.magenta_subtle_bg, fg = palette.magenta }) +hi("ModeMsg", { bold = true, cterm = { bold = true } }) +hi("NonText", { fg = palette.grey, ctermfg = "DarkGrey" }) +hi("PmenuSbar", { bg = palette.grey, ctermbg = "Grey" }) +hi("StatusLine", { reverse = true, bold = true, cterm = { reverse = true, bold = true } }) +hi("StatusLineNC", { reverse = true, cterm = { reverse = true } }) +hi("TabLineFill", { reverse = true, cterm = { reverse = true } }) +hi("TabLineSel", { bold = true, cterm = { bold = true } }) +hi("TermCursor", { reverse = true, cterm = { reverse = true } }) +hi("WinBar", { bold = true, cterm = { bold = true } }) +hi("WildMenu", { fg = palette.bg, bg = palette.yellow_subtle_bg, ctermfg = "Black", ctermbg = "Yellow" }) + +hi("VertSplit", { link = "Comment" }) +hi("WinSeparator", { link = "VertSplit" }) +hi("WinBarNC", { link = "WinBar" }) +hi("DiffTextAdd", { link = "DiffText" }) +hi("EndOfBuffer", { link = "NonText" }) +hi("LineNrAbove", { link = "LineNr" }) +hi("LineNrBelow", { link = "LineNr" }) +hi("QuickFixLine", { link = "Search" }) +hi("CursorLineSign", { link = "SignColumn" }) +hi("CursorLineFold", { link = "FoldColumn" }) +hi("CurSearch", { link = "Search" }) +hi("PmenuKind", { link = "Pmenu" }) +hi("PmenuKindSel", { link = "PmenuSel" }) +hi("PmenuMatch", { link = "Pmenu" }) +hi("PmenuMatchSel", { link = "PmenuSel" }) +hi("PmenuExtra", { link = "Pmenu" }) +hi("PmenuExtraSel", { link = "PmenuSel" }) +hi("PreInsert", { link = "Added" }) +hi("ComplMatchIns", {}) +hi("ComplHint", { link = "NonText" }) +hi("ComplHintMore", { link = "MoreMsg" }) +hi("Whitespace", { link = "NonText" }) +hi("MsgSeparator", { link = "StatusLine" }) +hi("NormalFloat", { link = "Pmenu" }) +hi("FloatBorder", { bg = palette.bg_secondary, fg = palette.fg_dim }) +hi("FloatTitle", { bg = palette.bg_secondary, fg = palette.fg, bold = true }) +hi("FloatFooter", { link = "Title" }) + +hi("FloatShadow", { bg = palette.bg, blend = 80 }) +hi("FloatShadowThrough", { bg = palette.bg, blend = 100 }) +hi("RedrawDebugNormal", { reverse = true, cterm = { reverse = true } }) +hi("RedrawDebugClear", { bg = palette.yellow_subtle_bg, ctermbg = "DarkYellow" }) +hi("RedrawDebugComposed", { bg = palette.green_subtle_bg, ctermbg = "DarkGreen" }) +hi("RedrawDebugRecompose", { bg = palette.red_subtle_bg, ctermbg = "DarkRed" }) +hi("Error", { link = "ErrorMsg" }) +hi("NvimInternalError", { link = "ErrorMsg" }) +hi("Todo", { fg = palette.blue_bright, bg = palette.blue_subtle_bg, ctermbg = "DarkBlue", ctermfg = "LightBlue" }) + +hi("String", { link = "Constant" }) +hi("Character", { link = "Constant" }) +hi("Number", { link = "Boolean" }) +hi("Boolean", { fg = palette.magenta_bright, bold = true }) +hi("Float", { link = "Number" }) +hi("Function", { link = "Identifier" }) +hi("Conditional", { link = "Statement" }) +hi("Repeat", { link = "Statement" }) +hi("Label", { link = "Statement" }) +hi("Operator", { fg = palette.fg_alt, italic = false, ctermfg = "White" }) +hi("Keyword", { link = "Statement" }) +hi("Exception", { link = "Statement" }) +hi("Include", { link = "PreProc" }) +hi("Define", { link = "PreProc" }) +hi("Macro", { link = "PreProc" }) +hi("PreCondit", { link = "PreProc" }) +hi("StorageClass", { link = "Type" }) +hi("Structure", { link = "Type" }) +hi("Typedef", { bold = true, fg = palette.yellow_brighter, ctermfg = "LightYellow" }) +hi("Tag", { link = "Special" }) +hi("SpecialChar", { link = "Special" }) +hi("Delimiter", { link = "Special" }) +hi("SpecialComment", { link = "Special" }) +hi("Debug", { link = "Special" }) + +hi("DiagnosticError", { fg = palette.red_bright, ctermfg = 1 }) +hi("DiagnosticWarn", { fg = palette.yellow, ctermfg = 3 }) +hi("DiagnosticInfo", { fg = palette.cyan, ctermfg = 4 }) +hi("DiagnosticHint", { fg = palette.silver, ctermfg = 7 }) +hi("DiagnosticOk", { fg = palette.green_bright, ctermfg = 10 }) +hi("DiagnosticUnderlineError", { fg = palette.red_bright, undercurl = true, cterm = { underline = true } }) +hi("DiagnosticUnderlineWarn", { fg = palette.yellow, undercurl = true, cterm = { underline = true } }) +hi("DiagnosticUnderlineInfo", { fg = palette.cyan, undercurl = true, cterm = { underline = true } }) +hi("DiagnosticUnderlineHint", { fg = palette.silver, undercurl = true, cterm = { underline = true } }) +hi("DiagnosticUnderlineOk", { fg = palette.green_bright, undercurl = true, cterm = { underline = true } }) +hi("DiagnosticVirtualTextError", { link = "DiagnosticError" }) +hi("DiagnosticVirtualTextWarn", { link = "DiagnosticWarn" }) +hi("DiagnosticVirtualTextInfo", { link = "DiagnosticInfo" }) +hi("DiagnosticVirtualTextHint", { link = "DiagnosticHint" }) +hi("DiagnosticVirtualTextOk", { link = "DiagnosticOk" }) +hi("DiagnosticFloatingError", { link = "DiagnosticError" }) +hi("DiagnosticFloatingWarn", { link = "DiagnosticWarn" }) +hi("DiagnosticFloatingInfo", { link = "DiagnosticInfo" }) +hi("DiagnosticFloatingHint", { link = "DiagnosticHint" }) +hi("DiagnosticFloatingOk", { link = "DiagnosticOk" }) +hi("DiagnosticSignError", { link = "DiagnosticError" }) +hi("DiagnosticSignWarn", { link = "DiagnosticWarn" }) +hi("DiagnosticSignInfo", { link = "DiagnosticInfo" }) +hi("DiagnosticSignHint", { link = "DiagnosticHint" }) +hi("DiagnosticSignOk", { link = "DiagnosticOk" }) +hi("DiagnosticDeprecated", { fg = palette.red, strikethrough = true, cterm = { strikethrough = true } }) + +hi("DiagnosticUnnecessary", { link = "Unused" }) +hi("LspInlayHint", { link = "NonText" }) +hi("SnippetTabstop", { link = "Visual" }) +hi("SnippetTabstopActive", { link = "SnippetTabstop" }) + +-- Text +hi("@markup.raw", { link = "Special" }) +hi("@markup.link", { link = "Identifier" }) +hi("@markup.link.label", { link = "ConstantUnderlined" }) +hi("@markup.heading", { link = "Title" }) +hi("@markup.heading.gitcommit", { bg = palette.bg, fg = palette.fg, bold = true }) +hi("@markup.link.url", { link = "Underlined" }) +hi("@markup.underline", { link = "Underlined" }) +hi("@comment.todo", { link = "Todo" }) + +-- Miscs +hi("@comment", { link = "Comment" }) +hi("@punctuation", { link = "Delimiter" }) + +-- Constants +hi("@constant", { link = "Constant" }) +hi("@constant.builtin", { link = "Special" }) +hi("@constant.macro", { link = "Define" }) +hi("@keyword.directive", { link = "Define" }) +hi("@string", { link = "String" }) +hi("@string.escape", { link = "SpecialChar" }) +hi("@string.special", { link = "SpecialChar" }) +hi("@character", { link = "Character" }) +hi("@character.special", { link = "SpecialChar" }) +hi("@number", { link = "Number" }) +hi("@boolean", { link = "Boolean" }) +hi("@number.float", { link = "Float" }) + +-- Functions +hi("@function", { link = "Function" }) +hi("@function.builtin", { link = "Special" }) +hi("@function.macro", { link = "Macro" }) +hi("@function.method", { link = "Function" }) +hi("@variable.parameter", { link = "Identifier" }) +hi("@variable.parameter.builtin", { link = "Special" }) +hi("@variable.member", { link = "Identifier" }) +hi("@property", { link = "Identifier" }) +hi("@attribute", { link = "Macro" }) +hi("@attribute.builtin", { link = "Special" }) +hi("@constructor", { link = "Special" }) + +-- Keywords +hi("@keyword.conditional", { link = "Conditional" }) +hi("@keyword.repeat", { link = "Repeat" }) +hi("@keyword.type", { link = "Structure" }) +hi("@label", { link = "Label" }) +hi("@operator", { link = "Operator" }) +hi("@keyword", { link = "Keyword" }) +hi("@keyword.exception", { link = "Exception" }) + +hi("@variable", { link = "Identifier" }) +hi("@type", { link = "Type" }) +hi("@type.builtin", { link = "Type" }) +hi("@type.definition", { link = "Typedef" }) +hi("@module", { link = "Identifier" }) +hi("@keyword.import", { link = "Include" }) +hi("@keyword.directive", { link = "PreProc" }) +hi("@keyword.debug", { link = "Debug" }) +hi("@tag", { link = "Tag" }) +hi("@tag.tsx", { link = "Identifier" }) +hi("@tag.builtin", { link = "Special" }) + +-- LSP semantic tokens +hi("@lsp.type.class", { link = "Structure" }) +hi("@lsp.type.comment", { link = "Comment" }) +hi("@lsp.type.decorator", { link = "Function" }) +hi("@lsp.type.enum", { link = "Structure" }) +hi("@lsp.type.enumMember", { link = "Constant" }) +hi("@lsp.type.function", { link = "Function" }) +hi("@lsp.type.interface", { link = "Structure" }) +hi("@lsp.type.macro", { link = "Macro" }) +hi("@lsp.type.method", { link = "Function" }) +hi("@lsp.type.namespace", { link = "Structure" }) +hi("@lsp.type.parameter", { link = "Identifier" }) +hi("@lsp.type.property", { link = "Identifier" }) +hi("@lsp.type.struct", { link = "Structure" }) +hi("@lsp.type.type", { link = "Type" }) +hi("@lsp.type.typeParameter", { link = "TypeDef" }) +hi("@lsp.type.variable", { link = "Identifier" }) +hi("@lsp.typemod.keyword.documentation", { fg = palette.grey, bold = true }) + +if vim.o.background == "light" then +-- TODO: Define light scheme +else + -- Default colors only used with a dark background. + hi("ColorColumn", { bg = palette.red_subtle_bg, ctermbg = "DarkRed" }) + hi("CursorColumn", { bg = palette.grey, ctermbg = "DarkGrey" }) + hi("CursorLine", { bg = palette.magenta_subtle_bg_darker, cterm = { underline = true } }) + hi("CursorLineNr", { + fg = palette.fg, + bg = palette.magenta_subtle_bg_darker, + bold = true, + ctermfg = "White", + cterm = { underline = true }, + }) + hi("DiffAdd", { fg = palette.green_bright, bg = palette.green_subtle_bg, ctermbg = "DarkGreen" }) + hi("DiffChange", { fg = palette.yellow_brighter, bg = palette.yellow_subtle_bg, ctermbg = "DarkYellow" }) + hi("DiffDelete", { fg = palette.red_bright, bg = palette.red_subtle_bg, ctermbg = "DarkRed" }) + hi("Directory", { fg = palette.magenta, bold = true, ctermfg = "Magenta" }) + hi("FoldColumn", { fg = palette.cyan_bright, bg = palette.grey, ctermfg = "Cyan", ctermbg = "DarkGrey" }) + hi("Folded", { fg = palette.cyan_bright, bg = palette.grey, ctermfg = "Cyan", ctermbg = "DarkGrey" }) + hi("LineNr", { fg = palette.grey_bright, ctermfg = "Grey" }) + hi( + "MatchParen", + { fg = palette.fg_alt, bg = palette.magenta_subtle_bg, ctermbg = "DarkMagenta", ctermfg = "Black" } + ) + hi("MoreMsg", { fg = palette.grey, ctermfg = "DarkGrey" }) + hi("Pmenu", { bg = palette.bg_secondary, ctermfg = "White", ctermbg = "Black" }) + hi("PmenuSel", { + bg = palette.magenta_subtle_bg, + fg = palette.fg, + bold = true, + ctermfg = "LightMagenta", + ctermbg = "DarkMagenta", + }) + hi("PmenuThumb", { bg = palette.fg, ctermbg = "White" }) + hi("Question", { fg = palette.green_bright, bold = true, ctermfg = "LightGreen" }) + hi("Search", { link = "IncSearch" }) + hi("Substitute", { + fg = palette.green_bright, + bg = palette.green_subtle_bg, + bold = true, + ctermfg = "DarkBlue", + ctermbg = "LightBlue", + }) + hi("SignColumn", { fg = palette.grey_bright, bg = palette.bg, ctermfg = "Cyan", ctermbg = "DarkGrey" }) + hi("SpecialKey", { fg = palette.cyan_bright, ctermfg = "LightBlue" }) + hi("SpellBad", { fg = palette.red, undercurl = true, ctermbg = "Red" }) + hi("SpellCap", { fg = palette.blue, undercurl = true, ctermbg = "Blue" }) + hi("SpellLocal", { fg = palette.cyan, undercurl = true, ctermbg = "Cyan" }) + hi("SpellRare", { fg = palette.magenta, undercurl = true, ctermbg = "Magenta" }) + hi("StatusLineTerm", { + fg = palette.bg, + bg = palette.green_bright, + bold = true, + ctermfg = "Black", + ctermbg = "LightGreen", + cterm = { bold = true }, + }) + hi("StatusLineTermNC", { fg = palette.bg, bg = palette.green_bright, ctermfg = "Black", ctermbg = "LightGreen" }) + hi( + "TabLine", + { bg = palette.grey, underline = true, ctermfg = "White", ctermbg = "DarkGrey", cterm = { underline = true } } + ) + hi("Title", { fg = palette.magenta_bright, bold = true, ctermfg = "Magenta" }) + hi("Visual", { + fg = palette.magenta_brighter, + bg = palette.magenta_subtle_bg, + ctermfg = "LightMagenta", + ctermbg = "DarkMagenta", + }) + hi("WarningMsg", { fg = palette.red_bright, ctermfg = "LightRed" }) + hi("Comment", { fg = palette.grey, ctermfg = "Cyan" }) + hi("Unused", { fg = palette.grey_bright, undercurl = true, ctermfg = "LightGrey" }) + hi("Constant", { fg = palette.yellow_brighter, ctermfg = "LightYellow" }) + hi("ConstantUnderlined", { fg = palette.yellow_brighter, underline = true, ctermfg = "LightYellow" }) + hi("Special", { fg = palette.silver, ctermfg = "LightGrey" }) + hi("Identifier", { fg = palette.fg, ctermfg = "White", cterm = { bold = true } }) + hi("Statement", { fg = palette.fg_alt, bold = true, ctermfg = "White" }) + hi("PreProc", { fg = palette.magenta, ctermfg = "LightMagenta" }) + hi("Type", { fg = palette.silver, bold = true, ctermfg = "LightCyan" }) + hi("Underlined", { fg = palette.silver, underline = true, ctermfg = "LightGrey", cterm = { underline = true } }) + hi("Ignore", { fg = palette.bg, ctermfg = "Black" }) + hi( + "Added", + { fg = palette.green_bright, bg = palette.green_subtle_bg, ctermfg = "LightGreen", ctermbg = "DarkGreen" } + ) + hi( + "Changed", + { fg = palette.blue_bright, bg = palette.blue_subtle_bg, ctermfg = "LightBlue", ctermbg = "DarkBlue" } + ) + hi("Removed", { fg = palette.red_bright, bg = palette.red_subtle_bg, ctermfg = "LightRed", ctermbg = "DarkRed" }) + hi("NotificationInfo", { fg = palette.silver, bg = palette.bg, ctermfg = "White", ctermbg = "Black" }) + + -- Snacks + hi("SnacksIndentScope", { fg = palette.magenta, ctermfg = "LightGrey" }) + hi("SnacksIndent", { fg = palette.magenta_subtle_bg, ctermfg = "DarkGrey" }) + hi( + "SnacksPickerCursorLine", + { bg = palette.magenta_subtle_bg, fg = palette.fg, bold = true, cterm = { underline = true } } + ) + hi("SnacksPickerListCursorLine", { link = "SnacksPickerCursorLine" }) + hi("SnacksPickerTitle", { link = "FloatTitle" }) + hi("SnacksBackdrop", { link = "Pmenu" }) + + -- Flash + hi("FlashMatch", { reverse = true }) + hi("FlashLabel", { bg = palette.fg, fg = palette.bg }) + + -- FzfLua + hi("FzfLuaNormal", { link = "Pmenu" }) + hi("FzfLuaBorder", { link = "Pmenu" }) + hi("FzfLuaTitle", { link = "Pmenu" }) + hi("FzfLuaBackdrop", { link = "Pmenu" }) + hi("FzfLuaPreviewNormal", { link = "FzfLuaNormal" }) + hi("FzfLuaPreviewBorder", { link = "FzfLuaBorder" }) + hi("FzfLuaPreviewTitle", { link = "FzfLuaTitle" }) + hi( + "FzfLuaCursorLine", + { bg = palette.magenta_subtle_bg, fg = palette.fg, bold = true, cterm = { underline = true } } + ) + hi("FzfLuaTitleFlags", { link = "FzfLuaCursorLine" }) + hi("FzfLuaCursorLineNr", { link = "FzfLuaCursorLine" }) + hi("FzfLuaHeaderBind", { link = "Pmenu" }) + hi("FzfLuaHeaderText", { link = "Comment" }) + hi("FzfLuaPathLineNr", { link = "Pmenu" }) + hi("FzfLuaPathColNr", { link = "Pmenu" }) + hi("FzfLuaLivePrompt", { link = "Pmenu" }) + hi("FzfLuaCmdBuf", { link = "Comment" }) + hi("FzfLuaBufName", { link = "Pmenu" }) + hi("FzfLuaBufId", { link = "Special" }) + hi("FzfLuaBufLineNr", { link = "Special" }) + hi("FzfLuaBufFlagCur", { link = "Pmenu" }) + hi("FzfLuaBufFlagAlt", { link = "Comment" }) + + -- Blinkpairs + hi("BlinkPairsOrange", { link = "Comment" }) + hi("BlinkPairsPurple", { fg = palette.magenta_brighter }) + hi("BlinkPairsBlue", { fg = palette.magenta_bright }) + + -- Neogit + hi("NeogitDiffAdd", { link = "DiffAdd" }) + hi("NeogitDiffDelete", { link = "DiffDelete" }) + hi("NeogitDiffContext", { bg = palette.bg_secondary, fg = palette.fg }) + hi("NeogitDiffContextCursor", { bg = palette.magenta_subtle_bg_darker, fg = palette.magenta_brighter }) + hi("NeogitDiffAddCursor", { bg = palette.green_bright, fg = palette.green_subtle_bg }) + hi("NeogitDiffDeleteCursor", { bg = palette.red_bright, fg = palette.red_subtle_bg }) + hi("NeogitDiffContextHighlight", { link = "NeogitDiffContext" }) + hi("NeogitDiffAddHighlight", { link = "DiffAdd" }) + hi("NeogitDiffDeleteHighlight", { link = "DiffDelete" }) + hi("NeogitHunkHeader", { bg = palette.bg_secondary, fg = palette.grey_bright }) + hi("NeogitHunkMergeHeader", { link = "NeogitHunkHeader" }) + hi("NeogitHunkHeaderHighlight", { bg = palette.magenta_subtle_bg, fg = palette.magenta_brighter }) + hi("NeogitHunkHeaderCursor", { link = "NeogitHunkHeaderHighlight" }) + hi("NeogitCommitViewHeader", { bg = palette.bg_secondary, fg = palette.fg }) + hi("NeogitDiffHeader", { bg = palette.bg, fg = palette.grey_bright, bold = true }) + hi("NeogitActiveItem", { bg = palette.grey_bright, fg = palette.bg, bold = true }) +end diff --git a/modules/neovim/formatter.nix b/modules/neovim/formatter.nix new file mode 100644 index 0000000..8b5de93 --- /dev/null +++ b/modules/neovim/formatter.nix @@ -0,0 +1,57 @@ +{ pkgs, ... }: +{ + flake.modules.homeManager.neovim-formatter = { + programs.nixvim.plugins.conform-nvim = { + enable = true; + settings = { + formatters_by_ft = { + typescriptreact = { + __unkeyed-1 = "biome-check"; + __unkeyed-2 = "prettierd"; + stop_after_first = true; + }; + astro = [ "prettierd" ]; + typescript = { + __unkeyed-1 = "biome-check"; + __unkeyed-2 = "prettierd"; + stop_after_first = true; + }; + javascript = { + __unkeyed-1 = "biome-check"; + __unkeyed-2 = "prettierd"; + stop_after_first = true; + }; + javascriptreact = { + __unkeyed-1 = "biome-check"; + __unkeyed-2 = "prettierd"; + stop_after_first = true; + }; + html = [ "prettierd" ]; + htmlangular = [ "prettierd" ]; + css = { + __unkeyed-1 = "biome-check"; + __unkeyed-2 = "prettierd"; + stop_after_first = true; + }; + yaml = [ "prettierd" ]; + markdown = [ "prettierd" ]; + json = { + __unkeyed-1 = "biome-check"; + __unkeyed-2 = "prettierd"; + stop_after_first = true; + }; + lua = [ "stylua" ]; + go = [ "goimports" ]; + gomod = [ "goimports" ]; + gowork = [ "goimports" ]; + gotmpl = [ "goimports" ]; + }; + format_on_save = { + timeout_ms = 500; + lsp_format = "fallback"; + }; + }; + extraPackages = [ pkgs.stylua ]; + }; + }; +} diff --git a/modules/neovim/git.nix b/modules/neovim/git.nix new file mode 100644 index 0000000..ac8845d --- /dev/null +++ b/modules/neovim/git.nix @@ -0,0 +1,33 @@ +{ ... }: +{ + flake.modules.homeManager.neovim-git = { + programs.nixvim = { + plugins.gitportal = { + enable = true; + }; + + keymaps = [ + { + key = "gll"; + action = "GitPortal"; + options.desc = "Open line in Git provider"; + } + { + key = "gll"; + action = "GitPortal"; + options.desc = "Open line in Git provider"; + } + { + key = "gly"; + action = "GitPortal copy_link_to_clipboard"; + options.desc = "Copy link to line at Git provider"; + } + { + key = "glo"; + action = "GitPortal open_link"; + options.desc = "Open link to line at Git provider"; + } + ]; + }; + }; +} diff --git a/modules/neovim/keybindings.nix b/modules/neovim/keybindings.nix new file mode 100644 index 0000000..eb9e9ac --- /dev/null +++ b/modules/neovim/keybindings.nix @@ -0,0 +1,134 @@ +{ ... }: +{ + flake.modules.homeManager.neovim-keybindings = { + programs.nixvim = { + plugins.which-key = { + enable = true; + icons.mappings = false; + }; + + keymaps = [ + # Open + { + mode = [ "n" ]; + key = "od"; + action = "vsplit | lua vim.lsp.buf.definition()"; + options.desc = "Go to definition in other window"; + } + + # Buffer + { + mode = [ "n" ]; + key = "bn"; + action = "bn"; + options.desc = "Move to next buffer"; + } + { + mode = [ "n" ]; + key = "bp"; + action = "bp"; + options.desc = "Move to previous buffer"; + } + { + mode = [ "n" ]; + key = "bk"; + action = "bn"; + options.desc = "Kill buffer and window"; + } + + # File + { + mode = [ "n" ]; + key = "fn"; + action = "enew"; + options.desc = "Create a new file"; + } + { + mode = [ "n" ]; + key = "fs"; + action = "w"; + options.desc = "Save currently opened file"; + } + + # Quit + { + mode = [ "n" ]; + key = "qq"; + action = "qa!"; + options.desc = "Leave neovim"; + } + + # Window + { + mode = [ "n" ]; + key = "w+"; + action = ":vertical resize +4"; + options.desc = "Increase window size"; + } + { + mode = [ "n" ]; + key = "w-"; + action = ":vertical resize -4"; + options.desc = "Decrease window size"; + } + { + mode = [ "n" ]; + key = "wx"; + action = ":bd"; + options.desc = "Kill active window and buffer"; + } + { + mode = [ "n" ]; + key = "wh"; + action = "h"; + options.desc = "Move to window on left"; + } + { + mode = [ "n" ]; + key = "wj"; + action = "j"; + options.desc = "Move to window on bottom"; + } + { + mode = [ "n" ]; + key = "wk"; + action = "k"; + options.desc = "Move to window on top"; + } + { + mode = [ "n" ]; + key = "wl"; + action = "l"; + options.desc = "Move to window on right"; + } + { + mode = [ "n" ]; + key = "ws"; + action = "sp"; + options.desc = "Split windows horizontally"; + } + { + mode = [ "n" ]; + key = "wv"; + action = "vsp"; + options.desc = "Split windows vertically"; + } + { + mode = [ "n" ]; + key = "wd"; + action = "close"; + options.desc = "Delete window only"; + } + { + mode = [ + "n" + "x" + "o" + ]; + key = ""; + action.__raw = /* lua */ ''function() require("flash").jump() end''; + } + ]; + }; + }; +} diff --git a/modules/neovim/lsp.nix b/modules/neovim/lsp.nix new file mode 100644 index 0000000..a652c90 --- /dev/null +++ b/modules/neovim/lsp.nix @@ -0,0 +1,202 @@ +{ pkgs, ... }: +{ + flake.modules.homeManager.neovim-lsp = { + programs.nixvim = { + plugins.lspconfig.enable = true; + + lsp = { + enable = true; + + servers = { + lua_ls = { + enable = true; + package = pkgs.lua-language-server; + packageFallback = true; + }; + nil_ls = { + enable = true; + package = pkgs.nil; + packageFallback = true; + }; + gopls = { + enable = true; + package = pkgs.gopls; + packageFallback = true; + }; + ts_ls = { + enable = true; + package = pkgs.typescript-language-server; + packageFallback = true; + }; + jsonls = { + enable = true; + package = pkgs.vscode-langservers-extracted; + packageFallback = true; + }; + cssls = { + enable = true; + package = pkgs.vscode-langservers-extracted; + packageFallback = true; + }; + html = { + enable = true; + package = pkgs.vscode-langservers-extracted; + packageFallback = true; + }; + astro = { + enable = true; + package = pkgs.astro-language-server; + packageFallback = true; + config.init_options.typescript.tsdk = "${pkgs.typescript}/lib/node_modules/typescript/lib"; + }; + eslint = { + enable = true; + package = pkgs.vscode-langservers-extracted; + packageFallback = true; + config = { + root_markers = [ + ".eslintrc" + ".eslintrc.js" + ".eslintrc.cjs" + ".eslintrc.yaml" + ".eslintrc.yml" + ".eslintrc.json" + "eslint.config.js" + "eslint.config.mjs" + "eslint.config.cjs" + "eslint.config.ts" + "eslint.config.mts" + "eslint.config.cts" + "package.json" + ]; + settings = { + validate = "on"; + useESLintClass = false; + experimental = { + useFlatConfig = true; + }; + codeActionOnSave = { + enable = false; + mode = "all"; + }; + format = true; + quiet = false; + onIgnoredFiles = "off"; + rulesCustomizations = { }; + run = "onType"; + problems = { + shortenToSingleLine = false; + }; + nodePath = ""; + workingDirectory = { + mode = "location"; + }; + codeAction = { + disableRuleComment = { + enable = true; + location = "separateLine"; + }; + showDocumentation = { + enable = true; + }; + }; + }; + handlers = { + "eslint/openDoc".__raw = /* lua */ '' + function(_, result) + if result then + vim.ui.open(result.url) + end + return {} + end + ''; + "eslint/confirmESLintExecution" = /* lua */ '' + function(_, result) + if not result then + return + end + return 4 -- approved + end + ''; + "eslint/probeFailed" = /* lua */ '' + function() + vim.notify("[lspconfig] ESLint probe failed.", vim.log.levels.WARN) + return {} + end + ''; + "eslint/noLibrary" = /* lua */ '' + function() + vim.notify("[lspconfig] Unable to find ESLint library.", vim.log.levels.WARN) + return {} + end + ''; + }; + on_new_config.__raw = /* lua */ '' + function(config, new_root_dir) + -- This function is called when LSP attaches to a new buffer + -- Set the working directory to the root where eslint config is found + config.settings = config.settings or {} + config.settings.workspaceFolder = { + uri = new_root_dir, + name = vim.fn.fnamemodify(new_root_dir, ":t"), + } + + -- Detect flat config + local flat_config_files = { + "eslint.config.js", + "eslint.config.mjs", + "eslint.config.cjs", + "eslint.config.ts", + "eslint.config.mts", + "eslint.config.cts", + } + + for _, file in ipairs(flat_config_files) do + local config_path = new_root_dir .. "/" .. file + if vim.uv.fs_stat(config_path) then + config.settings.experimental = config.settings.experimental or {} + config.settings.experimental.useFlatConfig = true + break + end + end + + -- Support Yarn PnP + local pnp_cjs = new_root_dir .. "/.pnp.cjs" + local pnp_js = new_root_dir .. "/.pnp.js" + if vim.uv.fs_stat(pnp_cjs) or vim.uv.fs_stat(pnp_js) then + config.cmd = vim.list_extend({ "yarn", "exec" }, config.cmd or {}) + end + end + ''; + }; + }; + biome = { + enable = true; + package = null; + packageFallback = false; + }; + }; + + keymaps = [ + { + key = "ca"; + lspBufAction = "code_action"; + } + { + key = "e"; + action = "lua vim.diagnostic.open_float()"; + } + ]; + }; + + # Define diagnostic appearance + diagnostic.settings = { + virtual_text = false; + signs = true; + underline = true; + update_in_insert = false; + severity_sort = false; + }; + }; + }; +} diff --git a/modules/neovim/options.nix b/modules/neovim/options.nix new file mode 100644 index 0000000..c36b7f4 --- /dev/null +++ b/modules/neovim/options.nix @@ -0,0 +1,52 @@ +{ ... }: +{ + flake.modules.homeManager.neovim-options = { + programs.nixvim = { + globals = { + mapleader = " "; + maplocalleader = " "; + }; + + clipboard.register = "unnamedplus"; + + opts = { + backup = false; + cmdheight = 1; + conceallevel = 0; + fileencoding = "utf-8"; + hlsearch = true; + ignorecase = true; + mouse = "a"; + pumheight = 10; + showmode = false; + smartindent = true; + breakindent = true; + showtabline = 0; + smartcase = true; + splitbelow = true; + splitright = true; + swapfile = false; + termguicolors = true; + timeoutlen = 600; + undofile = true; + updatetime = 230; + writebackup = false; + expandtab = true; + shiftwidth = 2; + tabstop = 2; + cursorline = true; + number = true; + relativenumber = true; + numberwidth = 2; + signcolumn = "yes"; + linebreak = true; + breakat = " ^I!@*-+;:,./?"; + scrolloff = 4; + sidescrolloff = 4; + winbar = ""; + foldlevel = 99; + foldlevelstart = 99; + }; + }; + }; +} diff --git a/modules/neovim/picker.nix b/modules/neovim/picker.nix new file mode 100644 index 0000000..5273ab6 --- /dev/null +++ b/modules/neovim/picker.nix @@ -0,0 +1,174 @@ +{ pkgs, ... }: +{ + flake.modules.homeManager.neovim-picker = { + programs.nixvim = { + plugins.oil = { + enable = true; + settings = { + keymaps = { + "q" = "actions.close"; + }; + columns = [ + "icon" + "permissions" + "size" + "mtime" + ]; + }; + }; + + extraPlugins = [ pkgs.vimPlugins.snacks-nvim ]; + extraConfigLua = /* lua */ '' + local Snacks = require("snacks"); + local filter_lsp_definitions = function(item) + if item.file:match("/react/ts5.0/") or item.file:match("react.d.ts") then + return false + end + return true + end + + Snacks.setup({ + bigfile = { enabled = true }, + bufdelete = { enabled = true }, + git = { enabled = true }, + indent = { enabled = true }, + input = { enabled = true }, + notifier = { enabled = true }, + picker = { + enabled = true, + prompt = "λ ", + layout = { preset = "ivy" }, + }, + statuscolumn = { enabled = true }, + }) + ''; + + keymaps = [ + # Git + { + key = "gb"; + action.__raw = "function() Snacks.git.blame_line() end"; + options.desc = "Show git blame for current line"; + } + # Picker + { + key = "."; + action.__raw = "function() Snacks.picker.files({ hidden = true }) end"; + options.desc = "Files"; + } + { + key = ""; + action.__raw = "function() Snacks.picker.git_files() end"; + options.desc = "Git files"; + } + # Find + { + key = "fr"; + action.__raw = "function() Snacks.picker.recent() end"; + options.desc = "Recent"; + } + { + key = "fp"; + action.__raw = "function() Snacks.picker.projects() end"; + options.desc = "Projects"; + } + { + key = "bb"; + action.__raw = "function() Snacks.picker.buffers() end"; + options.desc = "List buffers"; + } + { + key = "bd"; + action.__raw = "function() Snacks.bufdelete() end"; + options.desc = "Delete buffer"; + } + { + key = "bD"; + action.__raw = "function() Snacks.bufdelete.all() end"; + options.desc = "Delete all buffers"; + } + { + key = "bo"; + action.__raw = "function() Snacks.bufdelete.other() end"; + options.desc = "Delete other buffers"; + } + # Search + { + key = "ss"; + action.__raw = "function() Snacks.picker.grep() end"; + options.desc = "Grep"; + } + { + mode = [ + "n" + "x" + ]; + key = "sw"; + action.__raw = "function() Snacks.picker.grep_word() end"; + options.desc = "Visual selection or word"; + } + { + key = "su"; + action.__raw = "function() Snacks.picker.undo() end"; + options.desc = "Undo History"; + } + # Diagnostics + { + key = "td"; + action.__raw = "function() Snacks.picker.diagnostics_buffer() end"; + options.desc = "Buffer Diagnostics"; + } + { + key = "ta"; + action.__raw = "function() Snacks.picker.diagnostics() end"; + options.desc = "Diagnostics"; + } + # LSP + { + key = "gd"; + action.__raw = "function() Snacks.picker.lsp_definitions({ filter = { filter = filter_lsp_definitions } }) end"; + options.desc = "Goto Definition"; + } + { + key = "gD"; + action.__raw = "function() Snacks.picker.lsp_declarations() end"; + options.desc = "Goto Declaration"; + } + { + key = "grr"; + action.__raw = "function() Snacks.picker.lsp_references() end"; + options = { + desc = "References"; + nowait = true; + }; + } + { + key = "gI"; + action.__raw = "function() Snacks.picker.lsp_implementations() end"; + options.desc = "Goto Implementation"; + } + { + key = "gy"; + action.__raw = "function() Snacks.picker.lsp_type_definitions() end"; + options.desc = "Goto T[y]pe Definition"; + } + # Notifications and highlights + { + key = "on"; + action.__raw = "function() Snacks.notifier.show_history() end"; + options.desc = "Open notification history"; + } + { + key = "oh"; + action.__raw = "function() Snacks.picker.highlights() end"; + options.desc = "List highlights"; + } + { + key = "n"; + action = "Oil"; + options.desc = "Opens file explorer"; + } + ]; + }; + }; +} diff --git a/modules/neovim/statusline.nix b/modules/neovim/statusline.nix new file mode 100644 index 0000000..64af6d7 --- /dev/null +++ b/modules/neovim/statusline.nix @@ -0,0 +1,99 @@ +{ ... }: +{ + flake.modules.homeManager.neovim-statusline = { + programs.nixvim.plugins.lualine = { + enable = true; + + settings = { + options = { + theme = { + __raw = "winterly_lualine"; + }; + icons_enabled = false; + component_separators = { + left = "|"; + right = "|"; + }; + section_separators = { + left = ""; + right = ""; + }; + }; + sections = { + lualine_a = [ + { + __unkeyed-1 = "mode"; + fmt = { + __raw = "function(str) return str:sub(1, 1) end"; + }; + } + ]; + lualine_b = [ + { + __unkeyed-1 = "filename"; + file_status = true; + newfile_status = false; + path = 4; + shorting_target = 120; + symbols = { + modified = "[+]"; + readonly = "[-]"; + unnamed = "[No Name]"; + newfile = "[New]"; + }; + } + "encoding" + ]; + lualine_c = null; + lualine_x = null; + lualine_y = [ + "branch" + "diff" + "diagnostics" + ]; + lualine_z = [ + "location" + ]; + }; + }; + + # Sets up my custom colorscheme + luaConfig.pre = /* lua */ '' + local palette = require("dnsc.palette") + + local winterly_lualine = { + normal = { + a = { bg = palette.magenta, fg = palette.bg, gui = "bold" }, + b = { bg = palette.bg_secondary, fg = palette.magenta }, + c = { bg = palette.bg_secondary, fg = palette.magenta }, + }, + insert = { + a = { bg = palette.cyan_bright, fg = palette.bg, gui = "bold" }, + b = { bg = palette.bg_secondary, fg = palette.cyan_bright }, + c = { bg = palette.bg_secondary, fg = palette.cyan_bright }, + }, + visual = { + a = { bg = palette.blue_bright, fg = palette.bg, gui = "bold" }, + b = { bg = palette.bg_secondary, fg = palette.blue_bright }, + c = { bg = palette.bg_secondary, fg = palette.blue_bright }, + }, + replace = { + a = { bg = palette.red_bright, fg = palette.bg, gui = "bold" }, + b = { bg = palette.bg_secondary, fg = palette.red_bright }, + c = { bg = palette.bg_secondary, fg = palette.red_bright }, + }, + command = { + a = { bg = palette.green_bright, fg = palette.bg, gui = "bold" }, + b = { bg = palette.bg_secondary, fg = palette.green_bright }, + c = { bg = palette.bg_secondary, fg = palette.green_bright }, + }, + inactive = { + a = { bg = palette.bg_secondary, fg = palette.fg_dim }, + b = { bg = palette.bg_secondary, fg = palette.fg_dim }, + c = { bg = palette.bg_secondary, fg = palette.fg_dim }, + }, + } + ''; + }; + }; +} diff --git a/modules/systems.nix b/modules/systems.nix deleted file mode 100644 index 9cfcc0c..0000000 --- a/modules/systems.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - # Currently using ARM on MacOS and x86 on Linux - systems = [ - "aarch64-darwin" - "x86_64-linux" - ]; -} From 13c76e23d1f50c08579d4e0ac85c82ef1815445c Mon Sep 17 00:00:00 2001 From: Dennis Date: Tue, 3 Mar 2026 14:54:49 +0100 Subject: [PATCH 03/77] moves darwin system config to module --- flake.lock | 180 +++++++++++++++++++++++++++++++++++++ modules/darwin-system.nix | 65 ++++++++++++++ modules/hosts/dnsc-air.nix | 1 + 3 files changed, 246 insertions(+) create mode 100644 flake.lock create mode 100644 modules/darwin-system.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..91194c1 --- /dev/null +++ b/flake.lock @@ -0,0 +1,180 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixpkgs-lib" + ] + }, + "locked": { + "lastModified": 1772408722, + "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1769996383, + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772516620, + "narHash": "sha256-2r4cKdqCVlQkvcTcLUMxmsmAYZZxCMd//w/PnDnukTE=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "2b9504d5a0169d4940a312abe2df2c5658db8de9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "import-tree": { + "locked": { + "lastModified": 1772344373, + "narHash": "sha256-OQQ1MhB9t1J71b2wxRRTdH/Qd8UGG0p+dGspfCf5U1c=", + "owner": "vic", + "repo": "import-tree", + "rev": "10fda59eee7d7970ec443b925f32a1bc7526648c", + "type": "github" + }, + "original": { + "owner": "vic", + "repo": "import-tree", + "type": "github" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772379624, + "narHash": "sha256-NG9LLTWlz4YiaTAiRGChbrzbVxBfX+Auq4Ab/SWmk4A=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "52d061516108769656a8bd9c6e811c677ec5b462", + "type": "github" + }, + "original": { + "owner": "LnL7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1772479524, + "narHash": "sha256-U+hMRvavBzJYhdWCWGRHCK3bpcKjqTJAnyii3y09uT8=", + "rev": "4215e62dc2cd3bc705b0a423b9719ff6be378a43", + "type": "tarball", + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre957146.4215e62dc2cd/nixexprs.tar.xz" + }, + "original": { + "type": "tarball", + "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1770380644, + "narHash": "sha256-P7dWMHRUWG5m4G+06jDyThXO7kwSk46C1kgjEWcybkE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ae67888ff7ef9dff69b3cf0cc0fbfbcd3a722abe", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixvim": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs_2", + "systems": "systems" + }, + "locked": { + "lastModified": 1772402258, + "narHash": "sha256-3DmCFOdmbkFML1/G9gj8Wb+rCCZFPOQtNoMCpqOF8SA=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "21ae25e13b01d3b4cdc750b5f9e7bad68b150c10", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "home-manager": "home-manager", + "import-tree": "import-tree", + "nix-darwin": "nix-darwin", + "nixpkgs": "nixpkgs", + "nixpkgs-lib": [ + "nixpkgs" + ], + "nixvim": "nixvim" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/modules/darwin-system.nix b/modules/darwin-system.nix new file mode 100644 index 0000000..3f96cf2 --- /dev/null +++ b/modules/darwin-system.nix @@ -0,0 +1,65 @@ +{ config, ... }: +let + username = config.flake.globalConfig.username; +in +{ + flake.modules.darwin.system = { + system = { + primaryUser = username; + stateVersion = 5; + activationScripts.postActivation.text = '' + /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u + ''; + + defaults = { + NSGlobalDomain."com.apple.swipescrolldirection" = false; + + dock = { + autohide = true; + autohide-delay = 0.01; + autohide-time-modifier = 0.01; + expose-group-apps = true; + launchanim = false; + minimize-to-application = true; + orientation = "right"; + show-recents = false; + persistent-apps = [ + "/Applications/Helium.app" + "/Applications/Ghostty.app" + "/System/Applications/System Settings.app/" + ]; + persistent-others = [ + "/Users/${username}/Downloads" + ]; + }; + + finder = { + AppleShowAllExtensions = true; + CreateDesktop = false; + FXEnableExtensionChangeWarning = false; + FXPreferredViewStyle = "clmv"; + ShowPathbar = true; + ShowStatusBar = true; + }; + + loginwindow = { + LoginwindowText = "(λ) powered by nix-darwin"; + }; + + menuExtraClock = { + Show24Hour = true; + ShowDate = 0; + }; + + screencapture = { + location = "/Users/${username}/Downloads"; + target = "file"; + }; + + spaces.spans-displays = false; + }; + }; + + security.pam.services.sudo_local.touchIdAuth = true; + }; +} diff --git a/modules/hosts/dnsc-air.nix b/modules/hosts/dnsc-air.nix index 3da8700..8784c24 100644 --- a/modules/hosts/dnsc-air.nix +++ b/modules/hosts/dnsc-air.nix @@ -12,6 +12,7 @@ in specialArgs = { inherit inputs; }; modules = [ inputs.home-manager.darwinModules.home-manager + config.flake.modules.darwin.system { networking.hostName = "dnsc-air"; networking.computerName = "dnsc-air"; From acbe8a473db9f5c8ab388d8d2e5728dd645058b4 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 21:36:01 +0100 Subject: [PATCH 04/77] updates config --- flake.lock | 8 +- flake.nix | 4 - hosts/dnsc-machine/default.nix | 11 ++ hosts/dnsc-machine/hardware-configuration.nix | 41 +++++++ modules/{darwin-system.nix => base.nix} | 54 ++++++++- modules/base/default.nix | 112 ++++++++++++++++++ modules/config.nix | 6 + modules/hosts/dnsc-air.nix | 7 +- modules/hosts/dnsc-machine.nix | 11 ++ modules/neovim/default.nix | 3 +- modules/neovim/editing.nix | 4 +- modules/neovim/formatter.nix | 4 +- modules/neovim/lsp.nix | 4 +- modules/neovim/picker.nix | 4 +- modules/systems.nix | 7 ++ modules/vial/default.nix | 12 ++ 16 files changed, 270 insertions(+), 22 deletions(-) create mode 100644 hosts/dnsc-machine/default.nix create mode 100644 hosts/dnsc-machine/hardware-configuration.nix rename modules/{darwin-system.nix => base.nix} (56%) create mode 100644 modules/base/default.nix create mode 100644 modules/hosts/dnsc-machine.nix create mode 100644 modules/systems.nix create mode 100644 modules/vial/default.nix diff --git a/flake.lock b/flake.lock index 91194c1..ff8c6fd 100644 --- a/flake.lock +++ b/flake.lock @@ -99,11 +99,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1772479524, - "narHash": "sha256-U+hMRvavBzJYhdWCWGRHCK3bpcKjqTJAnyii3y09uT8=", - "rev": "4215e62dc2cd3bc705b0a423b9719ff6be378a43", + "lastModified": 1772525000, + "narHash": "sha256-JVA3N5t5II0xI9+sJ44UgaN6tMrZGOox0w2xZzKYt9Q=", + "rev": "72b1d820cb0149b40a35aa077b4b6d60cd1b23c3", "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre957146.4215e62dc2cd/nixexprs.tar.xz" + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre957475.72b1d820cb01/nixexprs.tar.xz" }, "original": { "type": "tarball", diff --git a/flake.nix b/flake.nix index 0c9ac25..1632df0 100644 --- a/flake.nix +++ b/flake.nix @@ -22,9 +22,5 @@ inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; - systems = [ - "aarch64-darwin" - "x86_64-linux" - ]; } (inputs.import-tree ./modules); } diff --git a/hosts/dnsc-machine/default.nix b/hosts/dnsc-machine/default.nix new file mode 100644 index 0000000..986f7da --- /dev/null +++ b/hosts/dnsc-machine/default.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + imports = [ + ./hardware-configuration.nix + ]; + + networking.hostName = "dnsc-machine"; + environment.systemPackages = [ ]; + system.stateVersion = "25.05"; +} diff --git a/hosts/dnsc-machine/hardware-configuration.nix b/hosts/dnsc-machine/hardware-configuration.nix new file mode 100644 index 0000000..0e059e0 --- /dev/null +++ b/hosts/dnsc-machine/hardware-configuration.nix @@ -0,0 +1,41 @@ +# 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 = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/30277f94-8b7b-4e91-8438-6815170edfdd"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/4DC9-7AB7"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/9b7564e7-2deb-4432-a4fc-d18d21ef2d11"; } + ]; + + # 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.enp42s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp45s0f3u3u4.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules/darwin-system.nix b/modules/base.nix similarity index 56% rename from modules/darwin-system.nix rename to modules/base.nix index 3f96cf2..1307d8b 100644 --- a/modules/darwin-system.nix +++ b/modules/base.nix @@ -3,7 +3,7 @@ let username = config.flake.globalConfig.username; in { - flake.modules.darwin.system = { + flake.modules.darwin.base = { system = { primaryUser = username; stateVersion = 5; @@ -11,6 +11,8 @@ in /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u ''; + nix.enable = false; + defaults = { NSGlobalDomain."com.apple.swipescrolldirection" = false; @@ -62,4 +64,54 @@ in security.pam.services.sudo_local.touchIdAuth = true; }; + + flake.modules.nixos.base = + { pkgs, ... }: + { + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + networking.networkmanager.enable = true; + + time.timeZone = "Europe/Berlin"; + i18n = { + defaultLocale = "en_US.UTF-8"; + extraLocaleSettings = { + LC_ADDRESS = "de_DE.UTF-8"; + LC_IDENTIFICATION = "de_DE.UTF-8"; + LC_MEASUREMENT = "de_DE.UTF-8"; + LC_MONETARY = "de_DE.UTF-8"; + LC_NAME = "de_DE.UTF-8"; + LC_NUMERIC = "de_DE.UTF-8"; + LC_PAPER = "de_DE.UTF-8"; + LC_TELEPHONE = "de_DE.UTF-8"; + LC_TIME = "de_DE.UTF-8"; + }; + }; + + security.sudo.enable = true; + + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + programs.mtr.enable = true; + + services.xserver.xkb.layout = "eu"; + services.openssh.enable = true; + services.udisks2.enable = true; + services.udev.packages = with pkgs; [ + vial + ]; + + users.users."${username}" = { + isNormalUser = true; + extraGroups = [ + "networkmanager" + "wheel" + ]; + }; + }; } diff --git a/modules/base/default.nix b/modules/base/default.nix new file mode 100644 index 0000000..4f3b8f2 --- /dev/null +++ b/modules/base/default.nix @@ -0,0 +1,112 @@ +{ config, ... }: +let + username = config.flake.globalConfig.username; +in +{ + flake.modules.darwin.system = + { pkgs }: + { + system = { + primaryUser = username; + stateVersion = 5; + activationScripts.postActivation.text = '' + /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u + ''; + + defaults = { + NSGlobalDomain."com.apple.swipescrolldirection" = false; + + dock = { + autohide = true; + autohide-delay = 0.01; + autohide-time-modifier = 0.01; + expose-group-apps = true; + launchanim = false; + minimize-to-application = true; + orientation = "right"; + show-recents = false; + persistent-apps = [ + "/Applications/Helium.app" + "/Applications/Ghostty.app" + "/System/Applications/System Settings.app/" + ]; + persistent-others = [ + "/Users/${username}/Downloads" + ]; + }; + + finder = { + AppleShowAllExtensions = true; + CreateDesktop = false; + FXEnableExtensionChangeWarning = false; + FXPreferredViewStyle = "clmv"; + ShowPathbar = true; + ShowStatusBar = true; + }; + + loginwindow = { + LoginwindowText = "(λ) powered by nix-darwin"; + }; + + menuExtraClock = { + Show24Hour = true; + ShowDate = 0; + }; + + screencapture = { + location = "/Users/${username}/Downloads"; + target = "file"; + }; + + spaces.spans-displays = false; + }; + }; + + security.pam.services.sudo_local.touchIdAuth = true; + }; + + flake.modules.nixos.system = + { pkgs }: + { + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + networking.networkmanager.enable = true; + i18n = { + defaultLocale = "en_US.UTF-8"; + extraLocaleSettings = { + LC_ADDRESS = "de_DE.UTF-8"; + LC_IDENTIFICATION = "de_DE.UTF-8"; + LC_MEASUREMENT = "de_DE.UTF-8"; + LC_MONETARY = "de_DE.UTF-8"; + LC_NAME = "de_DE.UTF-8"; + LC_NUMERIC = "de_DE.UTF-8"; + LC_PAPER = "de_DE.UTF-8"; + LC_TELEPHONE = "de_DE.UTF-8"; + LC_TIME = "de_DE.UTF-8"; + }; + }; + + security.sudo.enable = true; + + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + programs.mtr.enable = true; + + services.xserver.xkb.layout = "eu"; + services.openssh.enable = true; + services.udisks2.enable = true; + + users.users."${username}" = { + isNormalUser = true; + extraGroups = [ + "networkmanager" + "wheel" + ]; + }; + }; +} diff --git a/modules/config.nix b/modules/config.nix index 5850750..a490509 100644 --- a/modules/config.nix +++ b/modules/config.nix @@ -1,5 +1,11 @@ { lib, ... }: { + options.flake.modules = lib.mkOption { + type = lib.types.attrsOf (lib.types.lazyAttrsOf lib.types.raw); + default = { }; + description = "Reusable NixOS/Darwin/home-manager modules keyed by type and name"; + }; + options.flake.globalConfig = { username = lib.mkOption { type = lib.types.str; diff --git a/modules/hosts/dnsc-air.nix b/modules/hosts/dnsc-air.nix index 8784c24..2f2c661 100644 --- a/modules/hosts/dnsc-air.nix +++ b/modules/hosts/dnsc-air.nix @@ -4,6 +4,7 @@ ... }: let + hostname = "dnsc-air"; username = config.flake.globalConfig.username; in { @@ -12,10 +13,10 @@ in specialArgs = { inherit inputs; }; modules = [ inputs.home-manager.darwinModules.home-manager - config.flake.modules.darwin.system + config.flake.modules.darwin.base { - networking.hostName = "dnsc-air"; - networking.computerName = "dnsc-air"; + networking.hostName = "${hostname}"; + networking.computerName = "${hostname}"; users.users.${username}.home = "/Users/${username}"; nix.enable = false; nix.settings.experimental-features = [ diff --git a/modules/hosts/dnsc-machine.nix b/modules/hosts/dnsc-machine.nix new file mode 100644 index 0000000..f65631b --- /dev/null +++ b/modules/hosts/dnsc-machine.nix @@ -0,0 +1,11 @@ +{ inputs, ... }: + +{ + flake.nixosConfigurations.dnsc-machine = inputs.nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = with inputs.self.modules.nixos; [ + base + "${inputs.self}/hosts/dnsc-machine/default.nix" + ]; + }; +} diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index c5ffad7..eae14f8 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -1,10 +1,9 @@ { inputs, - pkgs, ... }: { - flake.modules.homeManager.neovim = { + flake.modules.homeManager.neovim = { pkgs, ... }: { imports = [ inputs.nixvim.homeModules.nixvim ]; programs.nixvim = { enable = true; diff --git a/modules/neovim/editing.nix b/modules/neovim/editing.nix index f9775da..c1f984a 100644 --- a/modules/neovim/editing.nix +++ b/modules/neovim/editing.nix @@ -1,6 +1,6 @@ -{ pkgs, ... }: +{ ... }: { - flake.modules.homeManager.neovim-editing = { + flake.modules.homeManager.neovim-editing = { pkgs, ... }: { programs.nixvim = { plugins.sleuth.enable = true; plugins.nvim-surround.enable = true; diff --git a/modules/neovim/formatter.nix b/modules/neovim/formatter.nix index 8b5de93..df2fb8d 100644 --- a/modules/neovim/formatter.nix +++ b/modules/neovim/formatter.nix @@ -1,6 +1,6 @@ -{ pkgs, ... }: +{ ... }: { - flake.modules.homeManager.neovim-formatter = { + flake.modules.homeManager.neovim-formatter = { pkgs, ... }: { programs.nixvim.plugins.conform-nvim = { enable = true; settings = { diff --git a/modules/neovim/lsp.nix b/modules/neovim/lsp.nix index a652c90..61861b4 100644 --- a/modules/neovim/lsp.nix +++ b/modules/neovim/lsp.nix @@ -1,6 +1,6 @@ -{ pkgs, ... }: +{ ... }: { - flake.modules.homeManager.neovim-lsp = { + flake.modules.homeManager.neovim-lsp = { pkgs, ... }: { programs.nixvim = { plugins.lspconfig.enable = true; diff --git a/modules/neovim/picker.nix b/modules/neovim/picker.nix index 5273ab6..dd7dd06 100644 --- a/modules/neovim/picker.nix +++ b/modules/neovim/picker.nix @@ -1,6 +1,6 @@ -{ pkgs, ... }: +{ ... }: { - flake.modules.homeManager.neovim-picker = { + flake.modules.homeManager.neovim-picker = { pkgs, ... }: { programs.nixvim = { plugins.oil = { enable = true; diff --git a/modules/systems.nix b/modules/systems.nix new file mode 100644 index 0000000..4ea5bf3 --- /dev/null +++ b/modules/systems.nix @@ -0,0 +1,7 @@ +{ ... }: +{ + systems = [ + "aarch64-darwin" + "x86_64-linux" + ]; +} diff --git a/modules/vial/default.nix b/modules/vial/default.nix new file mode 100644 index 0000000..9524fa7 --- /dev/null +++ b/modules/vial/default.nix @@ -0,0 +1,12 @@ +{ + flake.modules.nixos.vial = + { pkgs }: + { + environment.systemPackages = with pkgs; [ + vial + ]; + services.udev.packages = with pkgs; [ + vial + ]; + }; +} From 8156c9bd851dfc923c487624778e1da9d59eae17 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 21:40:52 +0100 Subject: [PATCH 05/77] removes unnecessary files --- hosts/dnsc-machine/default.nix | 11 -- hosts/dnsc-machine/hardware-configuration.nix | 41 ------ modules/base.nix | 117 ------------------ modules/hosts/dnsc-machine.nix | 6 +- 4 files changed, 3 insertions(+), 172 deletions(-) delete mode 100644 hosts/dnsc-machine/default.nix delete mode 100644 hosts/dnsc-machine/hardware-configuration.nix delete mode 100644 modules/base.nix diff --git a/hosts/dnsc-machine/default.nix b/hosts/dnsc-machine/default.nix deleted file mode 100644 index 986f7da..0000000 --- a/hosts/dnsc-machine/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ ... }: - -{ - imports = [ - ./hardware-configuration.nix - ]; - - networking.hostName = "dnsc-machine"; - environment.systemPackages = [ ]; - system.stateVersion = "25.05"; -} diff --git a/hosts/dnsc-machine/hardware-configuration.nix b/hosts/dnsc-machine/hardware-configuration.nix deleted file mode 100644 index 0e059e0..0000000 --- a/hosts/dnsc-machine/hardware-configuration.nix +++ /dev/null @@ -1,41 +0,0 @@ -# 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 = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/30277f94-8b7b-4e91-8438-6815170edfdd"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/4DC9-7AB7"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/9b7564e7-2deb-4432-a4fc-d18d21ef2d11"; } - ]; - - # 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.enp42s0.useDHCP = lib.mkDefault true; - # networking.interfaces.enp45s0f3u3u4.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/modules/base.nix b/modules/base.nix deleted file mode 100644 index 1307d8b..0000000 --- a/modules/base.nix +++ /dev/null @@ -1,117 +0,0 @@ -{ config, ... }: -let - username = config.flake.globalConfig.username; -in -{ - flake.modules.darwin.base = { - system = { - primaryUser = username; - stateVersion = 5; - activationScripts.postActivation.text = '' - /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u - ''; - - nix.enable = false; - - defaults = { - NSGlobalDomain."com.apple.swipescrolldirection" = false; - - dock = { - autohide = true; - autohide-delay = 0.01; - autohide-time-modifier = 0.01; - expose-group-apps = true; - launchanim = false; - minimize-to-application = true; - orientation = "right"; - show-recents = false; - persistent-apps = [ - "/Applications/Helium.app" - "/Applications/Ghostty.app" - "/System/Applications/System Settings.app/" - ]; - persistent-others = [ - "/Users/${username}/Downloads" - ]; - }; - - finder = { - AppleShowAllExtensions = true; - CreateDesktop = false; - FXEnableExtensionChangeWarning = false; - FXPreferredViewStyle = "clmv"; - ShowPathbar = true; - ShowStatusBar = true; - }; - - loginwindow = { - LoginwindowText = "(λ) powered by nix-darwin"; - }; - - menuExtraClock = { - Show24Hour = true; - ShowDate = 0; - }; - - screencapture = { - location = "/Users/${username}/Downloads"; - target = "file"; - }; - - spaces.spans-displays = false; - }; - }; - - security.pam.services.sudo_local.touchIdAuth = true; - }; - - flake.modules.nixos.base = - { pkgs, ... }: - { - boot.loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - - networking.networkmanager.enable = true; - - time.timeZone = "Europe/Berlin"; - i18n = { - defaultLocale = "en_US.UTF-8"; - extraLocaleSettings = { - LC_ADDRESS = "de_DE.UTF-8"; - LC_IDENTIFICATION = "de_DE.UTF-8"; - LC_MEASUREMENT = "de_DE.UTF-8"; - LC_MONETARY = "de_DE.UTF-8"; - LC_NAME = "de_DE.UTF-8"; - LC_NUMERIC = "de_DE.UTF-8"; - LC_PAPER = "de_DE.UTF-8"; - LC_TELEPHONE = "de_DE.UTF-8"; - LC_TIME = "de_DE.UTF-8"; - }; - }; - - security.sudo.enable = true; - - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - programs.mtr.enable = true; - - services.xserver.xkb.layout = "eu"; - services.openssh.enable = true; - services.udisks2.enable = true; - services.udev.packages = with pkgs; [ - vial - ]; - - users.users."${username}" = { - isNormalUser = true; - extraGroups = [ - "networkmanager" - "wheel" - ]; - }; - }; -} diff --git a/modules/hosts/dnsc-machine.nix b/modules/hosts/dnsc-machine.nix index f65631b..fcfda99 100644 --- a/modules/hosts/dnsc-machine.nix +++ b/modules/hosts/dnsc-machine.nix @@ -1,11 +1,11 @@ -{ inputs, ... }: +{ inputs, config, ... }: { flake.nixosConfigurations.dnsc-machine = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = with inputs.self.modules.nixos; [ + modules = with config.flake.modules.nixos; [ base - "${inputs.self}/hosts/dnsc-machine/default.nix" + dnsc-machine ]; }; } From e72a0523840bed22ac8f45dcac1dc3f69576dabd Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 21:51:59 +0100 Subject: [PATCH 06/77] updates config --- bak/AGENTS.md | 276 ---------- bak/Justfile | 36 -- bak/README.md | 29 - bak/flake.lock | 520 ------------------ bak/flake.nix | 109 ---- bak/home/darwin-work.nix | 29 - bak/home/darwin.nix | 30 - bak/home/deck.nix | 53 -- bak/home/linux.nix | 118 ---- bak/home/server.nix | 60 -- bak/hosts/dnsc-air/default.nix | 89 --- bak/hosts/dnsc-machine/default.nix | 84 --- .../dnsc-machine/hardware-configuration.nix | 41 -- bak/hosts/dnsc-server/default.nix | 173 ------ .../dnsc-server/hardware-configuration.nix | 40 -- bak/hosts/dnsc-vps-sm/default.nix | 187 ------- .../dnsc-vps-sm/hardware-configuration.nix | 8 - bak/hosts/dnsc-vps-sm/networking.nix | 33 -- bak/hosts/dnsc-work/default.nix | 104 ---- bak/modules/actual-server/default.nix | 21 - bak/modules/aerospace/default.nix | 115 ---- bak/modules/atuin/default.nix | 11 - bak/modules/backrest/default.nix | 98 ---- bak/modules/base/default.nix | 58 -- bak/modules/bash/bin/ff.sh | 18 - bak/modules/bash/default.nix | 55 -- bak/modules/cockpit/default.nix | 15 - bak/modules/direnv/default.nix | 6 - bak/modules/docker/default.nix | 11 - bak/modules/firefox/default.nix | 162 ------ bak/modules/fish/default.nix | 240 -------- bak/modules/fish/ff.bash | 18 - bak/modules/ghostty/default.nix | 57 -- bak/modules/ghostty/linux.nix | 56 -- bak/modules/git/default.nix | 28 - bak/modules/glance/default.nix | 205 ------- bak/modules/homebrew/default.nix | 38 -- bak/modules/homepage/default.nix | 175 ------ bak/modules/immich/default.nix | 9 - bak/modules/jellyfin/default.nix | 26 - bak/modules/keyd/default.nix | 15 - bak/modules/lazygit/default.nix | 21 - bak/modules/librewolf/default.nix | 165 ------ bak/modules/macos/default.nix | 61 -- bak/modules/nixvim/ai.nix | 45 -- bak/modules/nixvim/colorscheme.nix | 13 - bak/modules/nixvim/completion.nix | 29 - bak/modules/nixvim/default.nix | 27 - bak/modules/nixvim/editing.nix | 79 --- bak/modules/nixvim/extraFiles/palette.lua | 33 -- bak/modules/nixvim/extraFiles/winterly.lua | 368 ------------- bak/modules/nixvim/formatter.nix | 56 -- bak/modules/nixvim/git.nix | 28 - bak/modules/nixvim/keybindings.nix | 129 ----- bak/modules/nixvim/lsp.nix | 199 ------- bak/modules/nixvim/options.nix | 47 -- bak/modules/nixvim/picker.nix | 171 ------ bak/modules/nixvim/statusline.nix | 96 ---- .../nvim/config/after/ftplugin/markdown.vim | 5 - .../nvim/config/after/ftplugin/odin.vim | 5 - .../nvim/config/after/ftplugin/vimwiki.vim | 6 - bak/modules/nvim/config/colors/winterly.lua | 1 - bak/modules/nvim/config/ftdetect/fastlane.vim | 7 - bak/modules/nvim/config/init.lua | 1 - bak/modules/nvim/config/lazy-lock.json | 23 - bak/modules/nvim/config/lsp/astro.lua | 25 - bak/modules/nvim/config/lsp/biome.lua | 34 -- bak/modules/nvim/config/lsp/eslint.lua | 152 ----- bak/modules/nvim/config/lsp/gopls.lua | 99 ---- bak/modules/nvim/config/lsp/jsonls.lua | 15 - bak/modules/nvim/config/lsp/lua_ls.lua | 46 -- bak/modules/nvim/config/lsp/nil_ls.lua | 5 - bak/modules/nvim/config/lsp/tailwindcss.lua | 153 ------ bak/modules/nvim/config/lsp/ts_ls.lua | 22 - bak/modules/nvim/config/lua/dnsc/keymaps.lua | 10 - bak/modules/nvim/config/lua/dnsc/lazy.lua | 80 --- bak/modules/nvim/config/lua/dnsc/lsp.lua | 34 -- bak/modules/nvim/config/lua/dnsc/palette.lua | 1 - bak/modules/nvim/config/lua/dnsc/utils.lua | 152 ----- bak/modules/nvim/config/lua/plugins/blink.lua | 49 -- .../nvim/config/lua/plugins/codecompanion.lua | 26 - .../nvim/config/lua/plugins/conform.lua | 28 - .../nvim/config/lua/plugins/dispatch.lua | 3 - bak/modules/nvim/config/lua/plugins/flash.lua | 25 - .../nvim/config/lua/plugins/gitportal.lua | 24 - .../nvim/config/lua/plugins/helpers.lua | 4 - .../nvim/config/lua/plugins/lualine.lua | 78 --- .../nvim/config/lua/plugins/markdown.lua | 7 - .../nvim/config/lua/plugins/mini.pairs.lua | 4 - .../nvim/config/lua/plugins/nvim-surround.lua | 6 - bak/modules/nvim/config/lua/plugins/oil.lua | 19 - .../nvim/config/lua/plugins/schemastore.lua | 3 - .../nvim/config/lua/plugins/snacks.lua | 217 -------- .../nvim/config/lua/plugins/substitute.lua | 13 - .../nvim/config/lua/plugins/treesitter.lua | 100 ---- .../nvim/config/lua/plugins/which-key.lua | 153 ------ bak/modules/nvim/config/stylua.toml | 9 - bak/modules/nvim/deck.nix | 9 - bak/modules/nvim/default.nix | 25 - bak/modules/openssh/default.nix | 12 - bak/modules/raycast/default.nix | 7 - bak/modules/raycast/scripts/add-to-inbox.sh | 18 - bak/modules/raycast/scripts/emacsclient.sh | 20 - bak/modules/raycast/scripts/open-agenda.sh | 16 - bak/modules/restic/default.nix | 40 -- bak/modules/samba/default.nix | 45 -- bak/modules/ssh/default.nix | 43 -- bak/modules/steam/default.nix | 9 - bak/modules/syncthing/default.nix | 25 - bak/modules/tmux/default.nix | 79 --- bak/modules/tmux/server.nix | 58 -- .../tmuxinator/personal-layouts/dnsc.yml | 11 - .../tmuxinator/personal-layouts/main.yml | 7 - .../personal-layouts/nix-config.yml | 7 - .../tmuxinator/personal-layouts/notes.yml | 11 - .../tmuxinator/personal-layouts/proglog.yml | 11 - bak/modules/tmuxinator/personal.nix | 8 - .../tmuxinator/work-layouts/devtools.yml | 11 - .../work-layouts/k8s-admin-certification.yml | 11 - bak/modules/tmuxinator/work-layouts/main.yml | 7 - .../tmuxinator/work-layouts/nix-config.yml | 7 - bak/modules/tmuxinator/work-layouts/notes.yml | 11 - .../tmuxinator/work-layouts/ride-charts.yml | 11 - bak/modules/tmuxinator/work-layouts/ride.yml | 19 - bak/modules/tmuxinator/work.nix | 8 - bak/modules/ungoogled-chromium/default.nix | 13 - bak/modules/unix/audio.nix | 41 -- bak/modules/unix/base.nix | 28 - bak/modules/unix/bluetooth.nix | 14 - bak/modules/unix/default.nix | 6 - bak/modules/unix/nvidia.nix | 17 - bak/modules/unix/printing.nix | 10 - bak/modules/unix/shell.nix | 6 - bak/modules/unix/tablet.nix | 5 - bak/modules/ups/default.nix | 18 - bak/modules/uptime-kuma/default.nix | 8 - bak/modules/vaultwarden/default.nix | 11 - bak/modules/wezterm/config/appearance.lua | 21 - bak/modules/wezterm/config/helpers.lua | 78 --- bak/modules/wezterm/config/keybindings.lua | 77 --- bak/modules/wezterm/config/overrides.lua | 23 - bak/modules/wezterm/config/projects.lua | 33 -- bak/modules/wezterm/config/startup.lua | 28 - bak/modules/wezterm/config/tab_bar.lua | 60 -- bak/modules/wezterm/config/theme.lua | 65 --- bak/modules/wezterm/config/wezterm.lua | 21 - bak/modules/wezterm/default.nix | 8 - bak/modules/wm/awww/default.nix | 7 - bak/modules/wm/awww/scripts/random-bg.sh | 35 -- bak/modules/wm/cliphist/default.nix | 9 - bak/modules/wm/default.nix | 10 - bak/modules/wm/fuzzel/default.nix | 66 --- .../wm/fuzzel/scripts/fuzzel-cliphist.sh | 3 - .../wm/fuzzel/scripts/fuzzel-projects.sh | 17 - bak/modules/wm/fuzzel/scripts/fuzzel-ssh.sh | 8 - bak/modules/wm/ironbar/config/config.toml | 56 -- bak/modules/wm/ironbar/config/style.css | 171 ------ bak/modules/wm/ironbar/default.nix | 13 - bak/modules/wm/ly/default.nix | 23 - bak/modules/wm/niri-system/default.nix | 16 - bak/modules/wm/niri/config/config.kdl | 512 ----------------- bak/modules/wm/niri/default.nix | 60 -- bak/modules/wm/noctalia/default.nix | 135 ----- bak/modules/wm/swaync/config.json | 51 -- bak/modules/wm/swaync/default.nix | 10 - bak/modules/wm/swaync/style.css | 459 ---------------- bak/modules/wm/waybar/config/config.jsonc | 126 ----- bak/modules/wm/waybar/config/power_menu.xml | 20 - bak/modules/wm/waybar/config/style.css | 86 --- bak/modules/wm/waybar/default.nix | 11 - bak/modules/zellij/config.kdl | 331 ----------- bak/modules/zellij/default.nix | 15 - bak/modules/zen/default.nix | 311 ----------- bak/modules/zoxide/default.nix | 6 - bak/secrets/restic/password.age | 9 - bak/secrets/secrets.nix | 26 - bak/secrets/vaultwarden/env.age | Bin 616 -> 0 bytes bak/server-files/account.sqlite | Bin 61440 -> 0 bytes modules/base/default.nix | 6 +- .../{dnsc-air.nix => dnsc-air/default.nix} | 0 .../dnsc-machine/_hardware-configuration.nix | 36 ++ .../default.nix} | 10 +- 182 files changed, 47 insertions(+), 10411 deletions(-) delete mode 100644 bak/AGENTS.md delete mode 100644 bak/Justfile delete mode 100644 bak/README.md delete mode 100644 bak/flake.lock delete mode 100644 bak/flake.nix delete mode 100644 bak/home/darwin-work.nix delete mode 100644 bak/home/darwin.nix delete mode 100644 bak/home/deck.nix delete mode 100644 bak/home/linux.nix delete mode 100644 bak/home/server.nix delete mode 100644 bak/hosts/dnsc-air/default.nix delete mode 100644 bak/hosts/dnsc-machine/default.nix delete mode 100644 bak/hosts/dnsc-machine/hardware-configuration.nix delete mode 100644 bak/hosts/dnsc-server/default.nix delete mode 100644 bak/hosts/dnsc-server/hardware-configuration.nix delete mode 100644 bak/hosts/dnsc-vps-sm/default.nix delete mode 100644 bak/hosts/dnsc-vps-sm/hardware-configuration.nix delete mode 100644 bak/hosts/dnsc-vps-sm/networking.nix delete mode 100644 bak/hosts/dnsc-work/default.nix delete mode 100644 bak/modules/actual-server/default.nix delete mode 100644 bak/modules/aerospace/default.nix delete mode 100644 bak/modules/atuin/default.nix delete mode 100644 bak/modules/backrest/default.nix delete mode 100644 bak/modules/base/default.nix delete mode 100755 bak/modules/bash/bin/ff.sh delete mode 100644 bak/modules/bash/default.nix delete mode 100644 bak/modules/cockpit/default.nix delete mode 100644 bak/modules/direnv/default.nix delete mode 100644 bak/modules/docker/default.nix delete mode 100644 bak/modules/firefox/default.nix delete mode 100644 bak/modules/fish/default.nix delete mode 100644 bak/modules/fish/ff.bash delete mode 100644 bak/modules/ghostty/default.nix delete mode 100644 bak/modules/ghostty/linux.nix delete mode 100644 bak/modules/git/default.nix delete mode 100644 bak/modules/glance/default.nix delete mode 100644 bak/modules/homebrew/default.nix delete mode 100644 bak/modules/homepage/default.nix delete mode 100644 bak/modules/immich/default.nix delete mode 100644 bak/modules/jellyfin/default.nix delete mode 100644 bak/modules/keyd/default.nix delete mode 100644 bak/modules/lazygit/default.nix delete mode 100644 bak/modules/librewolf/default.nix delete mode 100644 bak/modules/macos/default.nix delete mode 100644 bak/modules/nixvim/ai.nix delete mode 100644 bak/modules/nixvim/colorscheme.nix delete mode 100644 bak/modules/nixvim/completion.nix delete mode 100644 bak/modules/nixvim/default.nix delete mode 100644 bak/modules/nixvim/editing.nix delete mode 100644 bak/modules/nixvim/extraFiles/palette.lua delete mode 100644 bak/modules/nixvim/extraFiles/winterly.lua delete mode 100644 bak/modules/nixvim/formatter.nix delete mode 100644 bak/modules/nixvim/git.nix delete mode 100644 bak/modules/nixvim/keybindings.nix delete mode 100644 bak/modules/nixvim/lsp.nix delete mode 100644 bak/modules/nixvim/options.nix delete mode 100644 bak/modules/nixvim/picker.nix delete mode 100644 bak/modules/nixvim/statusline.nix delete mode 100644 bak/modules/nvim/config/after/ftplugin/markdown.vim delete mode 100644 bak/modules/nvim/config/after/ftplugin/odin.vim delete mode 100644 bak/modules/nvim/config/after/ftplugin/vimwiki.vim delete mode 120000 bak/modules/nvim/config/colors/winterly.lua delete mode 100644 bak/modules/nvim/config/ftdetect/fastlane.vim delete mode 120000 bak/modules/nvim/config/init.lua delete mode 100644 bak/modules/nvim/config/lazy-lock.json delete mode 100644 bak/modules/nvim/config/lsp/astro.lua delete mode 100644 bak/modules/nvim/config/lsp/biome.lua delete mode 100644 bak/modules/nvim/config/lsp/eslint.lua delete mode 100644 bak/modules/nvim/config/lsp/gopls.lua delete mode 100644 bak/modules/nvim/config/lsp/jsonls.lua delete mode 100644 bak/modules/nvim/config/lsp/lua_ls.lua delete mode 100644 bak/modules/nvim/config/lsp/nil_ls.lua delete mode 100644 bak/modules/nvim/config/lsp/tailwindcss.lua delete mode 100644 bak/modules/nvim/config/lsp/ts_ls.lua delete mode 100644 bak/modules/nvim/config/lua/dnsc/keymaps.lua delete mode 100644 bak/modules/nvim/config/lua/dnsc/lazy.lua delete mode 100644 bak/modules/nvim/config/lua/dnsc/lsp.lua delete mode 120000 bak/modules/nvim/config/lua/dnsc/palette.lua delete mode 100644 bak/modules/nvim/config/lua/dnsc/utils.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/blink.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/codecompanion.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/conform.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/dispatch.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/flash.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/gitportal.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/helpers.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/lualine.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/markdown.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/mini.pairs.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/nvim-surround.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/oil.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/schemastore.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/snacks.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/substitute.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/treesitter.lua delete mode 100644 bak/modules/nvim/config/lua/plugins/which-key.lua delete mode 100644 bak/modules/nvim/config/stylua.toml delete mode 100644 bak/modules/nvim/deck.nix delete mode 100644 bak/modules/nvim/default.nix delete mode 100644 bak/modules/openssh/default.nix delete mode 100644 bak/modules/raycast/default.nix delete mode 100755 bak/modules/raycast/scripts/add-to-inbox.sh delete mode 100755 bak/modules/raycast/scripts/emacsclient.sh delete mode 100755 bak/modules/raycast/scripts/open-agenda.sh delete mode 100644 bak/modules/restic/default.nix delete mode 100644 bak/modules/samba/default.nix delete mode 100644 bak/modules/ssh/default.nix delete mode 100644 bak/modules/steam/default.nix delete mode 100644 bak/modules/syncthing/default.nix delete mode 100644 bak/modules/tmux/default.nix delete mode 100644 bak/modules/tmux/server.nix delete mode 100644 bak/modules/tmuxinator/personal-layouts/dnsc.yml delete mode 100644 bak/modules/tmuxinator/personal-layouts/main.yml delete mode 100644 bak/modules/tmuxinator/personal-layouts/nix-config.yml delete mode 100644 bak/modules/tmuxinator/personal-layouts/notes.yml delete mode 100644 bak/modules/tmuxinator/personal-layouts/proglog.yml delete mode 100644 bak/modules/tmuxinator/personal.nix delete mode 100644 bak/modules/tmuxinator/work-layouts/devtools.yml delete mode 100644 bak/modules/tmuxinator/work-layouts/k8s-admin-certification.yml delete mode 100644 bak/modules/tmuxinator/work-layouts/main.yml delete mode 100644 bak/modules/tmuxinator/work-layouts/nix-config.yml delete mode 100644 bak/modules/tmuxinator/work-layouts/notes.yml delete mode 100644 bak/modules/tmuxinator/work-layouts/ride-charts.yml delete mode 100644 bak/modules/tmuxinator/work-layouts/ride.yml delete mode 100644 bak/modules/tmuxinator/work.nix delete mode 100644 bak/modules/ungoogled-chromium/default.nix delete mode 100644 bak/modules/unix/audio.nix delete mode 100644 bak/modules/unix/base.nix delete mode 100644 bak/modules/unix/bluetooth.nix delete mode 100644 bak/modules/unix/default.nix delete mode 100644 bak/modules/unix/nvidia.nix delete mode 100644 bak/modules/unix/printing.nix delete mode 100644 bak/modules/unix/shell.nix delete mode 100644 bak/modules/unix/tablet.nix delete mode 100644 bak/modules/ups/default.nix delete mode 100644 bak/modules/uptime-kuma/default.nix delete mode 100644 bak/modules/vaultwarden/default.nix delete mode 100644 bak/modules/wezterm/config/appearance.lua delete mode 100644 bak/modules/wezterm/config/helpers.lua delete mode 100644 bak/modules/wezterm/config/keybindings.lua delete mode 100644 bak/modules/wezterm/config/overrides.lua delete mode 100644 bak/modules/wezterm/config/projects.lua delete mode 100644 bak/modules/wezterm/config/startup.lua delete mode 100644 bak/modules/wezterm/config/tab_bar.lua delete mode 100644 bak/modules/wezterm/config/theme.lua delete mode 100644 bak/modules/wezterm/config/wezterm.lua delete mode 100644 bak/modules/wezterm/default.nix delete mode 100644 bak/modules/wm/awww/default.nix delete mode 100755 bak/modules/wm/awww/scripts/random-bg.sh delete mode 100644 bak/modules/wm/cliphist/default.nix delete mode 100644 bak/modules/wm/default.nix delete mode 100644 bak/modules/wm/fuzzel/default.nix delete mode 100755 bak/modules/wm/fuzzel/scripts/fuzzel-cliphist.sh delete mode 100755 bak/modules/wm/fuzzel/scripts/fuzzel-projects.sh delete mode 100755 bak/modules/wm/fuzzel/scripts/fuzzel-ssh.sh delete mode 100644 bak/modules/wm/ironbar/config/config.toml delete mode 100644 bak/modules/wm/ironbar/config/style.css delete mode 100644 bak/modules/wm/ironbar/default.nix delete mode 100644 bak/modules/wm/ly/default.nix delete mode 100644 bak/modules/wm/niri-system/default.nix delete mode 100644 bak/modules/wm/niri/config/config.kdl delete mode 100644 bak/modules/wm/niri/default.nix delete mode 100644 bak/modules/wm/noctalia/default.nix delete mode 100644 bak/modules/wm/swaync/config.json delete mode 100644 bak/modules/wm/swaync/default.nix delete mode 100644 bak/modules/wm/swaync/style.css delete mode 100644 bak/modules/wm/waybar/config/config.jsonc delete mode 100644 bak/modules/wm/waybar/config/power_menu.xml delete mode 100644 bak/modules/wm/waybar/config/style.css delete mode 100644 bak/modules/wm/waybar/default.nix delete mode 100644 bak/modules/zellij/config.kdl delete mode 100644 bak/modules/zellij/default.nix delete mode 100644 bak/modules/zen/default.nix delete mode 100644 bak/modules/zoxide/default.nix delete mode 100644 bak/secrets/restic/password.age delete mode 100644 bak/secrets/secrets.nix delete mode 100644 bak/secrets/vaultwarden/env.age delete mode 100644 bak/server-files/account.sqlite rename modules/hosts/{dnsc-air.nix => dnsc-air/default.nix} (100%) create mode 100644 modules/hosts/dnsc-machine/_hardware-configuration.nix rename modules/hosts/{dnsc-machine.nix => dnsc-machine/default.nix} (52%) diff --git a/bak/AGENTS.md b/bak/AGENTS.md deleted file mode 100644 index 40df3e4..0000000 --- a/bak/AGENTS.md +++ /dev/null @@ -1,276 +0,0 @@ -# Agent Guide for nix-config - -This document provides guidelines for AI coding agents working in this Nix configuration repository. - -## Repository Overview - -This is a flake-based Nix configuration managing multiple hosts: -- `dnsc-air` (nix-darwin, macOS) -- `dnsc-work` (nix-darwin, macOS) -- `dnsc-deck` (home-manager only, Steam Deck) -- `dnsc-server` (NixOS) -- `dnsc-vps-sm` (NixOS) - -## Directory Structure - -``` -. -├── flake.nix # Main flake configuration -├── Justfile # Common build/deploy commands -├── hosts/ # Host-specific configurations -│ ├── dnsc-air/ -│ ├── dnsc-work/ -│ ├── dnsc-server/ -│ └── dnsc-vps-sm/ -├── home/ # Home-manager configurations -│ ├── darwin.nix -│ ├── darwin-work.nix -│ ├── linux.nix -│ ├── server.nix -│ └── deck.nix -├── modules/ # Reusable modules -│ ├── base/ -│ ├── fish/ -│ ├── git/ -│ ├── nixvim/ -│ └── [40+ other modules] -└── secrets/ # agenix encrypted secrets -``` - -## Build Commands - -### Validation and Testing -```bash -# Check flake evaluates correctly -nix flake check - -# Show flake metadata -nix flake show - -# Update flake inputs -just up - -# Update specific input -just upi i=home-manager -``` - -### Deployment - -**macOS (darwin-rebuild):** -```bash -# Deploy to current macOS host -just mre - -# Deploy with lock file recreation -just mup - -# Manual deployment -darwin-rebuild switch --flake . -``` - -**NixOS (nixos-rebuild):** -```bash -# Deploy NixOS configuration -just deploy - -# Deploy with debug output -just debug - -# Manual deployment -nixos-rebuild switch --flake . -``` - -**Steam Deck (home-manager):** -```bash -# Deploy to Steam Deck -just dre - -# Manual deployment -nix run home-manager/master -- switch --flake .#dnsc-deck -``` - -### Maintenance -```bash -# View system generation history -just history - -# Clean old generations (>7 days) -just clean - -# Run garbage collection -just gc - -# Open Nix REPL -just repl -``` - -## Code Style Guidelines - -### Nix Language Conventions - -**File Structure:** -```nix -{ - config, - inputs, - outputs, - lib, - pkgs, - ... -}: -{ - imports = [ - # List imports first - ]; - - # Configuration follows -} -``` - -**Formatting:** -- Use 2 spaces for indentation -- Opening braces on same line: `{ foo = "bar"; }` -- Function parameters use named pattern matching -- Multi-line lists: one item per line with trailing semicolons -- String interpolation: `"${variable}"` or `''${expression}''` - -**Naming Conventions:** -- Module files: `default.nix` in subdirectories -- Descriptive attribute names: `services.syncthing.enable` -- Host configurations: `dnsc-` -- Use kebab-case for file/directory names: `nixos-modules` -- Use camelCase for attribute names in Nix expressions - -**Imports:** -```nix -# In flake.nix -inputs.home-manager.nixosModules.home-manager - -# In configuration files -outputs.nixosModules.base -../../modules/docker -./hardware-configuration.nix -``` - -**Package Management:** -```nix -# System packages -environment.systemPackages = with pkgs; [ - git - btop - neovim -]; - -# Using lib.mkAfter for additions -environment.systemPackages = lib.mkAfter ( - with pkgs; [ - additional-package - ] -); -``` - -**Module Structure:** -- Keep modules focused and reusable -- Place in `modules//default.nix` -- Use option declarations when creating configurable modules -- Include modules in host configs via `imports = [ ]` - -### Configuration Patterns - -**Home Manager Integration:** -```nix -home-manager = { - extraSpecialArgs = { inherit inputs outputs; }; - useGlobalPkgs = true; - backupFileExtension = "backup"; - users = { - dennis = import ../../home/darwin.nix; - }; -}; -``` - -**Service Configuration:** -```nix -services.syncthing = { - enable = true; - user = "dennis"; - configDir = "/home/dennis/.config/syncthing"; - # ... additional settings -}; -``` - -**Secrets with agenix:** -```nix -age = { - identityPaths = [ "${config.users.users.dennis.home}/.ssh/id_ed25519" ]; - secrets."restic/password".file = ../../secrets/restic/password.age; -}; -``` - -### Fish Shell Functions - -**Function Style:** -```nix -functions = { - function_name = /* fish */ '' - # Fish shell code here - echo "example" - ''; -}; -``` - -**Inline Comments:** -Use `/* fish */` or `/* bash */` before multi-line strings to indicate language - -## Common Tasks - -### Adding a New Module - -1. Create `modules//default.nix` -2. Define module structure: - ```nix - { pkgs, ... }: - { - # Configuration here - } - ``` -3. Export in `flake.nix` if needed: - ```nix - nixosModules.moduleName = import ./modules/module-name; - ``` -4. Import in host configuration: - ```nix - imports = [ ../../modules/module-name ]; - ``` - -### Adding a New Host - -1. Create `hosts//default.nix` -2. Create `hosts//hardware-configuration.nix` (for NixOS) -3. Add configuration to `flake.nix`: - ```nix - nixosConfigurations.hostname = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs outputs; }; - modules = [ ./hosts/hostname ]; - }; - ``` - -### Modifying Home Manager Config - -1. Edit appropriate file in `home/`: - - `darwin.nix` for dnsc-air - - `darwin-work.nix` for dnsc-work - - `server.nix` for servers -2. Changes take effect on next deployment -3. Home configs import modules from `modules/` directory - -## Important Notes - -- **Never commit secrets**: Use agenix for sensitive data -- **Test before deploying**: Run `nix flake check` before major changes -- **System state version**: Don't change `system.stateVersion` without migration -- **Flake inputs**: Keep inputs up-to-date with `just up` -- **Git ignore**: `.DS_Store` files are ignored globally (see `modules/git/default.nix`) -- **No traditional package.json**: This is a Nix project, not a Node.js project -- **Experimental features**: This config uses `nix-command` and `flakes` features diff --git a/bak/Justfile b/bak/Justfile deleted file mode 100644 index 37e72a3..0000000 --- a/bak/Justfile +++ /dev/null @@ -1,36 +0,0 @@ -deploy: - nixos-rebuild switch --flake . - -debug: - nixos-rebuild switch --flake . --show-trace --verbose - -up: - nix flake update - -# Update specific input -# usage: make upi i=home-manager -upi: - nix flake update $(i) - -history: - nix profile history --profile /nix/var/nix/profiles/system - -repl: - nix repl -f flake:nixpkgs - -clean: - sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d - -gc: - sudo nix-collect-garbage --delete-old - -# dnsc-air -mre: - if ! git diff --quiet || ! git diff --staged --quiet; then git add . && git commit -am "new revision"; fi && darwin-rebuild switch --flake . - -mup: - darwin-rebuild switch --recreate-lock-file --flake . - -# dnsc-deck -dre: - nix run home-manager/master -- switch --flake .#dnsc-deck diff --git a/bak/README.md b/bak/README.md deleted file mode 100644 index 581e74c..0000000 --- a/bak/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Nix - -The flake-based nix configuration I use for my servers and personal computing devices: - -- `dnsc-air` (nix-darwin) -- `dnsc-work` (nix-darwin) -- `dnsc-deck` (nix package/configuration management on Steam Deck) -- `dnsc-server` (NixOS) -- `dnsc-vps-sm` (nixOS) - -## Modules - -Shared functionality can be found in the `./modules` directory. The modules are just included in the relevant host configuration. - -## Home Manager - -In addition to the system configuration in `./hosts` I use `home-manager` to handle user-specific configuration (`./home`). - -## Secrets - -Secrets are managed with `agenix`. A step-by-step tutorial is included as a comment in the main secrets file. - -## Commands - -Because Nix-CLI commands can get a bit unwieldy (at least as how I use them currently) I've added a `Justfile` with commands to deploy changes and update packages and flakes. - -## TODO - -- [ ] Modularize server configs (`dnsc-vps-sm` and `dnsc-server`) diff --git a/bak/flake.lock b/bak/flake.lock deleted file mode 100644 index b621bf1..0000000 --- a/bak/flake.lock +++ /dev/null @@ -1,520 +0,0 @@ -{ - "nodes": { - "agenix": { - "inputs": { - "darwin": "darwin", - "home-manager": "home-manager", - "nixpkgs": "nixpkgs", - "systems": "systems" - }, - "locked": { - "lastModified": 1770165109, - "narHash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I=", - "owner": "ryantm", - "repo": "agenix", - "rev": "b027ee29d959fda4b60b57566d64c98a202e0feb", - "type": "github" - }, - "original": { - "owner": "ryantm", - "repo": "agenix", - "type": "github" - } - }, - "brew-src": { - "flake": false, - "locked": { - "lastModified": 1769363988, - "narHash": "sha256-BiGPeulrDVetXP+tjxhMcGLUROZAtZIhU5m4MqawCfM=", - "owner": "Homebrew", - "repo": "brew", - "rev": "d01011cac6d72032c75fd2cd9489909e95d9faf2", - "type": "github" - }, - "original": { - "owner": "Homebrew", - "ref": "5.0.12", - "repo": "brew", - "type": "github" - } - }, - "darwin": { - "inputs": { - "nixpkgs": [ - "agenix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1744478979, - "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "43975d782b418ebf4969e9ccba82466728c2851b", - "type": "github" - }, - "original": { - "owner": "lnl7", - "ref": "master", - "repo": "nix-darwin", - "type": "github" - } - }, - "firefox-addons": { - "inputs": { - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "dir": "pkgs/firefox-addons", - "lastModified": 1770350627, - "narHash": "sha256-gaLX5akNsppWTRPw4Q+E8QxsjxMkMAU539wFdnI8i70=", - "owner": "rycee", - "repo": "nur-expressions", - "rev": "27854a8a99d8ef77d0d6c70cf9c7f99f1a3e8d8f", - "type": "gitlab" - }, - "original": { - "dir": "pkgs/firefox-addons", - "owner": "rycee", - "repo": "nur-expressions", - "type": "gitlab" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769996383, - "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "agenix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1745494811, - "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1770318660, - "narHash": "sha256-yFVde8QZK7Dc0Xa8eQDsmxLX4NJNfL1NKfctSyiQgMY=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "471e6a065f9efed51488d7c51a9abbd387df91b8", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_3": { - "inputs": { - "nixpkgs": [ - "zen-browser", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769872935, - "narHash": "sha256-07HMIGQ/WJeAQJooA7Kkg1SDKxhAiV6eodvOwTX6WKI=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "f4ad5068ee8e89e4a7c2e963e10dd35cd77b37b7", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "ip-whitelist": { - "inputs": { - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1733315147, - "narHash": "sha256-maBv+DuS0e0xuO+lh1WebUg8YkHL1jnafrmCPLrd2D0=", - "owner": "Oak-Digital", - "repo": "nixos-ip-whitelist-firewall", - "rev": "14e3346cc015d370b00a16b790a1c323b985ff63", - "type": "github" - }, - "original": { - "owner": "Oak-Digital", - "repo": "nixos-ip-whitelist-firewall", - "type": "github" - } - }, - "nix-darwin": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1770184146, - "narHash": "sha256-DsqnN6LvXmohTRaal7tVZO/AKBuZ02kPBiZKSU4qa/k=", - "owner": "LnL7", - "repo": "nix-darwin", - "rev": "0d7874ef7e3ba02d58bebb871e6e29da36fa1b37", - "type": "github" - }, - "original": { - "owner": "LnL7", - "ref": "master", - "repo": "nix-darwin", - "type": "github" - } - }, - "nix-homebrew": { - "inputs": { - "brew-src": "brew-src" - }, - "locked": { - "lastModified": 1769437432, - "narHash": "sha256-8d7KnCpT2LweRvSzZYEGd9IM3eFX+A78opcnDM0+ndk=", - "owner": "zhaofengli", - "repo": "nix-homebrew", - "rev": "a5409abd0d5013d79775d3419bcac10eacb9d8c5", - "type": "github" - }, - "original": { - "owner": "zhaofengli", - "repo": "nix-homebrew", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1754028485, - "narHash": "sha256-IiiXB3BDTi6UqzAZcf2S797hWEPCRZOwyNThJIYhUfk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "59e69648d345d6e8fef86158c555730fa12af9de", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1770136044, - "narHash": "sha256-tlFqNG/uzz2++aAmn4v8J0vAkV3z7XngeIIB3rM3650=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e576e3c9cf9bad747afcddd9e34f51d18c855b4e", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1744536153, - "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 0, - "narHash": "sha256-US1tAChvPxT52RV8GksWZS415tTS7PV42KTc2PNDBmc=", - "path": "/nix/store/aa0zsahvyqnvzkicsh29jirm9hwv95pg-source", - "type": "path" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1770169770, - "narHash": "sha256-awR8qIwJxJJiOmcEGgP2KUqYmHG4v/z8XpL9z8FnT1A=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "aa290c9891fa4ebe88f8889e59633d20cc06a5f2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1770169770, - "narHash": "sha256-awR8qIwJxJJiOmcEGgP2KUqYmHG4v/z8XpL9z8FnT1A=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "aa290c9891fa4ebe88f8889e59633d20cc06a5f2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_6": { - "locked": { - "lastModified": 0, - "narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=", - "path": "/nix/store/khbvilmsrv4l69nwd52h27j1mp44a0xi-source", - "type": "path" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_7": { - "locked": { - "lastModified": 1728538411, - "narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_8": { - "locked": { - "lastModified": 1769461804, - "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixvim": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_5", - "systems": "systems_2" - }, - "locked": { - "lastModified": 1770388595, - "narHash": "sha256-0NvpmDqFcJAtRFJE3RDZWnN7PDJBZutoDtN+Cl8a3DY=", - "owner": "nix-community", - "repo": "nixvim", - "rev": "51abc532525e486176f9a7b24b17908c60017b54", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixvim", - "type": "github" - } - }, - "noctalia": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1770405424, - "narHash": "sha256-yZA6Kutl6ptH0ZYBzeiVg4X+nMqFWuj/raWh9WPEBd0=", - "owner": "noctalia-dev", - "repo": "noctalia-shell", - "rev": "ef94643dbc42a4566540994f08aafc1c5a2f9825", - "type": "github" - }, - "original": { - "owner": "noctalia-dev", - "repo": "noctalia-shell", - "type": "github" - } - }, - "root": { - "inputs": { - "agenix": "agenix", - "firefox-addons": "firefox-addons", - "home-manager": "home-manager_2", - "ip-whitelist": "ip-whitelist", - "nix-darwin": "nix-darwin", - "nix-homebrew": "nix-homebrew", - "nixpkgs": "nixpkgs_4", - "nixpkgs-stable": "nixpkgs-stable", - "nixvim": "nixvim", - "noctalia": "noctalia", - "zellij-switch": "zellij-switch", - "zen-browser": "zen-browser" - } - }, - "rust-overlay": { - "inputs": { - "nixpkgs": "nixpkgs_7" - }, - "locked": { - "lastModified": 1736476219, - "narHash": "sha256-+qyv3QqdZCdZ3cSO/cbpEY6tntyYjfe1bB12mdpNFaY=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "de30cc5963da22e9742bbbbb9a3344570ed237b9", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "zellij-switch": { - "inputs": { - "nixpkgs": "nixpkgs_6", - "rust-overlay": "rust-overlay", - "systems": "systems_3" - }, - "locked": { - "lastModified": 1742588229, - "narHash": "sha256-IPg0pBw0ciF+xl6viq3nK+dvZoDZrfBDui7dkPLz258=", - "owner": "mostafaqanbaryan", - "repo": "zellij-switch", - "rev": "0e3c303c19890ccb03589230ac5a7c4307e573e4", - "type": "github" - }, - "original": { - "owner": "mostafaqanbaryan", - "repo": "zellij-switch", - "type": "github" - } - }, - "zen-browser": { - "inputs": { - "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_8" - }, - "locked": { - "lastModified": 1770382887, - "narHash": "sha256-on4vg7ctpMPzKWcvXPtV095aal6KUPDSKV9+I8HhQtY=", - "owner": "0xc000022070", - "repo": "zen-browser-flake", - "rev": "58aa8fb418e2853382d52453a6a7739125f2b8e0", - "type": "github" - }, - "original": { - "owner": "0xc000022070", - "repo": "zen-browser-flake", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/bak/flake.nix b/bak/flake.nix deleted file mode 100644 index 014bab0..0000000 --- a/bak/flake.nix +++ /dev/null @@ -1,109 +0,0 @@ -{ - description = "dnsc-server NixOS flake"; - - inputs = { - agenix.url = "github:ryantm/agenix"; - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11"; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - nix-darwin.url = "github:LnL7/nix-darwin/master"; - nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; - ip-whitelist.url = "github:Oak-Digital/nixos-ip-whitelist-firewall"; - nix-homebrew.url = "github:zhaofengli/nix-homebrew"; - zellij-switch.url = "github:mostafaqanbaryan/zellij-switch"; - zen-browser.url = "github:0xc000022070/zen-browser-flake"; - firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; - nixvim.url = "github:nix-community/nixvim"; - noctalia = { - url = "github:noctalia-dev/noctalia-shell"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = - { - self, - nixpkgs, - home-manager, - nix-darwin, - nix-homebrew, - agenix, - zellij-switch, - nixvim, - noctalia, - ... - }@inputs: - let - inherit (self) outputs; - in - { - # Custom nixosModules - nixosModules.base = import ./modules/base; - nixosModules.macos = import ./modules/macos; - nixosModules.homebrew = import ./modules/homebrew; - nixosModules.aerospace = import ./modules/aerospace; - nixosModules.keyd = import ./modules/keyd; - nixosModules.ly = import ./modules/wm/ly; - nixosModules.unix = import ./modules/unix; - nixosModules.nvidia = import ./modules/unix/nvidia.nix; - nixosModules.bluetooth = import ./modules/unix/bluetooth.nix; - nixosModules.audio = import ./modules/unix/audio.nix; - nixosModules.printing = import ./modules/unix/printing.nix; - nixosModules.tablet = import ./modules/unix/tablet.nix; - nixosModules.steam = import ./modules/steam; - nixosModules.niriSystem = import ./modules/wm/niri-system; - nixosModules.direnv = import ./modules/direnv; - - nixosConfigurations.dnsc-machine = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs outputs; }; - modules = [ - ./hosts/dnsc-machine - ]; - }; - - nixosConfigurations.dnsc-server = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs outputs; }; - modules = [ - ./hosts/dnsc-server - agenix.nixosModules.default - ]; - }; - - nixosConfigurations.dnsc-vps-sm = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs outputs; }; - modules = [ - ./hosts/dnsc-vps-sm - agenix.nixosModules.default - ]; - }; - - darwinConfigurations.dnsc-air = nix-darwin.lib.darwinSystem { - system = "aarch64-darwin"; - specialArgs = { inherit inputs outputs; }; - modules = [ - nix-homebrew.darwinModules.nix-homebrew - ./hosts/dnsc-air - ]; - }; - - darwinConfigurations.dnsc-work = nix-darwin.lib.darwinSystem { - system = "aarch64-darwin"; - specialArgs = { inherit inputs outputs; }; - modules = [ - nix-homebrew.darwinModules.nix-homebrew - ./hosts/dnsc-work - ]; - }; - - homeConfigurations."dnsc-deck" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.x86_64-linux; - modules = [ ./home/deck.nix ]; - }; - }; -} diff --git a/bak/home/darwin-work.nix b/bak/home/darwin-work.nix deleted file mode 100644 index 1b490ad..0000000 --- a/bak/home/darwin-work.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ inputs, ... }: - -{ - home.username = "dennis"; - home.stateVersion = "24.11"; - home.homeDirectory = "/Users/dennis"; - home.sessionVariables = { - EDITOR = "nvim"; - GOPATH = "$HOME/go"; - JAVA_HOME = "/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home"; - ANDROID_HOME = "$HOME/Library/Android/sdk"; - }; - - xdg.enable = true; - - imports = [ - inputs.nixvim.homeModules.nixvim - ../modules/git - ../modules/zoxide - ../modules/fish - ../modules/ghostty - ../modules/tmux - ../modules/tmuxinator/work.nix - ../modules/lazygit - ]; - - programs.home-manager.enable = true; - programs.nixvim.imports = [ ../modules/nixvim ]; -} diff --git a/bak/home/darwin.nix b/bak/home/darwin.nix deleted file mode 100644 index 5d3c139..0000000 --- a/bak/home/darwin.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ inputs, ... }: - -{ - home.username = "dennis"; - home.homeDirectory = "/Users/dennis"; - home.stateVersion = "24.11"; - - home.sessionVariables = { - EDITOR = "nvim"; - GOPATH = "$HOME/go"; - QT_QPA_PLATFORMTHEME = "gtk3"; - }; - - xdg.enable = true; - - imports = [ - inputs.nixvim.homeModules.nixvim - ../modules/ssh - ../modules/git - ../modules/zoxide - ../modules/fish - ../modules/tmux - ../modules/tmuxinator/personal.nix - ../modules/ghostty - ../modules/lazygit - ]; - - programs.home-manager.enable = true; - programs.nixvim.imports = [ ../modules/nixvim ]; -} diff --git a/bak/home/deck.nix b/bak/home/deck.nix deleted file mode 100644 index 2b9ee3a..0000000 --- a/bak/home/deck.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ pkgs, ... }: - -{ - nix = { - package = pkgs.nix; - settings.experimental-features = [ - "nix-command" - "flakes" - ]; - }; - - nixpkgs = { - config = { - allowUnfree = true; - allowUnfreePredicate = (_: true); - }; - }; - - home.username = "deck"; - home.homeDirectory = "/home/deck"; - home.stateVersion = "24.11"; - - home.sessionVariables = { - EDITOR = "nvim"; - }; - - home.packages = with pkgs; [ - git - neovim - neofetch - zip - unzip - ripgrep - fzf - just - lazygit - fortune - zoxide - fnm - gcc - ]; - - xdg.enable = true; - - imports = [ - ../modules/git - ../modules/fish - ../modules/nvim/deck.nix - ../modules/lazygit - ]; - - programs.home-manager.enable = true; -} diff --git a/bak/home/linux.nix b/bak/home/linux.nix deleted file mode 100644 index b65f4c9..0000000 --- a/bak/home/linux.nix +++ /dev/null @@ -1,118 +0,0 @@ -{ inputs, pkgs, ... }: - -{ - home.username = "dennis"; - home.homeDirectory = "/home/dennis"; - home.stateVersion = "24.11"; - - home.packages = with pkgs; [ - neofetch - zip - unzip - ripgrep - fzf - fd - sd - bat - tldr - fortune - just - mmv-go - zoxide - xwayland-satellite - nerd-fonts.victor-mono - adwaita-fonts - noto-fonts-color-emoji - bodoni-moda - reversal-icon-theme - fnm - libnotify - swww - loupe - nautilus - nautilus-open-any-terminal - swaynotificationcenter - gimp - wl-clipboard - hyprpicker - usbutils - krita - gpustat - tmux - tmuxinator - adw-gtk3 - kdePackages.qt6ct - ]; - - imports = [ - inputs.nixvim.homeModules.nixvim - inputs.noctalia.homeModules.default - ../modules/ssh - ../modules/git - ../modules/zoxide - ../modules/direnv - ../modules/ghostty/linux.nix - ../modules/fish - ../modules/tmux - ../modules/tmuxinator/personal.nix - ../modules/zen - ../modules/ungoogled-chromium - ../modules/wm/niri - ../modules/wm/noctalia - ]; - - programs.home-manager.enable = true; - programs.nixvim.imports = [ ../modules/nixvim ]; - - # Appearance - fonts.fontconfig = { - enable = true; - antialiasing = true; - defaultFonts = { - monospace = [ "VictorMono Nerd Font" ]; - sansSerif = [ - "Adwaita Sans" - "Noto Color Emoji" - ]; - serif = [ "Bodoni Moda" ]; - }; - }; - - gtk = { - enable = true; - colorScheme = "dark"; - theme.name = "adw-gtk3"; - font = { - package = pkgs.adwaita-fonts; - name = "Adwaita Sans"; - size = 11; - }; - iconTheme = { - package = pkgs.reversal-icon-theme; - name = "Reversal-dark"; - }; - gtk4.iconTheme = { - package = pkgs.reversal-icon-theme; - name = "Reversal-dark"; - }; - cursorTheme = { - package = pkgs.bibata-cursors; - name = "Bibata-Modern-Ice"; - size = 24; - }; - }; - - # Services - # Mpris (Media Player) - services.mpris-proxy.enable = true; - - # Udiskie (Mass Storage Devices) - services.udiskie = { - enable = true; - settings = { - program_options = { - file_manager = "${pkgs.nautilus}/bin/nautilus"; - }; - }; - }; -} diff --git a/bak/home/server.nix b/bak/home/server.nix deleted file mode 100644 index 9ad204d..0000000 --- a/bak/home/server.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ _config, pkgs, ... }: - -{ - home.username = "dennis"; - home.homeDirectory = "/home/dennis"; - home.stateVersion = "24.11"; - - home.packages = with pkgs; [ - neofetch - zip - unzip - ripgrep - fzf - fd - sd - bat - tldr - fortune - iotop - iftop - btop - just - mmv-go - zoxide - tmux - ]; - - imports = [ - ../modules/ssh - ../modules/tmux/server.nix - ]; - - programs.home-manager.enable = true; - - programs.git = { - enable = true; - settings = { - init = { - defaultBranch = "main"; - }; - - core = { - ignorecase = "false"; - }; - - pull = { - rebase = false; - }; - - push = { - autoSetupRemote = true; - }; - - user = { - name = "Dennis Schoepf"; - email = "me@dnsc.io"; - }; - }; - }; -} diff --git a/bak/hosts/dnsc-air/default.nix b/bak/hosts/dnsc-air/default.nix deleted file mode 100644 index 55e9915..0000000 --- a/bak/hosts/dnsc-air/default.nix +++ /dev/null @@ -1,89 +0,0 @@ -{ - inputs, - outputs, - lib, - pkgs, - ... -}: -{ - imports = [ - inputs.home-manager.darwinModules.home-manager - outputs.nixosModules.base - outputs.nixosModules.macos - outputs.nixosModules.homebrew - outputs.nixosModules.aerospace - outputs.nixosModules.direnv - ]; - - # Device & user-specific settings - networking.hostName = "dnsc-air"; - networking.computerName = "dnsc-air"; - system.defaults.smb.NetBIOSName = "dnsc-air"; - users.users."dennis" = { - home = "/Users/dennis"; - description = "Dennis Schoepf"; - }; - nix.settings.trusted-users = [ "dennis" ]; - security.pam.services.sudo_local.touchIdAuth = true; - - # Device specific overlays - nixpkgs.overlays = [ ]; - - # System Packages - environment.systemPackages = lib.mkAfter ( - with pkgs; - [ - rsync - # Some global devtools that are - # not included in project flakes - tree-sitter - nil - stylua - lua-language-server - ] - ); - - # Install additional homebrew apps - homebrew.masApps = { - Bitwarden = 1352778147; - "Yesterday For Old Reddit" = 1603279883; - "Final Cut Pro" = 424389933; - Wireguard = 1451685025; - Pages = 409201541; - }; - - homebrew.brews = lib.mkAfter ([ - "harfbuzz" - "openexr" - "openjph" - "p11-kit" - "ca-certificates" - "gettext" - "yt-dlp" - ]); - - homebrew.casks = lib.mkAfter ([ - "cyberduck" - "krita" - "darktable" - ]); - - # Shells - environment.shells = [ pkgs.fish ]; - - # Home Manager Setup - home-manager = { - extraSpecialArgs = { inherit inputs outputs; }; - useGlobalPkgs = true; - backupFileExtension = "backup"; - users = { - dennis = import ../../home/darwin.nix; - }; - }; - - nix.enable = false; - nix.settings.experimental-features = [ - "nix-command" - "flakes" - ]; -} diff --git a/bak/hosts/dnsc-machine/default.nix b/bak/hosts/dnsc-machine/default.nix deleted file mode 100644 index 0b15d4a..0000000 --- a/bak/hosts/dnsc-machine/default.nix +++ /dev/null @@ -1,84 +0,0 @@ -{ - lib, - inputs, - outputs, - pkgs, - ... -}: - -{ - imports = [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - inputs.home-manager.nixosModules.home-manager - outputs.nixosModules.base - outputs.nixosModules.unix - outputs.nixosModules.nvidia - outputs.nixosModules.bluetooth - outputs.nixosModules.printing - outputs.nixosModules.tablet - outputs.nixosModules.audio - outputs.nixosModules.ly - outputs.nixosModules.niriSystem - outputs.nixosModules.keyd - outputs.nixosModules.steam - ]; - - # Device specific overlays - # Overlays for all devices are defined - # in flake.nix - nixpkgs.overlays = [ - (final: prev: { - python3Packages = prev.python3Packages // { - python-dbusmock = - inputs.nixpkgs-backport-fix.legacyPackages.x86_64-linux.python3Packages.python-dbusmock; - }; - }) - ]; - - # General settings - networking.hostName = "dnsc-machine"; - time.timeZone = "Europe/Berlin"; - services.xserver.xkb.layout = "eu"; - - users.users.dennis = { - isNormalUser = true; - description = "dennis"; - extraGroups = [ - "networkmanager" - "wheel" - ]; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILvXWZOPOJJDAoF+Sx/ZLoAVu6G/7/MAWoknBgMAzjul dennis@dnsc-mac" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKnmuxDkpDIku5t1Tykz21u78xoQ7LJR8JEcfth32LGu dennis@dnsc-work" - ]; - }; - - # Home Manager - home-manager = { - extraSpecialArgs = { inherit inputs outputs; }; - backupFileExtension = "backup"; - users = { - dennis = { - imports = [ - inputs.zen-browser.homeModules.beta - ../../home/linux.nix - ]; - }; - }; - }; - - # System Packages - environment.systemPackages = lib.mkAfter (with pkgs; [ ]); - - # Enable some services that do not need configuration - services.openssh.enable = true; - services.udisks2.enable = true; - services.tuned.enable = true; - services.upower.enable = true; - services.udev.packages = with pkgs; [ - vial - ]; - - system.stateVersion = "25.05"; -} diff --git a/bak/hosts/dnsc-machine/hardware-configuration.nix b/bak/hosts/dnsc-machine/hardware-configuration.nix deleted file mode 100644 index 73a5bc9..0000000 --- a/bak/hosts/dnsc-machine/hardware-configuration.nix +++ /dev/null @@ -1,41 +0,0 @@ -# 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 = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/30277f94-8b7b-4e91-8438-6815170edfdd"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/4DC9-7AB7"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/9b7564e7-2deb-4432-a4fc-d18d21ef2d11"; } - ]; - - # 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.enp42s0.useDHCP = lib.mkDefault true; - # networking.interfaces.enp45s0f3u3u4.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/bak/hosts/dnsc-server/default.nix b/bak/hosts/dnsc-server/default.nix deleted file mode 100644 index 07e5bee..0000000 --- a/bak/hosts/dnsc-server/default.nix +++ /dev/null @@ -1,173 +0,0 @@ -{ - config, - inputs, - outputs, - pkgs, - ... -}: -{ - imports = [ - ./hardware-configuration.nix - inputs.home-manager.nixosModules.home-manager - ../../modules/docker - ../../modules/ups - ../../modules/restic - ../../modules/samba - ../../modules/openssh - ../../modules/jellyfin - ../../modules/actual-server - ../../modules/immich - ../../modules/cockpit - ../../modules/backrest - ]; - - # General - time.timeZone = "Europe/Berlin"; - i18n.defaultLocale = "en_US.UTF-8"; - - # Boot - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.systemd-boot.configurationLimit = 10; - boot.supportedFilesystems = [ "zfs" ]; - boot.zfs.forceImportRoot = false; - boot.zfs.extraPools = [ "main" ]; - - # Secrets - age = { - identityPaths = [ "${config.users.users.dennis.home}/.ssh/id_ed25519" ]; - secrets."restic/password" = { - file = ../../secrets/restic/password.age; - }; - }; - - # Nix Settings - # Perform garbage collection weekly to maintain low disk usage - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 1w"; - }; - nix.settings.auto-optimise-store = true; - - programs.bash = { - enable = true; - }; - - # Networking - networking.hostName = "dnsc-server"; - networking.hostId = "380f584e"; - networking.networkmanager.enable = true; - # Fix due to https://github.com/NixOS/nixpkgs/issues/180175 - systemd.services.NetworkManager-wait-online.enable = false; - - # Firewall - networking.firewall = { - enable = true; - allowedTCPPorts = [ - 22 - 443 - 9004 - ]; - allowedUDPPorts = [ - 22 - 443 - 9004 - ]; - }; - - # My user account - users.users.dennis = { - description = "dennis"; - isNormalUser = true; - extraGroups = [ - "wheel" - "networkmanager" - ]; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILvXWZOPOJJDAoF+Sx/ZLoAVu6G/7/MAWoknBgMAzjul dennis@dnsc-mac" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKnmuxDkpDIku5t1Tykz21u78xoQ7LJR8JEcfth32LGu dennis@dnsc-work" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF8LXdDU3C4PcCHb/BEm1xQIZyo2KTR5Dcuw6ni+SxmH dennis@dnsc-machine" - ]; - }; - - security.sudo.enable = true; - - # Home Manager Setup - home-manager = { - extraSpecialArgs = { inherit inputs outputs; }; - backupFileExtension = "backup"; - users = { - dennis = import ../../home/server.nix; - }; - }; - - # Enable new Nix CLI and flakes - nix.settings.experimental-features = [ - "nix-command" - "flakes" - ]; - - # Install system wide packages - environment.systemPackages = with pkgs; [ - git - btop - neovim - wget - jellyfin - jellyfin-web - jellyfin-ffmpeg - usbutils - restic - mkcert - actual-server - cockpit - ]; - - # GnuPG - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - - # ZFS - services.zfs = { - autoSnapshot.enable = true; - trim.enable = true; - }; - - # Caddy - services.caddy = { - enable = true; - virtualHosts."media.home.lan".extraConfig = '' - reverse_proxy http://127.0.0.1:8096 - tls internal - ''; - virtualHosts."finance.home.lan".extraConfig = '' - encode gzip zstd - reverse_proxy http://127.0.0.1:9002 - tls internal - ''; - virtualHosts."photos.home.lan".extraConfig = '' - reverse_proxy http://127.0.0.1:9003 - tls internal - ''; - virtualHosts."backup.home.lan".extraConfig = '' - reverse_proxy http://127.0.0.1:9004 - tls internal - ''; - }; - - # Environment variables - environment.variables.EDITOR = "nvim"; - - # Copy the NixOS configuration file and link it from the resulting system - # (/run/current-system/configuration.nix). This is useful in case you - # accidentally delete configuration.nix. - # system.copySystemConfiguration = true; - - # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, - # and migrated your data accordingly. - # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . - system.stateVersion = "24.11"; -} diff --git a/bak/hosts/dnsc-server/hardware-configuration.nix b/bak/hosts/dnsc-server/hardware-configuration.nix deleted file mode 100644 index 57a0d37..0000000 --- a/bak/hosts/dnsc-server/hardware-configuration.nix +++ /dev/null @@ -1,40 +0,0 @@ -# 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 = [ "vmd" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/89318ceb-c0c6-47f2-9cad-99612498bd75"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/EE6C-978E"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/9c843b67-418a-4d11-8700-6a0eb866c02c"; } - ]; - - # 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.enp2s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/bak/hosts/dnsc-vps-sm/default.nix b/bak/hosts/dnsc-vps-sm/default.nix deleted file mode 100644 index f87a67f..0000000 --- a/bak/hosts/dnsc-vps-sm/default.nix +++ /dev/null @@ -1,187 +0,0 @@ -{ - inputs, - outputs, - _lib, - config, - pkgs, - ... -}: -{ - imports = [ - ./hardware-configuration.nix - ./networking.nix - inputs.home-manager.nixosModules.home-manager - inputs.ip-whitelist.nixosModules.default - ../../modules/openssh - ../../modules/vaultwarden - ../../modules/uptime-kuma - ../../modules/glance - ../../modules/docker - ../../modules/actual-server - ]; - - # Secrets - age = { - identityPaths = [ "${config.users.users.dennis.home}/.ssh/id_ed25519" ]; - secrets."vaultwarden/env".file = ../../secrets/vaultwarden/env.age; - secrets."restic/password".file = ../../secrets/restic/password.age; - }; - - # Generated automatically - boot.tmp.cleanOnBoot = true; - zramSwap.enable = true; - - # General - time.timeZone = "Europe/Berlin"; - i18n.defaultLocale = "en_US.UTF-8"; - - # Nix Settings - nix.gc = { - automatic = true; - dates = "03:15"; - options = "-d"; - }; - nix.settings.auto-optimise-store = true; - - programs.bash = { - enable = true; - }; - - security.sudo.enable = true; - - # Networking - networking.hostName = "dnsc-vps-sm"; - networking.hostId = "380f585f"; - networking.domain = "dnsc.io"; - networking.networkmanager.enable = true; - # Fix due to https://github.com/NixOS/nixpkgs/issues/180175 - systemd.services.NetworkManager-wait-online.enable = false; - - # Firewall - networking.firewall = { - enable = true; - allowedTCPPorts = [ - 22 - 80 - 443 - ]; - }; - - # My user account - users.users.dennis = { - description = "dennis"; - initialPassword = "admin"; - isNormalUser = true; - linger = true; - extraGroups = [ - "wheel" - "networkmanager" - ]; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILvXWZOPOJJDAoF+Sx/ZLoAVu6G/7/MAWoknBgMAzjul dennis@dnsc-mac" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKnmuxDkpDIku5t1Tykz21u78xoQ7LJR8JEcfth32LGu dennis@dnsc-work" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF8LXdDU3C4PcCHb/BEm1xQIZyo2KTR5Dcuw6ni+SxmH dennis@dnsc-machine" - ]; - }; - - # Home Manager Setup - home-manager = { - extraSpecialArgs = { inherit inputs outputs; }; - backupFileExtension = "backup"; - users = { - dennis = import ../../home/server.nix; - }; - }; - - # Enable new Nix CLI and flakes - nix.settings.experimental-features = [ - "nix-command" - "flakes" - ]; - - # Install system wide packages - environment.systemPackages = with pkgs; [ - git - btop - neovim - wget - docker-compose - actual-server - restic - glance - ncdu - ]; - - # Programs - # GnuPG - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - - # Services - # Caddy - services.caddy = { - enable = true; - virtualHosts."www.dnsc.io".extraConfig = '' - redir https://dnsc.io{uri} - ''; - virtualHosts."dnsc.io".extraConfig = '' - encode gzip - file_server - - root * /var/www/homepage - ''; - virtualHosts."slides.dnsc.io".extraConfig = '' - encode gzip - file_server - - root * /var/www/slides - ''; - virtualHosts."vault.dnsc.io".extraConfig = '' - reverse_proxy localhost:8000 - ''; - virtualHosts."uptime.dnsc.io".extraConfig = '' - reverse_proxy localhost:9000 - ''; - virtualHosts."home.dnsc.io".extraConfig = '' - reverse_proxy localhost:9001 - ''; - virtualHosts."finance.dnsc.io".extraConfig = '' - reverse_proxy localhost:9002 - ''; - }; - - # Restic - services.restic.backups.dnsc-vps-sm-backup = { - initialize = true; - passwordFile = config.age.secrets."restic/password".path; - repository = "sftp:u295965@u295965.your-storagebox.de:restic/dnsc-vps-sm"; - paths = [ - "/var/backup/vaultwarden" - ]; - pruneOpts = [ - "--keep-daily 1" - "--keep-weekly 3" - "--keep-monthly 5" - "--keep-yearly 10" - ]; - timerConfig = { - OnCalendar = "daily"; - Persistent = true; - }; - }; - - # Environment variables - environment.variables.EDITOR = "nvim"; - - # Copy the NixOS configuration file and link it from the resulting system - # (/run/current-system/configuration.nix). This is useful in case you - # accidentally delete configuration.nix. - # system.copySystemConfiguration = true; - - # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, - # and migrated your data accordingly. - # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . - system.stateVersion = "23.11"; -} diff --git a/bak/hosts/dnsc-vps-sm/hardware-configuration.nix b/bak/hosts/dnsc-vps-sm/hardware-configuration.nix deleted file mode 100644 index 6679bdf..0000000 --- a/bak/hosts/dnsc-vps-sm/hardware-configuration.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ modulesPath, ... }: -{ - imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.loader.grub.device = "/dev/sda"; - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ]; - boot.initrd.kernelModules = [ "nvme" ]; - fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; }; -} diff --git a/bak/hosts/dnsc-vps-sm/networking.nix b/bak/hosts/dnsc-vps-sm/networking.nix deleted file mode 100644 index 9cd913c..0000000 --- a/bak/hosts/dnsc-vps-sm/networking.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ lib, ... }: { - # This file was populated at runtime with the networking - # details gathered from the active system. - networking = { - nameservers = [ "8.8.8.8" - ]; - defaultGateway = "172.31.1.1"; - defaultGateway6 = { - address = "fe80::1"; - interface = "eth0"; - }; - dhcpcd.enable = false; - usePredictableInterfaceNames = lib.mkForce false; - interfaces = { - eth0 = { - ipv4.addresses = [ - { address="91.99.21.186"; prefixLength=32; } - ]; - ipv6.addresses = [ - { address="2a01:4f8:1c1a:cdfb::1"; prefixLength=64; } -{ address="fe80::9400:4ff:fe27:8245"; prefixLength=64; } - ]; - ipv4.routes = [ { address = "172.31.1.1"; prefixLength = 32; } ]; - ipv6.routes = [ { address = "fe80::1"; prefixLength = 128; } ]; - }; - - }; - }; - services.udev.extraRules = '' - ATTR{address}=="96:00:04:27:82:45", NAME="eth0" - - ''; -} diff --git a/bak/hosts/dnsc-work/default.nix b/bak/hosts/dnsc-work/default.nix deleted file mode 100644 index 93b01ab..0000000 --- a/bak/hosts/dnsc-work/default.nix +++ /dev/null @@ -1,104 +0,0 @@ -{ - inputs, - outputs, - pkgs, - ... -}: -{ - imports = [ - inputs.home-manager.darwinModules.home-manager - outputs.nixosModules.base - outputs.nixosModules.macos - outputs.nixosModules.homebrew - outputs.nixosModules.aerospace - outputs.nixosModules.direnv - ]; - - # Device & user-specific settings - networking.hostName = "dnsc-work"; - networking.computerName = "dnsc-work"; - users.users."dennis" = { - home = "/Users/dennis"; - description = "Dennis Schoepf"; - }; - nix.settings.trusted-users = [ "dennis" ]; - - nixpkgs.overlays = [ ]; - - # System Packages - environment.systemPackages = with pkgs; [ - circumflex - gh - fnm - stylua - typescript-language-server - vscode-langservers-extracted - astro-language-server - tailwindcss-language-server - lua-language-server - prettierd - eslint_d - nil - tree-sitter - tmux - tmuxinator - uv - # rsync - ]; - - homebrew.masApps = { - Bitwarden = 1352778147; - Wireguard = 1451685025; - # XCode = 497799835; - }; - - homebrew.taps = [ "huseyinbabal/tap" ]; - - homebrew.brews = [ - "watchman" - "pnpm" - "pkg-config" - "cairo" - "pango" - "libpng" - "jpeg" - "giflib" - "librsvg" - "pixman" - "python-setuptools" - "gmp" - "rbenv" - "mysql@8.0" - "huseyinbabal/tap/tredis" - "yt-dlp" - "minikube" - ]; - - homebrew.casks = [ - "microsoft-teams" - "1password" - "1password-cli" - "android-studio" - "zulu@17" - "postman" - "docker-desktop" - "google-chrome" - ]; - - # Shells - environment.shells = [ pkgs.fish ]; - - # Home Manager Setup - home-manager = { - extraSpecialArgs = { inherit inputs outputs; }; - useGlobalPkgs = true; - backupFileExtension = "backup"; - users = { - dennis = import ../../home/darwin-work.nix; - }; - }; - - # Nix settings - # Use determinate systems - nix.enable = false; -} diff --git a/bak/modules/actual-server/default.nix b/bak/modules/actual-server/default.nix deleted file mode 100644 index 446765d..0000000 --- a/bak/modules/actual-server/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - pkgs, - ... -}: -{ - systemd.services.actual = { - enable = true; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - description = "user service for the actual budgeting server instance"; - environment = { - ACTUAL_PORT = "9002"; - }; - serviceConfig = { - Type = "simple"; - ExecStart = "/run/current-system/sw/bin/actual-server"; - Restart = "on-failure"; - RestartSec = 3; - }; - }; -} diff --git a/bak/modules/aerospace/default.nix b/bak/modules/aerospace/default.nix deleted file mode 100644 index 1a25a89..0000000 --- a/bak/modules/aerospace/default.nix +++ /dev/null @@ -1,115 +0,0 @@ -{ - services.aerospace = { - enable = true; - settings = { - accordion-padding = 25; - gaps = { - inner.horizontal = 6; - inner.vertical = 6; - outer.left = 6; - outer.bottom = 6; - outer.top = 6; - outer.right = 6; - }; - workspace-to-monitor-force-assignment = { - "1" = "main"; - "2" = "main"; - "3" = "main"; - "4" = "main"; - "5" = "secondary"; - "6" = "secondary"; - }; - mode.main.binding = { - alt-h = "focus left"; - alt-j = "focus down"; - alt-k = "focus up"; - alt-l = "focus right"; - alt-shift-h = "move left"; - alt-shift-j = "move down"; - alt-shift-k = "move up"; - alt-shift-l = "move right"; - alt-comma = "layout tiles horizontal vertical"; - alt-period = "layout accordion horizontal vertical"; - alt-f = "fullscreen"; - alt-1 = "workspace 1"; - alt-2 = "workspace 2"; - alt-3 = "workspace 3"; - alt-4 = "workspace 4"; - alt-5 = "workspace 5"; - alt-6 = "workspace 6"; - alt-shift-1 = [ - "move-node-to-workspace 1" - "workspace 1" - ]; - alt-shift-2 = [ - "move-node-to-workspace 2" - "workspace 2" - ]; - alt-shift-3 = [ - "move-node-to-workspace 3" - "workspace 3" - ]; - alt-shift-4 = [ - "move-node-to-workspace 4" - "workspace 4" - ]; - alt-shift-5 = [ - "move-node-to-workspace 5" - "workspace 5" - ]; - alt-shift-6 = [ - "move-node-to-workspace 6" - "workspace 6" - ]; - alt-tab = "workspace-back-and-forth"; - alt-shift-tab = "move-workspace-to-monitor --wrap-around next"; - }; - on-window-detected = [ - { - "if".app-id = "app.zen-browser.zen"; - run = "move-node-to-workspace 1"; - } - { - "if".app-id = "company.thebrowser.Browser"; - run = "move-node-to-workspace 1"; - } - { - "if".app-id = "com.github.wez.wezterm"; - run = "move-node-to-workspace 2"; - } - { - "if".app-id = "com.mitchellh.ghostty"; - run = "move-node-to-workspace 2"; - } - { - "if".app-id = "com.apple.Preview"; - run = "move-node-to-workspace 3"; - } - { - "if".app-id = "com.apple.dt.Xcode"; - run = "move-node-to-workspace 3"; - } - { - "if".app-id = "com.postmanlabs.mac"; - run = "move-node-to-workspace 3"; - } - { - "if".app-id = "com.apple.iCal"; - run = "move-node-to-workspace 4"; - } - { - "if".app-id = "com.microsoft.teams2"; - run = "move-node-to-workspace 5"; - } - { - "if".app-id = "com.spotify.client"; - run = "move-node-to-workspace 6"; - } - { - "if".app-id = "com.apple.reminders"; - run = "move-node-to-workspace 6"; - } - ]; - }; - }; -} diff --git a/bak/modules/atuin/default.nix b/bak/modules/atuin/default.nix deleted file mode 100644 index b7f11e5..0000000 --- a/bak/modules/atuin/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - programs.atuin = { - enable = true; - enableBashIntegration = false; - enableFishIntegration = false; - settings = { - style = "compact"; - inline_height = 20; - }; - }; -} diff --git a/bak/modules/backrest/default.nix b/bak/modules/backrest/default.nix deleted file mode 100644 index c4da165..0000000 --- a/bak/modules/backrest/default.nix +++ /dev/null @@ -1,98 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: -let - # Declarative backrest config referencing the existing restic repo. - # The password is read at runtime from the agenix secret path via - # BACKREST_VAR_RESTIC_PASSWORD, which backrest expands as ${RESTIC_PASSWORD} - # inside the repo env block. - backrestConfig = builtins.toJSON { - version = 4; - modno = 1; - instance = "dnsc-server"; - repos = [ - { - id = "dnsc-storage"; - uri = "sftp:dnsc-storage:restic/dnsc-server"; - env = [ "RESTIC_PASSWORD_FILE=${config.age.secrets."restic/password".path}" ]; - flags = [ - "-o 'sftp.args=-i /root/.ssh/id_ed25519 -o StrictHostKeyChecking=accept-new'" - ]; - autoInitialize = false; - guid = "15448172d015919712f015508d40e28d13db4c9e877bf545454c8289ad621069"; - prunePolicy = { - schedule = { - disabled = true; - }; - }; - checkPolicy = { - schedule = { - disabled = true; - }; - }; - } - ]; - plans = [ - { - id = "dnsc-storage-plan"; - repo = "dnsc-storage"; - paths = config.services.restic.backups."dnsc-storage".paths; - schedule = { - disabled = true; - }; - retention = { - policyKeepLastN = 3; - }; - } - ]; - auth = { - disabled = true; - }; - }; -in -{ - environment.systemPackages = lib.mkAfter ( - with pkgs; - [ - backrest - ] - ); - - # Write the declarative config into the backrest state dir at activation time. - # The file must be in a writable location because backrest creates a .bak - # alongside it when migrating. /var/lib/backrest is owned by the backrest user. - system.activationScripts.backrestConfig = { - deps = [ "users" ]; - text = '' - install -d -m 750 /var/lib/backrest - install -m 640 \ - ${pkgs.writeText "backrest-config.json" backrestConfig} \ - /var/lib/backrest/config.json - ''; - }; - - systemd.services.backrest = { - enable = true; - description = "Restic GUI"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - - environment = { - BACKREST_PORT = "9004"; - BACKREST_RESTIC_COMMAND = "${pkgs.restic}/bin/restic"; - BACKREST_CONFIG = "/var/lib/backrest/config.json"; - BACKREST_DATA = "/var/lib/backrest/data"; - }; - - serviceConfig = { - Type = "simple"; - User = "root"; - ExecStart = "${pkgs.backrest}/bin/backrest"; - Restart = "on-failure"; - RestartSec = "5s"; - }; - }; -} diff --git a/bak/modules/base/default.nix b/bak/modules/base/default.nix deleted file mode 100644 index 288839b..0000000 --- a/bak/modules/base/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - pkgs, - inputs, - ... -}: - -{ - nix = { - channel.enable = false; - package = pkgs.nix; - nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; - settings = { - experimental-features = [ - "nix-command" - "flakes" - ]; - }; - }; - - nixpkgs = { - config = { - allowUnfree = true; - allowUnsupportedSystem = true; - }; - }; - - environment.systemPackages = with pkgs; [ - gcc - wget - git - btop - fish - ripgrep - fzf - fd - sd - bat - vim - just - tldr - fortune - ffmpeg - zoxide - sqlite - restic - imagemagick - sqlite - fortune - lazygit - tmux - tmuxinator - nix-prefetch - nix-prefetch-github - dua - opencode - vial - ]; -} diff --git a/bak/modules/bash/bin/ff.sh b/bak/modules/bash/bin/ff.sh deleted file mode 100755 index 4a2060f..0000000 --- a/bak/modules/bash/bin/ff.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -# Switch between Ripgrep launcher mode (CTRL-R) and fzf filtering mode (CTRL-F) -rm -f /tmp/rg-fzf-{r,f} -RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case " -INITIAL_QUERY="${*:-}" -fzf --ansi --disabled --query "$INITIAL_QUERY" \ - --bind "start:reload($RG_PREFIX {q})+unbind(ctrl-r)" \ - --bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \ - --bind "ctrl-f:unbind(change,ctrl-f)+change-prompt(2. fzf> )+enable-search+rebind(ctrl-r)+transform-query(echo {q} > /tmp/rg-fzf-r; cat /tmp/rg-fzf-f)" \ - --bind "ctrl-r:unbind(ctrl-r)+change-prompt(1. ripgrep> )+disable-search+reload($RG_PREFIX {q} || true)+rebind(change,ctrl-f)+transform-query(echo {q} > /tmp/rg-fzf-f; cat /tmp/rg-fzf-r)" \ - --color "hl:-1:underline,hl+:-1:underline:reverse" \ - --prompt '1. ripgrep> ' \ - --delimiter : \ - --header '╱ CTRL-R (ripgrep mode) ╱ CTRL-F (fzf mode) ╱' \ - --preview 'bat --color=always {1} --highlight-line {2}' \ - --preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \ - --bind 'enter:become(nvim {1} +{2})' diff --git a/bak/modules/bash/default.nix b/bak/modules/bash/default.nix deleted file mode 100644 index aa30ff1..0000000 --- a/bak/modules/bash/default.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - programs.bash = { - enable = true; - enableCompletion = true; - - sessionVariables = { - GPG_TTY = "$(tty)"; - PROMPT_DIRTRIM = 3; - GOPATH = "$HOME/go"; - GOROOT = "$(brew --prefix golang)/libexec"; - }; - - shellAliases = { - "ff" = "${./bin/ff.sh}"; - "ipl" = "ifconfig | grep \"inet \" | grep -v 127.0.0.1 | awk '{print $2}' | head -n 1"; - "ipp" = "curl -4 ifconfig.me"; - "lg" = "lazygit"; - "g" = "git"; - "xsrc" = "source ~/.bashrc && source .bash_profile"; - "ll" = "ls -l"; - "la" = "ls -la"; - }; - - profileExtra = '' - export PATH=\ - $GOPATH/bin:\ - $GOROOT/bin:\ - /run/current-system/sw/bin:\ - /opt/homebrew/bin:$PATH - ''; - - bashrcExtra = '' - # FNM - eval "$(fnm env --use-on-cd --shell bash)" - - # emacs-libvterm - if [[ "$INSIDE_EMACS" = 'vterm' ]] \ - && [[ -n "$EMACS_VTERM_PATH" ]] \ - && [[ -f "$EMACS_VTERM_PATH/etc/emacs-vterm-bash.sh" ]]; then - source "$EMACS_VTERM_PATH/etc/emacs-vterm-bash.sh" - fi - ''; - - initExtra = '' - if [ "$TERM" == "dumb" ]; then - PS1="[\u@\h:\w]\\$ " - else - source ~/.git-prompt.sh - - PROMPT_COMMAND='PS1_CMD1=$(__git_ps1 "(%s)")'; - PS1="\[\e[95m\]\u\[\e[35m\]@\h\[\e[0m\] \[\e[96m\]\w\[\e[0m\] \[\e[95m\]$PS1_CMD1\n\[\e[96m\]λ\[\e[0m\] " - fi - ''; - }; -} diff --git a/bak/modules/cockpit/default.nix b/bak/modules/cockpit/default.nix deleted file mode 100644 index 63fd926..0000000 --- a/bak/modules/cockpit/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - services.cockpit = { - enable = true; - openFirewall = true; - allowed-origins = [ - "http://192.168.178.69:9090" - "wss://192.168.178.69:9090" - ]; - settings = { - WebService = { - AllowUnencrypted = true; - }; - }; - }; -} diff --git a/bak/modules/direnv/default.nix b/bak/modules/direnv/default.nix deleted file mode 100644 index 2b51c9d..0000000 --- a/bak/modules/direnv/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - programs.direnv = { - enable = true; - nix-direnv.enable = true; - }; -} diff --git a/bak/modules/docker/default.nix b/bak/modules/docker/default.nix deleted file mode 100644 index 9a38f24..0000000 --- a/bak/modules/docker/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - virtualisation.docker = { - enable = true; - rootless = { - enable = true; - setSocketVariable = true; - }; - }; - - users.users.dennis.extraGroups = [ "docker" ]; -} diff --git a/bak/modules/firefox/default.nix b/bak/modules/firefox/default.nix deleted file mode 100644 index 377f0cd..0000000 --- a/bak/modules/firefox/default.nix +++ /dev/null @@ -1,162 +0,0 @@ -{ inputs, pkgs, ... }: - -{ - programs.firefox = { - enable = true; - nativeMessagingHosts = [ pkgs.firefoxpwa ]; - languagePacks = [ - "en-US" - "de" - ]; - policies = { - DisableTelemetry = true; - DisableFirefoxStudies = true; - DisablePocket = true; - DisableFirefoxScreenshots = true; - DisableForgetButton = true; - DisableMasterPasswordCreation = true; - DisableProfileImport = true; - DisableProfileRefresh = true; - DisableSetDesktopBackground = true; - DisplayBookmarksToolbar = "never"; - DisplayMenuBar = "default-off"; - SearchBar = "unified"; - OfferToSaveLogins = false; - OverrideFirstRunPage = ""; - OverridePostUpdatePage = ""; - EnableTrackingProtection = { - Value = true; - Locked = true; - Cryptomining = true; - Fingerprinting = true; - }; - DefaultDownloadDirectory = "\${home}/Downloads"; - }; - - profiles = { - "dennis" = { - id = 0; - isDefault = true; - - containersForce = true; - containers = { - default = { - name = "personal"; - color = "turquoise"; - icon = "chill"; - id = 1; - }; - }; - - extensions.force = true; - extensions.packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [ - ublock-origin - dearrow - bitwarden - sponsorblock - vimium - ]; - - search = { - default = "google"; - force = true; - engines = { - bing.metaData.hidden = true; - perplexity.metaData.hidden = true; - wikipedia.metaData.hidden = true; - ddg.metaData.hidden = true; - - nix-packages = { - name = "Nix Packages"; - urls = [ - { - template = "https://search.nixos.org/packages"; - params = [ - { - name = "type"; - value = "packages"; - } - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@np" ]; - }; - - nix-options = { - name = "Nix Options"; - urls = [ - { - template = "https://search.nixos.org/options"; - params = [ - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@no" ]; - }; - - nix-home-manager = { - name = "Nix Home Manager"; - urls = [ - { - template = "https://home-manager-options.extranix.com"; - params = [ - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@nh" ]; - }; - - nix-wiki = { - name = "Nix Wiki"; - urls = [ - { - template = "https://wiki.nixos.org/w/index.php"; - params = [ - { - name = "search"; - value = "{searchTerms}"; - } - ]; - } - ]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@nw" ]; - }; - }; - }; - - settings = { - "browser.startup.homepage" = "https://home.dnsc.io"; - "browser.newtabpage.pinned" = [ - { - title = "[dnsc] Home"; - url = "https://home.dnsc.io"; - } - ]; - "browser.search.region" = "DE"; - "general.useragent.locale" = "en-US"; - "layout.css.prefers-color-scheme.content-override" = 0; - }; - }; - }; - }; -} diff --git a/bak/modules/fish/default.nix b/bak/modules/fish/default.nix deleted file mode 100644 index 042f63d..0000000 --- a/bak/modules/fish/default.nix +++ /dev/null @@ -1,240 +0,0 @@ -{ ... }: - -{ - programs.fish = { - enable = true; - functions = { - ff = "bash ${./ff.bash}"; - fish_greeting = "fortune -a"; - localip = "ifconfig | grep \"inet \" | grep -v 127.0.0.1 | awk '{print $2}' | head -n 1"; - publicip = "curl -4 ifconfig.me"; - enter_vps = "ssh dnsc-vps-sm -t tmux new -As main"; - rebuild_vps = "ssh -t dnsc-vps-sm 'cd ~/nix-config && git pull && sudo just deploy'"; - enter_server = "ssh dnsc-server -t tmux new -As main"; - rebuild_server = "ssh -t dnsc-server 'cd ~/nix-config && git pull && sudo just deploy'"; - kill_tunnels = /* fish */ '' - ps -o pid,command | grep "^[0-9]\{4,5\} ssh -fNL" | awk '{print $1}' | xargs kill -9 - ''; - dbui = '' - uvx --with PyMySQL --with sqlit-tui[ssh] --from sqlit-tui@1.2.11 sqlit - ''; - dev_projects = /* fish */ '' - if test "$hn" = "dnsc-work" - begin - fd . ~/dev/ride/apps/backend/edge-services -t d -d 1; - fd . ~/dev/ride/apps/backend/backend-services -t d -d 1; - fd . ~/dev/ride/apps/frontend/projects -t d -d 1; - fd . ~/dev/ride/apps/native -t d -d 1; - fd . ~/dev/ride/packages -t d -d 1; - fd . ~/dev -t d -d 1; - echo "$HOME/dev/ride/apps/frontend"; - echo "$HOME/dev/ride/apps/lib"; - echo "$HOME/dev/ride/apps/packages"; - end - else - begin - echo "$HOME/notes" - fd . ~/dev -t d -d 1 - end - end - ''; - cdd = /* fish */ '' - set folder (dev_projects | fzf) - cd $folder - ''; - cdr = /* fish */ '' - set folder (dev_projects | fzf) - cd $folder - - if test -n "$folder" - set service (basename $folder) - cd $folder - - if test -f "package.json" - set script_cmd (jq -r '.scripts | to_entries | .[] | "\(.key): \(.value)"' package.json | fzf) - - if test -n "$script_cmd" - set script_name (string split ": " $script_cmd)[1] - if test -n "$script_name" - echo "Running: npm run $script_name" - npm run $script_name - end - end - end - end - ''; - sessionizer = /* fish */ '' - set -l selected (tmuxinator ls -n | tail -n +2 | fzf --prompt " switch to >> ") - - if test -z "$selected" - return 1 - end - - tmuxinator start "$selected" - ''; - tmux_sessionizer = /* fish */ '' - tmux display-popup -h 50% -w 80% -E sessionizer - ''; - nn = /* fish */ '' - # Require a title argument - if test (count $argv) -lt 1 - echo "Usage: nn \"My Note\"" - return 1 - end - - # Join all arguments into single title (preserves spaces inside quotes) - set -l title $argv[1] - - # Timestamp up to minutes, format: YYYY-MM-DD_HH-MM - set -l ts (date "+%Y%m%d%H%M") - - # Normalize title: lowercase, replace spaces with hyphens, remove/replace - # characters unsafe for filenames (keep a-z0-9- and replace others with -) - set -l slug (string lower -- $title) - # Replace any sequence of non-alphanumeric characters with single hyphen - set -l slug (echo $slug | sed -E 's/[^a-z0-9]+/-/g' | sed -E 's/^-|-$//g') - - # Compose filename - set -l filename "$ts"_"$slug.md" - - # Directory for notes (change if you prefer another path) - set -l notes_dir ~/dev/notes - - # Ensure directory exists - test -d $notes_dir; or mkdir -p $notes_dir - - # Full path - set -l fullpath "$notes_dir/$filename" - - # If file doesn't exist, create with timestamp and title at top - if not test -f $fullpath - # Human-friendly timestamp line (no seconds) - set -l display_ts (date "+%Y-%m-%d %H:%M") - printf "---\nCREATED_AT: %s\n---\n\n# %s\n\n" "$display_ts" "$title" > $fullpath - end - - # Open file in neovim - nvim $fullpath - ''; - fish_mode_prompt = /* fish */ '' - switch $fish_bind_mode - case default - set_color --bold brcyan - echo '[N] ' - case insert - set_color --bold brgreen - echo '[I] ' - case replace_one - set_color --bold yellow - echo '[R] ' - case replace - set_color --bold bryellow - echo '[R] ' - case visual - set_color --bold brmagenta - echo '[V] ' - case '*' - set_color --bold red - echo '[?] ' - end - set_color normal - ''; - setup_winterly_theme_colors = /* fish */ '' - set --universal fish_color_autosuggestion brblack # autosuggestions - set --universal fish_color_command brwhite # commands - set --universal fish_color_comment brblack # code comments - set --universal fish_color_cwd brblack # current working directory in the default prompt - set --universal fish_color_end brblack # process separators like ';' and '&' - set --universal fish_color_error brwhite # highlight potential errors - set --universal fish_color_escape brblack # highlight character escapes like '\n' and '\x70' - set --universal fish_color_match yellow # highlight matching parenthesis - set --universal fish_color_normal brwhite # default color - set --universal fish_color_operator brblack # parameter expansion operators like '*' and '~' - set --universal fish_color_param bryellow # regular command parameters - set --universal fish_color_quote brmagenta # quoted blocks of text - set --universal fish_color_redirection brwhite # IO redirections - set --universal fish_color_search --bold --background=black --foreground=bryellow - set --universal fish_color_search_match --background black # highlight history search matches and the selected pager item (must be a background) - set --universal fish_pager_color_selected_background --background black --foreground brmagenta - set --universal fish_pager_color_progress --foreground=brwhite --background=black - set --universal fish_color_selection --background magenta # when selecting text (in vi visual mode) - set --universal fish_color_cancel brblack # the '^C' indicator on a canceled command - set --universal fish_color_host brwhite # current host system in some of fish default prompts - set --universal fish_color_host_remote yellow #ayu:syntax.constant current host system in some of fish default prompts, if fish is running remotely (via ssh or similar) - set --universal fish_color_user brwhite # current username in some of fish default prompts - ''; - setup_homebrew = /* fish */ '' - fish_add_path /opt/homebrew/bin - - if test -d (brew --prefix)"/share/fish/completions" - set -p fish_complete_path (brew --prefix)/share/fish/completions - end - - if test -d (brew --prefix)"/share/fish/vendor_completions.d" - set -p fish_complete_path (brew --prefix)/share/fish/vendor_completions.d - end - ''; - setup_path = /* fish */ '' - fish_add_path /run/wrappers/bin - fish_add_path /run/current-system/sw/bin - fish_add_path $HOME/.nix-profile/bin - - if test "$(uname)" = "Darwin" - fish_add_path /nix/var/nix/profiles/default/bin - setup_homebrew - end - ''; - setup_env = /* fish */ '' - for line in (cat $HOME/.env | grep -v '^#') - set item (string split -m 1 '=' $line) - set -gx $item[1] $item[2] - end - ''; - setup_work = /* fish */ '' - fish_add_path $ANDROID_HOME/emulator - fish_add_path $ANDROID_HOME/platform-tools - fish_add_path $HOME/.local/share/uv/tools - rbenv init - | source - fnm env --use-on-cd --shell fish | source - ''; - }; - - interactiveShellInit = /* fish */ '' - # Set some global values - set -x GPG_TTY (tty) - set hn (prompt_hostname) - - fish_vi_key_bindings insert - fish_vi_cursor xterm - - setup_winterly_theme_colors - setup_env - setup_path - - if test "$hn" = "dnsc-work" - setup_work - end - - # Custom init - direnv hook fish | source - - # Auto start tmux - if status is-interactive; and not set -q TMUX - if tmux list-sessions >/dev/null 2>&1 - # Attach to the first available session - tmux a - else - # Create a new session - tmux new-session -t main - end - end - ''; - - shellAbbrs = { - lg = "lazygit"; - gg = "lazygit"; - g = "git"; - frc = "source ~/.config/fish/**/*.fish"; - }; - }; -} diff --git a/bak/modules/fish/ff.bash b/bak/modules/fish/ff.bash deleted file mode 100644 index 4a2060f..0000000 --- a/bak/modules/fish/ff.bash +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -# Switch between Ripgrep launcher mode (CTRL-R) and fzf filtering mode (CTRL-F) -rm -f /tmp/rg-fzf-{r,f} -RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case " -INITIAL_QUERY="${*:-}" -fzf --ansi --disabled --query "$INITIAL_QUERY" \ - --bind "start:reload($RG_PREFIX {q})+unbind(ctrl-r)" \ - --bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \ - --bind "ctrl-f:unbind(change,ctrl-f)+change-prompt(2. fzf> )+enable-search+rebind(ctrl-r)+transform-query(echo {q} > /tmp/rg-fzf-r; cat /tmp/rg-fzf-f)" \ - --bind "ctrl-r:unbind(ctrl-r)+change-prompt(1. ripgrep> )+disable-search+reload($RG_PREFIX {q} || true)+rebind(change,ctrl-f)+transform-query(echo {q} > /tmp/rg-fzf-f; cat /tmp/rg-fzf-r)" \ - --color "hl:-1:underline,hl+:-1:underline:reverse" \ - --prompt '1. ripgrep> ' \ - --delimiter : \ - --header '╱ CTRL-R (ripgrep mode) ╱ CTRL-F (fzf mode) ╱' \ - --preview 'bat --color=always {1} --highlight-line {2}' \ - --preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \ - --bind 'enter:become(nvim {1} +{2})' diff --git a/bak/modules/ghostty/default.nix b/bak/modules/ghostty/default.nix deleted file mode 100644 index 7291021..0000000 --- a/bak/modules/ghostty/default.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ - programs.ghostty = { - enable = true; - enableFishIntegration = true; - package = null; - settings = { - font-size = 18; - font-family = "Victor Mono"; - font-style = "SemiBold"; - background-opacity = 0.945; - window-padding-x = 0; - window-padding-y = 0; - window-padding-balance = true; - window-inherit-working-directory = true; - window-theme = "ghostty"; - shell-integration-features = true; - scrollback-limit = 100000; - link-url = true; - link-previews = true; - title = " "; - background = "#0f0b15"; - foreground = "#ffffff"; - cursor-color = "#d369af"; - selection-foreground = "#af85ea"; - selection-background = "#572454"; - palette = [ - "0=#0f0b15" - "1=#f47359" - "2=#29a444" - "3=#b58a52" - "4=#3f95f6" - "5=#d369af" - "6=#4fbaef" - "7=#b8c6d5" - "8=#807c9f" - "9=#ff6a7a" - "10=#00a392" - "11=#df9080" - "12=#029fff" - "13=#af85ea" - "14=#35afbf" - "15=#ffffff" - ]; - keybind = [ - "ctrl+plus=increase_font_size:2" - "ctrl+minus=decrease_font_size:2" - "ctrl+0=reset_font_size" - "ctrl+shift+a=select_all" - "ctrl+shift+c=copy_to_clipboard" - "ctrl+shift+v=paste_from_clipboard" - "cmd+c=copy_to_clipboard" - "cmd+v=paste_from_clipboard" - "global:cmd+semicolon=toggle_quick_terminal" - ]; - }; - }; -} diff --git a/bak/modules/ghostty/linux.nix b/bak/modules/ghostty/linux.nix deleted file mode 100644 index 02529ec..0000000 --- a/bak/modules/ghostty/linux.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ - programs.ghostty = { - enable = true; - enableFishIntegration = true; - settings = { - font-size = 14; - font-family = "VictorMono Nerd Font"; - font-style = "SemiBold"; - background-opacity = 0.945; - window-padding-x = 0; - window-padding-y = 0; - window-padding-balance = true; - window-inherit-working-directory = true; - window-theme = "ghostty"; - shell-integration-features = true; - scrollback-limit = 100000; - link-url = true; - link-previews = true; - title = " "; - background = "#0f0b15"; - foreground = "#ffffff"; - cursor-color = "#d369af"; - selection-foreground = "#af85ea"; - selection-background = "#572454"; - palette = [ - "0=#0f0b15" - "1=#f47359" - "2=#29a444" - "3=#b58a52" - "4=#3f95f6" - "5=#d369af" - "6=#4fbaef" - "7=#b8c6d5" - "8=#807c9f" - "9=#ff6a7a" - "10=#00a392" - "11=#df9080" - "12=#029fff" - "13=#af85ea" - "14=#35afbf" - "15=#ffffff" - ]; - keybind = [ - "ctrl+plus=increase_font_size:2" - "ctrl+minus=decrease_font_size:2" - "ctrl+0=reset_font_size" - "ctrl+shift+a=select_all" - "ctrl+shift+c=copy_to_clipboard" - "ctrl+shift+v=paste_from_clipboard" - "cmd+c=copy_to_clipboard" - "cmd+v=paste_from_clipboard" - "global:cmd+semicolon=toggle_quick_terminal" - ]; - }; - }; -} diff --git a/bak/modules/git/default.nix b/bak/modules/git/default.nix deleted file mode 100644 index c25f6ce..0000000 --- a/bak/modules/git/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - programs.git = { - enable = true; - settings = { - init = { - defaultBranch = "main"; - }; - - core = { - ignorecase = "false"; - }; - - pull = { - rebase = false; - }; - - push = { - autoSetupRemote = true; - }; - - user = { - name = "Dennis Schoepf"; - email = "me@dnsc.io"; - }; - }; - ignores = [ ".DS_Store" ]; - }; -} diff --git a/bak/modules/glance/default.nix b/bak/modules/glance/default.nix deleted file mode 100644 index 47096f9..0000000 --- a/bak/modules/glance/default.nix +++ /dev/null @@ -1,205 +0,0 @@ -{ - services.glance = { - enable = true; - settings = { - server = { - port = 9001; - }; - theme = { - background-color = "hsl(264 31.3% 6.3%)"; - primary-color = "hsl(9 92.1% 85.1%)"; - contrast-multiplier = 1.2; - positive-color = "hsl(174 100% 32%)"; - negative-color = "hsl(354 100% 70.8%)"; - disable-picker = false; - }; - pages = [ - { - name = "Home"; - columns = [ - { - size = "small"; - widgets = [ - - { - type = "monitor"; - cache = "1m"; - title = "Selfhosted"; - sites = [ - { - title = "Fastmail"; - url = "https://app.fastmail.com/"; - icon = "si:protonmail"; - } - { - title = "Actual"; - url = "https://finance.dnsc.io"; - icon = "si:actualbudget"; - } - { - title = "Vaultwarden"; - url = "https://vault.dnsc.io"; - icon = "si:vaultwarden"; - } - { - title = "Uptime Kuma"; - url = "https://uptime.dnsc.io"; - icon = "si:uptimekuma"; - } - { - title = "dnsc.io"; - url = "https://dnsc.io"; - icon = "si:htmx"; - } - { - title = "Jellyfin"; - url = "http://192.168.178.69:8096"; - icon = "si:jellyfin"; - allow-insecure = true; - } - ]; - } - { - type = "bookmarks"; - groups = [ - { - title = "Hosting"; - color = "hsl(187 56.6% 47.8%)"; - links = [ - { - title = "Hetzner"; - url = "https://console.hetzner.com/projects/1355757/dashboard"; - } - { - title = "Netcup"; - url = "https://www.servercontrolpanel.de/SCP/Home"; - } - { - title = "Porkbun"; - url = "https://porkbun.com/account/domainsSpeedy"; - } - ]; - } - { - title = "Dev"; - color = "hsl(319 37.6% 63.5%)"; - links = [ - { - title = "Codeberg"; - url = "https://codeberg.org/dnscio"; - } - { - title = "Github"; - url = "https://github.com/dennisschoepf?tab=repositories"; - } - ]; - } - ]; - } - ]; - } - { - size = "full"; - widgets = [ - { - type = "group"; - widgets = [ - { - type = "hacker-news"; - limit = 15; - collapse-after = 5; - } - { - type = "rss"; - title = "r/neovim"; - single-line-titles = true; - feeds = [ - { - url = "https://www.reddit.com/r/neovim.rss"; - } - ]; - } - { - type = "rss"; - title = "r/onepiece"; - single-line-titles = true; - feeds = [ - { - url = "https://www.reddit.com/r/onepiece.rss"; - } - ]; - } - { - type = "rss"; - title = "r/triathlon"; - single-line-titles = true; - feeds = [ - { - url = "https://www.reddit.com/r/triathlon.rss"; - } - ]; - } - ]; - } - { - type = "twitch-channels"; - channels = [ - "theprimeagen" - "tsoding" - "noway4u_sir" - "broxah" - "caedrel" - "bashbunni" - ]; - } - - { - type = "videos"; - collapse-after = 6; - channels = [ - "UCuTaETsuCOkJ0H_GAztWt0Q" - "UCJVMrR290HU9pDxaP35u_cg" - "UCqqJQ_cXSat0KIAVfIfKkVA" - "UCdC0An4ZPNr_YiFiYoVbwaw" - "UCsXVk37bltHxD1rDPwtNM8Q" - "UCofJu853kJKpkg4y5a-9YXg" - "UCewLMcro9tNP97XQ1rxtLXQ" - "UCuo9VyowIT-ljA5G2ZuC6Yw" - "UCipCyKo5D3FyWE6_TpQyr5A" - "UCmL9OhLB27r1lTCHQ3pEiIQ" - "UCNIuvl7V8zACPpTmmNIqP2A" - "UC-gct8TB_8l5HsQHBBr8hyQ" - ]; - } - ]; - } - { - size = "small"; - widgets = [ - { - type = "server-stats"; - servers = [ - { - name = "dnsc-vps-sm"; - type = "local"; - } - ]; - } - { - type = "calendar"; - first-day-of-the-week = "monday"; - } - { - type = "weather"; - units = "metric"; - hour-format = "24h"; - location = "Munich, Germany"; - } - ]; - } - ]; - } - ]; - }; - }; -} diff --git a/bak/modules/homebrew/default.nix b/bak/modules/homebrew/default.nix deleted file mode 100644 index 798bc58..0000000 --- a/bak/modules/homebrew/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - nix-homebrew = { - enable = true; - user = "dennis"; - autoMigrate = true; - }; - - homebrew = { - user = "dennis"; - enable = true; - - onActivation = { - autoUpdate = true; - upgrade = true; - cleanup = "zap"; - }; - - brews = [ - "go" - "mas" - ]; - - casks = [ - "font-victor-mono" - "font-victor-mono-nerd-font" - "vlc" - "ghostty" - "hiddenbar" - "eurkey" - "karabiner-elements" - "caffeine" - "raycast" - "spotify" - "zen" - "keyboard-cowboy" - ]; - }; -} diff --git a/bak/modules/homepage/default.nix b/bak/modules/homepage/default.nix deleted file mode 100644 index cbf18e0..0000000 --- a/bak/modules/homepage/default.nix +++ /dev/null @@ -1,175 +0,0 @@ -{ - services.homepage-dashboard = { - enable = true; - listenPort = 9001; - allowedHosts = "home.dnsc.io"; - settings = { - theme = "dark"; - maxBookmarkGroupColumns = 2; - headerStyle = "boxedWidgets"; - background = { - image = "https://i.ibb.co/v6FjzW5V/winter.png"; - opacity = 40; - brightness = 50; - }; - }; - widgets = [ - { - resources = { - cpu = true; - cputemp = true; - units = "metric"; - }; - } - { - resources = { - memory = true; - uptime = true; - network = true; - }; - } - ]; - services = [ - { - "VPS" = [ - { - "Vaultwarden" = { - href = "https://vault.dnsc.io"; - icon = "vaultwarden.png"; - }; - } - { - "Uptime Kuma" = { - href = "https://uptime.dnsc.io"; - icon = "uptime-kuma.png"; - }; - } - { - "Actual" = { - href = "https://finance.dnsc.io"; - icon = "actual-budget.png"; - }; - } - { - "Slides" = { - href = "https://slides.dnsc.io"; - icon = "slidev.png"; - }; - } - { - "Homepage" = { - href = "https://dnsc.io"; - icon = "html.png"; - }; - } - ]; - } - { - "Homelab" = [ - { - "Jellyfin" = { - href = "http://100.103.199.4:8096"; - icon = "jellyfin.png"; - }; - } - { - "Syncthing" = { - href = "http://100.103.199.4:8384"; - icon = "syncthing.png"; - }; - } - ]; - } - ]; - bookmarks = [ - { - Hosting = [ - { - Porkbun = [ - { - abbr = "PB"; - href = "https://porkbun.com/account/domainsSpeedy"; - } - ]; - } - { - Hetzner = [ - { - abbr = "HZ"; - href = "https://console.hetzner.com/projects/1355757/dashboard"; - } - ]; - } - ]; - } - { - Apps = [ - { - Fastmail = [ - { - abbr = "FM"; - href = "https://app.fastmail.com"; - } - ]; - } - { - YNAB = [ - { - abbr = "YN"; - href = "https://app.ynab.com"; - } - ]; - } - ]; - } - { - Dev = [ - { - Codeberg = [ - { - abbr = "CB"; - href = "https://codeberg.org"; - } - ]; - } - { - Github = [ - { - abbr = "GH"; - href = "https://github.com/dennisschoepf"; - } - ]; - } - ]; - } - { - Entertainment = [ - { - YouTube = [ - { - abbr = "YT"; - href = "https://youtube.com/feed/subscriptions"; - } - ]; - } - { - Twitch = [ - { - abbr = "TW"; - href = "https://www.twitch.tv/directory/following"; - } - ]; - } - { - Overcast = [ - { - abbr = "OC"; - href = "https://overcast.fm"; - } - ]; - } - ]; - } - ]; - }; -} diff --git a/bak/modules/immich/default.nix b/bak/modules/immich/default.nix deleted file mode 100644 index 885df5f..0000000 --- a/bak/modules/immich/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - services.immich = { - enable = true; - port = 9003; - host = "192.168.178.69"; - openFirewall = true; - mediaLocation = "/main/pictures"; - }; -} diff --git a/bak/modules/jellyfin/default.nix b/bak/modules/jellyfin/default.nix deleted file mode 100644 index f14f9f1..0000000 --- a/bak/modules/jellyfin/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - pkgs, - ... -}: -{ - services.jellyfin = { - enable = true; - openFirewall = true; - }; - - nixpkgs.config.packageOverrides = pkgs: { - vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; - }; - - hardware.graphics = { - enable = true; - extraPackages = with pkgs; [ - intel-media-driver - intel-vaapi-driver - libva-vdpau-driver - intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in) - vpl-gpu-rt # QSV on 11th gen or newer - ]; - }; - -} diff --git a/bak/modules/keyd/default.nix b/bak/modules/keyd/default.nix deleted file mode 100644 index c07190e..0000000 --- a/bak/modules/keyd/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - services.keyd = { - enable = true; - keyboards = { - default = { - ids = [ "05ac:024f" ]; - settings = { - main = { - space = "overload(control, space)"; - }; - }; - }; - }; - }; -} diff --git a/bak/modules/lazygit/default.nix b/bak/modules/lazygit/default.nix deleted file mode 100644 index 151543d..0000000 --- a/bak/modules/lazygit/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config, ... }: - -{ - programs.lazygit = { - enable = true; - settings = { - gui = { - nerdFontsVersion = "3"; - theme = { - lightTheme = false; - activeBorderColor = [ "magenta" "bold" ]; - searchingActiveBorderColor = [ "cyan" "bold" ]; - inactiveBorderColor = [ "#807c9f" ]; - optionsTextColor = [ "#807c9f" ]; - selectedLineBgColor = [ "#331531" ]; - inactiveViewSelectedLineBgColor = [ "#1d202f" ]; - }; - }; - }; - }; -} diff --git a/bak/modules/librewolf/default.nix b/bak/modules/librewolf/default.nix deleted file mode 100644 index 53840d9..0000000 --- a/bak/modules/librewolf/default.nix +++ /dev/null @@ -1,165 +0,0 @@ -{ - inputs, - pkgs, - ... -}: - -{ - programs.librewolf = { - enable = true; - nativeMessagingHosts = [ pkgs.firefoxpwa ]; - policies = { - AutofillAddressEnabled = true; - AutofillCreditCardEnabled = false; - DisableAppUpdate = true; - DisableFeedbackCommands = true; - DisableFirefoxStudies = true; - DisablePocket = true; - DisableTelemetry = true; - DontCheckDefaultBrowser = true; - OfferToSaveLogins = false; - EnableTrackingProtection = { - Value = true; - Locked = true; - Cryptomining = true; - Fingerprinting = true; - }; - }; - settings = { - "webgl.disabled" = false; - "privacy.clearOnShutdown.history" = false; - "privacy.clearOnShutdown.cookies" = false; - }; - profiles.default = { - isDefault = true; - name = "default"; - settings = { - "layout.css.prefers-color-scheme.content-override" = 0; - }; - - bookmarks = { - force = true; - settings = [ - { - name = "Home"; - url = "https://home.dnsc.io"; - } - "separator" - { - name = "Nix Packages"; - url = "https://search.nixos.org/packages"; - } - { - name = "Nix Options"; - url = "https://search.nixos.org/options"; - } - { - name = "Home Manager"; - url = "https://home-manager-options.extranix.com/"; - } - ]; - }; - - containersForce = true; - containers = { - default = { - name = "personal"; - color = "turquoise"; - icon = "chill"; - id = 1; - }; - }; - - search = { - default = "google"; - force = true; - engines = { - nix-packages = { - name = "Nix Packages"; - urls = [ - { - template = "https://search.nixos.org/packages"; - params = [ - { - name = "type"; - value = "packages"; - } - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@np" ]; - }; - - nix-options = { - name = "Nix Options"; - urls = [ - { - template = "https://search.nixos.org/options"; - params = [ - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@no" ]; - }; - - nix-home-manager = { - name = "Nix Home Manager"; - urls = [ - { - template = "https://home-manager-options.extranix.com"; - params = [ - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@nh" ]; - }; - - nix-wiki = { - name = "Nix Wiki"; - urls = [ - { - template = "https://wiki.nixos.org/w/index.php"; - params = [ - { - name = "search"; - value = "{searchTerms}"; - } - ]; - } - ]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@nw" ]; - }; - }; - }; - - extensions.force = true; - extensions.packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [ - ublock-origin - dearrow - bitwarden - sponsorblock - vimium - ]; - }; - }; -} diff --git a/bak/modules/macos/default.nix b/bak/modules/macos/default.nix deleted file mode 100644 index 070655b..0000000 --- a/bak/modules/macos/default.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ pkgs, ... }: - -{ - system = { - primaryUser = "dennis"; - stateVersion = 5; - activationScripts.postActivation.text = '' - /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u - ''; - - defaults = { - NSGlobalDomain."com.apple.swipescrolldirection" = false; - - dock = { - autohide = true; - autohide-delay = 0.01; - autohide-time-modifier = 0.01; - expose-group-apps = true; - launchanim = false; - minimize-to-application = true; - orientation = "right"; - show-recents = false; - persistent-apps = [ - "/Applications/Helium.app" - "/Applications/Ghostty.app" - "/System/Applications/System Settings.app/" - ]; - persistent-others = [ - "/Users/dennis/Downloads" - ]; - }; - - finder = { - AppleShowAllExtensions = true; - CreateDesktop = false; - FXEnableExtensionChangeWarning = false; - FXPreferredViewStyle = "clmv"; - ShowPathbar = true; - ShowStatusBar = true; - }; - - loginwindow = { - LoginwindowText = "(λ) powered by nix-darwin"; - }; - - menuExtraClock = { - Show24Hour = true; - ShowDate = 0; - }; - - screencapture = { - location = "/Users/dennis/Downloads"; - target = "file"; - }; - - spaces.spans-displays = false; - }; - }; - - security.pam.services.sudo_local.touchIdAuth = true; -} diff --git a/bak/modules/nixvim/ai.nix b/bak/modules/nixvim/ai.nix deleted file mode 100644 index 90794f9..0000000 --- a/bak/modules/nixvim/ai.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ ... }: - -{ - plugins.opencode = { - enable = true; - settings = { - provider.enabled = "tmux"; - }; - }; - - keymaps = [ - { - action.__raw = ''function() require("opencode").ask("@this: ", { submit = true }) end''; - key = "at"; - options.desc = "ask opencode about this"; - } - { - action.__raw = ''function() require("opencode").toggle() end''; - key = "aa"; - options.desc = "toggle opencode"; - } - { - action.__raw = ''function() require("opencode").select() end''; - key = "as"; - options.desc = "select an opencode action"; - } - { - mode = [ - "n" - "x" - ]; - action.__raw = ''function() return require("opencode").operator("@this ") end''; - key = "go"; - options.desc = "add range to opencode"; - } - { - mode = [ - "n" - ]; - action.__raw = ''function() return require("opencode").operator("@this ") .. "_" end''; - key = "go"; - options.desc = "add line to opencode"; - } - ]; -} diff --git a/bak/modules/nixvim/colorscheme.nix b/bak/modules/nixvim/colorscheme.nix deleted file mode 100644 index bdb7a63..0000000 --- a/bak/modules/nixvim/colorscheme.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ ... }: - -{ - colorscheme = "winterly"; - - # Make palette available to this module but - # also for other configuration (e.g. lualine) - extraFiles."lua/dnsc/palette.lua".source = ./extraFiles/palette.lua; - - # Set custorscheme in neovims runtimepath so that neovim - # discovers it automatically - extraFiles."colors/winterly.lua".source = ./extraFiles/winterly.lua; -} diff --git a/bak/modules/nixvim/completion.nix b/bak/modules/nixvim/completion.nix deleted file mode 100644 index b2aace2..0000000 --- a/bak/modules/nixvim/completion.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - plugins.blink-cmp = { - enable = true; - settings = { - keymap = { - preset = "enter"; - "" = [ - "select_next" - "fallback" - ]; - "" = [ - "select_prev" - "fallback" - ]; - "" = [ - "select_and_accept" - ]; - "" = [ - "show_documentation" - "hide_documentation" - ]; - }; - appearance.nerd_font_variant = "mono"; - completion.documentation.auto_show = false; - signature.enabled = true; - cmdline.completion.menu.auto_show = true; - }; - }; -} diff --git a/bak/modules/nixvim/default.nix b/bak/modules/nixvim/default.nix deleted file mode 100644 index 314e781..0000000 --- a/bak/modules/nixvim/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ pkgs, ... }: - -# These options are imported in nixvim.imports and therefore -# every option here lives within `programs.nixvim` -{ - enable = true; - defaultEditor = true; - package = pkgs.neovim-unwrapped; - - # Setup some aliases - vimAlias = true; - vimdiffAlias = true; - - imports = [ - ./colorscheme.nix - ./completion.nix - ./editing.nix - ./picker.nix - ./formatter.nix - ./git.nix - ./lsp.nix - ./options.nix - ./statusline.nix - ./keybindings.nix - ./ai.nix - ]; -} diff --git a/bak/modules/nixvim/editing.nix b/bak/modules/nixvim/editing.nix deleted file mode 100644 index e86452f..0000000 --- a/bak/modules/nixvim/editing.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ pkgs, ... }: - -{ - plugins.sleuth.enable = true; - plugins.nvim-surround.enable = true; - plugins.flash.enable = true; - - plugins.blink-pairs = { - enable = true; - }; - - plugins.treesitter = { - enable = true; - highlight.enable = true; - indent.enable = true; - folding.enable = true; - - grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ - angular - bash - css - html - javascript - jsdoc - json - lua - make - markdown - markdown_inline - go - gomod - gotmpl - python - styled - tsx - typescript - nix - regex - toml - vim - vimdoc - xml - yaml - ]; - }; - - plugins.substitute = { - enable = true; - luaConfig.post = /* lua */ '' - local sub = require("substitute") - vim.keymap.set("n", "s", sub.operator, { noremap = true }) - vim.keymap.set("n", "ss", sub.line, { noremap = true }) - vim.keymap.set("n", "S", sub.eol, { noremap = true }) - vim.keymap.set("x", "s", sub.visual, { noremap = true }) - ''; - }; - - extraPlugins = [ - pkgs.vimPlugins.vim-cool - ]; - - autoCmd = [ - { - callback.__raw = "function() vim.highlight.on_yank() end"; - event = [ - "TextYankPost" - ]; - } - { - event = [ "FileType" ]; - pattern = "qf"; - callback.__raw = /* lua */ '' - function() - vim.keymap.set("n", "", "", { buffer = true }) - end - ''; - } - ]; -} diff --git a/bak/modules/nixvim/extraFiles/palette.lua b/bak/modules/nixvim/extraFiles/palette.lua deleted file mode 100644 index 1ab3504..0000000 --- a/bak/modules/nixvim/extraFiles/palette.lua +++ /dev/null @@ -1,33 +0,0 @@ -return { - fg = "#ffffff", - fg_alt = "#bf8a9f", - fg_dim = "#807c9f", - bg = "#0f0b15", - bg_secondary = "#1d202f", - grey = "#807c9f", - grey_bright = "#807c9f", - red = "#f47359", - red_bright = "#ff6a7a", - red_subtle_bg = "#67182f", - green = "#29a444", - green_bright = "#00a392", - green_subtle_bg = "#10452f", - yellow = "#b58a52", - yellow_bright = "#df9080", - yellow_brighter = "#FCC1B6", - yellow_subtle_bg = "#54362a", - blue = "#3f95f6", - blue_bright = "#029fff", - blue_subtle_bg = "#2a346e", - blue_subtle_dark_bg = "#003045", - magenta = "#d369af", - magenta_bright = "#af85ea", - magenta_brighter = "#c57faf", - magenta_subtle_bg = "#572454", - magenta_subtle_bg_darker = "#331531", - cyan = "#4fbaef", - cyan_bright = "#35afbf", - cyan_subtle_bg = "#133d56", - silver = "#b8c6d5", - silver_bright = "#ffffff", -} diff --git a/bak/modules/nixvim/extraFiles/winterly.lua b/bak/modules/nixvim/extraFiles/winterly.lua deleted file mode 100644 index d3b6a51..0000000 --- a/bak/modules/nixvim/extraFiles/winterly.lua +++ /dev/null @@ -1,368 +0,0 @@ -local palette = require("dnsc.palette") - -vim.cmd.highlight("clear") -vim.g.colors_name = "winterly" - -local hi = function(name, val) - -- Force links - val.force = true - - -- Make sure that `cterm` attribute is not populated from `gui` - val.cterm = val.cterm or {} ---@type vim.api.keyset.highlight - - -- Define global highlight - vim.api.nvim_set_hl(0, name, val) -end - --- General -hi("Normal", { fg = palette.fg }) - -hi("Conceal", { fg = palette.silver, bg = palette.grey, ctermfg = "LightGrey", ctermbg = "DarkGrey" }) -hi("Cursor", { bg = palette.magenta_bright }) -hi("DiffText", { bg = palette.yellow_subtle_bg, bold = true, ctermbg = "DarkYellow", cterm = { bold = true } }) -hi("ErrorMsg", { fg = palette.red_bright, bg = palette.red_subtle_bg, ctermfg = "White", ctermbg = "DarkRed" }) -hi("IncSearch", { bg = palette.magenta_subtle_bg, fg = palette.magenta }) -hi("ModeMsg", { bold = true, cterm = { bold = true } }) -hi("NonText", { fg = palette.grey, ctermfg = "DarkGrey" }) -hi("PmenuSbar", { bg = palette.grey, ctermbg = "Grey" }) -hi("StatusLine", { reverse = true, bold = true, cterm = { reverse = true, bold = true } }) -hi("StatusLineNC", { reverse = true, cterm = { reverse = true } }) -hi("TabLineFill", { reverse = true, cterm = { reverse = true } }) -hi("TabLineSel", { bold = true, cterm = { bold = true } }) -hi("TermCursor", { reverse = true, cterm = { reverse = true } }) -hi("WinBar", { bold = true, cterm = { bold = true } }) -hi("WildMenu", { fg = palette.bg, bg = palette.yellow_subtle_bg, ctermfg = "Black", ctermbg = "Yellow" }) - -hi("VertSplit", { link = "Comment" }) -hi("WinSeparator", { link = "VertSplit" }) -hi("WinBarNC", { link = "WinBar" }) -hi("DiffTextAdd", { link = "DiffText" }) -hi("EndOfBuffer", { link = "NonText" }) -hi("LineNrAbove", { link = "LineNr" }) -hi("LineNrBelow", { link = "LineNr" }) -hi("QuickFixLine", { link = "Search" }) -hi("CursorLineSign", { link = "SignColumn" }) -hi("CursorLineFold", { link = "FoldColumn" }) -hi("CurSearch", { link = "Search" }) -hi("PmenuKind", { link = "Pmenu" }) -hi("PmenuKindSel", { link = "PmenuSel" }) -hi("PmenuMatch", { link = "Pmenu" }) -hi("PmenuMatchSel", { link = "PmenuSel" }) -hi("PmenuExtra", { link = "Pmenu" }) -hi("PmenuExtraSel", { link = "PmenuSel" }) -hi("PreInsert", { link = "Added" }) -hi("ComplMatchIns", {}) -hi("ComplHint", { link = "NonText" }) -hi("ComplHintMore", { link = "MoreMsg" }) -hi("Whitespace", { link = "NonText" }) -hi("MsgSeparator", { link = "StatusLine" }) -hi("NormalFloat", { link = "Pmenu" }) -hi("FloatBorder", { bg = palette.bg_secondary, fg = palette.fg_dim }) -hi("FloatTitle", { bg = palette.bg_secondary, fg = palette.fg, bold = true }) -hi("FloatFooter", { link = "Title" }) - -hi("FloatShadow", { bg = palette.bg, blend = 80 }) -hi("FloatShadowThrough", { bg = palette.bg, blend = 100 }) -hi("RedrawDebugNormal", { reverse = true, cterm = { reverse = true } }) -hi("RedrawDebugClear", { bg = palette.yellow_subtle_bg, ctermbg = "DarkYellow" }) -hi("RedrawDebugComposed", { bg = palette.green_subtle_bg, ctermbg = "DarkGreen" }) -hi("RedrawDebugRecompose", { bg = palette.red_subtle_bg, ctermbg = "DarkRed" }) -hi("Error", { link = "ErrorMsg" }) -hi("NvimInternalError", { link = "ErrorMsg" }) -hi("Todo", { fg = palette.blue_bright, bg = palette.blue_subtle_bg, ctermbg = "DarkBlue", ctermfg = "LightBlue" }) - -hi("String", { link = "Constant" }) -hi("Character", { link = "Constant" }) -hi("Number", { link = "Boolean" }) -hi("Boolean", { fg = palette.magenta_bright, bold = true }) -hi("Float", { link = "Number" }) -hi("Function", { link = "Identifier" }) -hi("Conditional", { link = "Statement" }) -hi("Repeat", { link = "Statement" }) -hi("Label", { link = "Statement" }) -hi("Operator", { fg = palette.fg_alt, italic = false, ctermfg = "White" }) -hi("Keyword", { link = "Statement" }) -hi("Exception", { link = "Statement" }) -hi("Include", { link = "PreProc" }) -hi("Define", { link = "PreProc" }) -hi("Macro", { link = "PreProc" }) -hi("PreCondit", { link = "PreProc" }) -hi("StorageClass", { link = "Type" }) -hi("Structure", { link = "Type" }) -hi("Typedef", { bold = true, fg = palette.yellow_brighter, ctermfg = "LightYellow" }) -hi("Tag", { link = "Special" }) -hi("SpecialChar", { link = "Special" }) -hi("Delimiter", { link = "Special" }) -hi("SpecialComment", { link = "Special" }) -hi("Debug", { link = "Special" }) - -hi("DiagnosticError", { fg = palette.red_bright, ctermfg = 1 }) -hi("DiagnosticWarn", { fg = palette.yellow, ctermfg = 3 }) -hi("DiagnosticInfo", { fg = palette.cyan, ctermfg = 4 }) -hi("DiagnosticHint", { fg = palette.silver, ctermfg = 7 }) -hi("DiagnosticOk", { fg = palette.green_bright, ctermfg = 10 }) -hi("DiagnosticUnderlineError", { fg = palette.red_bright, undercurl = true, cterm = { underline = true } }) -hi("DiagnosticUnderlineWarn", { fg = palette.yellow, undercurl = true, cterm = { underline = true } }) -hi("DiagnosticUnderlineInfo", { fg = palette.cyan, undercurl = true, cterm = { underline = true } }) -hi("DiagnosticUnderlineHint", { fg = palette.silver, undercurl = true, cterm = { underline = true } }) -hi("DiagnosticUnderlineOk", { fg = palette.green_bright, undercurl = true, cterm = { underline = true } }) -hi("DiagnosticVirtualTextError", { link = "DiagnosticError" }) -hi("DiagnosticVirtualTextWarn", { link = "DiagnosticWarn" }) -hi("DiagnosticVirtualTextInfo", { link = "DiagnosticInfo" }) -hi("DiagnosticVirtualTextHint", { link = "DiagnosticHint" }) -hi("DiagnosticVirtualTextOk", { link = "DiagnosticOk" }) -hi("DiagnosticFloatingError", { link = "DiagnosticError" }) -hi("DiagnosticFloatingWarn", { link = "DiagnosticWarn" }) -hi("DiagnosticFloatingInfo", { link = "DiagnosticInfo" }) -hi("DiagnosticFloatingHint", { link = "DiagnosticHint" }) -hi("DiagnosticFloatingOk", { link = "DiagnosticOk" }) -hi("DiagnosticSignError", { link = "DiagnosticError" }) -hi("DiagnosticSignWarn", { link = "DiagnosticWarn" }) -hi("DiagnosticSignInfo", { link = "DiagnosticInfo" }) -hi("DiagnosticSignHint", { link = "DiagnosticHint" }) -hi("DiagnosticSignOk", { link = "DiagnosticOk" }) -hi("DiagnosticDeprecated", { fg = palette.red, strikethrough = true, cterm = { strikethrough = true } }) - -hi("DiagnosticUnnecessary", { link = "Unused" }) -hi("LspInlayHint", { link = "NonText" }) -hi("SnippetTabstop", { link = "Visual" }) -hi("SnippetTabstopActive", { link = "SnippetTabstop" }) - --- Text -hi("@markup.raw", { link = "Special" }) -hi("@markup.link", { link = "Identifier" }) -hi("@markup.link.label", { link = "ConstantUnderlined" }) -hi("@markup.heading", { link = "Title" }) -hi("@markup.heading.gitcommit", { bg = palette.bg, fg = palette.fg, bold = true }) -hi("@markup.link.url", { link = "Underlined" }) -hi("@markup.underline", { link = "Underlined" }) -hi("@comment.todo", { link = "Todo" }) - --- Miscs -hi("@comment", { link = "Comment" }) -hi("@punctuation", { link = "Delimiter" }) - --- Constants -hi("@constant", { link = "Constant" }) -hi("@constant.builtin", { link = "Special" }) -hi("@constant.macro", { link = "Define" }) -hi("@keyword.directive", { link = "Define" }) -hi("@string", { link = "String" }) -hi("@string.escape", { link = "SpecialChar" }) -hi("@string.special", { link = "SpecialChar" }) -hi("@character", { link = "Character" }) -hi("@character.special", { link = "SpecialChar" }) -hi("@number", { link = "Number" }) -hi("@boolean", { link = "Boolean" }) -hi("@number.float", { link = "Float" }) - --- Functions -hi("@function", { link = "Function" }) -hi("@function.builtin", { link = "Special" }) -hi("@function.macro", { link = "Macro" }) -hi("@function.method", { link = "Function" }) -hi("@variable.parameter", { link = "Identifier" }) -hi("@variable.parameter.builtin", { link = "Special" }) -hi("@variable.member", { link = "Identifier" }) -hi("@property", { link = "Identifier" }) -hi("@attribute", { link = "Macro" }) -hi("@attribute.builtin", { link = "Special" }) -hi("@constructor", { link = "Special" }) - --- Keywords -hi("@keyword.conditional", { link = "Conditional" }) -hi("@keyword.repeat", { link = "Repeat" }) -hi("@keyword.type", { link = "Structure" }) -hi("@label", { link = "Label" }) -hi("@operator", { link = "Operator" }) -hi("@keyword", { link = "Keyword" }) -hi("@keyword.exception", { link = "Exception" }) - -hi("@variable", { link = "Identifier" }) -hi("@type", { link = "Type" }) -hi("@type.builtin", { link = "Type" }) -hi("@type.definition", { link = "Typedef" }) -hi("@module", { link = "Identifier" }) -hi("@keyword.import", { link = "Include" }) -hi("@keyword.directive", { link = "PreProc" }) -hi("@keyword.debug", { link = "Debug" }) -hi("@tag", { link = "Tag" }) -hi("@tag.tsx", { link = "Identifier" }) -hi("@tag.builtin", { link = "Special" }) - --- LSP semantic tokens -hi("@lsp.type.class", { link = "Structure" }) -hi("@lsp.type.comment", { link = "Comment" }) -hi("@lsp.type.decorator", { link = "Function" }) -hi("@lsp.type.enum", { link = "Structure" }) -hi("@lsp.type.enumMember", { link = "Constant" }) -hi("@lsp.type.function", { link = "Function" }) -hi("@lsp.type.interface", { link = "Structure" }) -hi("@lsp.type.macro", { link = "Macro" }) -hi("@lsp.type.method", { link = "Function" }) -hi("@lsp.type.namespace", { link = "Structure" }) -hi("@lsp.type.parameter", { link = "Identifier" }) -hi("@lsp.type.property", { link = "Identifier" }) -hi("@lsp.type.struct", { link = "Structure" }) -hi("@lsp.type.type", { link = "Type" }) -hi("@lsp.type.typeParameter", { link = "TypeDef" }) -hi("@lsp.type.variable", { link = "Identifier" }) -hi("@lsp.typemod.keyword.documentation", { fg = palette.grey, bold = true }) - -if vim.o.background == "light" then --- TODO: Define light scheme -else - -- Default colors only used with a dark background. - hi("ColorColumn", { bg = palette.red_subtle_bg, ctermbg = "DarkRed" }) - hi("CursorColumn", { bg = palette.grey, ctermbg = "DarkGrey" }) - hi("CursorLine", { bg = palette.magenta_subtle_bg_darker, cterm = { underline = true } }) - hi("CursorLineNr", { - fg = palette.fg, - bg = palette.magenta_subtle_bg_darker, - bold = true, - ctermfg = "White", - cterm = { underline = true }, - }) - hi("DiffAdd", { fg = palette.green_bright, bg = palette.green_subtle_bg, ctermbg = "DarkGreen" }) - hi("DiffChange", { fg = palette.yellow_brighter, bg = palette.yellow_subtle_bg, ctermbg = "DarkYellow" }) - hi("DiffDelete", { fg = palette.red_bright, bg = palette.red_subtle_bg, ctermbg = "DarkRed" }) - hi("Directory", { fg = palette.magenta, bold = true, ctermfg = "Magenta" }) - hi("FoldColumn", { fg = palette.cyan_bright, bg = palette.grey, ctermfg = "Cyan", ctermbg = "DarkGrey" }) - hi("Folded", { fg = palette.cyan_bright, bg = palette.grey, ctermfg = "Cyan", ctermbg = "DarkGrey" }) - hi("LineNr", { fg = palette.grey_bright, ctermfg = "Grey" }) - hi( - "MatchParen", - { fg = palette.fg_alt, bg = palette.magenta_subtle_bg, ctermbg = "DarkMagenta", ctermfg = "Black" } - ) - hi("MoreMsg", { fg = palette.grey, ctermfg = "DarkGrey" }) - hi("Pmenu", { bg = palette.bg_secondary, ctermfg = "White", ctermbg = "Black" }) - hi("PmenuSel", { - bg = palette.magenta_subtle_bg, - fg = palette.fg, - bold = true, - ctermfg = "LightMagenta", - ctermbg = "DarkMagenta", - }) - hi("PmenuThumb", { bg = palette.fg, ctermbg = "White" }) - hi("Question", { fg = palette.green_bright, bold = true, ctermfg = "LightGreen" }) - hi("Search", { link = "IncSearch" }) - hi("Substitute", { - fg = palette.green_bright, - bg = palette.green_subtle_bg, - bold = true, - ctermfg = "DarkBlue", - ctermbg = "LightBlue", - }) - hi("SignColumn", { fg = palette.grey_bright, bg = palette.bg, ctermfg = "Cyan", ctermbg = "DarkGrey" }) - hi("SpecialKey", { fg = palette.cyan_bright, ctermfg = "LightBlue" }) - hi("SpellBad", { fg = palette.red, undercurl = true, ctermbg = "Red" }) - hi("SpellCap", { fg = palette.blue, undercurl = true, ctermbg = "Blue" }) - hi("SpellLocal", { fg = palette.cyan, undercurl = true, ctermbg = "Cyan" }) - hi("SpellRare", { fg = palette.magenta, undercurl = true, ctermbg = "Magenta" }) - hi("StatusLineTerm", { - fg = palette.bg, - bg = palette.green_bright, - bold = true, - ctermfg = "Black", - ctermbg = "LightGreen", - cterm = { bold = true }, - }) - hi("StatusLineTermNC", { fg = palette.bg, bg = palette.green_bright, ctermfg = "Black", ctermbg = "LightGreen" }) - hi( - "TabLine", - { bg = palette.grey, underline = true, ctermfg = "White", ctermbg = "DarkGrey", cterm = { underline = true } } - ) - hi("Title", { fg = palette.magenta_bright, bold = true, ctermfg = "Magenta" }) - hi("Visual", { - fg = palette.magenta_brighter, - bg = palette.magenta_subtle_bg, - ctermfg = "LightMagenta", - ctermbg = "DarkMagenta", - }) - hi("WarningMsg", { fg = palette.red_bright, ctermfg = "LightRed" }) - hi("Comment", { fg = palette.grey, ctermfg = "Cyan" }) - hi("Unused", { fg = palette.grey_bright, undercurl = true, ctermfg = "LightGrey" }) - hi("Constant", { fg = palette.yellow_brighter, ctermfg = "LightYellow" }) - hi("ConstantUnderlined", { fg = palette.yellow_brighter, underline = true, ctermfg = "LightYellow" }) - hi("Special", { fg = palette.silver, ctermfg = "LightGrey" }) - hi("Identifier", { fg = palette.fg, ctermfg = "White", cterm = { bold = true } }) - hi("Statement", { fg = palette.fg_alt, bold = true, ctermfg = "White" }) - hi("PreProc", { fg = palette.magenta, ctermfg = "LightMagenta" }) - hi("Type", { fg = palette.silver, bold = true, ctermfg = "LightCyan" }) - hi("Underlined", { fg = palette.silver, underline = true, ctermfg = "LightGrey", cterm = { underline = true } }) - hi("Ignore", { fg = palette.bg, ctermfg = "Black" }) - hi( - "Added", - { fg = palette.green_bright, bg = palette.green_subtle_bg, ctermfg = "LightGreen", ctermbg = "DarkGreen" } - ) - hi( - "Changed", - { fg = palette.blue_bright, bg = palette.blue_subtle_bg, ctermfg = "LightBlue", ctermbg = "DarkBlue" } - ) - hi("Removed", { fg = palette.red_bright, bg = palette.red_subtle_bg, ctermfg = "LightRed", ctermbg = "DarkRed" }) - hi("NotificationInfo", { fg = palette.silver, bg = palette.bg, ctermfg = "White", ctermbg = "Black" }) - - -- Snacks - hi("SnacksIndentScope", { fg = palette.magenta, ctermfg = "LightGrey" }) - hi("SnacksIndent", { fg = palette.magenta_subtle_bg, ctermfg = "DarkGrey" }) - hi( - "SnacksPickerCursorLine", - { bg = palette.magenta_subtle_bg, fg = palette.fg, bold = true, cterm = { underline = true } } - ) - hi("SnacksPickerListCursorLine", { link = "SnacksPickerCursorLine" }) - hi("SnacksPickerTitle", { link = "FloatTitle" }) - hi("SnacksBackdrop", { link = "Pmenu" }) - - -- Flash - hi("FlashMatch", { reverse = true }) - hi("FlashLabel", { bg = palette.fg, fg = palette.bg }) - - -- FzfLua - hi("FzfLuaNormal", { link = "Pmenu" }) - hi("FzfLuaBorder", { link = "Pmenu" }) - hi("FzfLuaTitle", { link = "Pmenu" }) - hi("FzfLuaBackdrop", { link = "Pmenu" }) - hi("FzfLuaPreviewNormal", { link = "FzfLuaNormal" }) - hi("FzfLuaPreviewBorder", { link = "FzfLuaBorder" }) - hi("FzfLuaPreviewTitle", { link = "FzfLuaTitle" }) - hi( - "FzfLuaCursorLine", - { bg = palette.magenta_subtle_bg, fg = palette.fg, bold = true, cterm = { underline = true } } - ) - hi("FzfLuaTitleFlags", { link = "FzfLuaCursorLine" }) - hi("FzfLuaCursorLineNr", { link = "FzfLuaCursorLine" }) - hi("FzfLuaHeaderBind", { link = "Pmenu" }) - hi("FzfLuaHeaderText", { link = "Comment" }) - hi("FzfLuaPathLineNr", { link = "Pmenu" }) - hi("FzfLuaPathColNr", { link = "Pmenu" }) - hi("FzfLuaLivePrompt", { link = "Pmenu" }) - hi("FzfLuaCmdBuf", { link = "Comment" }) - hi("FzfLuaBufName", { link = "Pmenu" }) - hi("FzfLuaBufId", { link = "Special" }) - hi("FzfLuaBufLineNr", { link = "Special" }) - hi("FzfLuaBufFlagCur", { link = "Pmenu" }) - hi("FzfLuaBufFlagAlt", { link = "Comment" }) - - -- Blinkpairs - hi("BlinkPairsOrange", { link = "Comment" }) - hi("BlinkPairsPurple", { fg = palette.magenta_brighter }) - hi("BlinkPairsBlue", { fg = palette.magenta_bright }) - - -- Neogit - hi("NeogitDiffAdd", { link = "DiffAdd" }) - hi("NeogitDiffDelete", { link = "DiffDelete" }) - hi("NeogitDiffContext", { bg = palette.bg_secondary, fg = palette.fg }) - hi("NeogitDiffContextCursor", { bg = palette.magenta_subtle_bg_darker, fg = palette.magenta_brighter }) - hi("NeogitDiffAddCursor", { bg = palette.green_bright, fg = palette.green_subtle_bg }) - hi("NeogitDiffDeleteCursor", { bg = palette.red_bright, fg = palette.red_subtle_bg }) - hi("NeogitDiffContextHighlight", { link = "NeogitDiffContext" }) - hi("NeogitDiffAddHighlight", { link = "DiffAdd" }) - hi("NeogitDiffDeleteHighlight", { link = "DiffDelete" }) - hi("NeogitHunkHeader", { bg = palette.bg_secondary, fg = palette.grey_bright }) - hi("NeogitHunkMergeHeader", { link = "NeogitHunkHeader" }) - hi("NeogitHunkHeaderHighlight", { bg = palette.magenta_subtle_bg, fg = palette.magenta_brighter }) - hi("NeogitHunkHeaderCursor", { link = "NeogitHunkHeaderHighlight" }) - hi("NeogitCommitViewHeader", { bg = palette.bg_secondary, fg = palette.fg }) - hi("NeogitDiffHeader", { bg = palette.bg, fg = palette.grey_bright, bold = true }) - hi("NeogitActiveItem", { bg = palette.grey_bright, fg = palette.bg, bold = true }) -end diff --git a/bak/modules/nixvim/formatter.nix b/bak/modules/nixvim/formatter.nix deleted file mode 100644 index 37e1989..0000000 --- a/bak/modules/nixvim/formatter.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ pkgs, ... }: - -{ - plugins.conform-nvim = { - enable = true; - settings = { - formatters_by_ft = { - typescriptreact = { - __unkeyed-1 = "biome-check"; - __unkeyed-2 = "prettierd"; - stop_after_first = true; - }; - astro = [ "prettierd" ]; - typescript = { - __unkeyed-1 = "biome-check"; - __unkeyed-2 = "prettierd"; - stop_after_first = true; - }; - javascript = { - __unkeyed-1 = "biome-check"; - __unkeyed-2 = "prettierd"; - stop_after_first = true; - }; - javascriptreact = { - __unkeyed-1 = "biome-check"; - __unkeyed-2 = "prettierd"; - stop_after_first = true; - }; - html = [ "prettierd" ]; - htmlangular = [ "prettierd" ]; - css = { - __unkeyed-1 = "biome-check"; - __unkeyed-2 = "prettierd"; - stop_after_first = true; - }; - yaml = [ "prettierd" ]; - markdown = [ "prettierd" ]; - json = { - __unkeyed-1 = "biome-check"; - __unkeyed-2 = "prettierd"; - stop_after_first = true; - }; - lua = [ "stylua" ]; - go = [ "goimports" ]; - gomod = [ "goimports" ]; - gowork = [ "goimports" ]; - gotmpl = [ "goimports" ]; - }; - format_on_save = { - timeout_ms = 500; - lsp_format = "fallback"; - }; - }; - extraPackages = [pkgs.stylua]; - }; -} diff --git a/bak/modules/nixvim/git.nix b/bak/modules/nixvim/git.nix deleted file mode 100644 index 8efd6ad..0000000 --- a/bak/modules/nixvim/git.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - plugins.gitportal = { - enable = true; - }; - - keymaps = [ - { - key = "gll"; - action = "GitPortal"; - options.desc = "Open line in Git provider"; - } - { - key = "gll"; - action = "GitPortal"; - options.desc = "Open line in Git provider"; - } - { - key = "gly"; - action = "GitPortal copy_link_to_clipboard"; - options.desc = "Copy link to line at Git provider"; - } - { - key = "glo"; - action = "GitPortal open_link"; - options.desc = "Open link to line at Git provider"; - } - ]; -} diff --git a/bak/modules/nixvim/keybindings.nix b/bak/modules/nixvim/keybindings.nix deleted file mode 100644 index 7c2540d..0000000 --- a/bak/modules/nixvim/keybindings.nix +++ /dev/null @@ -1,129 +0,0 @@ -{ - plugins.which-key = { - enable = true; - icons.mappings = false; - }; - - keymaps = [ - # Open - { - mode = [ "n" ]; - key = "od"; - action = "vsplit | lua vim.lsp.buf.definition()"; - options.desc = "Go to definition in other window"; - } - - # Buffer - { - mode = [ "n" ]; - key = "bn"; - action = "bn"; - options.desc = "Move to next buffer"; - } - { - mode = [ "n" ]; - key = "bp"; - action = "bp"; - options.desc = "Move to previous buffer"; - } - { - mode = [ "n" ]; - key = "bk"; - action = "bn"; - options.desc = "Kill buffer and window"; - } - - # File - { - mode = [ "n" ]; - key = "fn"; - action = "enew"; - options.desc = "Create a new file"; - } - { - mode = [ "n" ]; - key = "fs"; - action = "w"; - options.desc = "Save currently opened file"; - } - - # Quit - { - mode = [ "n" ]; - key = "qq"; - action = "qa!"; - options.desc = "Leave neovim"; - } - - # Window - { - mode = [ "n" ]; - key = "w+"; - action = ":vertical resize +4"; - options.desc = "Increase window size"; - } - { - mode = [ "n" ]; - key = "w-"; - action = ":vertical resize -4"; - options.desc = "Decrease window size"; - } - { - mode = [ "n" ]; - key = "wx"; - action = ":bd"; - options.desc = "Kill active window and buffer"; - } - { - mode = [ "n" ]; - key = "wh"; - action = "h"; - options.desc = "Move to window on left"; - } - { - mode = [ "n" ]; - key = "wj"; - action = "j"; - options.desc = "Move to window on bottom"; - } - { - mode = [ "n" ]; - key = "wk"; - action = "k"; - options.desc = "Move to window on top"; - } - { - mode = [ "n" ]; - key = "wl"; - action = "l"; - options.desc = "Move to window on right"; - } - { - mode = [ "n" ]; - key = "ws"; - action = "sp"; - options.desc = "Split windows horizontally"; - } - { - mode = [ "n" ]; - key = "wv"; - action = "vsp"; - options.desc = "Split windows vertically"; - } - { - mode = [ "n" ]; - key = "wd"; - action = "close"; - options.desc = "Delete window only"; - } - { - mode = [ - "n" - "x" - "o" - ]; - key = ""; - action.__raw = /* lua */ ''function() require("flash").jump() end''; - } - ]; -} diff --git a/bak/modules/nixvim/lsp.nix b/bak/modules/nixvim/lsp.nix deleted file mode 100644 index 5129969..0000000 --- a/bak/modules/nixvim/lsp.nix +++ /dev/null @@ -1,199 +0,0 @@ -{ pkgs, ... }: - -{ - plugins.lspconfig.enable = true; - - lsp = { - enable = true; - - servers = { - lua_ls = { - enable = true; - package = pkgs.lua-language-server; - packageFallback = true; - }; - nil_ls = { - enable = true; - package = pkgs.nil; - packageFallback = true; - }; - gopls = { - enable = true; - package = pkgs.gopls; - packageFallback = true; - }; - ts_ls = { - enable = true; - package = pkgs.typescript-language-server; - packageFallback = true; - }; - jsonls = { - enable = true; - package = pkgs.vscode-langservers-extracted; - packageFallback = true; - }; - cssls = { - enable = true; - package = pkgs.vscode-langservers-extracted; - packageFallback = true; - }; - html = { - enable = true; - package = pkgs.vscode-langservers-extracted; - packageFallback = true; - }; - astro = { - enable = true; - package = pkgs.astro-language-server; - packageFallback = true; - config.init_options.typescript.tsdk = "${pkgs.typescript}/lib/node_modules/typescript/lib"; - }; - eslint = { - enable = true; - package = pkgs.vscode-langservers-extracted; - packageFallback = true; - config = { - root_markers = [ - ".eslintrc" - ".eslintrc.js" - ".eslintrc.cjs" - ".eslintrc.yaml" - ".eslintrc.yml" - ".eslintrc.json" - "eslint.config.js" - "eslint.config.mjs" - "eslint.config.cjs" - "eslint.config.ts" - "eslint.config.mts" - "eslint.config.cts" - "package.json" - ]; - settings = { - validate = "on"; - useESLintClass = false; - experimental = { - useFlatConfig = true; - }; - codeActionOnSave = { - enable = false; - mode = "all"; - }; - format = true; - quiet = false; - onIgnoredFiles = "off"; - rulesCustomizations = { }; - run = "onType"; - problems = { - shortenToSingleLine = false; - }; - nodePath = ""; - workingDirectory = { - mode = "location"; - }; - codeAction = { - disableRuleComment = { - enable = true; - location = "separateLine"; - }; - showDocumentation = { - enable = true; - }; - }; - }; - handlers = { - "eslint/openDoc".__raw = /* lua */ '' - function(_, result) - if result then - vim.ui.open(result.url) - end - return {} - end - ''; - "eslint/confirmESLintExecution" = /* lua */ '' - function(_, result) - if not result then - return - end - return 4 -- approved - end - ''; - "eslint/probeFailed" = /* lua */ '' - function() - vim.notify("[lspconfig] ESLint probe failed.", vim.log.levels.WARN) - return {} - end - ''; - "eslint/noLibrary" = /* lua */ '' - function() - vim.notify("[lspconfig] Unable to find ESLint library.", vim.log.levels.WARN) - return {} - end - ''; - }; - on_new_config.__raw = /* lua */ '' - function(config, new_root_dir) - -- This function is called when LSP attaches to a new buffer - -- Set the working directory to the root where eslint config is found - config.settings = config.settings or {} - config.settings.workspaceFolder = { - uri = new_root_dir, - name = vim.fn.fnamemodify(new_root_dir, ":t"), - } - - -- Detect flat config - local flat_config_files = { - "eslint.config.js", - "eslint.config.mjs", - "eslint.config.cjs", - "eslint.config.ts", - "eslint.config.mts", - "eslint.config.cts", - } - - for _, file in ipairs(flat_config_files) do - local config_path = new_root_dir .. "/" .. file - if vim.uv.fs_stat(config_path) then - config.settings.experimental = config.settings.experimental or {} - config.settings.experimental.useFlatConfig = true - break - end - end - - -- Support Yarn PnP - local pnp_cjs = new_root_dir .. "/.pnp.cjs" - local pnp_js = new_root_dir .. "/.pnp.js" - if vim.uv.fs_stat(pnp_cjs) or vim.uv.fs_stat(pnp_js) then - config.cmd = vim.list_extend({ "yarn", "exec" }, config.cmd or {}) - end - end - ''; - }; - }; - biome = { - enable = true; - package = null; - packageFallback = false; - }; - }; - - keymaps = [ - { - key = "ca"; - lspBufAction = "code_action"; - } - { - key = "e"; - action = "lua vim.diagnostic.open_float()"; - } - ]; - }; - - # Define diagnostic appearance - diagnostic.settings = { - virtual_text = false; - signs = true; - underline = true; - update_in_insert = false; - severity_sort = false; - }; -} diff --git a/bak/modules/nixvim/options.nix b/bak/modules/nixvim/options.nix deleted file mode 100644 index 4e16fc3..0000000 --- a/bak/modules/nixvim/options.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - globals = { - mapleader = " "; - maplocalleader = " "; - }; - - clipboard.register = "unnamedplus"; - - opts = { - backup = false; - cmdheight = 1; - conceallevel = 0; - fileencoding = "utf-8"; - hlsearch = true; - ignorecase = true; - mouse = "a"; - pumheight = 10; - showmode = false; - smartindent = true; - breakindent = true; - showtabline = 0; - smartcase = true; - splitbelow = true; - splitright = true; - swapfile = false; - termguicolors = true; - timeoutlen = 600; - undofile = true; - updatetime = 230; - writebackup = false; - expandtab = true; - shiftwidth = 2; - tabstop = 2; - cursorline = true; - number = true; - relativenumber = true; - numberwidth = 2; - signcolumn = "yes"; - linebreak = true; - breakat = " ^I!@*-+;:,./?"; - scrolloff = 4; - sidescrolloff = 4; - winbar = ""; - foldlevel = 99; - foldlevelstart = 99; - }; -} diff --git a/bak/modules/nixvim/picker.nix b/bak/modules/nixvim/picker.nix deleted file mode 100644 index 0c254d5..0000000 --- a/bak/modules/nixvim/picker.nix +++ /dev/null @@ -1,171 +0,0 @@ -{ pkgs, ... }: - -{ - plugins.oil = { - enable = true; - settings = { - keymaps = { - "q" = "actions.close"; - }; - columns = [ - "icon" - "permissions" - "size" - "mtime" - ]; - }; - }; - - extraPlugins = [ pkgs.vimPlugins.snacks-nvim ]; - extraConfigLua = /* lua */ '' - local Snacks = require("snacks"); - local filter_lsp_definitions = function(item) - if item.file:match("/react/ts5.0/") or item.file:match("react.d.ts") then - return false - end - return true - end - - Snacks.setup({ - bigfile = { enabled = true }, - bufdelete = { enabled = true }, - git = { enabled = true }, - indent = { enabled = true }, - input = { enabled = true }, - notifier = { enabled = true }, - picker = { - enabled = true, - prompt = "λ ", - layout = { preset = "ivy" }, - }, - statuscolumn = { enabled = true }, - }) - ''; - - keymaps = [ - # Git - { - key = "gb"; - action.__raw = "function() Snacks.git.blame_line() end"; - options.desc = "Show git blame for current line"; - } - # Picker - { - key = "."; - action.__raw = "function() Snacks.picker.files({ hidden = true }) end"; - options.desc = "Files"; - } - { - key = ""; - action.__raw = "function() Snacks.picker.git_files() end"; - options.desc = "Git files"; - } - # Find - { - key = "fr"; - action.__raw = "function() Snacks.picker.recent() end"; - options.desc = "Recent"; - } - { - key = "fp"; - action.__raw = "function() Snacks.picker.projects() end"; - options.desc = "Projects"; - } - { - key = "bb"; - action.__raw = "function() Snacks.picker.buffers() end"; - options.desc = "List buffers"; - } - { - key = "bd"; - action.__raw = "function() Snacks.bufdelete() end"; - options.desc = "Delete buffer"; - } - { - key = "bD"; - action.__raw = "function() Snacks.bufdelete.all() end"; - options.desc = "Delete all buffers"; - } - { - key = "bo"; - action.__raw = "function() Snacks.bufdelete.other() end"; - options.desc = "Delete other buffers"; - } - # Search - { - key = "ss"; - action.__raw = "function() Snacks.picker.grep() end"; - options.desc = "Grep"; - } - { - mode = [ - "n" - "x" - ]; - key = "sw"; - action.__raw = "function() Snacks.picker.grep_word() end"; - options.desc = "Visual selection or word"; - } - { - key = "su"; - action.__raw = "function() Snacks.picker.undo() end"; - options.desc = "Undo History"; - } - # Diagnostics - { - key = "td"; - action.__raw = "function() Snacks.picker.diagnostics_buffer() end"; - options.desc = "Buffer Diagnostics"; - } - { - key = "ta"; - action.__raw = "function() Snacks.picker.diagnostics() end"; - options.desc = "Diagnostics"; - } - # LSP - { - key = "gd"; - action.__raw = "function() Snacks.picker.lsp_definitions({ filter = { filter = filter_lsp_definitions } }) end"; - options.desc = "Goto Definition"; - } - { - key = "gD"; - action.__raw = "function() Snacks.picker.lsp_declarations() end"; - options.desc = "Goto Declaration"; - } - { - key = "grr"; - action.__raw = "function() Snacks.picker.lsp_references() end"; - options = { - desc = "References"; - nowait = true; - }; - } - { - key = "gI"; - action.__raw = "function() Snacks.picker.lsp_implementations() end"; - options.desc = "Goto Implementation"; - } - { - key = "gy"; - action.__raw = "function() Snacks.picker.lsp_type_definitions() end"; - options.desc = "Goto T[y]pe Definition"; - } - # Notifications and highlights - { - key = "on"; - action.__raw = "function() Snacks.notifier.show_history() end"; - options.desc = "Open notification history"; - } - { - key = "oh"; - action.__raw = "function() Snacks.picker.highlights() end"; - options.desc = "List highlights"; - } - { - key = "n"; - action = "Oil"; - options.desc = "Opens file explorer"; - } - ]; -} diff --git a/bak/modules/nixvim/statusline.nix b/bak/modules/nixvim/statusline.nix deleted file mode 100644 index 086efc4..0000000 --- a/bak/modules/nixvim/statusline.nix +++ /dev/null @@ -1,96 +0,0 @@ -{ - plugins.lualine = { - enable = true; - - settings = { - options = { - theme = { - __raw = "winterly_lualine"; - }; - icons_enabled = false; - component_separators = { - left = "|"; - right = "|"; - }; - section_separators = { - left = ""; - right = ""; - }; - }; - sections = { - lualine_a = [ - { - __unkeyed-1 = "mode"; - fmt = { - __raw = "function(str) return str:sub(1, 1) end"; - }; - } - ]; - lualine_b = [ - { - __unkeyed-1 = "filename"; - file_status = true; - newfile_status = false; - path = 4; - shorting_target = 120; - symbols = { - modified = "[+]"; - readonly = "[-]"; - unnamed = "[No Name]"; - newfile = "[New]"; - }; - } - "encoding" - ]; - lualine_c = null; - lualine_x = null; - lualine_y = [ - "branch" - "diff" - "diagnostics" - ]; - lualine_z = [ - "location" - ]; - }; - }; - - # Sets up my custom colorscheme - luaConfig.pre = /* lua */ '' - local palette = require("dnsc.palette") - - local winterly_lualine = { - normal = { - a = { bg = palette.magenta, fg = palette.bg, gui = "bold" }, - b = { bg = palette.bg_secondary, fg = palette.magenta }, - c = { bg = palette.bg_secondary, fg = palette.magenta }, - }, - insert = { - a = { bg = palette.cyan_bright, fg = palette.bg, gui = "bold" }, - b = { bg = palette.bg_secondary, fg = palette.cyan_bright }, - c = { bg = palette.bg_secondary, fg = palette.cyan_bright }, - }, - visual = { - a = { bg = palette.blue_bright, fg = palette.bg, gui = "bold" }, - b = { bg = palette.bg_secondary, fg = palette.blue_bright }, - c = { bg = palette.bg_secondary, fg = palette.blue_bright }, - }, - replace = { - a = { bg = palette.red_bright, fg = palette.bg, gui = "bold" }, - b = { bg = palette.bg_secondary, fg = palette.red_bright }, - c = { bg = palette.bg_secondary, fg = palette.red_bright }, - }, - command = { - a = { bg = palette.green_bright, fg = palette.bg, gui = "bold" }, - b = { bg = palette.bg_secondary, fg = palette.green_bright }, - c = { bg = palette.bg_secondary, fg = palette.green_bright }, - }, - inactive = { - a = { bg = palette.bg_secondary, fg = palette.fg_dim }, - b = { bg = palette.bg_secondary, fg = palette.fg_dim }, - c = { bg = palette.bg_secondary, fg = palette.fg_dim }, - }, - } - ''; - }; -} diff --git a/bak/modules/nvim/config/after/ftplugin/markdown.vim b/bak/modules/nvim/config/after/ftplugin/markdown.vim deleted file mode 100644 index 629290d..0000000 --- a/bak/modules/nvim/config/after/ftplugin/markdown.vim +++ /dev/null @@ -1,5 +0,0 @@ -setlocal expandtab -setlocal smartindent -setlocal tabstop=2 -setlocal shiftwidth=2 -setlocal conceallevel=2 diff --git a/bak/modules/nvim/config/after/ftplugin/odin.vim b/bak/modules/nvim/config/after/ftplugin/odin.vim deleted file mode 100644 index 629290d..0000000 --- a/bak/modules/nvim/config/after/ftplugin/odin.vim +++ /dev/null @@ -1,5 +0,0 @@ -setlocal expandtab -setlocal smartindent -setlocal tabstop=2 -setlocal shiftwidth=2 -setlocal conceallevel=2 diff --git a/bak/modules/nvim/config/after/ftplugin/vimwiki.vim b/bak/modules/nvim/config/after/ftplugin/vimwiki.vim deleted file mode 100644 index d6ec024..0000000 --- a/bak/modules/nvim/config/after/ftplugin/vimwiki.vim +++ /dev/null @@ -1,6 +0,0 @@ -setlocal expandtab -setlocal smartindent -setlocal tabstop=2 -setlocal shiftwidth=2 -setlocal conceallevel=2 -setlocal nocompatible diff --git a/bak/modules/nvim/config/colors/winterly.lua b/bak/modules/nvim/config/colors/winterly.lua deleted file mode 120000 index e2ac629..0000000 --- a/bak/modules/nvim/config/colors/winterly.lua +++ /dev/null @@ -1 +0,0 @@ -/nix/store/mp57l6qar04fcicsvmryl7fjzq6wwfmp-home-manager-files/.config/nvim/colors/winterly.lua \ No newline at end of file diff --git a/bak/modules/nvim/config/ftdetect/fastlane.vim b/bak/modules/nvim/config/ftdetect/fastlane.vim deleted file mode 100644 index 64d666e..0000000 --- a/bak/modules/nvim/config/ftdetect/fastlane.vim +++ /dev/null @@ -1,7 +0,0 @@ -au BufNewFile,BufRead Appfile set ft=ruby -au BufNewFile,BufRead Deliverfile set ft=ruby -au BufNewFile,BufRead Fastfile set ft=ruby -au BufNewFile,BufRead Gymfile set ft=ruby -au BufNewFile,BufRead Matchfile set ft=ruby -au BufNewFile,BufRead Snapfile set ft=ruby -au BufNewFile,BufRead Scanfile set ft=ruby diff --git a/bak/modules/nvim/config/init.lua b/bak/modules/nvim/config/init.lua deleted file mode 120000 index 4370be1..0000000 --- a/bak/modules/nvim/config/init.lua +++ /dev/null @@ -1 +0,0 @@ -/nix/store/mp57l6qar04fcicsvmryl7fjzq6wwfmp-home-manager-files/.config/nvim/init.lua \ No newline at end of file diff --git a/bak/modules/nvim/config/lazy-lock.json b/bak/modules/nvim/config/lazy-lock.json deleted file mode 100644 index b891305..0000000 --- a/bak/modules/nvim/config/lazy-lock.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, - "codecompanion.nvim": { "branch": "main", "commit": "a8c696d1fc4268085e4306d54af39b07be884b17" }, - "conform.nvim": { "branch": "master", "commit": "cde4da5c1083d3527776fee69536107d98dae6c9" }, - "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, - "follow-md-links.nvim": { "branch": "main", "commit": "728d96d268eef9666f0ee77a083e7e2f0b44f607" }, - "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, - "gitportal.nvim": { "branch": "main", "commit": "2420f27c6269184f13d018f347f36eb120403110" }, - "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, - "lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" }, - "mini.pairs": { "branch": "main", "commit": "b316e68f2d242d5bd010deaab645daa27ed86297" }, - "nvim-surround": { "branch": "main", "commit": "fcfa7e02323d57bfacc3a141f8a74498e1522064" }, - "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "oil.nvim": { "branch": "master", "commit": "7e1cd7703ff2924d7038476dcbc04b950203b902" }, - "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "schemastore.nvim": { "branch": "main", "commit": "eed1834170f343c14a6768f085b26b3571a55302" }, - "snacks.nvim": { "branch": "main", "commit": "3c5c23ba91e608bd89bb36d76cb005aa63d20dbf" }, - "substitute.nvim": { "branch": "main", "commit": "9db749a880e3dd3b0eb57f698aa8f1e1630e1f25" }, - "vim-cool": { "branch": "master", "commit": "9ea940c0d537e55de0de4c0298c04b976960fb12" }, - "vim-dispatch": { "branch": "master", "commit": "a2ff28abdb2d89725192db5b8562977d392a4d3f" }, - "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, - "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } -} diff --git a/bak/modules/nvim/config/lsp/astro.lua b/bak/modules/nvim/config/lsp/astro.lua deleted file mode 100644 index d653381..0000000 --- a/bak/modules/nvim/config/lsp/astro.lua +++ /dev/null @@ -1,25 +0,0 @@ -local function get_typescript_server_path(root_dir) - local project_roots = vim.fs.find("node_modules", { path = root_dir, upward = true, limit = math.huge }) - for _, project_root in ipairs(project_roots) do - local typescript_path = project_root .. "/typescript" - local stat = vim.loop.fs_stat(typescript_path) - if stat and stat.type == "directory" then - return typescript_path .. "/lib" - end - end - return "" -end - -return { - cmd = { "astro-ls", "--stdio" }, - filetypes = { "astro" }, - root_markers = { "package.json", "tsconfig.json", "jsconfig.json", ".git" }, - init_options = { - typescript = {}, - }, - before_init = function(_, config) - if config.init_options and config.init_options.typescript and not config.init_options.typescript.tsdk then - config.init_options.typescript.tsdk = get_typescript_server_path(config.root_dir) - end - end, -} diff --git a/bak/modules/nvim/config/lsp/biome.lua b/bak/modules/nvim/config/lsp/biome.lua deleted file mode 100644 index aa0c92c..0000000 --- a/bak/modules/nvim/config/lsp/biome.lua +++ /dev/null @@ -1,34 +0,0 @@ ----@type vim.lsp.Config -return { - cmd = function(dispatchers, config) - local cmd = 'biome' - local local_cmd = (config or {}).root_dir and config.root_dir .. '/node_modules/.bin/biome' - if local_cmd and vim.fn.executable(local_cmd) == 1 then - cmd = local_cmd - end - return vim.lsp.rpc.start({ cmd, 'lsp-proxy' }, dispatchers) - end, - filetypes = { - 'astro', - 'css', - 'graphql', - 'html', - 'javascript', - 'javascriptreact', - 'json', - 'jsonc', - 'svelte', - 'typescript', - 'typescriptreact', - 'vue', - }, - workspace_required = true, - root_markers = { - 'package-lock.json', - 'yarn.lock', - 'pnpm-lock.yaml', - 'bun.lockb', - 'bun.lock', - 'deno.lock', - }, -} diff --git a/bak/modules/nvim/config/lsp/eslint.lua b/bak/modules/nvim/config/lsp/eslint.lua deleted file mode 100644 index 6808cd4..0000000 --- a/bak/modules/nvim/config/lsp/eslint.lua +++ /dev/null @@ -1,152 +0,0 @@ -local utils = require("dnsc.utils") -local lsp = vim.lsp - -local eslint_config_files = { - ".eslintrc", - ".eslintrc.js", - ".eslintrc.cjs", - ".eslintrc.yaml", - ".eslintrc.yml", - ".eslintrc.json", - "eslint.config.js", - "eslint.config.mjs", - "eslint.config.cjs", - "eslint.config.ts", - "eslint.config.mts", - "eslint.config.cts", -} - ----@type vim.lsp.Config -return { - cmd = { "vscode-eslint-language-server", "--stdio" }, - filetypes = { - "javascript", - "javascriptreact", - "javascript.jsx", - "typescript", - "typescriptreact", - "typescript.tsx", - "vue", - "svelte", - "astro", - "htmlangular", - }, - workspace_required = true, - on_attach = function(client, bufnr) - vim.api.nvim_buf_create_user_command(0, "LspEslintFixAll", function() - client:request_sync("workspace/executeCommand", { - command = "eslint.applyAllFixes", - arguments = { - { - uri = vim.uri_from_bufnr(bufnr), - version = lsp.util.buf_versions[bufnr], - }, - }, - }, nil, bufnr) - end, {}) - end, - root_markers = eslint_config_files, - -- Refer to https://github.com/Microsoft/vscode-eslint#settings-options for documentation. - settings = { - validate = "on", - packageManager = nil, - useESLintClass = false, - experimental = { - useFlatConfig = false, - }, - codeActionOnSave = { - enable = false, - mode = "all", - }, - format = true, - quiet = false, - onIgnoredFiles = "off", - rulesCustomizations = {}, - run = "onType", - problems = { - shortenToSingleLine = false, - }, - -- nodePath configures the directory in which the eslint server should start its node_modules resolution. - -- This path is relative to the workspace folder (root dir) of the server instance. - nodePath = "", - -- use the workspace folder location or the file location (if no workspace folder is open) as the working directory - workingDirectory = { mode = "auto" }, - codeAction = { - disableRuleComment = { - enable = true, - location = "separateLine", - }, - showDocumentation = { - enable = true, - }, - }, - }, - before_init = function(_, config) - -- The "workspaceFolder" is a VSCode concept. It limits how far the - -- server will traverse the file system when locating the ESLint config - -- file (e.g., .eslintrc). - local root_dir = config.root_dir - - if root_dir then - config.settings = config.settings or {} - config.settings.workspaceFolder = { - uri = root_dir, - name = vim.fn.fnamemodify(root_dir, ":t"), - } - - -- Support flat config files - -- They contain 'config' in the file name - local flat_config_files = vim.tbl_filter(function(file) - return file:match("config") - end, eslint_config_files) - - for _, file in ipairs(flat_config_files) do - local found_files = vim.fn.globpath(root_dir, file, true, true) - - -- Filter out files inside node_modules - local filtered_files = {} - for _, found_file in ipairs(found_files) do - if string.find(found_file, "[/\\]node_modules[/\\]") == nil then - table.insert(filtered_files, found_file) - end - end - - if #filtered_files > 0 then - config.settings.experimental = config.settings.experimental or {} - config.settings.experimental.useFlatConfig = true - break - end - end - - -- Support Yarn2 (PnP) projects - local pnp_cjs = root_dir .. "/.pnp.cjs" - local pnp_js = root_dir .. "/.pnp.js" - if vim.uv.fs_stat(pnp_cjs) or vim.uv.fs_stat(pnp_js) then - local cmd = config.cmd - config.cmd = vim.list_extend({ "yarn", "exec" }, cmd) - end - end - end, - handlers = { - ["eslint/openDoc"] = function(_, result) - if result then - vim.ui.open(result.url) - end - return {} - end, - ["eslint/confirmESLintExecution"] = function(_, result) - if not result then - return - end - return 4 -- approved - end, - ["eslint/probeFailed"] = function() - vim.notify("[lspconfig] ESLint probe failed.", vim.log.levels.WARN) - return {} - end, - ["eslint/noLibrary"] = function() - vim.notify("[lspconfig] Unable to find ESLint library.", vim.log.levels.WARN) - return {} - end, - }, -} diff --git a/bak/modules/nvim/config/lsp/gopls.lua b/bak/modules/nvim/config/lsp/gopls.lua deleted file mode 100644 index 4e20944..0000000 --- a/bak/modules/nvim/config/lsp/gopls.lua +++ /dev/null @@ -1,99 +0,0 @@ ----@brief ---- ---- https://github.com/golang/tools/tree/master/gopls ---- ---- Google's lsp server for golang. - ---- @class go_dir_custom_args ---- ---- @field envvar_id string ---- ---- @field custom_subdir string? - -local mod_cache = nil -local std_lib = nil - ----@param custom_args go_dir_custom_args ----@param on_complete fun(dir: string | nil) -local function identify_go_dir(custom_args, on_complete) - local cmd = { "go", "env", custom_args.envvar_id } - vim.system(cmd, { text = true }, function(output) - local res = vim.trim(output.stdout or "") - if output.code == 0 and res ~= "" then - if custom_args.custom_subdir and custom_args.custom_subdir ~= "" then - res = res .. custom_args.custom_subdir - end - on_complete(res) - else - vim.schedule(function() - vim.notify( - ("[gopls] identify " .. custom_args.envvar_id .. " dir cmd failed with code %d: %s\n%s"):format( - output.code, - vim.inspect(cmd), - output.stderr - ) - ) - end) - on_complete(nil) - end - end) -end - ----@return string? -local function get_std_lib_dir() - if std_lib and std_lib ~= "" then - return std_lib - end - - identify_go_dir({ envvar_id = "GOROOT", custom_subdir = "/src" }, function(dir) - if dir then - std_lib = dir - end - end) - return std_lib -end - ----@return string? -local function get_mod_cache_dir() - if mod_cache and mod_cache ~= "" then - return mod_cache - end - - identify_go_dir({ envvar_id = "GOMODCACHE" }, function(dir) - if dir then - mod_cache = dir - end - end) - return mod_cache -end - ----@param fname string ----@return string? -local function get_root_dir(fname) - if mod_cache and fname:sub(1, #mod_cache) == mod_cache then - local clients = vim.lsp.get_clients({ name = "gopls" }) - if #clients > 0 then - return clients[#clients].config.root_dir - end - end - if std_lib and fname:sub(1, #std_lib) == std_lib then - local clients = vim.lsp.get_clients({ name = "gopls" }) - if #clients > 0 then - return clients[#clients].config.root_dir - end - end - return vim.fs.root(fname, "go.work") or vim.fs.root(fname, "go.mod") or vim.fs.root(fname, ".git") -end - ----@type vim.lsp.Config -return { - cmd = { "gopls" }, - filetypes = { "go", "gomod", "gowork", "gotmpl" }, - root_dir = function(bufnr, on_dir) - local fname = vim.api.nvim_buf_get_name(bufnr) - get_mod_cache_dir() - get_std_lib_dir() - -- see: https://github.com/neovim/nvim-lspconfig/issues/804 - on_dir(get_root_dir(fname)) - end, -} diff --git a/bak/modules/nvim/config/lsp/jsonls.lua b/bak/modules/nvim/config/lsp/jsonls.lua deleted file mode 100644 index 1351c29..0000000 --- a/bak/modules/nvim/config/lsp/jsonls.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - cmd = { "vscode-json-language-server", "--stdio" }, - filetypes = { "json", "jsonc" }, - init_options = { - provideFormatter = true, - }, - root_markers = { ".git" }, - single_file_support = true, - settings = { - json = { - schemas = require("schemastore").json.schemas(), - validate = { enable = true }, - }, - }, -} diff --git a/bak/modules/nvim/config/lsp/lua_ls.lua b/bak/modules/nvim/config/lsp/lua_ls.lua deleted file mode 100644 index c83c91c..0000000 --- a/bak/modules/nvim/config/lsp/lua_ls.lua +++ /dev/null @@ -1,46 +0,0 @@ -return { - cmd = { "lua-language-server" }, - filetypes = { "lua" }, - root_markers = { - ".luarc.json", - ".luarc.jsonc", - ".luacheckrc", - ".stylua.toml", - "stylua.toml", - "selene.toml", - "selene.yml", - ".git", - }, - single_file_support = true, - log_level = vim.lsp.protocol.MessageType.Warning, - on_init = function(client) - if client.workspace_folders then - local path = client.workspace_folders[1].name - if - path ~= vim.fn.stdpath("config") - and (vim.uv.fs_stat(path .. "/.luarc.json") or vim.uv.fs_stat(path .. "/.luarc.jsonc")) - then - return - end - end - - client.config.settings.Lua = vim.tbl_deep_extend("force", client.config.settings.Lua, { - runtime = { - version = "LuaJIT", - }, - workspace = { - checkThirdParty = false, - library = { - vim.env.VIMRUNTIME, - }, - }, - }) - end, - settings = { - Lua = { - diagnostics = { - globals = { "vim" }, - }, - }, - }, -} diff --git a/bak/modules/nvim/config/lsp/nil_ls.lua b/bak/modules/nvim/config/lsp/nil_ls.lua deleted file mode 100644 index 9774b5f..0000000 --- a/bak/modules/nvim/config/lsp/nil_ls.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - cmd = { "nil" }, - filetypes = { "nix" }, - root_markers = { "flake.nix", ".git" }, -} diff --git a/bak/modules/nvim/config/lsp/tailwindcss.lua b/bak/modules/nvim/config/lsp/tailwindcss.lua deleted file mode 100644 index d6a9383..0000000 --- a/bak/modules/nvim/config/lsp/tailwindcss.lua +++ /dev/null @@ -1,153 +0,0 @@ -function root_markers_with_field(root_files, new_names, field, fname) - local path = vim.fn.fnamemodify(fname, ":h") - local found = vim.fs.find(new_names, { path = path, upward = true }) - - for _, f in ipairs(found or {}) do - -- Match the given `field`. - for line in io.lines(f) do - if line:find(field) then - root_files[#root_files + 1] = vim.fs.basename(f) - break - end - end - end - - return root_files -end - -function insert_package_json(root_files, field, fname) - return root_markers_with_field(root_files, { "package.json", "package.json5" }, field, fname) -end - -return { - cmd = { "tailwindcss-language-server", "--stdio" }, - -- filetypes copied and adjusted from tailwindcss-intellisense - filetypes = { - -- html - "aspnetcorerazor", - "astro", - "astro-markdown", - "blade", - "clojure", - "django-html", - "htmldjango", - "edge", - "eelixir", -- vim ft - "elixir", - "ejs", - "erb", - "eruby", -- vim ft - "gohtml", - "gohtmltmpl", - "haml", - "handlebars", - "hbs", - "html", - "htmlangular", - "html-eex", - "heex", - "jade", - "leaf", - "liquid", - "markdown", - "mdx", - "mustache", - "njk", - "nunjucks", - "php", - "razor", - "slim", - "twig", - -- css - "css", - "less", - "postcss", - "sass", - "scss", - "stylus", - "sugarss", - -- js - "javascript", - "javascriptreact", - "reason", - "rescript", - "typescript", - "typescriptreact", - -- mixed - "vue", - "svelte", - "templ", - }, - settings = { - tailwindCSS = { - validate = true, - lint = { - cssConflict = "warning", - invalidApply = "error", - invalidScreen = "error", - invalidVariant = "error", - invalidConfigPath = "error", - invalidTailwindDirective = "error", - recommendedVariantOrder = "warning", - }, - classAttributes = { - "class", - "className", - "class:list", - "classList", - "ngClass", - }, - includeLanguages = { - eelixir = "html-eex", - elixir = "phoenix-heex", - eruby = "erb", - heex = "phoenix-heex", - htmlangular = "html", - templ = "html", - }, - }, - }, - before_init = function(_, config) - if not config.settings then - config.settings = {} - end - if not config.settings.editor then - config.settings.editor = {} - end - if not config.settings.editor.tabSize then - config.settings.editor.tabSize = vim.lsp.util.get_effective_tabstop() - end - end, - workspace_required = true, - root_dir = function(bufnr, on_dir) - local root_files = { - -- Generic - "tailwind.config.js", - "tailwind.config.cjs", - "tailwind.config.mjs", - "tailwind.config.ts", - "postcss.config.js", - "postcss.config.cjs", - "postcss.config.mjs", - "postcss.config.ts", - -- Phoenix - "assets/tailwind.config.js", - "assets/tailwind.config.cjs", - "assets/tailwind.config.mjs", - "assets/tailwind.config.ts", - -- Django - "theme/static_src/tailwind.config.js", - "theme/static_src/tailwind.config.cjs", - "theme/static_src/tailwind.config.mjs", - "theme/static_src/tailwind.config.ts", - "theme/static_src/postcss.config.js", - -- Rails - "app/assets/stylesheets/application.tailwind.css", - "app/assets/tailwind/application.css", - } - local fname = vim.api.nvim_buf_get_name(bufnr) - root_files = insert_package_json(root_files, "tailwindcss", fname) - root_files = root_markers_with_field(root_files, { "mix.lock" }, "tailwind", fname) - on_dir(vim.fs.dirname(vim.fs.find(root_files, { path = fname, upward = true })[1])) - end, -} diff --git a/bak/modules/nvim/config/lsp/ts_ls.lua b/bak/modules/nvim/config/lsp/ts_ls.lua deleted file mode 100644 index 5341d24..0000000 --- a/bak/modules/nvim/config/lsp/ts_ls.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - cmd = { "typescript-language-server", "--stdio" }, - filetypes = { - "javascript", - "javascriptreact", - "javascript.jsx", - "typescript", - "typescriptreact", - "typescript.tsx", - }, - root_markers = { "tsconfig.json", "package.json", ".git" }, - init_options = { - hostInfo = "neovim", - preferences = { - includeCompletionsForModuleExports = true, - includeCompletionsForImportStatements = true, - importModuleSpecifierPreference = "relative", - importModuleSpecifierEnding = "minimal", - }, - }, - single_file_support = true, -} diff --git a/bak/modules/nvim/config/lua/dnsc/keymaps.lua b/bak/modules/nvim/config/lua/dnsc/keymaps.lua deleted file mode 100644 index a13b6d8..0000000 --- a/bak/modules/nvim/config/lua/dnsc/keymaps.lua +++ /dev/null @@ -1,10 +0,0 @@ -local opts = { noremap = true, silent = true, expr = true } - --- Non-leader general keybindings -vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", opts) -vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", opts) -vim.keymap.set("n", "", "zz", { desc = "Move down" }) -vim.keymap.set("n", "", "zz", { desc = "Move up" }) -vim.keymap.set("n", "n", "nzzzv", { desc = "Move to next occurence" }) -vim.keymap.set("n", "N", "Nzzzv", { desc = "Move to next occurence" }) -vim.keymap.set("n", "", "") \ No newline at end of file diff --git a/bak/modules/nvim/config/lua/dnsc/lazy.lua b/bak/modules/nvim/config/lua/dnsc/lazy.lua deleted file mode 100644 index 4178fd3..0000000 --- a/bak/modules/nvim/config/lua/dnsc/lazy.lua +++ /dev/null @@ -1,80 +0,0 @@ --- Bootstrap lazy.nvim -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end -end -vim.opt.rtp:prepend(lazypath) - -vim.g.mapleader = " " -vim.g.maplocalleader = " " - -vim.cmd([[colorscheme winterly]]) - -local options = { - backup = false, -- creates a backup file - clipboard = "unnamedplus", -- allows neovim to access the system clipboard - cmdheight = 1, -- more space in the neovim command line for displaying messages - completeopt = { "menu", "menuone", "noselect" }, -- mostly just for cmp - conceallevel = 0, -- so that `` is visible in markdown files - fileencoding = "utf-8", -- the encoding written to a file - hlsearch = true, -- highlight all matches on previous search pattern - ignorecase = true, -- ignore case in search patterns - mouse = "a", -- allow the mouse to be used in neovim - pumheight = 10, -- pop up menu height - showmode = false, -- we don't need to see things like -- INSERT -- anymore - smartindent = true, - breakindent = true, - showtabline = 0, -- always show tabs - smartcase = true, -- smart case - splitbelow = true, -- force all horizontal splits to go below current window - splitright = true, -- force all vertical splits to go to the right of current window - swapfile = false, -- creates a swapfile - termguicolors = true, -- set term gui colors (most terminals support this) - timeoutlen = 600, -- time to wait for a mapped sequence to complete (in milliseconds) - undofile = true, -- enable persistent undo - updatetime = 230, -- faster completion (4000ms default) - writebackup = false, -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited - expandtab = true, -- convert tabs to spaces - shiftwidth = 2, -- the number of spaces inserted for each indentation - tabstop = 2, -- insert 2 spaces for a tab - cursorline = true, -- highlight the current line - number = true, -- set numbered lines - relativenumber = true, -- set relative numbered lines - numberwidth = 4, -- set number column width to 2 {default 4} - signcolumn = "yes", -- always show the sign column, otherwise it would shift the text each time - linebreak = true, - breakat = " ^I!@*-+;:,./?", - scrolloff = 6, -- is one of my fav - sidescrolloff = 4, - winbar = nil, - foldlevel = 99, - foldlevelstart = 99, -} - -vim.opt.shortmess:append("c") - -for k, v in pairs(options) do - vim.opt[k] = v -end - --- Setup lazy.nvim -require("lazy").setup({ - spec = { - { import = "plugins" }, - }, - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "winterly" } }, - -- automatically check for plugin updates - checker = { enabled = false }, -}) diff --git a/bak/modules/nvim/config/lua/dnsc/lsp.lua b/bak/modules/nvim/config/lua/dnsc/lsp.lua deleted file mode 100644 index c065590..0000000 --- a/bak/modules/nvim/config/lua/dnsc/lsp.lua +++ /dev/null @@ -1,34 +0,0 @@ -vim.lsp.enable("ts_ls") -vim.lsp.enable("lua_ls") -vim.lsp.enable("jsonls") -vim.lsp.enable("nil_ls") -vim.lsp.enable("astro") -vim.lsp.enable("tailwindcss") -vim.lsp.enable("gopls") -vim.lsp.enable("eslint") -vim.lsp.enable("biome") - -vim.diagnostic.config({ - virtual_text = false, - signs = true, - underline = true, - update_in_insert = false, - severity_sort = false, -}) - -vim.api.nvim_create_autocmd("LspAttach", { - callback = function(args) - vim.keymap.set( - "n", - "e", - "lua vim.diagnostic.open_float()", - { buffer = args.buf, desc = "Show diagnostics on current line" } - ) - vim.keymap.set( - "n", - "ca", - "lua vim.lsp.buf.code_action()", - { buffer = args.buf, desc = "Code actions for current line" } - ) - end, -}) diff --git a/bak/modules/nvim/config/lua/dnsc/palette.lua b/bak/modules/nvim/config/lua/dnsc/palette.lua deleted file mode 120000 index 52c2135..0000000 --- a/bak/modules/nvim/config/lua/dnsc/palette.lua +++ /dev/null @@ -1 +0,0 @@ -/nix/store/mp57l6qar04fcicsvmryl7fjzq6wwfmp-home-manager-files/.config/nvim/lua/dnsc/palette.lua \ No newline at end of file diff --git a/bak/modules/nvim/config/lua/dnsc/utils.lua b/bak/modules/nvim/config/lua/dnsc/utils.lua deleted file mode 100644 index c965bd8..0000000 --- a/bak/modules/nvim/config/lua/dnsc/utils.lua +++ /dev/null @@ -1,152 +0,0 @@ -vim.api.nvim_create_autocmd("TextYankPost", { - callback = function() - vim.highlight.on_yank() - end, -}) - -function tbl_flatten(t) - --- @diagnostic disable-next-line:deprecated - return nvim_eleven and vim.iter(t):flatten(math.huge):totable() or vim.tbl_flatten(t) -end - -function search_ancestors(startpath, func) - if nvim_eleven then - validate("func", func, "function") - end - if func(startpath) then - return startpath - end - local guard = 100 - for path in vim.fs.parents(startpath) do - -- Prevent infinite recursion if our algorithm breaks - guard = guard - 1 - if guard == 0 then - return - end - - if func(path) then - return path - end - end -end - -local function escape_wildcards(path) - return path:gsub("([%[%]%?%*])", "\\%1") -end - -function strip_archive_subpath(path) - -- Matches regex from zip.vim / tar.vim - path = vim.fn.substitute(path, "zipfile://\\(.\\{-}\\)::[^\\\\].*$", "\\1", "") - path = vim.fn.substitute(path, "tarfile:\\(.\\{-}\\)::.*$", "\\1", "") - return path -end - -local function root_pattern(...) - local patterns = tbl_flatten({ ... }) - return function(startpath) - startpath = strip_archive_subpath(startpath) - for _, pattern in ipairs(patterns) do - local match = search_ancestors(startpath, function(path) - for _, p in ipairs(vim.fn.glob(table.concat({ escape_wildcards(path), pattern }, "/"), true, true)) do - if vim.loop.fs_stat(p) then - return path - end - end - end) - - if match ~= nil then - return match - end - end - end -end - -local function filter(arr, fn) - if type(arr) ~= "table" then - return arr - end - - local filtered = {} - for k, v in pairs(arr) do - if fn(v, k, arr) then - table.insert(filtered, v) - end - end - - return filtered -end - -local function filterReactDTS(value) - -- Depending on typescript version either uri or targetUri is returned - if value.uri then - return string.match(value.uri, "%.d.ts") == nil - elseif value.targetUri then - return string.match(value.targetUri, "%.d.ts") == nil - end -end - -local project_types = { - ["main.odin"] = "odin run .", - ["package.json"] = "pnpm run dev", - ["Makefile"] = "make", - ["flake.nix"] = "sudo just deploy", -} - -local function find_project_type() - for marker, _ in pairs(project_types) do - if vim.fn.glob(marker) ~= "" then - return marker - end - end - return nil -end - -local function compile_project() - local marker = find_project_type() - - if not marker then - vim.notify("No recognized project type found", vim.log.levels.WARN) - return - end - - local cmd = project_types[marker] - - -- Create a new terminal buffer and run the command - vim.cmd("botright new") -- Create new window at bottom - vim.cmd("terminal " .. cmd) - - -- Enter normal mode and hide the buffer number - vim.cmd("setlocal nonumber") - vim.cmd("setlocal norelativenumber") - vim.cmd("startinsert") -end - -local function root_markers_with_field(root_files, new_names, field, fname) - local path = vim.fn.fnamemodify(fname, ":h") - local found = vim.fs.find(new_names, { path = path, upward = true }) - - for _, f in ipairs(found or {}) do - -- Match the given `field`. - for line in io.lines(f) do - if line:find(field) then - root_files[#root_files + 1] = vim.fs.basename(f) - break - end - end - end - - return root_files -end - -local function insert_package_json(root_files, field, fname) - return root_markers_with_field(root_files, { "package.json", "package.json5" }, field, fname) -end - -return { - compile_project = compile_project, - filter = filter, - filterReactDTS = filterReactDTS, - root_pattern = root_pattern, - insert_package_json = insert_package_json, - root_markers_with_field = root_markers_with_field, -} diff --git a/bak/modules/nvim/config/lua/plugins/blink.lua b/bak/modules/nvim/config/lua/plugins/blink.lua deleted file mode 100644 index ee221be..0000000 --- a/bak/modules/nvim/config/lua/plugins/blink.lua +++ /dev/null @@ -1,49 +0,0 @@ -return { - "saghen/blink.cmp", - dependencies = { "rafamadriz/friendly-snippets" }, - version = "1.*", - ---@module 'blink.cmp' - ---@type blink.cmp.Config - opts = { - keymap = { - preset = "enter", - [""] = { "select_next", "fallback" }, - [""] = { "select_prev", "fallback" }, - [""] = { "show_documentation", "hide_documentation" }, - }, - appearance = { - nerd_font_variant = "mono", - }, - completion = { - documentation = { - auto_show = false, - }, - list = { - selection = { - preselect = false, - auto_insert = true, - }, - }, - }, - signature = { - enabled = true, - }, - sources = { - default = { "lsp", "path", "snippets", "buffer" }, - per_filetype = { - sql = { "dadbod" }, - mysql = { "dadbod" }, - plsql = { "dadbod" }, - codecompanion = { "codecompanion" }, - }, - providers = { - dadbod = { module = "vim_dadbod_completion.blink" }, - }, - }, - fuzzy = { implementation = "prefer_rust_with_warning" }, - cmdline = { - completion = { menu = { auto_show = true } }, - }, - }, - opts_extend = { "sources.default" }, -} diff --git a/bak/modules/nvim/config/lua/plugins/codecompanion.lua b/bak/modules/nvim/config/lua/plugins/codecompanion.lua deleted file mode 100644 index 466b65d..0000000 --- a/bak/modules/nvim/config/lua/plugins/codecompanion.lua +++ /dev/null @@ -1,26 +0,0 @@ -return { - "olimorris/codecompanion.nvim", - config = function() - require("codecompanion").setup({ - strategies = { - chat = { - adapter = "anthropic", - }, - inline = { - adapter = "anthropic", - }, - }, - }) - - vim.cmd([[cab cc CodeCompanion]]) - end, - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", - }, - keys = { - { "cc", "CodeCompanionChat Toggle", desc = "Open companion chat", mode = "n" }, - { "ca", "CodeCompanionActions", desc = "Open companion actions", mode = "n" }, - { "ga", "CodeCompanionChat Add", desc = "Add selection", mode = "v" }, - }, -} diff --git a/bak/modules/nvim/config/lua/plugins/conform.lua b/bak/modules/nvim/config/lua/plugins/conform.lua deleted file mode 100644 index 8cc49fe..0000000 --- a/bak/modules/nvim/config/lua/plugins/conform.lua +++ /dev/null @@ -1,28 +0,0 @@ -return { - "stevearc/conform.nvim", - opts = { - formatters_by_ft = { - typescriptreact = { "biome-check", "prettierd", stop_after_first = true }, - astro = { "prettierd" }, - typescript = { "biome-check", "prettierd", stop_after_first = true }, - javascript = { "biome-check", "prettierd", stop_after_first = true }, - javascriptreact = { "biome-check", "prettierd", stop_after_first = true }, - html = { "prettierd" }, - htmlangular = { "prettierd" }, - css = { "biome-check", "prettierd", stop_after_first = true }, - yaml = { "prettierd" }, - markdown = { "prettierd" }, - json = { "biome-check", "prettierd", stop_after_first = true }, - lua = { "stylua" }, - go = { "goimports" }, - gomod = { "goimports" }, - gowork = { "goimports" }, - gotmpl = { "goimports" }, - }, - format_on_save = { - -- These options will be passed to conform.format() - timeout_ms = 500, - lsp_format = "fallback", - }, - }, -} diff --git a/bak/modules/nvim/config/lua/plugins/dispatch.lua b/bak/modules/nvim/config/lua/plugins/dispatch.lua deleted file mode 100644 index e91cec8..0000000 --- a/bak/modules/nvim/config/lua/plugins/dispatch.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { - "tpope/vim-dispatch", -} diff --git a/bak/modules/nvim/config/lua/plugins/flash.lua b/bak/modules/nvim/config/lua/plugins/flash.lua deleted file mode 100644 index cc24767..0000000 --- a/bak/modules/nvim/config/lua/plugins/flash.lua +++ /dev/null @@ -1,25 +0,0 @@ -return { - "folke/flash.nvim", - event = "VeryLazy", - opts = {}, - config = function() - vim.api.nvim_create_autocmd("BufReadPost", { - pattern = "quickfix", - callback = function() - vim.keymap.set("n", "", "", { buffer = true }) - end, - }) - end, - keys = { - { - "", - mode = { "n", "x", "o" }, - function() - if vim.bo.filetype ~= "qf" then - require("flash").jump() - end - end, - desc = "Flash", - }, - }, -} diff --git a/bak/modules/nvim/config/lua/plugins/gitportal.lua b/bak/modules/nvim/config/lua/plugins/gitportal.lua deleted file mode 100644 index 98ad0b7..0000000 --- a/bak/modules/nvim/config/lua/plugins/gitportal.lua +++ /dev/null @@ -1,24 +0,0 @@ -return { - "trevorhauter/gitportal.nvim", - opts = { - always_include_current_line = true, - switch_branch_or_commit_upon_ingestion = "ask_first", - }, - keys = { - { - "gll", - "GitPortal", - desc = "Browse file at git remote", - }, - { - "gly", - "GitPortal copy_link_to_clipboard", - desc = "Yank git link to clipboard", - }, - { - "glo", - "GitPortal open_link", - desc = "Browse file at git remote", - }, - }, -} diff --git a/bak/modules/nvim/config/lua/plugins/helpers.lua b/bak/modules/nvim/config/lua/plugins/helpers.lua deleted file mode 100644 index 1192bf8..0000000 --- a/bak/modules/nvim/config/lua/plugins/helpers.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "romainl/vim-cool", - "tpope/vim-sleuth", -} diff --git a/bak/modules/nvim/config/lua/plugins/lualine.lua b/bak/modules/nvim/config/lua/plugins/lualine.lua deleted file mode 100644 index 5838cd0..0000000 --- a/bak/modules/nvim/config/lua/plugins/lualine.lua +++ /dev/null @@ -1,78 +0,0 @@ -local palette = require("dnsc.palette") - -local modus_vivendi_tinted = { - normal = { - a = { bg = palette.magenta, fg = palette.bg, gui = "bold" }, - b = { bg = palette.bg_secondary, fg = palette.magenta }, - c = { bg = palette.bg_secondary, fg = palette.magenta }, - }, - insert = { - a = { bg = palette.cyan_bright, fg = palette.bg, gui = "bold" }, - b = { bg = palette.bg_secondary, fg = palette.cyan_bright }, - c = { bg = palette.bg_secondary, fg = palette.cyan_bright }, - }, - visual = { - a = { bg = palette.blue_bright, fg = palette.bg, gui = "bold" }, - b = { bg = palette.bg_secondary, fg = palette.blue_bright }, - c = { bg = palette.bg_secondary, fg = palette.blue_bright }, - }, - replace = { - a = { bg = palette.red_bright, fg = palette.bg, gui = "bold" }, - b = { bg = palette.bg_secondary, fg = palette.red_bright }, - c = { bg = palette.bg_secondary, fg = palette.red_bright }, - }, - command = { - a = { bg = palette.green_bright, fg = palette.bg, gui = "bold" }, - b = { bg = palette.bg_secondary, fg = palette.green_bright }, - c = { bg = palette.bg_secondary, fg = palette.green_bright }, - }, - inactive = { - a = { bg = palette.bg_secondary, fg = palette.fg_dim }, - b = { bg = palette.bg_secondary, fg = palette.fg_dim }, - c = { bg = palette.bg_secondary, fg = palette.fg_dim }, - }, -} - -return { - "nvim-lualine/lualine.nvim", - opts = { - options = { - theme = modus_vivendi_tinted, - icons_enabled = false, - -- globalstatus = true - component_separators = { left = "|", right = "|" }, - section_separators = { left = "", right = "" }, - }, - winbar = {}, - sections = { - lualine_a = { - { - "mode", - fmt = function(str) - return str:sub(1, 1) - end, - }, - }, - lualine_b = { - { - "filename", - file_status = true, - newfile_status = false, - path = 1, - shorting_target = 120, - symbols = { - modified = "[+]", -- Text to show when the file is modified. - readonly = "[-]", -- Text to show when the file is non-modifiable or readonly. - unnamed = "[No Name]", -- Text to show for unnamed buffers. - newfile = "[New]", -- Text to show for newly created file before first write - }, - }, - "encoding", - }, - lualine_c = {}, - lualine_x = {}, - lualine_y = { "branch", "diff", "diagnostics" }, - lualine_z = { "progress" }, - }, - }, -} diff --git a/bak/modules/nvim/config/lua/plugins/markdown.lua b/bak/modules/nvim/config/lua/plugins/markdown.lua deleted file mode 100644 index 06982aa..0000000 --- a/bak/modules/nvim/config/lua/plugins/markdown.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "jghauser/follow-md-links.nvim", - ft = { "markdown" }, - config = function() - vim.keymap.set("n", "", ":edit #", { silent = true }) - end, -} diff --git a/bak/modules/nvim/config/lua/plugins/mini.pairs.lua b/bak/modules/nvim/config/lua/plugins/mini.pairs.lua deleted file mode 100644 index 666d1de..0000000 --- a/bak/modules/nvim/config/lua/plugins/mini.pairs.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "echasnovski/mini.pairs", - opts = {}, -} diff --git a/bak/modules/nvim/config/lua/plugins/nvim-surround.lua b/bak/modules/nvim/config/lua/plugins/nvim-surround.lua deleted file mode 100644 index c0bfcb6..0000000 --- a/bak/modules/nvim/config/lua/plugins/nvim-surround.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - "kylechui/nvim-surround", - version = "*", -- Use for stability; omit to use `main` branch for the latest features - event = "VeryLazy", - opts = {}, -} diff --git a/bak/modules/nvim/config/lua/plugins/oil.lua b/bak/modules/nvim/config/lua/plugins/oil.lua deleted file mode 100644 index 0dd1d7c..0000000 --- a/bak/modules/nvim/config/lua/plugins/oil.lua +++ /dev/null @@ -1,19 +0,0 @@ -return { - "stevearc/oil.nvim", - opts = { - keymaps = { - ["q"] = "actions.close", - }, - columns = { - "icon", - "permissions", - "size", - "mtime", - }, - }, - -- stylua: ignore - keys = { - { "n", "Oil", desc = "Open file browser", mode = "n" }, - } -, -} diff --git a/bak/modules/nvim/config/lua/plugins/schemastore.lua b/bak/modules/nvim/config/lua/plugins/schemastore.lua deleted file mode 100644 index 502519f..0000000 --- a/bak/modules/nvim/config/lua/plugins/schemastore.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { - 'b0o/schemastore.nvim' -} diff --git a/bak/modules/nvim/config/lua/plugins/snacks.lua b/bak/modules/nvim/config/lua/plugins/snacks.lua deleted file mode 100644 index 19c3e5a..0000000 --- a/bak/modules/nvim/config/lua/plugins/snacks.lua +++ /dev/null @@ -1,217 +0,0 @@ ----@module 'snacks' - -local filter_lsp_definitions = function(item) - if item.file:match("/react/ts5.0/") or item.file:match("react.d.ts") then - return false - end - - return true -end - -return { - "folke/snacks.nvim", - priority = 1000, - lazy = false, - opts = { - bigfile = { enabled = true }, - bufdelete = { enabled = true }, - git = { enabled = true }, - -- TODO: Integrate GH and see how that works out - -- gh = { - -- enabled = true - -- } - indent = { - enabled = true, - }, - input = { enabled = true }, - lazygit = { - enabled = true, - }, - notifier = { enabled = true }, - picker = { - enabled = true, - prompt = "λ ", - }, - statuscolumn = { enabled = true }, - zen = { enabled = true }, - }, - keys = { - -- Git - { - "gg", - function() - Snacks.lazygit() - end, - desc = "Lazygit", - }, - { - "gb", - function() - Snacks.git.blame_line() - end, - desc = "Show git blame for current line", - }, - -- Zen Mode - { - "z", - function() - Snacks.zen() - end, - desc = "Toggle Zen Mode", - }, - -- Picker - { - ".", - function() - Snacks.picker.files({ hidden = true }) - end, - desc = "Files", - }, - { - "a", - function() - Snacks.picker.files({ hidden = true, ignored = true }) - end, - desc = "All files", - }, - { - "", - function() - Snacks.picker.git_files() - end, - desc = "Git files", - }, - -- Find - { - "fr", - function() - Snacks.picker.recent() - end, - desc = "Recent", - }, - { - "fp", - function() - Snacks.picker.projects() - end, - desc = "Projects", - }, - { - "bb", - function() - Snacks.picker.buffers() - end, - desc = "List buffers", - }, - { - "bd", - function() - Snacks.bufdelete() - end, - desc = "Buffers", - }, - { - "bD", - function() - Snacks.bufdelete.all() - end, - desc = "Buffers", - }, - { - "bo", - function() - Snacks.bufdelete.other() - end, - desc = "Buffers", - }, - -- Search - { - "ss", - function() - Snacks.picker.grep() - end, - desc = "Grep", - }, - { - "sw", - function() - Snacks.picker.grep_word() - end, - desc = "Visual selection or word", - mode = { "n", "x" }, - }, - { - "su", - function() - Snacks.picker.undo() - end, - desc = "Undo History", - }, - -- Diagnostics - { - "td", - function() - Snacks.picker.diagnostics_buffer() - end, - desc = "Buffer Diagnostics", - }, - { - "ta", - function() - Snacks.picker.diagnostics() - end, - desc = "Diagnostics", - }, - -- LSP - { - "gd", - function() - Snacks.picker.lsp_definitions({ filter = { filter = filter_lsp_definitions } }) - end, - desc = "Goto Definition", - }, - { - "gD", - function() - Snacks.picker.lsp_declarations() - end, - desc = "Goto Declaration", - }, - { - "grr", - function() - Snacks.picker.lsp_references() - end, - nowait = true, - desc = "References", - }, - { - "gI", - function() - Snacks.picker.lsp_implementations() - end, - desc = "Goto Implementation", - }, - { - "gy", - function() - Snacks.picker.lsp_type_definitions() - end, - desc = "Goto T[y]pe Definition", - }, - { - "on", - function() - Snacks.notifier.show_history() - end, - desc = "Open notification history", - }, - { - "oh", - function() - Snacks.picker.highlights() - end, - desc = "List highlights", - }, - }, -} diff --git a/bak/modules/nvim/config/lua/plugins/substitute.lua b/bak/modules/nvim/config/lua/plugins/substitute.lua deleted file mode 100644 index 4e8288a..0000000 --- a/bak/modules/nvim/config/lua/plugins/substitute.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - "gbprod/substitute.nvim", - config = function() - local sub = require("substitute") - - sub.setup() - - vim.keymap.set("n", "s", sub.operator, { noremap = true }) - vim.keymap.set("n", "ss", sub.line, { noremap = true }) - vim.keymap.set("n", "S", sub.eol, { noremap = true }) - vim.keymap.set("x", "s", sub.visual, { noremap = true }) - end, -} diff --git a/bak/modules/nvim/config/lua/plugins/treesitter.lua b/bak/modules/nvim/config/lua/plugins/treesitter.lua deleted file mode 100644 index 5c86500..0000000 --- a/bak/modules/nvim/config/lua/plugins/treesitter.lua +++ /dev/null @@ -1,100 +0,0 @@ -return { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - opts = { - ensure_installed = { - "angular", - "bash", - "c", - "css", - "diff", - "html", - "javascript", - "jsdoc", - "json", - "jsonc", - "lua", - "luadoc", - "luap", - "markdown", - "markdown_inline", - "odin", - "go", - "goctl", - "gowork", - "gomod", - "gosum", - "gotmpl", - "printf", - "python", - "query", - "regex", - "toml", - "tsx", - "typescript", - "vim", - "vimdoc", - "xml", - "yaml", - }, - auto_install = true, - sync_install = false, - ignore_install = {}, - modules = {}, - highlight = { enable = true }, - indent = { enable = true }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "", - node_incremental = "", - scope_incremental = "", - node_decremental = "", - }, - }, - textobjects = { - select = { - enable = true, - lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ["aa"] = "@parameter.outer", - ["ia"] = "@parameter.inner", - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@class.outer", - ["ic"] = "@class.inner", - }, - }, - move = { - enable = true, - set_jumps = true, -- whether to set jumps in the jumplist - goto_next_start = { - ["]m"] = "@function.outer", - ["]]"] = "@class.outer", - }, - goto_next_end = { - ["]M"] = "@function.outer", - ["]["] = "@class.outer", - }, - goto_previous_start = { - ["[m"] = "@function.outer", - ["[["] = "@class.outer", - }, - goto_previous_end = { - ["[M"] = "@function.outer", - ["[]"] = "@class.outer", - }, - }, - swap = { - enable = true, - swap_next = { - ["a"] = "@parameter.inner", - }, - swap_previous = { - ["A"] = "@parameter.inner", - }, - }, - }, - }, -} diff --git a/bak/modules/nvim/config/lua/plugins/which-key.lua b/bak/modules/nvim/config/lua/plugins/which-key.lua deleted file mode 100644 index 80346c8..0000000 --- a/bak/modules/nvim/config/lua/plugins/which-key.lua +++ /dev/null @@ -1,153 +0,0 @@ -local utils = require("dnsc.utils") - -return { - "folke/which-key.nvim", - event = "VeryLazy", - config = function() - local wk = require("which-key") - - ---@class wk.Opts - local opts = { - icons = { mappings = false }, - win = { border = "rounded" }, - } - - wk.setup(opts) - wk.add({ - { "o", group = "+open", mode = "n" }, - { - "od", - "vsplit | lua vim.lsp.buf.definition()", - desc = "Go to definition in other window", - mode = "n", - }, - { "b", group = "+buffer", mode = "n" }, - { - "bn", - "bn", - desc = "Move to next buffer", - mode = "n", - }, - { - "bp", - "bp", - desc = "Move to previous buffer", - mode = "n", - }, - { - "bk", - "bn", - desc = "Kill buffer and window", - mode = "n", - }, - { "c", group = "+code", mode = "n" }, - { - "cr", - function() - utils.compile_project() - end, - desc = "Compile project", - mode = "n", - }, - - { "f", group = "+file", mode = "n" }, - { - "fn", - "enew", - desc = "Create a new file", - mode = "n", - }, - { - "fs", - "w", - desc = "Save currently opened file", - mode = "n", - }, - - { "qq", "qa!", desc = "Leave neovim", mode = "n" }, - - { "s", group = "+search", mode = "n" }, - { "g", group = "+git", mode = "n" }, - - { "t", group = "+diagnostics", mode = "n" }, - { "ta", "TodoQuickFix", desc = "Show all todo comments", mode = "n" }, - - { "w", group = "+window", mode = "n" }, - { - "w+", - ":vertical resize +4", - desc = "Increase window size", - mode = "n", - }, - { - "w-", - ":vertical resize -4", - desc = "Decrease window size", - mode = "n", - }, - { - "wx", - "q", - desc = "Close active window", - mode = "n", - }, - { - "wx", - ":bd", - desc = "Kill active window and buffer", - mode = "n", - }, - { - "wh", - "h", - desc = "Move to window on left", - mode = "n", - }, - { - "wj", - "j", - desc = "Move to window on bottom", - mode = "n", - }, - { - "wk", - "k", - desc = "Move to window on top", - mode = "n", - }, - { - "wl", - "l", - desc = "Move to window on right", - mode = "n", - }, - { - "ws", - "sp", - desc = "Split windows horizontally", - mode = "n", - }, - { - "wv", - "vsp", - desc = "Split windows vertically", - mode = "n", - }, - { - "wd", - "close", - desc = "Delete window only", - mode = "n", - }, - - { "x", group = "+config", mode = "n" }, - { - "xn", - "set number relativenumber", - desc = "Show relative numbers", - mode = "n", - }, - { "xr", "source $MYVIMRC", desc = "Reload config", mode = "n" }, - }) - end, -} diff --git a/bak/modules/nvim/config/stylua.toml b/bak/modules/nvim/config/stylua.toml deleted file mode 100644 index 079f9f5..0000000 --- a/bak/modules/nvim/config/stylua.toml +++ /dev/null @@ -1,9 +0,0 @@ -column_width = 120 -indent_type = "Spaces" -indent_width = 2 -quote_style = "AutoPreferDouble" -call_parentheses = "Always" -collapse_simple_statement = "Never" - -[sort_requires] -enabled = false diff --git a/bak/modules/nvim/deck.nix b/bak/modules/nvim/deck.nix deleted file mode 100644 index 8cfad0e..0000000 --- a/bak/modules/nvim/deck.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, ... }: - -{ - xdg.configFile."nvim" = { - # mkOutOfStoreSymlink needs an absolute path, otherwise it does not work: https://github.com/nix-community/home-manager/issues/676#issuecomment-1595795685 - # TODO: At least make the location of the config folder dynamic so that it works on other machines - source = config.lib.file.mkOutOfStoreSymlink /home/deck/dev/nix-config/modules/nvim/config; - }; -} diff --git a/bak/modules/nvim/default.nix b/bak/modules/nvim/default.nix deleted file mode 100644 index 880eeb6..0000000 --- a/bak/modules/nvim/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - pkgs, - config, - lib, - ... -}: - -{ - xdg.configFile."nvim" = { - # mkOutOfStoreSymlink needs an absolute path, otherwise it does not work: https://github.com/nix-community/home-manager/issues/676#issuecomment-1595795685 - source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/nvim/config"; - }; - - home.packages = lib.mkAfter ( - with pkgs; - [ - # Some devtools not included in project - # flakes - stylua - lua-language-server - nil - tree-sitter - ] - ); -} diff --git a/bak/modules/openssh/default.nix b/bak/modules/openssh/default.nix deleted file mode 100644 index 3096f39..0000000 --- a/bak/modules/openssh/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - services.openssh = { - enable = true; - settings = { - X11Forwarding = false; - PermitRootLogin = "no"; - PasswordAuthentication = false; - }; - openFirewall = true; - }; -} - diff --git a/bak/modules/raycast/default.nix b/bak/modules/raycast/default.nix deleted file mode 100644 index 37defce..0000000 --- a/bak/modules/raycast/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, ... }: - -{ - xdg.configFile."raycast-scripts" = { - source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/raycast/scripts"; - }; -} diff --git a/bak/modules/raycast/scripts/add-to-inbox.sh b/bak/modules/raycast/scripts/add-to-inbox.sh deleted file mode 100755 index fe16cbe..0000000 --- a/bak/modules/raycast/scripts/add-to-inbox.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# Required parameters: -# @raycast.schemaVersion 1 -# @raycast.title Add to Inbox -# @raycast.mode silent - -# Optional parameters: -# @raycast.icon 🤖 -# @raycast.argument1 { "type": "text", "placeholder": "Placeholder" } - -# Documentation: -# @raycast.description Adds a task to my org inbox -# @raycast.author dnsc -# @raycast.authorURL https://raycast.com/dnsc - -emacsclient -e "(dnsc/add-to-inbox \"* TODO $1\n\")" -echo "Added new task to inbox" diff --git a/bak/modules/raycast/scripts/emacsclient.sh b/bak/modules/raycast/scripts/emacsclient.sh deleted file mode 100755 index 0fe950d..0000000 --- a/bak/modules/raycast/scripts/emacsclient.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# Required parameters: -# @raycast.schemaVersion 1 -# @raycast.title Emacs Client -# @raycast.mode silent - -# Optional parameters: -# @raycast.icon 🤖 - -# Documentation: -# @raycast.description Opens new emacsclient frame -# @raycast.author dnsc -# @raycast.authorURL https://raycast.com/dnsc - -emacsclient -a "" -c -gsleep 3s - -client_window=$(aerospace list-windows --workspace focused | gcut -d " " -f1) -aerospace focus --window-id $client_window diff --git a/bak/modules/raycast/scripts/open-agenda.sh b/bak/modules/raycast/scripts/open-agenda.sh deleted file mode 100755 index 096cfa0..0000000 --- a/bak/modules/raycast/scripts/open-agenda.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Required parameters: -# @raycast.schemaVersion 1 -# @raycast.title Open Agenda -# @raycast.mode silent - -# Optional parameters: -# @raycast.icon 🤖 - -# Documentation: -# @raycast.description Opens org agenda. -# @raycast.author dnsc -# @raycast.authorURL https://raycast.com/dnsc - -emacsclient -r --eval "(dnsc/open-agenda-only-window)" diff --git a/bak/modules/restic/default.nix b/bak/modules/restic/default.nix deleted file mode 100644 index ffe2efe..0000000 --- a/bak/modules/restic/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ - config, - ... -}: - -{ - # Root SSH - programs.ssh = { - extraConfig = '' - Host dnsc-storage - AddKeysToAgent yes - Hostname u295965.your-storagebox.de - User u295965 - IdentityFile /root/.ssh/id_ed25519 - IdentitiesOnly yes - Port 23 - ''; - }; - - services.restic.backups = { - "dnsc-storage" = { - initialize = true; - passwordFile = config.age.secrets."restic/password".path; - repository = "sftp:dnsc-storage:restic/dnsc-server"; - createWrapper = true; - paths = [ - "/main/share" - "/data/actual-server" - ]; - pruneOpts = [ - "--keep-last 3" - ]; - timerConfig = { - OnCalendar = "daily"; - Persistent = true; - RandomizedDelaySec = "5h"; - }; - }; - }; -} diff --git a/bak/modules/samba/default.nix b/bak/modules/samba/default.nix deleted file mode 100644 index 0c821f0..0000000 --- a/bak/modules/samba/default.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ ... }: - -{ - # Samba - services.samba = { - enable = true; - openFirewall = true; - settings = { - global = { - "workgroup" = "WORKGROUP"; - "security" = "user"; - #"use sendfile" = "yes"; - #"max protocol" = "smb2"; - # note: localhost is the ipv6 localhost ::1 - "hosts allow" = "192.168.178. 127.0.0.1 localhost"; - "hosts deny" = "0.0.0.0/0"; - "guest account" = "nobody"; - "map to guest" = "bad user"; - }; - "share" = { - "path" = "/main/share"; - "browseable" = "yes"; - "writeable" = "yes"; - "read only" = "no"; - "guest ok" = "yes"; - "force user" = "dennis"; - "force group" = "users"; - }; - }; - }; - - services.samba-wsdd = { - enable = true; - openFirewall = true; - }; - - services.avahi = { - publish.enable = true; - publish.userServices = true; - nssmdns4 = true; - enable = true; - openFirewall = true; - }; - -} diff --git a/bak/modules/ssh/default.nix b/bak/modules/ssh/default.nix deleted file mode 100644 index dab7b26..0000000 --- a/bak/modules/ssh/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ config, ... }: -{ - programs.ssh = { - enable = true; - enableDefaultConfig = false; - matchBlocks = { - "*" = { - addKeysToAgent = "yes"; - }; - "dnsc-machine" = { - hostname = "192.168.178.250"; - user = "dennis"; - identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519"; - identitiesOnly = true; - }; - "dnsc-server" = { - hostname = "192.168.178.69"; - user = "dennis"; - identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519"; - identitiesOnly = true; - }; - "dnsc-vps-sm" = { - hostname = "91.99.21.186"; - user = "dennis"; - identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519"; - identitiesOnly = true; - }; - "dnsc-storage" = { - hostname = "u295965.your-storagebox.de"; - user = "u295965"; - identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519"; - identitiesOnly = true; - port = 23; - }; - "dnsc-storage-sftp" = { - hostname = "u295965.your-storagebox.de"; - user = "u295965"; - identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519"; - port = 22; - }; - }; - }; -} diff --git a/bak/modules/steam/default.nix b/bak/modules/steam/default.nix deleted file mode 100644 index 188f583..0000000 --- a/bak/modules/steam/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - programs.gamemode.enable = true; - programs.steam = { - enable = true; - remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play - dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server - localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers - }; -} diff --git a/bak/modules/syncthing/default.nix b/bak/modules/syncthing/default.nix deleted file mode 100644 index efe4078..0000000 --- a/bak/modules/syncthing/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - services.syncthing = { - enable = true; - group = "users"; - guiAddress = "0.0.0.0:8384"; - user = "dennis"; - configDir = "/home/dennis/.config/syncthing"; - overrideDevices = true; - overrideFolders = true; - settings = { - devices = { - "dnsc-air" = { id = "RYFO5XN-RRZZQI3-4W5DPHO-C7OKL5N-ZUQUBEI-ZKSWUHM-2BMTFRY-MDC7MA3"; }; - "dnsc-phone" = { id = "NGHODAF-W646NPR-R5IEL2R-QLULKB6-I4APGMB-5PIM6B6-5HZCLAV-HRTSEQI"; }; - }; - folders = { - "notes" = { - path = "/home/dennis/notes"; - devices = [ "dnsc-air" "dnsc-phone" ]; - }; - }; - }; - }; - systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true"; -} - diff --git a/bak/modules/tmux/default.nix b/bak/modules/tmux/default.nix deleted file mode 100644 index c175083..0000000 --- a/bak/modules/tmux/default.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ pkgs, ... }: - -{ - programs.tmux = { - enable = true; - package = pkgs.tmux; - baseIndex = 1; - clock24 = true; - disableConfirmationPrompt = true; - mouse = true; - newSession = true; - prefix = "C-b"; - shell = "${pkgs.fish}/bin/fish"; - terminal = "screen-256color"; - keyMode = "vi"; - escapeTime = 0; - plugins = with pkgs; [ - { - plugin = tmuxPlugins.resurrect; - extraConfig = '' - set -g @resurrect-strategy-nvim 'session' - set -g @resurrect-capture-pane-contents 'on' - ''; - } - { - plugin = tmuxPlugins.continuum; - extraConfig = '' - set -g @continuum-restore 'on' - set -g @continuum-boot 'on' - set -g @continuum-save-interval '10' - ''; - } - ]; - extraConfig = '' - set -g status-position top - set -g status-style bg=#1d202f,fg=white - set -g status-left "" - set -g status-right "#[bg=default,fg=magenta]>> #S << #[bg=default,fg=white]#H " - set-window-option -g window-status-style 'fg=magenta,bg=#1d202f' - set-window-option -g window-status-format ' #I #[fg=white]#W #[fg=cyan]#F ' - set-window-option -g window-status-current-style "fg=black,bg=magenta" - set-window-option -g window-status-current-format " #I #W #F " - set -g pane-border-style fg=#807c9f - set -g pane-active-border-style fg=magenta - set -g message-style "fg=black,bg=red,bold" - - unbind % - bind "|" split-window -h - unbind '"' - bind - split-window -l 15 -v - - bind r source-file "~/.config/tmux/tmux.conf" - - bind h select-pane -L - bind j select-pane -D - bind k select-pane -U - bind l select-pane -R - - bind -r H resize-pane -L 5 - bind -r J resize-pane -D 5 - bind -r K resize-pane -U 5 - bind -r L resize-pane -R 5 - - bind ? list-keys -a - - unbind s - bind s display-popup -h 50% -w 80% -E sessionizer - - unbind g - bind g display-popup -h 90% -w 95% -E lazygit - - unbind C-x - bind C-x kill-session - - unbind v - bind v choose-tree -Zw "join-pane -t '%%'" - ''; - }; -} diff --git a/bak/modules/tmux/server.nix b/bak/modules/tmux/server.nix deleted file mode 100644 index 7661915..0000000 --- a/bak/modules/tmux/server.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ pkgs, ... }: - -{ - programs.tmux = { - enable = true; - package = pkgs.tmux; - baseIndex = 1; - clock24 = true; - disableConfirmationPrompt = true; - mouse = true; - newSession = true; - prefix = "C-a"; - terminal = "screen-256color"; - keyMode = "vi"; - escapeTime = 0; - extraConfig = '' - set -g status-position bottom - set -g status-style bg=#1d202f,fg=white - set -g status-left "" - set -g status-right "#[bg=default,fg=magenta]>> #S << #[bg=default,fg=white]#H " - set-window-option -g window-status-style 'fg=magenta,bg=#1d202f' - set-window-option -g window-status-format ' #I #[fg=white]#W #[fg=cyan]#F ' - set-window-option -g window-status-current-style "fg=black,bg=magenta" - set-window-option -g window-status-current-format " #I #W #F " - set -g pane-border-style fg=#807c9f - set -g pane-active-border-style fg=magenta - set -g message-style "fg=black,bg=red,bold" - - unbind % - bind "|" split-window -h - unbind '"' - bind - split-window -l 15 -v - - bind r source-file "~/.config/tmux/tmux.conf" - - bind h select-pane -L - bind j select-pane -D - bind k select-pane -U - bind l select-pane -R - - bind -r H resize-pane -L 5 - bind -r J resize-pane -D 5 - bind -r K resize-pane -U 5 - bind -r L resize-pane -R 5 - - bind ? list-keys -a - - unbind s - bind s display-popup -h 50% -w 80% -E sessionizer - - unbind C-x - bind C-x kill-session - - unbind v - bind v choose-tree -Zw "join-pane -t '%%'" - ''; - }; -} diff --git a/bak/modules/tmuxinator/personal-layouts/dnsc.yml b/bak/modules/tmuxinator/personal-layouts/dnsc.yml deleted file mode 100644 index c182d28..0000000 --- a/bak/modules/tmuxinator/personal-layouts/dnsc.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: dnsc-io -root: ~/dev/dnsc-io -windows: - - dev: - layout: main-horizontal - panes: - - nvim +"lua Snacks.picker.files({ hidden = true })" - - run: - layout: main-vertical - panes: - - "pnpm dev" diff --git a/bak/modules/tmuxinator/personal-layouts/main.yml b/bak/modules/tmuxinator/personal-layouts/main.yml deleted file mode 100644 index aaf99be..0000000 --- a/bak/modules/tmuxinator/personal-layouts/main.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: main -root: ~/ -windows: - - default: - layout: main-vertical - panes: - - clear diff --git a/bak/modules/tmuxinator/personal-layouts/nix-config.yml b/bak/modules/tmuxinator/personal-layouts/nix-config.yml deleted file mode 100644 index 9f9db2e..0000000 --- a/bak/modules/tmuxinator/personal-layouts/nix-config.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: nix-config -root: ~/dev/nix-config/ -windows: - - code: - layout: main-horizontal - panes: - - nvim +"lua Snacks.picker.files({ hidden = true })" diff --git a/bak/modules/tmuxinator/personal-layouts/notes.yml b/bak/modules/tmuxinator/personal-layouts/notes.yml deleted file mode 100644 index 814af92..0000000 --- a/bak/modules/tmuxinator/personal-layouts/notes.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: notes -root: ~/dev/notes -windows: - - code: - layout: main-horizontal - panes: - - nvim +"lua Snacks.picker.files({ hidden = true })" - - run: - layout: even-vertical - panes: - - clear diff --git a/bak/modules/tmuxinator/personal-layouts/proglog.yml b/bak/modules/tmuxinator/personal-layouts/proglog.yml deleted file mode 100644 index 4d0f235..0000000 --- a/bak/modules/tmuxinator/personal-layouts/proglog.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: proglog -root: ~/dev/proglog -windows: - - dev: - layout: main-horizontal - panes: - - nvim +"lua Snacks.picker.files({ hidden = true })" - - run: - layout: main-vertical - panes: - - echo ">> Run proglog tasks here" diff --git a/bak/modules/tmuxinator/personal.nix b/bak/modules/tmuxinator/personal.nix deleted file mode 100644 index 7b16f91..0000000 --- a/bak/modules/tmuxinator/personal.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, ... }: - -{ - xdg.configFile."tmuxinator" = { - # mkOutOfStoreSymlink needs an absolute path, otherwise it does not work: https://github.com/nix-community/home-manager/issues/676#issuecomment-1595795685 - source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/tmuxinator/personal-layouts"; - }; -} diff --git a/bak/modules/tmuxinator/work-layouts/devtools.yml b/bak/modules/tmuxinator/work-layouts/devtools.yml deleted file mode 100644 index 56941fe..0000000 --- a/bak/modules/tmuxinator/work-layouts/devtools.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: devtools -root: ~/dev/devtools/ -windows: - - code: - layout: main-horizontal - panes: - - nvim +"lua Snacks.picker.files({ hidden = true })" - - run: - layout: even-vertical - panes: - - clear diff --git a/bak/modules/tmuxinator/work-layouts/k8s-admin-certification.yml b/bak/modules/tmuxinator/work-layouts/k8s-admin-certification.yml deleted file mode 100644 index 0673120..0000000 --- a/bak/modules/tmuxinator/work-layouts/k8s-admin-certification.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: k8s-admin-certification -root: ~/dev/kubernetes-admin-certification -windows: - - notes: - layout: main-vertical - panes: - - cd notes && nvim +"lua Snacks.picker.files({ hidden = true })" - - experiments: - layout: even-vertical - panes: - - cd experiments && clear diff --git a/bak/modules/tmuxinator/work-layouts/main.yml b/bak/modules/tmuxinator/work-layouts/main.yml deleted file mode 100644 index aaf99be..0000000 --- a/bak/modules/tmuxinator/work-layouts/main.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: main -root: ~/ -windows: - - default: - layout: main-vertical - panes: - - clear diff --git a/bak/modules/tmuxinator/work-layouts/nix-config.yml b/bak/modules/tmuxinator/work-layouts/nix-config.yml deleted file mode 100644 index 9f9db2e..0000000 --- a/bak/modules/tmuxinator/work-layouts/nix-config.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: nix-config -root: ~/dev/nix-config/ -windows: - - code: - layout: main-horizontal - panes: - - nvim +"lua Snacks.picker.files({ hidden = true })" diff --git a/bak/modules/tmuxinator/work-layouts/notes.yml b/bak/modules/tmuxinator/work-layouts/notes.yml deleted file mode 100644 index 814af92..0000000 --- a/bak/modules/tmuxinator/work-layouts/notes.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: notes -root: ~/dev/notes -windows: - - code: - layout: main-horizontal - panes: - - nvim +"lua Snacks.picker.files({ hidden = true })" - - run: - layout: even-vertical - panes: - - clear diff --git a/bak/modules/tmuxinator/work-layouts/ride-charts.yml b/bak/modules/tmuxinator/work-layouts/ride-charts.yml deleted file mode 100644 index 6fc4ae8..0000000 --- a/bak/modules/tmuxinator/work-layouts/ride-charts.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: ride-charts -root: ~/dev/ride-charts -windows: - - code: - layout: main-horizontal - panes: - - nvim +"lua Snacks.picker.files({ hidden = true })" - - run: - layout: even-vertical - panes: - - clear diff --git a/bak/modules/tmuxinator/work-layouts/ride.yml b/bak/modules/tmuxinator/work-layouts/ride.yml deleted file mode 100644 index 3a755cd..0000000 --- a/bak/modules/tmuxinator/work-layouts/ride.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: ride -root: ~/dev/ride -windows: - - code: - layout: main-horizontal - panes: - - nvim +"lua Snacks.picker.files({ hidden = true })" - - run: - layout: even-vertical - panes: - - clear - - db: - layout: main-horizontal - panes: - - dbui - - redis: - layout: main-horizontal - panes: - - tredis diff --git a/bak/modules/tmuxinator/work.nix b/bak/modules/tmuxinator/work.nix deleted file mode 100644 index 44a772f..0000000 --- a/bak/modules/tmuxinator/work.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, ... }: - -{ - xdg.configFile."tmuxinator" = { - # mkOutOfStoreSymlink needs an absolute path, otherwise it does not work: https://github.com/nix-community/home-manager/issues/676#issuecomment-1595795685 - source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/tmuxinator/work-layouts"; - }; -} diff --git a/bak/modules/ungoogled-chromium/default.nix b/bak/modules/ungoogled-chromium/default.nix deleted file mode 100644 index cb913a5..0000000 --- a/bak/modules/ungoogled-chromium/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ pkgs, ... }: - -{ - programs.chromium = { - enable = true; - package = pkgs.ungoogled-chromium; - extensions = [ - { id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # uBlock - { id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden - { id = "dbepggeogbaibhgnhhndojpepiihcmeb"; } # Vimium - ]; - }; -} diff --git a/bak/modules/unix/audio.nix b/bak/modules/unix/audio.nix deleted file mode 100644 index 9ad9faf..0000000 --- a/bak/modules/unix/audio.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - environment.systemPackages = lib.mkAfter (with pkgs; [ - pwvucontrol - ]); - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - raopOpenFirewall = true; - wireplumber.extraConfig."10-bluez" = { - "monitor.bluez.properties" = { - "bluez5.enable-sbc-xq" = true; - "bluez5.enable-msbc" = true; - "bluez5.enable-hw-volume" = true; - "bluez5.roles" = [ - "hsp_hs" - "hsp_ag" - "hfp_hf" - "hfp_ag" - ]; - }; - }; - extraConfig.pipewire = { - "10-airplay" = { - "context.modules" = [ - { - name = "libpipewire-module-raop-discover"; - # increase the buffer size if you get dropouts/glitches - # args = { - # "raop.latency.ms" = 500; - # }; - } - ]; - }; - }; - }; -} diff --git a/bak/modules/unix/base.nix b/bak/modules/unix/base.nix deleted file mode 100644 index 917f4e2..0000000 --- a/bak/modules/unix/base.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - networking.networkmanager.enable = true; - i18n.defaultLocale = "en_US.UTF-8"; - i18n.extraLocaleSettings = { - LC_ADDRESS = "de_DE.UTF-8"; - LC_IDENTIFICATION = "de_DE.UTF-8"; - LC_MEASUREMENT = "de_DE.UTF-8"; - LC_MONETARY = "de_DE.UTF-8"; - LC_NAME = "de_DE.UTF-8"; - LC_NUMERIC = "de_DE.UTF-8"; - LC_PAPER = "de_DE.UTF-8"; - LC_TELEPHONE = "de_DE.UTF-8"; - LC_TIME = "de_DE.UTF-8"; - }; - security.sudo.enable = true; - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - programs.mtr.enable = true; - environment.variables = { - EDITOR = "nvim"; - SYSTEMD_EDITOR = "nvim"; - VISUAL = "nvim"; - }; -} diff --git a/bak/modules/unix/bluetooth.nix b/bak/modules/unix/bluetooth.nix deleted file mode 100644 index 638c259..0000000 --- a/bak/modules/unix/bluetooth.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, ... }: - -{ - services.blueman.enable = true; - hardware.bluetooth = { - enable = true; - settings = { - General = { - Enable = "Source,Sink,Media,Socket"; - Experimental = true; - }; - }; - }; -} diff --git a/bak/modules/unix/default.nix b/bak/modules/unix/default.nix deleted file mode 100644 index 1b25537..0000000 --- a/bak/modules/unix/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./base.nix - ./shell.nix - ]; -} diff --git a/bak/modules/unix/nvidia.nix b/bak/modules/unix/nvidia.nix deleted file mode 100644 index 54c8d19..0000000 --- a/bak/modules/unix/nvidia.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, ... }: - -{ - services.xserver.videoDrivers = [ "nvidia" ]; - hardware = { - graphics.enable = true; - nvidia = { - modesetting.enable = true; - powerManagement.enable = false; - powerManagement.finegrained = false; - open = true; - nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.stable; - }; - }; - environment.sessionVariables.NIXOS_OZONE_WL = "1"; -} diff --git a/bak/modules/unix/printing.nix b/bak/modules/unix/printing.nix deleted file mode 100644 index 4bebfa5..0000000 --- a/bak/modules/unix/printing.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ ... }: - -{ - services.printing.enable = true; - services.avahi = { - enable = true; - nssmdns4 = true; - openFirewall = true; - }; -} diff --git a/bak/modules/unix/shell.nix b/bak/modules/unix/shell.nix deleted file mode 100644 index b3daf32..0000000 --- a/bak/modules/unix/shell.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ pkgs, ... }: - -{ - programs.fish.enable = true; - users.defaultUserShell = pkgs.fish; -} diff --git a/bak/modules/unix/tablet.nix b/bak/modules/unix/tablet.nix deleted file mode 100644 index 65becfb..0000000 --- a/bak/modules/unix/tablet.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - hardware.opentabletdriver.enable = true; - hardware.uinput.enable = true; - boot.kernelModules = [ "uinput" ]; -} diff --git a/bak/modules/ups/default.nix b/bak/modules/ups/default.nix deleted file mode 100644 index c6f2559..0000000 --- a/bak/modules/ups/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - power.ups = { - enable = true; - - ups."eaton-ups" = { - driver = "usbhid-ups"; - port = "auto"; - }; - - users.upsmon = { - passwordFile = "/etc/upsmon.passwd"; - upsmon = "primary"; - }; - - upsmon.monitor."eaton-ups".user = "upsmon"; - }; -} - diff --git a/bak/modules/uptime-kuma/default.nix b/bak/modules/uptime-kuma/default.nix deleted file mode 100644 index e28aef1..0000000 --- a/bak/modules/uptime-kuma/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - services.uptime-kuma = { - enable = true; - settings = { - PORT = "9000"; - }; - }; -} diff --git a/bak/modules/vaultwarden/default.nix b/bak/modules/vaultwarden/default.nix deleted file mode 100644 index a1b8c3d..0000000 --- a/bak/modules/vaultwarden/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - config, - ... -}: -{ - services.vaultwarden = { - enable = true; - environmentFile = config.age.secrets."vaultwarden/env".path; - backupDir = "/var/backup/vaultwarden"; - }; -} diff --git a/bak/modules/wezterm/config/appearance.lua b/bak/modules/wezterm/config/appearance.lua deleted file mode 100644 index dac848f..0000000 --- a/bak/modules/wezterm/config/appearance.lua +++ /dev/null @@ -1,21 +0,0 @@ -local wezterm = require("wezterm") -local helpers = require("helpers") -local theme = require("theme") - -local M = {} - -function M.apply_to_config(config) - config.color_schemes = { - ["dnsc"] = theme.colors, - } - config.color_scheme = "dnsc" - config.font = wezterm.font("VictorMono Nerd Font", { weight = "DemiBold", stretch = "Normal", style = "Normal" }) - config.font_size = 18.5 - config.window_decorations = "RESIZE" - config.window_padding = helpers.get_padding(20, 15) - config.window_background_opacity = 0.97 - config.macos_window_background_blur = 30 - config.command_palette_font_size = 19 -end - -return M diff --git a/bak/modules/wezterm/config/helpers.lua b/bak/modules/wezterm/config/helpers.lua deleted file mode 100644 index 7eaf8bf..0000000 --- a/bak/modules/wezterm/config/helpers.lua +++ /dev/null @@ -1,78 +0,0 @@ -local wezterm = require("wezterm") - -local M = {} - -function M.project_dir() - return wezterm.home_dir .. "/dev" -end - -function M.project_dirs() - local projects = { wezterm.home_dir } - - for _, dir in ipairs(wezterm.glob(M.project_dir() .. "/*")) do - table.insert(projects, dir) - end - - table.insert(projects, wezterm.home_dir .. "/notes") - - return projects -end - -function M.get_outdated_packages() - local success, stdout, stderr = - wezterm.run_child_process({ "sh", "-c", "/opt/homebrew/bin/brew outdated -q | wc -l" }) - - if success ~= true then - wezterm.log_error(stderr) - - return "X" - end - - return stdout:gsub("%s+", "") -end - -function M.get_primary_battery_state() - local battery_info = wezterm.battery_info() - - return string.format("%.0f%%", battery_info[1].state_of_charge * 100) -end - -function M.get_padding(padding, remove_padding_bottom) - return { - left = padding, - right = padding, - top = padding, - bottom = padding - remove_padding_bottom, - } -end - -function M.move_pane(key, direction) - return { - key = key, - mods = "LEADER", - action = wezterm.action.ActivatePaneDirection(direction), - } -end - -function M.get_is_zoomed(for_window) - local tab = for_window:active_tab() - local panes_info = tab:panes_with_info() - - for _, pane_info in ipairs(panes_info) do - if pane_info.is_active then - return pane_info.is_zoomed - end - end -end - -function M.get_zoomed_status(for_window) - local is_zoomed = M.get_is_zoomed(for_window) - - if is_zoomed then - return "[Z]" - end - - return "" -end - -return M diff --git a/bak/modules/wezterm/config/keybindings.lua b/bak/modules/wezterm/config/keybindings.lua deleted file mode 100644 index 3917dc2..0000000 --- a/bak/modules/wezterm/config/keybindings.lua +++ /dev/null @@ -1,77 +0,0 @@ -local wezterm = require("wezterm") -local helpers = require("helpers") -local projects = require("projects") - -local M = {} - -function M.apply_to_config(config) - config.leader = { key = "b", mods = "CTRL", timeout_milliseconds = 1000 } - - config.keys = { - -- Window/Pane Management - { - key = "|", - mods = "LEADER", - action = wezterm.action.SplitPane({ direction = "Left", size = { Percent = 40 } }), - }, - { - key = "-", - mods = "LEADER", - action = wezterm.action.SplitPane({ direction = "Down", size = { Percent = 30 } }), - }, - { - key = "x", - mods = "LEADER", - action = wezterm.action.CloseCurrentPane({ confirm = true }), - }, - { - mods = "LEADER", - key = "z", - action = wezterm.action.TogglePaneZoomState, - }, - { - mods = "LEADER", - key = "u", - action = wezterm.action.PaneSelect({ - mode = "SwapWithActive", - }), - }, - -- Navigation - helpers.move_pane("j", "Down"), - helpers.move_pane("k", "Up"), - helpers.move_pane("h", "Left"), - helpers.move_pane("l", "Right"), - -- Workspaces - { - key = "s", - mods = "LEADER", - action = projects.choose(), - }, - -- Misc - { - key = " ", - mods = "LEADER", - action = wezterm.action.ActivateCommandPalette, - }, - { - key = "v", - mods = "LEADER", - action = wezterm.action.ActivateCopyMode, - }, - { - key = "c", - mods = "LEADER", - action = wezterm.action.SpawnTab("CurrentPaneDomain"), - }, - } - - for i = 1, 8 do - table.insert(config.keys, { - key = tostring(i), - mods = "LEADER", - action = wezterm.action.ActivateTab(i - 1), - }) - end -end - -return M diff --git a/bak/modules/wezterm/config/overrides.lua b/bak/modules/wezterm/config/overrides.lua deleted file mode 100644 index dd17be1..0000000 --- a/bak/modules/wezterm/config/overrides.lua +++ /dev/null @@ -1,23 +0,0 @@ -local wezterm = require("wezterm") -local hn = wezterm.hostname() -local helpers = require("helpers") - -local M = {} - -function M.apply_to_config(config) - if hn == "dnsc-work" then - config.window_background_opacity = 0.975 - config.font_size = 19 - end - - if hn == "dnsc-machine" then - config.font = wezterm.font("VictorMono Nerd Font", { weight = "DemiBold" }) - config.font_size = 15.5 - config.window_decorations = "NONE" - config.window_padding = helpers.get_padding(18, 6) - config.window_background_opacity = 0.94 - -- config.enable_wayland = false; - end -end - -return M diff --git a/bak/modules/wezterm/config/projects.lua b/bak/modules/wezterm/config/projects.lua deleted file mode 100644 index 4addb8e..0000000 --- a/bak/modules/wezterm/config/projects.lua +++ /dev/null @@ -1,33 +0,0 @@ -local wezterm = require("wezterm") -local helpers = require("helpers") - -local M = {} - -function M.choose() - local choices = {} - - for _, value in ipairs(helpers.project_dirs()) do - table.insert(choices, { label = value }) - end - - return wezterm.action.InputSelector({ - title = "Projects", - choices = choices, - fuzzy = true, - action = wezterm.action_callback(function(child_window, child_pane, _, label) - if not label then - return - end - - child_window:perform_action( - wezterm.action.SwitchToWorkspace({ - name = label:match("([^/]+)$"), - spawn = { cwd = label }, - }), - child_pane - ) - end), - }) -end - -return M diff --git a/bak/modules/wezterm/config/startup.lua b/bak/modules/wezterm/config/startup.lua deleted file mode 100644 index 2202264..0000000 --- a/bak/modules/wezterm/config/startup.lua +++ /dev/null @@ -1,28 +0,0 @@ -local wezterm = require("wezterm") -local mux = wezterm.mux -local helpers = require("helpers") - -local M = {} - -wezterm.on("gui-startup", function(cmd) - local args = {} - if cmd then - args = cmd.args - end - - -- WORKSPACES - -- W: dennis - local _, _, _ = mux.spawn_window({ - workspace = "dennis", - cwd = wezterm.home_dir, - args = args, - }) - - mux.set_active_workspace("dennis") -end) - -function M.apply_to_config(config) - return config -end - -return M diff --git a/bak/modules/wezterm/config/tab_bar.lua b/bak/modules/wezterm/config/tab_bar.lua deleted file mode 100644 index a7d6e0c..0000000 --- a/bak/modules/wezterm/config/tab_bar.lua +++ /dev/null @@ -1,60 +0,0 @@ -local wezterm = require("wezterm") -local helpers = require("helpers") -local theme = require("theme") - -local M = {} - -local function get_elements(for_window) - return { - { Background = { Color = theme.palette.bg } }, - { Text = "h:" .. wezterm.hostname() .. " " }, - { Text = "u:" .. helpers.get_outdated_packages() .. " " }, - { Text = "b:" .. helpers.get_primary_battery_state() .. " " }, - { Background = { Color = theme.palette.bg_secondary } }, - { Text = " " .. helpers.get_zoomed_status(for_window) .. " " }, - { Text = "s:" .. for_window:active_workspace() .. " " }, - } -end - -wezterm.on("update-right-status", function(window, _) - window:set_right_status(wezterm.format(get_elements(window))) -end) - -function M.apply_to_config(config) - config.enable_tab_bar = true - config.use_fancy_tab_bar = true - config.tab_bar_at_bottom = false - - config.window_frame = { - inactive_titlebar_bg = theme.palette.bg, - active_titlebar_bg = theme.palette.bg, - font = wezterm.font({ family = "Victor Mono", weight = "Bold" }), - } - - config.colors = { - tab_bar = { - active_tab = { - bg_color = theme.palette.magenta_subtle_bg, - fg_color = theme.palette.fg, - }, - inactive_tab = { - bg_color = theme.palette.bg, - fg_color = theme.palette.grey, - }, - inactive_tab_hover = { - fg_color = theme.palette.fg, - bg_color = theme.palette.bg, - }, - new_tab = { - bg_color = theme.palette.bg, - fg_color = theme.palette.grey, - }, - new_tab_hover = { - bg_color = theme.palette.bg, - fg_color = theme.palette.fg, - }, - }, - } -end - -return M diff --git a/bak/modules/wezterm/config/theme.lua b/bak/modules/wezterm/config/theme.lua deleted file mode 100644 index 69c7729..0000000 --- a/bak/modules/wezterm/config/theme.lua +++ /dev/null @@ -1,65 +0,0 @@ -local M = {} - -local palette = { - fg = "#ffffff", - bg = "#0f0b15", - bg_secondary = "#1d202f", - grey = "#807c9f", - grey_bright = "#807c9f", - red = "#f47359", - red_bright = "#ff6a7a", - green = "#29a444", - green_bright = "#00a392", - yellow = "#b58a52", - yellow_bright = "#df9080", - blue = "#3f95f6", - blue_bright = "#029fff", - magenta = "#d369af", - magenta_bright = "#af85ea", - magenta_subtle_bg = "#572454", - cyan = "#4fbaef", - cyan_bright = "#35afbf", - silver = "#b8c6d5", - silver_bright = "#ffffff", -} - -M.palette = palette - -M.colors = { - foreground = palette.fg, - background = palette.bg, - - cursor_bg = palette.magenta, - cursor_fg = palette.fg, - cursor_border = palette.magenta, - - selection_fg = palette.magenta_bright, - selection_bg = palette.magenta_subtle_bg, - - scrollbar_thumb = palette.bg_secondary, - split = palette.bg_secondary, - - ansi = { - palette.bg, - palette.red, - palette.green, - palette.yellow, - palette.blue, - palette.magenta, - palette.cyan, - palette.silver, - }, - - brights = { - palette.grey_bright, - palette.red_bright, - palette.green_bright, - palette.yellow_bright, - palette.blue_bright, - palette.magenta_bright, - palette.cyan_bright, - palette.silver_bright, - }, -} - -return M diff --git a/bak/modules/wezterm/config/wezterm.lua b/bak/modules/wezterm/config/wezterm.lua deleted file mode 100644 index 0682527..0000000 --- a/bak/modules/wezterm/config/wezterm.lua +++ /dev/null @@ -1,21 +0,0 @@ -local wezterm = require("wezterm") -local appearance = require("appearance") -local tab_bar = require("tab_bar") -local startup = require("startup") -local keybindings = require("keybindings") -local overrides = require("overrides") - -local config = {} - -if wezterm.config_builder then - ---@diagnostic disable-next-line: lowercase-global - config = wezterm.config_builder() -end - -appearance.apply_to_config(config) -tab_bar.apply_to_config(config) -startup.apply_to_config(config) -keybindings.apply_to_config(config) -overrides.apply_to_config(config) - -return config diff --git a/bak/modules/wezterm/default.nix b/bak/modules/wezterm/default.nix deleted file mode 100644 index 7ea2b4b..0000000 --- a/bak/modules/wezterm/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, ... }: - -{ - xdg.configFile."wezterm" = { - # mkOutOfStoreSymlink needs an absolute path, otherwise it does not work: https://github.com/nix-community/home-manager/issues/676#issuecomment-1595795685 - source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wezterm/config"; - }; -} diff --git a/bak/modules/wm/awww/default.nix b/bak/modules/wm/awww/default.nix deleted file mode 100644 index 135022e..0000000 --- a/bak/modules/wm/awww/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, ... }: - -{ - xdg.configFile."awww/bin" = { - source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/awww/scripts"; - }; -} diff --git a/bak/modules/wm/awww/scripts/random-bg.sh b/bak/modules/wm/awww/scripts/random-bg.sh deleted file mode 100755 index 34c30bd..0000000 --- a/bak/modules/wm/awww/scripts/random-bg.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# Changes the wallpaper to a randomly chosen image in a given directory -# at a set interval. - -DEFAULT_INTERVAL=300 # In seconds - -if [ $# -lt 1 ] || [ ! -d "$1" ]; then - printf "Usage:\n\t\e[1m%s\e[0m \e[4mDIRECTORY\e[0m [\e[4mINTERVAL\e[0m]\n" "$0" - printf "\tChanges the wallpaper to a randomly chosen image in DIRECTORY every\n\tINTERVAL seconds (or every %d seconds if unspecified)." "$DEFAULT_INTERVAL" - exit 1 -fi - -# See awww-img(1) -RESIZE_TYPE="crop" -export AWWW_TRANSITION_FPS="${AWWW_TRANSITION_FPS:-60}" -export AWWW_TRANSITION_STEP="${AWWW_TRANSITION_STEP:-2}" - -# Kill existing script executions -for pid in $(pidof -x "random-bg.sh"); do - if [ $pid != $$ ]; then - kill $pid - fi -done - -while true; do - find "$1" -type f \ - | while read -r img; do - echo "$( button { - border-radius: 12px; - color: @fg; -} - -.notification-group { - margin: 0; - padding: 0; -} - -.notification-group:focus { - background: @bg; -} - -.notification-group.low { - /* Low Priority Group */ -} - -.notification-group.normal { - /* Low Priority Group */ -} - -.notification-group.critical { - /* Low Priority Group */ -} - -.notification-group .notification-group-close-button .close-button { -} - -.notification-group .notification-group-buttons, .notification-group .notification-group-headers { - margin: 0 10px 4px 10px; - color: @fg; -} - -.notification-group .notification-group-headers { - /* Notification Group Headers */ -} - -.notification-group .notification-group-headers .notification-group-header { - font-size: 1.1rem; - font-weight: bold; -} - -.notification-group .notification-group-headers .notification-group-icon { - margin-top: 2px; - color: @fg_dim; - -gtk-icon-size: 24px; -} - -.notification-group .notification-group-buttons { - /* Notification Group Buttons */ - background-color: @bg; - color: @fg_dim; -} - -.notification-group.collapsed { - /* When another group is expanded, lower the opacity of the collapsed ones */ -} - -.notification-group.collapsed.not-expanded { - opacity: 0.4; -} - -.notification-group.collapsed .notification-row .notification { - background-color: @bg_secondary; -} - -.notification-group.collapsed .notification-row:not(:last-child) { - /* Top notification in stack */ - /* Set lower stacked notifications opacity to 0 */ -} - -.notification-group.collapsed .notification-row:not(:last-child) .notification-action, -.notification-group.collapsed .notification-row:not(:last-child) .notification-default-action { - opacity: 0; -} - -.notification-group.collapsed:hover .notification-row:not(:only-child) .notification { - background-color: @bg_secondary; -} - -.control-center { - /* The Control Center which contains the old notifications + widgets */ - background-color: @bg; - border-radius: 0; - color: @fg; - opacity: 0.95; -} - -.control-center .control-center-list-placeholder { - /* The placeholder when there are no notifications */ - opacity: 0; -} - -.control-center .control-center-list { - /* List of notifications */ - background: transparent; -} - -.control-center .control-center-list .notification { - box-shadow: none; - border: 2px solid @magenta_subtle_bg; -} - -.control-center .control-center-list .notification .notification-default-action, -.control-center .control-center-list .notification .notification-action { -} - -.control-center .control-center-list .notification .notification-default-action:hover, -.control-center .control-center-list .notification .notification-action:hover { - background-color: @bg_secondary; -} - -.blank-window { - /* Window behind control center and on all other monitors */ - background: transparent; -} - -.floating-notifications { - background: transparent; -} - -.floating-notifications .notification { - box-shadow: none; -} - -.widget-mpris { - padding: 0; - opacity: 1; -} - -.widget-mpris .widget-mpris-player { - margin-bottom: 12px; - border-radius: 12px; - border: 2px solid @magenta_subtle_bg_darker; -} - -.widget-mpris .widget-mpris-player .mpris-background { - filter: blur(10px); -} - -.widget-mpris .widget-mpris-player .mpris-overlay { - padding: 12px; -} - -.widget-mpris .widget-mpris-player .mpris-overlay button:hover { - /* The media player buttons (play, pause, next, etc...) */ - background: @magenta_subtle_bg_darker; - color: @magenta_brighter; -} - -.widget-mpris .widget-mpris-player .mpris-overlay .widget-mpris-album-art { - border-radius: 8px; - -gtk-icon-size: 64px; -} - -.widget-mpris .widget-mpris-player .mpris-overlay .widget-mpris-title { - font-weight: bold; - font-size: 1.25rem; -} - -.widget-mpris .widget-mpris-player .mpris-overlay .widget-mpris-subtitle { - font-size: 1.1rem; - color: @fg_alt; -} - -.widget-mpris .widget-mpris-player .mpris-overlay > box > button { - /* Change player control buttons */ - color: @fg; -} - -.widget-mpris .widget-mpris-player .mpris-overlay > box > button:hover { - background-color: @magenta_subtle_bg_darker; -} - -.widget-mpris > box > button { - /* Change player side buttons */ -} - -.widget-mpris > box > button:disabled { - /* Change player side buttons insensitive */ - color: @grey; -} - -.widget-title > label { - margin-top: 8px; - margin-left: 12px; - font-size: 1.8rem; - font-weight: bold; - color: @fg; -} - -/* .widget-buttons-grid { */ -/* padding: 0 20px 12px 20px; */ -/* } */ - -.widget-buttons-grid flowboxchild > button { - padding: 12px 0; - margin: 8px; - background-color: @magenta; - color: @fg; - opacity: 1; -} - -.widget-buttons-grid flowboxchild > button:hover { - padding: 12px 0; - background-color: @magenta; - box-shadow: inset 0px 0px 15px 3px rgba(0,0,0,0.8); - transition: none; - color: @fg; -} - -.widget-buttons-grid flowboxchild > button.toggle:checked { - /* style given to the active toggle button */ -} diff --git a/bak/modules/wm/waybar/config/config.jsonc b/bak/modules/wm/waybar/config/config.jsonc deleted file mode 100644 index 1c603be..0000000 --- a/bak/modules/wm/waybar/config/config.jsonc +++ /dev/null @@ -1,126 +0,0 @@ -{ - // Bar Options - "output": "DP-3", - "position": "left", - "width": 36, - "margin-left": 8, - "margin-top": 8, - "margin-bottom": 8, - // Placing Modules - "modules-left": [ - "clock", - "custom/cpu-label", - "cpu", - "custom/memory-label", - "memory", - "custom/disk-label", - "disk", - "custom/nvidia-label", - "custom/nvidia" - ], - "modules-center": [ - "niri/workspaces" - ], - "modules-right": [ - "wireplumber#source", - "wireplumber#sink", - "tray", - "custom/power" - ], - // Module Configuration - "niri/workspaces": { - "format": "{icon}", - "format-icons": { - "active": "󰄯", - "default": "󰄰" - } - }, - "clock": { - "interval": 60, - "format": "{:%H\n%M}", - "format-alt": "{:%d\n%m}", - "tooltip": false, - "justify": "center" - }, - "custom/cpu-label": { - "format": "CPU", - "tooltip": false - }, - "cpu": { - "interval": "30", - "format": "{usage}%", - "max-length": 2 - }, - "custom/memory-label": { - "format": "MEM", - "tooltip": false - }, - "memory": { - "interval": "30", - "format": "{percentage}%", - "max-length": 2 - }, - "custom/disk-label": { - "format": "SSD", - "tooltip": false - }, - "disk": { - "interval": "30", - "format": "{percentage_used}%", - "max-length": 2 - }, - "custom/nvidia-label": { - "format": "GPU", - "tooltip": false - }, - "custom/nvidia": { - "exec": "nvidia-smi --query-gpu=temperature.gpu --format=csv,nounits,noheader", - "format": "{}°", - "tooltip": false, - "interval": 10 - }, - "wireplumber#source": { - "node-type": "Audio/Source", - "on-click": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle", - "on-click-right": "pwvucontrol", - "scroll-step": 5.0, - "tooltip-format": "{node_name} ({source_volume}%)", - "format": "{icon}", - "format-muted": "󰍭", - "format-icons": { - "default": [ - "󰍬" - ] - } - }, - "wireplumber#sink": { - "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", - "on-click-right": "pwvucontrol", - "scroll-step": 5.0, - "tooltip-format": "{node_name} ({volume}%)", - "format": "{icon}", - "format-muted": "󰖁", - "format-icons": { - "default": [ - "󰕿", - "󰖀", - "󰕾" - ] - } - }, - "tray": { - "icon-size": 14, - "spacing": 18 - }, - "custom/power": { - "format": "󰐥", - "tooltip": false, - "menu": "on-click", - "menu-file": "~/.config/waybar/power_menu.xml", - "menu-actions": { - "lock": "hyprlock", - "reboot": "reboot", - "shutdown": "shutdown now" - } - } -} diff --git a/bak/modules/wm/waybar/config/power_menu.xml b/bak/modules/wm/waybar/config/power_menu.xml deleted file mode 100644 index 8b15c31..0000000 --- a/bak/modules/wm/waybar/config/power_menu.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - Lock - - - - - Reboot - - - - - Shutdown - - - - diff --git a/bak/modules/wm/waybar/config/style.css b/bak/modules/wm/waybar/config/style.css deleted file mode 100644 index 858e436..0000000 --- a/bak/modules/wm/waybar/config/style.css +++ /dev/null @@ -1,86 +0,0 @@ -* { - font-family: "VictorMono Nerd Font Propo"; - font-size: 12px; - font-weight: bold; - background: transparent; -} - -tooltip, -menu { - background: rgba(15, 11, 12, 0.9); - border-radius: 8px; - border: 2px solid #572454; -} - -menuitem { - color: #ffffff; - margin-left: 4px; - margin-right: 4px; - border-radius: 4px; -} - -menuitem:hover { - color: #331531; - background-color: #c57faf; -} - -window#waybar { - background-color: rgba(15, 11, 12, 0.95); - border-radius: 8px; - color: #ffffff; -} - -#workspaces button { - padding: 2px 10px; - margin: 0; - color: #d369af; -} - -#clock { - font-size: 15px; - padding: 8px 0 8px; -} - -#custom-cpu-label, -#custom-memory-label, -#custom-disk-label, -#custom-nvidia-label { - color: #572454; - padding-top: 6px; - border-top: 1px solid #572454; -} - -#custom-nvidia { - border-bottom: 1px solid #572454; -} - -#cpu, -#memory, -#disk, -#custom-nvidia { - color: #d369af; - padding-bottom: 8px; -} - -#wireplumber { - font-size: 16px; - margin-top: 4px; - margin-bottom: 4px; -} - -#tray { - margin: 4px; - margin-top: 0; - border-radius: 4px; - padding-top: 10px; - padding-bottom: 10px; -} - -#custom-power { - background-color: #331531; - font-size: 16px; - border-bottom-left-radius: 8px; - border-bottom-right-radius: 8px; - padding-top: 6px; - padding-bottom: 6px; -} diff --git a/bak/modules/wm/waybar/default.nix b/bak/modules/wm/waybar/default.nix deleted file mode 100644 index 67aab91..0000000 --- a/bak/modules/wm/waybar/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, ... }: - -{ - xdg.configFile."waybar" = { - source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/waybar/config"; - }; - - programs.waybar = { - enable = true; - }; -} diff --git a/bak/modules/zellij/config.kdl b/bak/modules/zellij/config.kdl deleted file mode 100644 index 03d15ab..0000000 --- a/bak/modules/zellij/config.kdl +++ /dev/null @@ -1,331 +0,0 @@ -keybinds clear-defaults=true { - shared_except "locked" "scroll" { - bind "Esc" { SwitchToMode "Locked"; } - } - - normal { - // Modes - bind "p" { SwitchToMode "Pane"; } - bind "r" { SwitchToMode "Resize"; } - bind "m" { SwitchToMode "Move"; } - bind "t" { SwitchToMode "Tab"; } - bind "/" { SwitchToMode "Scroll"; } - - // Plugins / Tools - bind "q" { - LaunchOrFocusPlugin "plugin-manager" { - floating true - move_to_focused_tab true - }; - SwitchToMode "Locked"; - } - - bind "w" { - LaunchOrFocusPlugin "session-manager" { - floating true - move_to_focused_tab true - }; - SwitchToMode "Locked"; - } - - bind "s" { - Run "fish" "-ic" "sessionizer" { - close_on_exit true - floating true - }; - SwitchToMode "Locked"; - } - - // Global keybindings - bind "c" { - NewTab { - layout "compact" - }; - SwitchToMode "Locked"; - } - bind "z" { ToggleFocusFullscreen; SwitchToMode "Locked"; } - bind "x" { CloseFocus; SwitchToMode "Locked"; } - bind "-" { NewPane "Down"; SwitchToMode "Locked"; } - bind "|" { NewPane "Right"; SwitchToMode "Locked"; } - bind "h" "Left" { MoveFocus "Left"; SwitchToMode "Locked"; } - bind "l" "Right" { MoveFocus "Right"; SwitchToMode "Locked"; } - bind "j" "Down" { MoveFocus "Down"; SwitchToMode "Locked"; } - bind "k" "Up" { MoveFocus "Up"; SwitchToMode "Locked"; } - bind "1" { GoToTab 1; SwitchToMode "Locked"; } - bind "2" { GoToTab 2; SwitchToMode "Locked"; } - bind "3" { GoToTab 3; SwitchToMode "Locked"; } - bind "4" { GoToTab 4; SwitchToMode "Locked"; } - bind "5" { GoToTab 5; SwitchToMode "Locked"; } - bind "6" { GoToTab 6; SwitchToMode "Locked"; } - bind "7" { GoToTab 7; SwitchToMode "Locked"; } - bind "8" { GoToTab 8; SwitchToMode "Locked"; } - bind "9" { GoToTab 9; SwitchToMode "Locked"; } - } - - locked { - bind "Ctrl b" { SwitchToMode "Normal"; } - } - - resize { - bind "h" "Left" { Resize "Increase Left"; } - bind "j" "Down" { Resize "Increase Down"; } - bind "k" "Up" { Resize "Increase Up"; } - bind "l" "Right" { Resize "Increase Right"; } - bind "H" { Resize "Decrease Left"; } - bind "J" { Resize "Decrease Down"; } - bind "K" { Resize "Decrease Up"; } - bind "L" { Resize "Decrease Right"; } - bind "=" "+" { Resize "Increase"; } - bind "-" { Resize "Decrease"; } - } - - move { - bind "n" "Tab" { MovePane; } - bind "p" { MovePaneBackwards; } - bind "h" "Left" { MovePane "Left"; } - bind "j" "Down" { MovePane "Down"; } - bind "k" "Up" { MovePane "Up"; } - bind "l" "Right" { MovePane "Right"; } - } - - pane { - bind "n" { NewPane; SwitchToMode "Locked"; } - bind "x" { CloseFocus; SwitchToMode "Locked"; } - bind "p" { SwitchFocus; } - bind "f" { TogglePaneEmbedOrFloating; SwitchToMode "Locked"; } - bind "s" { NewPane "stacked"; SwitchToMode "Locked"; } - bind "r" { SwitchToMode "RenamePane"; } - } - - tab { - bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "h" "Left" "Up" "k" { GoToPreviousTab; } - bind "l" "Right" "Down" "j" { GoToNextTab; } - bind "n" { NewTab; SwitchToMode "Normal"; } - bind "x" { CloseTab; SwitchToMode "Normal"; } - bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; } - bind "b" { BreakPane; SwitchToMode "Normal"; } - bind "]" { BreakPaneRight; SwitchToMode "Normal"; } - bind "[" { BreakPaneLeft; SwitchToMode "Normal"; } - bind "1" { GoToTab 1; SwitchToMode "Normal"; } - bind "2" { GoToTab 2; SwitchToMode "Normal"; } - bind "3" { GoToTab 3; SwitchToMode "Normal"; } - bind "4" { GoToTab 4; SwitchToMode "Normal"; } - bind "5" { GoToTab 5; SwitchToMode "Normal"; } - bind "6" { GoToTab 6; SwitchToMode "Normal"; } - bind "7" { GoToTab 7; SwitchToMode "Normal"; } - bind "8" { GoToTab 8; SwitchToMode "Normal"; } - bind "9" { GoToTab 9; SwitchToMode "Normal"; } - bind "Tab" { ToggleTab; } - } - - renamepane { - bind "Ctrl c" "Enter" { SwitchToMode "Locked"; } - bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; } - } - - renametab { - bind "Ctrl c" "Enter" { SwitchToMode "Locked"; } - bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; } - } - - scroll { - bind "e" { EditScrollback; SwitchToMode "Locked"; } - bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; } - bind "Ctrl c" "Esc" { ScrollToBottom; SwitchToMode "Locked"; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - } - - entersearch { - bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; } - bind "Enter" { SwitchToMode "Search"; } - } - - search { - bind "Ctrl c" { ScrollToBottom; SwitchToMode "Locked"; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "n" { Search "down"; } - bind "p" { Search "up"; } - bind "c" { SearchToggleOption "CaseSensitivity"; } - bind "w" { SearchToggleOption "Wrap"; } - bind "o" { SearchToggleOption "WholeWord"; } - } - - tmux { } -} - -theme "winterly" -themes { - winterly { - text_unselected { - base 255 255 255 - background 15 11 21 - emphasis_0 245 194 231 - emphasis_1 166 227 161 - emphasis_2 137 220 235 - emphasis_3 250 179 135 - } - text_selected { - base 205 214 244 - background 87 36 84 - emphasis_0 250 179 135 - emphasis_1 137 220 235 - emphasis_2 166 227 161 - emphasis_3 245 194 231 - } - ribbon_selected { - base 15 11 21 - background 175 133 234 - emphasis_0 252 193 182 - emphasis_1 191 138 159 - emphasis_2 53 175 191 - emphasis_3 197 127 175 - } - ribbon_unselected { - base 128 124 159 - background 29 32 47 - emphasis_0 252 193 182 - emphasis_1 191 138 159 - emphasis_2 53 175 191 - emphasis_3 197 127 175 - } - table_title { - base 255 255 255 - background 15 11 21 - emphasis_0 250 179 135 - emphasis_1 137 220 235 - emphasis_2 166 227 161 - emphasis_3 245 194 231 - } - table_cell_selected { - base 205 214 244 - background 87 36 84 - emphasis_0 250 179 135 - emphasis_1 137 220 235 - emphasis_2 166 227 161 - emphasis_3 245 194 231 - } - table_cell_unselected { - base 255 255 255 - background 15 11 21 - emphasis_0 250 179 135 - emphasis_1 137 220 235 - emphasis_2 166 227 161 - emphasis_3 245 194 231 - } - list_selected { - base 205 214 244 - background 87 36 84 - emphasis_0 250 179 135 - emphasis_1 137 220 235 - emphasis_2 166 227 161 - emphasis_3 245 194 231 - } - list_unselected { - base 255 255 255 - background 15 11 21 - emphasis_0 250 179 135 - emphasis_1 137 220 235 - emphasis_2 166 227 161 - emphasis_3 245 194 231 - } - frame_selected { - base 197 127 175 - background 0 - emphasis_0 0 - emphasis_1 0 - emphasis_2 0 - emphasis_3 0 - } - frame_unselected { - base 128 124 159 - background 0 - emphasis_0 0 - emphasis_1 0 - emphasis_2 0 - emphasis_3 0 - } - frame_highlight { - base 197 127 175 - background 0 - emphasis_0 0 - emphasis_1 0 - emphasis_2 0 - emphasis_3 0 - } - exit_code_success { - base 154 - background 238 - emphasis_0 51 - emphasis_1 16 - emphasis_2 201 - emphasis_3 45 - } - exit_code_error { - base 255 106 122 - background 0 - emphasis_0 0 - emphasis_1 0 - emphasis_2 0 - emphasis_3 0 - } - multiplayer_user_colors { - player_1 201 - player_2 45 - player_3 99 - player_4 226 - player_5 51 - player_6 136 - player_7 124 - player_8 245 - player_9 207 - player_10 215 - } - } -} - -plugins { - about location="zellij:about" - compact-bar location="zellij:compact-bar" { - tooltip "F1" - } - configuration location="zellij:configuration" - filepicker location="zellij:strider" { - cwd "/" - } - plugin-manager location="zellij:plugin-manager" - session-manager location="zellij:session-manager" - status-bar location="zellij:status-bar" - strider location="zellij:strider" - tab-bar location="zellij:tab-bar" - welcome-screen location="zellij:session-manager" { - welcome_screen false - } -} - -load_plugins { - "https://github.com/dj95/zjstatus/releases/latest/download/zjstatus.wasm" -} - -default_mode "locked" -default_shell "fish" -default_layout "compact" -pane_frames true -scroll_buffer_size 100000 -copy_on_select true -attach_to_session true -session_name "default" -session_serialization true -pane_viewport_serialization true -web_server false -show_startup_tips false diff --git a/bak/modules/zellij/default.nix b/bak/modules/zellij/default.nix deleted file mode 100644 index fafe586..0000000 --- a/bak/modules/zellij/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, pkgs, ... }: -{ - xdg.configFile."zellij/config.kdl" = { - source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/zellij/config.kdl"; - }; - - # xdg.configFile."zellij/layouts/default.kdl" = { - # source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/zellij/layouts/default.kdl"; - # }; - - programs.zellij = { - enable = true; - enableFishIntegration = true; - }; -} diff --git a/bak/modules/zen/default.nix b/bak/modules/zen/default.nix deleted file mode 100644 index 7367d30..0000000 --- a/bak/modules/zen/default.nix +++ /dev/null @@ -1,311 +0,0 @@ -{ - inputs, - pkgs, - system, - ... -}: - -{ - programs.zen-browser = { - enable = true; - nativeMessagingHosts = [ pkgs.firefoxpwa ]; - policies = { - AutofillAddressEnabled = true; - AutofillCreditCardEnabled = false; - DisableAppUpdate = true; - DisableFeedbackCommands = true; - DisableFirefoxStudies = true; - DisablePocket = true; - DisableTelemetry = true; - DontCheckDefaultBrowser = true; - NoDefaultBookmarks = true; - OfferToSaveLogins = false; - EnableTrackingProtection = { - Value = true; - Locked = true; - Cryptomining = true; - Fingerprinting = true; - }; - }; - profiles.default = - let - containers = { - Personal = { - color = "purple"; - icon = "fingerprint"; - id = 1; - }; - }; - spaces = { - "Personal" = { - id = "53d805fa-2cc1-44b5-929b-a72cc83d9587"; - position = 1000; - container = containers."Personal".id; - theme = { - type = "gradient"; - texture = 0.7; - opacity = 0.8; - colors = [ - { - red = 87; - green = 36; - blue = 84; - } - { - red = 51; - green = 21; - blue = 49; - } - ]; - }; - }; - }; - pins = { - "Home" = { - id = "245843da-9cc4-4c78-ad43-ea7d9139838b"; - workspace = spaces.Personal.id; - container = containers.Personal.id; - url = "https://home.dnsc.io"; - position = 101; - }; - "Apps" = { - id = "092abc24-d7c5-4012-b311-d4ee0b193537"; - workspace = spaces.Personal.id; - container = containers.Personal.id; - isGroup = true; - isFolderCollapsed = true; - editedTitle = true; - position = 200; - }; - "Mail" = { - id = "746d2753-f042-4050-89b3-d2e5f1697a90"; - workspace = spaces.Personal.id; - container = containers.Personal.id; - folderParentId = pins."Apps".id; - url = "https://app.fastmail.com/mail/Inbox/?u=b88140d0"; - position = 201; - }; - "Finance" = { - id = "02bad3d7-7a88-4ca2-8b29-ced5f9956ac6"; - workspace = spaces.Personal.id; - container = containers.Personal.id; - folderParentId = pins."Apps".id; - url = "https://finance.dnsc.io/"; - position = 202; - }; - "Codeberg" = { - id = "c79480bb-ad11-4bd4-b4a2-f6d9a1790278"; - workspace = spaces.Personal.id; - container = containers.Personal.id; - folderParentId = pins."Apps".id; - url = "https://codeberg.org/dnscio"; - position = 203; - }; - "Github" = { - id = "811448b3-ac9b-4f56-b7c1-f0d5b1d25b62"; - workspace = spaces.Personal.id; - container = containers.Personal.id; - folderParentId = pins."Apps".id; - url = "https://github.com/"; - position = 204; - }; - "Entertainment" = { - id = "969167a2-c586-4382-a6f8-a5f17df43b51"; - workspace = spaces.Personal.id; - container = containers.Personal.id; - isGroup = true; - isFolderCollapsed = true; - editedTitle = true; - folderParentId = pins."Entertainment".id; - position = 300; - }; - "Twitch" = { - id = "043a9077-ce81-4f6d-8f61-d2947c675eef"; - workspace = spaces.Personal.id; - container = containers.Personal.id; - url = "https://www.twitch.tv/directory/following"; - folderParentId = pins."Entertainment".id; - position = 301; - }; - "Youtube" = { - id = "54b399ae-1106-4b91-9e2c-893e9114c215"; - workspace = spaces.Personal.id; - container = containers.Personal.id; - folderParentId = pins."Entertainment".id; - url = "https://www.youtube.com/feed/subscriptions"; - position = 302; - }; - "Nix" = { - id = "02329197-7617-42e0-bc9a-1d09415ef10c"; - workspace = spaces.Personal.id; - container = containers.Personal.id; - isGroup = true; - isFolderCollapsed = true; - editedTitle = true; - position = 400; - }; - "Packages" = { - id = "c79480bb-ad11-4bd4-b4a2-f6d9a1790278"; - workspace = spaces.Personal.id; - container = containers.Personal.id; - folderParentId = pins."Nix".id; - url = "https://search.nixos.org/packages"; - position = 401; - }; - "Options" = { - id = "63930b7a-d423-4a74-8edb-0179b9c9902e"; - workspace = spaces.Personal.id; - container = containers.Personal.id; - folderParentId = pins."Nix".id; - url = "https://search.nixos.org/options"; - position = 402; - }; - "Home Manager" = { - id = "97194c72-9ab9-4310-90f8-397fd7ce626a"; - workspace = spaces.Personal.id; - container = containers.Personal.id; - folderParentId = pins."Nix".id; - url = "https://home-manager-options.extranix.com"; - position = 403; - }; - }; - in - { - containersForce = true; - pinsForce = true; - spacesForce = true; - inherit containers pins spaces; - - settings = { - "layout.css.prefers-color-scheme.content-override" = 0; - }; - - search = { - default = "google"; - force = true; - engines = { - nix-packages = { - name = "Nix Packages"; - urls = [ - { - template = "https://search.nixos.org/packages"; - params = [ - { - name = "type"; - value = "packages"; - } - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@np" ]; - }; - - nix-options = { - name = "Nix Options"; - urls = [ - { - template = "https://search.nixos.org/options"; - params = [ - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@no" ]; - }; - - nix-home-manager = { - name = "Nix Home Manager"; - urls = [ - { - template = "https://home-manager-options.extranix.com"; - params = [ - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@nh" ]; - }; - - nix-wiki = { - name = "Nix Wiki"; - urls = [ - { - template = "https://wiki.nixos.org/w/index.php"; - params = [ - { - name = "search"; - value = "{searchTerms}"; - } - ]; - } - ]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@nw" ]; - }; - }; - }; - - extensions.packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [ - ublock-origin - dearrow - bitwarden - sponsorblock - vimium - ]; - }; - }; - - xdg.mimeApps = - let - value = - let - zen-browser = inputs.zen-browser.packages.${system}.beta; # or twilight - in - zen-browser.meta.desktopFileName; - - associations = builtins.listToAttrs ( - map - (name: { - inherit name value; - }) - [ - "application/x-extension-shtml" - "application/x-extension-xhtml" - "application/x-extension-html" - "application/x-extension-xht" - "application/x-extension-htm" - "x-scheme-handler/unknown" - "x-scheme-handler/mailto" - "x-scheme-handler/chrome" - "x-scheme-handler/about" - "x-scheme-handler/https" - "x-scheme-handler/http" - "application/xhtml+xml" - "application/json" - "text/plain" - "text/html" - ] - ); - in - { - associations.added = associations; - defaultApplications = associations; - }; -} diff --git a/bak/modules/zoxide/default.nix b/bak/modules/zoxide/default.nix deleted file mode 100644 index 1c20b97..0000000 --- a/bak/modules/zoxide/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - programs.zoxide = { - enable = true; - enableFishIntegration = true; - }; -} diff --git a/bak/secrets/restic/password.age b/bak/secrets/restic/password.age deleted file mode 100644 index fff06c2..0000000 --- a/bak/secrets/restic/password.age +++ /dev/null @@ -1,9 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 JIw3cQ u0VpHg/TVASeIVR7/mfbllXrlM71vNpqQhgnfya6vQY -HKopl3RT1S2+W1Sb95eFUhdH4Fh35KS5l6KLYyfdw/Y --> ssh-ed25519 HufN+g Vfe9hzCZm69hjyk9S0/ZFbVkuvTe3nGbNw9BZfuiiAM -4H1Nfgd8usdv34RuCf3R3J+jyqHj4rnbNHmgkav7VDs --> ssh-ed25519 cTYF0w H4NeFzgk/mTkEe6uPXutoh6r6wfpNS0SNJYUi1VNRgg -AAjgzAkbXLXBVLtMZAPfXOfgGnpgsF6DvH1BK/vW6E0 ---- rEeM9TuloOX1HuwGmtdxk+Mi+NnWYsHndCStBbCqSh4 -aǓ][&[|er'EZB?Hv4MrM E1fJrƫ% \ No newline at end of file diff --git a/bak/secrets/secrets.nix b/bak/secrets/secrets.nix deleted file mode 100644 index cedfc8a..0000000 --- a/bak/secrets/secrets.nix +++ /dev/null @@ -1,26 +0,0 @@ -let - dnsc-air = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILvXWZOPOJJDAoF+Sx/ZLoAVu6G/7/MAWoknBgMAzjul dennis@dnsc-mac"; - dnsc-vps-sm = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF/sUA38t7TI1LYADLBn898Hh0MTR4maiHVwEtDoN9W5 dnsc-vps-sm"; - dnsc-server = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM3mkEgvHrwjsEReHQHpLbMP71JLvp6XxMPyW7PTaLCd dennis@dnsc-server"; - systems = [ - dnsc-air - dnsc-vps-sm - dnsc-server - ]; -in -{ - # Add like this: "secret1.age".publicKeys = systems; - "vaultwarden/env.age".publicKeys = systems; - "restic/password.age".publicKeys = systems; -} - -# 1. Create a file with secret -# nix run github:ryantm/agenix -- -e $FILE_PATH -# -# 2. Reference the file in NixOS config: -# { -# age.secrets.secret1.file = ../secrets/secret1.age; -# } -# -# 3. And use it like this: -# passwordFile = config.age.secrets.secret1.path; diff --git a/bak/secrets/vaultwarden/env.age b/bak/secrets/vaultwarden/env.age deleted file mode 100644 index 0f8206836ddcb4423bf7d729e04f809cddc60d64..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 616 zcmYdHPt{G$OD?J`D9Oyv)5|YP*Do{V(zR14F3!+RO))YxHMCUl@+>z_4pi_iF;3Ig zwy-ERtgI+vH63iFIC^slPYch)a6 zEDbR;bWL{6@HY*0cJ;|O3NrI4clPpkO*N}&_B#4%QC4lt1>;& zFUip{x1zkNQolH?BtOK_Gr-t6vl!jBt{otbflHfo;rz%4OgRIij z0Cz)oA4`+6NUzEiKd)dnUv2M<@@%f$G&2K(WY_$hlB~RlaPPn>ZPQ4jtYA;?AdjHR zh)5UHbjy^eN|)@!0$(m&U0ns|kir7zQon-4@|2SFKm$w9qTqrm)8xbguOwrC@5<5w zGasKIH}`;yELX0YJ;B5UZwu{op~>IZK=L| iwyA%IS>V>sTVm>THFi~o8?92R{IvLlfyy;Gp;7?2lILvz diff --git a/bak/server-files/account.sqlite b/bak/server-files/account.sqlite deleted file mode 100644 index 0adbb2556e88396e503c571a976939ac132cea4e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 61440 zcmWFz^vNtqRY=P(%1ta$FlG>7U}R))P*7lCU|?flVBlv!06qo=1{MUDff0#~i^;~I z*CoWu^M!$rBZ7f1fIpNYg6{^eDsK-@GS46GY5W_xHt@G`HgZ+sGGJ7EGz3ONU^E0q zLtr!nMnhoegg}!TE4#S3IAe=;Nn%n?YFcJaYB88#a}IKK3~^Nmadh%=RR9ZdDS&}S zW{N_HYea}bK#-@eV^E}mw`-&hR8AqiD8IBI9;yN^T3nfz9AB1NRGgWgrx5Jx=;Pz* z7Xp_}%}Xw-EGUW3O)W_Tn~Wioomz=*BurCrVonKmO(m(tXfi3OIjJS7DGE;h{ywgb zehMzGZjPZoAqsAeKEbYVOY;(QQz0fQya5&4%EBDlJYeicd^V zPAx7*V)CH`8j=Jwcr?I5XkGz@EqaI{1+4;1lMXl*;xkh;VNP}P4|4T%_X9-$T$QFm zkgJ<(kgK1wYp?>yx?&AnI-nM#=m3dlUb4)pIBOw z59Y^%EPw_>yde^YzcHB?oUWQx;lTwCsA3+BAS#AhrJ#T}Wq~~tkBA(&u9VE;f}F%k zY*Iz}Inbztt4_@WrSlX8PrndXch?{VKmQN~zfd0^cw#Vwg{}fL`f;i>&}{VLW*4`% zW^97wo`Tf8l+3*J`22#@yv&sNqSV6D)Z&t29KuW}A%Q~?)ZH4zC5a^vuVBk|$@wX% zp!}7YmI+O-Fi#YvmXsFd#g`W4fRiyyIJKf6v#2t@Br`V^7806`e4Om!qN0qA_24K= zEG@|ZVJ;MBDuINQpsrF-(8x_K$;ii39w^|6oz#kwqQv-=L|Cp@NK7utEJHYmcQ*qE zs3cYAViUI(#gzm>4vIGfk=&{5?BdeWjE#z54-}^+7p0aILn#gvZ$JeVG@w3#Co62B zTb7tpnyTRB_f*n1mG z8UmvsFd71*Aut*OqaiRF0;3@?8UmvsFd71*A%G_YM(6+W1kR|`Xb6mkz-S1JhQMeD zjE2By2#kinXb6mkz-S1JhQMeD43iKTo&O&u5jpCO(GVC7fzc2c4S~@R7!85Z5Eu=C z(GVC7fzc2c4S~@Rz!L(a^Z$4PXH;r51V%$(Gz3ONU^E0qLtr!nMnhmU1V%$(Gz3ON zU^E1VNeF=E{~7tuG4P)oCLS8~#%KtPhQMeDjE2By2#kinXb6mkz-S1JhQMeDjE2By z2n_oWFkoa4<>eLU;q@igQFoZ8UmvsFd71*Aut*OqaiRF0;3@?8UmvsFd71*Au#Mh zK%F_1s6hbG{6B-hu=D Date: Tue, 3 Mar 2026 21:55:58 +0100 Subject: [PATCH 07/77] migrates system shell --- modules/hosts/dnsc-machine/default.nix | 4 ++++ modules/shell/default.nix | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 modules/shell/default.nix diff --git a/modules/hosts/dnsc-machine/default.nix b/modules/hosts/dnsc-machine/default.nix index b881602..79c9133 100644 --- a/modules/hosts/dnsc-machine/default.nix +++ b/modules/hosts/dnsc-machine/default.nix @@ -6,7 +6,11 @@ in flake.nixosConfigurations.dnsc-machine = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = with config.flake.modules.nixos; [ + # Modules base + shell + + # Machine-specific configuration { imports = [ ./_hardware-configuration.nix ]; networking.hostName = hostname; diff --git a/modules/shell/default.nix b/modules/shell/default.nix new file mode 100644 index 0000000..7381939 --- /dev/null +++ b/modules/shell/default.nix @@ -0,0 +1,18 @@ +{ + ... +}: +{ + flake.modules.nixos.shell = + { pkgs, ... }: + { + programs.fish.enable = true; + users.defaultUserShell = pkgs.fish; + }; + + flake.modules.darwin.shell = + { pkgs, ... }: + { + programs.fish.enable = true; + users.defaultUserShell = pkgs.fish; + }; +} From 2c8c977d28994be13208dd40695bf34ecdf5e014 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 21:59:22 +0100 Subject: [PATCH 08/77] moves home manager shell config --- modules/shell/default.nix | 250 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 250 insertions(+) diff --git a/modules/shell/default.nix b/modules/shell/default.nix index 7381939..90287a1 100644 --- a/modules/shell/default.nix +++ b/modules/shell/default.nix @@ -1,4 +1,5 @@ { + inputs, ... }: { @@ -7,6 +8,10 @@ { programs.fish.enable = true; users.defaultUserShell = pkgs.fish; + + home-manager.sharedModules = [ + inputs.self.modules.homeManager.shell + ]; }; flake.modules.darwin.shell = @@ -14,5 +19,250 @@ { programs.fish.enable = true; users.defaultUserShell = pkgs.fish; + + home-manager.sharedModules = [ + inputs.self.modules.homeManager.shell + ]; + }; + + flake.modules.homeManager.shell = + { pkgs, ... }: + { + programs.fish = { + enable = true; + functions = { + ff = "bash ${./ff.bash}"; + fish_greeting = "fortune -a"; + localip = "ifconfig | grep \"inet \" | grep -v 127.0.0.1 | awk '{print $2}' | head -n 1"; + publicip = "curl -4 ifconfig.me"; + enter_vps = "ssh dnsc-vps-sm -t tmux new -As main"; + rebuild_vps = "ssh -t dnsc-vps-sm 'cd ~/nix-config && git pull && sudo just deploy'"; + enter_server = "ssh dnsc-server -t tmux new -As main"; + rebuild_server = "ssh -t dnsc-server 'cd ~/nix-config && git pull && sudo just deploy'"; + kill_tunnels = /* fish */ '' + ps -o pid,command | grep "^[0-9]\{4,5\} ssh -fNL" | awk '{print $1}' | xargs kill -9 + ''; + dbui = '' + uvx --with PyMySQL --with sqlit-tui[ssh] --from sqlit-tui@1.2.11 sqlit + ''; + dev_projects = /* fish */ '' + if test "$hn" = "dnsc-work" + begin + fd . ~/dev/ride/apps/backend/edge-services -t d -d 1; + fd . ~/dev/ride/apps/backend/backend-services -t d -d 1; + fd . ~/dev/ride/apps/frontend/projects -t d -d 1; + fd . ~/dev/ride/apps/native -t d -d 1; + fd . ~/dev/ride/packages -t d -d 1; + fd . ~/dev -t d -d 1; + echo "$HOME/dev/ride/apps/frontend"; + echo "$HOME/dev/ride/apps/lib"; + echo "$HOME/dev/ride/apps/packages"; + end + else + begin + echo "$HOME/notes" + fd . ~/dev -t d -d 1 + end + end + ''; + cdd = /* fish */ '' + set folder (dev_projects | fzf) + cd $folder + ''; + cdr = /* fish */ '' + set folder (dev_projects | fzf) + cd $folder + + if test -n "$folder" + set service (basename $folder) + cd $folder + + if test -f "package.json" + set script_cmd (jq -r '.scripts | to_entries | .[] | "\(.key): \(.value)"' package.json | fzf) + + if test -n "$script_cmd" + set script_name (string split ": " $script_cmd)[1] + if test -n "$script_name" + echo "Running: npm run $script_name" + npm run $script_name + end + end + end + end + ''; + sessionizer = /* fish */ '' + set -l selected (tmuxinator ls -n | tail -n +2 | fzf --prompt " switch to >> ") + + if test -z "$selected" + return 1 + end + + tmuxinator start "$selected" + ''; + tmux_sessionizer = /* fish */ '' + tmux display-popup -h 50% -w 80% -E sessionizer + ''; + nn = /* fish */ '' + # Require a title argument + if test (count $argv) -lt 1 + echo "Usage: nn \"My Note\"" + return 1 + end + + # Join all arguments into single title (preserves spaces inside quotes) + set -l title $argv[1] + + # Timestamp up to minutes, format: YYYY-MM-DD_HH-MM + set -l ts (date "+%Y%m%d%H%M") + + # Normalize title: lowercase, replace spaces with hyphens, remove/replace + # characters unsafe for filenames (keep a-z0-9- and replace others with -) + set -l slug (string lower -- $title) + # Replace any sequence of non-alphanumeric characters with single hyphen + set -l slug (echo $slug | sed -E 's/[^a-z0-9]+/-/g' | sed -E 's/^-|-$//g') + + # Compose filename + set -l filename "$ts"_"$slug.md" + + # Directory for notes (change if you prefer another path) + set -l notes_dir ~/dev/notes + + # Ensure directory exists + test -d $notes_dir; or mkdir -p $notes_dir + + # Full path + set -l fullpath "$notes_dir/$filename" + + # If file doesn't exist, create with timestamp and title at top + if not test -f $fullpath + # Human-friendly timestamp line (no seconds) + set -l display_ts (date "+%Y-%m-%d %H:%M") + printf "---\nCREATED_AT: %s\n---\n\n# %s\n\n" "$display_ts" "$title" > $fullpath + end + + # Open file in neovim + nvim $fullpath + ''; + fish_mode_prompt = /* fish */ '' + switch $fish_bind_mode + case default + set_color --bold brcyan + echo '[N] ' + case insert + set_color --bold brgreen + echo '[I] ' + case replace_one + set_color --bold yellow + echo '[R] ' + case replace + set_color --bold bryellow + echo '[R] ' + case visual + set_color --bold brmagenta + echo '[V] ' + case '*' + set_color --bold red + echo '[?] ' + end + set_color normal + ''; + setup_winterly_theme_colors = /* fish */ '' + set --universal fish_color_autosuggestion brblack # autosuggestions + set --universal fish_color_command brwhite # commands + set --universal fish_color_comment brblack # code comments + set --universal fish_color_cwd brblack # current working directory in the default prompt + set --universal fish_color_end brblack # process separators like ';' and '&' + set --universal fish_color_error brwhite # highlight potential errors + set --universal fish_color_escape brblack # highlight character escapes like '\n' and '\x70' + set --universal fish_color_match yellow # highlight matching parenthesis + set --universal fish_color_normal brwhite # default color + set --universal fish_color_operator brblack # parameter expansion operators like '*' and '~' + set --universal fish_color_param bryellow # regular command parameters + set --universal fish_color_quote brmagenta # quoted blocks of text + set --universal fish_color_redirection brwhite # IO redirections + set --universal fish_color_search --bold --background=black --foreground=bryellow + set --universal fish_color_search_match --background black # highlight history search matches and the selected pager item (must be a background) + set --universal fish_pager_color_selected_background --background black --foreground brmagenta + set --universal fish_pager_color_progress --foreground=brwhite --background=black + set --universal fish_color_selection --background magenta # when selecting text (in vi visual mode) + set --universal fish_color_cancel brblack # the '^C' indicator on a canceled command + set --universal fish_color_host brwhite # current host system in some of fish default prompts + set --universal fish_color_host_remote yellow #ayu:syntax.constant current host system in some of fish default prompts, if fish is running remotely (via ssh or similar) + set --universal fish_color_user brwhite # current username in some of fish default prompts + ''; + setup_homebrew = /* fish */ '' + fish_add_path /opt/homebrew/bin + + if test -d (brew --prefix)"/share/fish/completions" + set -p fish_complete_path (brew --prefix)/share/fish/completions + end + + if test -d (brew --prefix)"/share/fish/vendor_completions.d" + set -p fish_complete_path (brew --prefix)/share/fish/vendor_completions.d + end + ''; + setup_path = /* fish */ '' + fish_add_path /run/wrappers/bin + fish_add_path /run/current-system/sw/bin + fish_add_path $HOME/.nix-profile/bin + + if test "$(uname)" = "Darwin" + fish_add_path /nix/var/nix/profiles/default/bin + setup_homebrew + end + ''; + setup_env = /* fish */ '' + for line in (cat $HOME/.env | grep -v '^#') + set item (string split -m 1 '=' $line) + set -gx $item[1] $item[2] + end + ''; + setup_work = /* fish */ '' + fish_add_path $ANDROID_HOME/emulator + fish_add_path $ANDROID_HOME/platform-tools + fish_add_path $HOME/.local/share/uv/tools + rbenv init - | source + fnm env --use-on-cd --shell fish | source + ''; + }; + + interactiveShellInit = /* fish */ '' + # Set some global values + set -x GPG_TTY (tty) + set hn (prompt_hostname) + + fish_vi_key_bindings insert + fish_vi_cursor xterm + + setup_winterly_theme_colors + setup_env + setup_path + + if test "$hn" = "dnsc-work" + setup_work + end + + # Custom init + direnv hook fish | source + + # Auto start tmux + if status is-interactive; and not set -q TMUX + if tmux list-sessions >/dev/null 2>&1 + # Attach to the first available session + tmux a + else + # Create a new session + tmux new-session -t main + end + end + ''; + + shellAbbrs = { + lg = "lazygit"; + gg = "lazygit"; + g = "git"; + frc = "source ~/.config/fish/**/*.fish"; + }; + }; }; } From d44b7ebdaa83690176b0acca1a4b7313fc7f0dce Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 22:08:29 +0100 Subject: [PATCH 09/77] updates home manager config --- modules/home-manager/default.nix | 25 +++++++++++++++++ modules/hosts/dnsc-air/default.nix | 38 -------------------------- modules/hosts/dnsc-machine/default.nix | 1 + modules/shell/default.nix | 1 - 4 files changed, 26 insertions(+), 39 deletions(-) create mode 100644 modules/home-manager/default.nix delete mode 100644 modules/hosts/dnsc-air/default.nix diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix new file mode 100644 index 0000000..385eace --- /dev/null +++ b/modules/home-manager/default.nix @@ -0,0 +1,25 @@ +{ inputs, config, ... }: +let + username = config.flake.globalConfig.username; + hmConfig = { + useGlobalPkgs = true; + useUserPackages = true; + backupFileExtension = "backup"; + users.${username}.home.stateVersion = "24.11"; + }; +in +{ + flake.modules.nixos.home-manager = + { ... }: + { + imports = [ inputs.home-manager.nixosModules.home-manager ]; + home-manager = hmConfig; + }; + + flake.modules.darwin.home-manager = + { ... }: + { + imports = [ inputs.home-manager.darwinModules.home-manager ]; + home-manager = hmConfig; + }; +} diff --git a/modules/hosts/dnsc-air/default.nix b/modules/hosts/dnsc-air/default.nix deleted file mode 100644 index 2f2c661..0000000 --- a/modules/hosts/dnsc-air/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - inputs, - config, - ... -}: -let - hostname = "dnsc-air"; - username = config.flake.globalConfig.username; -in -{ - flake.darwinConfigurations.dnsc-air = inputs.nix-darwin.lib.darwinSystem { - system = "aarch64-darwin"; - specialArgs = { inherit inputs; }; - modules = [ - inputs.home-manager.darwinModules.home-manager - config.flake.modules.darwin.base - { - networking.hostName = "${hostname}"; - networking.computerName = "${hostname}"; - users.users.${username}.home = "/Users/${username}"; - nix.enable = false; - nix.settings.experimental-features = [ - "nix-command" - "flakes" - ]; - - home-manager = { - useGlobalPkgs = true; - backupFileExtension = "backup"; - users.${username} = { - imports = [ config.flake.modules.homeManager.neovim ]; - home.stateVersion = "24.11"; - }; - }; - } - ]; - }; -} diff --git a/modules/hosts/dnsc-machine/default.nix b/modules/hosts/dnsc-machine/default.nix index 79c9133..0a714cc 100644 --- a/modules/hosts/dnsc-machine/default.nix +++ b/modules/hosts/dnsc-machine/default.nix @@ -7,6 +7,7 @@ in system = "x86_64-linux"; modules = with config.flake.modules.nixos; [ # Modules + home-manager base shell diff --git a/modules/shell/default.nix b/modules/shell/default.nix index 90287a1..a734158 100644 --- a/modules/shell/default.nix +++ b/modules/shell/default.nix @@ -31,7 +31,6 @@ programs.fish = { enable = true; functions = { - ff = "bash ${./ff.bash}"; fish_greeting = "fortune -a"; localip = "ifconfig | grep \"inet \" | grep -v 127.0.0.1 | awk '{print $2}' | head -n 1"; publicip = "curl -4 ifconfig.me"; From 95fd98e0ae85e1df84ca06af9e863945247c4424 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 22:36:18 +0100 Subject: [PATCH 10/77] migrates config further --- modules/desktop/default.nix | 17 +++++++++++++++++ modules/drawing-tablet/default.nix | 10 ++++++++++ modules/gaming/default.nix | 8 ++++++++ modules/hosts/dnsc-machine/default.nix | 6 ++++-- modules/nvidia-graphics/default.nix | 20 ++++++++++++++++++++ modules/printing/default.nix | 13 +++++++++++++ 6 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 modules/desktop/default.nix create mode 100644 modules/drawing-tablet/default.nix create mode 100644 modules/gaming/default.nix create mode 100644 modules/nvidia-graphics/default.nix create mode 100644 modules/printing/default.nix diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix new file mode 100644 index 0000000..b288dc5 --- /dev/null +++ b/modules/desktop/default.nix @@ -0,0 +1,17 @@ +{ ... }: +{ + flake.modules.nixos.desktop = + { pkgs, ... }: + { + services.displayManager.cosmic-greeter.enable = true; + services.desktopManager.cosmic.enable = true; + services.system76-scheduler.enable = true; + + environment.cosmic.excludePackages = with pkgs; [ + cosmic-term + ]; + }; + + # TODO: Persist ~/.config/cosmic after setup + # and symlink it with home manager +} diff --git a/modules/drawing-tablet/default.nix b/modules/drawing-tablet/default.nix new file mode 100644 index 0000000..aa10c00 --- /dev/null +++ b/modules/drawing-tablet/default.nix @@ -0,0 +1,10 @@ +{ ... }: +{ + flake.modules.nixos.drawing-tablet = + { pkgs, ... }: + { + hardware.opentabletdriver.enable = true; + hardware.uinput.enable = true; + boot.kernelModules = [ "uinput" ]; + }; +} diff --git a/modules/gaming/default.nix b/modules/gaming/default.nix new file mode 100644 index 0000000..b9282de --- /dev/null +++ b/modules/gaming/default.nix @@ -0,0 +1,8 @@ +{ ... }: +{ + flake.modules.nixos.gaming = + { pkgs, ... }: + { + programs.gamemode.enable = true; + }; +} diff --git a/modules/hosts/dnsc-machine/default.nix b/modules/hosts/dnsc-machine/default.nix index 0a714cc..60d71a1 100644 --- a/modules/hosts/dnsc-machine/default.nix +++ b/modules/hosts/dnsc-machine/default.nix @@ -6,12 +6,14 @@ in flake.nixosConfigurations.dnsc-machine = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = with config.flake.modules.nixos; [ - # Modules home-manager base + nvidia-graphics + graphics-tablet + printing shell + desktop - # Machine-specific configuration { imports = [ ./_hardware-configuration.nix ]; networking.hostName = hostname; diff --git a/modules/nvidia-graphics/default.nix b/modules/nvidia-graphics/default.nix new file mode 100644 index 0000000..b5f397f --- /dev/null +++ b/modules/nvidia-graphics/default.nix @@ -0,0 +1,20 @@ +{ config, ... }: +{ + flake.modules.nixos.nvidia-graphics = + { pkgs, ... }: + { + services.xserver.videoDrivers = [ "nvidia" ]; + hardware = { + graphics.enable = true; + nvidia = { + modesetting.enable = true; + powerManagement.enable = false; + powerManagement.finegrained = false; + open = true; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; + }; + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + }; +} diff --git a/modules/printing/default.nix b/modules/printing/default.nix new file mode 100644 index 0000000..e7ef6cb --- /dev/null +++ b/modules/printing/default.nix @@ -0,0 +1,13 @@ +{ ... }: +{ + flake.modules.nixos.printing = + { pkgs, ... }: + { + services.printing.enable = true; + services.avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + }; +} From fc2234ae2105238b28e931f744ee8d9ba7c839cd Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 22:41:31 +0100 Subject: [PATCH 11/77] migrate gaming --- modules/gaming/default.nix | 20 ++++++++++++++++++++ modules/hosts/dnsc-machine/default.nix | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/modules/gaming/default.nix b/modules/gaming/default.nix index b9282de..1f60277 100644 --- a/modules/gaming/default.nix +++ b/modules/gaming/default.nix @@ -4,5 +4,25 @@ { pkgs, ... }: { programs.gamemode.enable = true; + programs.gamescope.enable = true; + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + protontricks.enable = true; + + extraCompatPackages = with pkgs; [ + proton-ge-bin + ]; + extraPackages = with pkgs; [ + gamescope + ]; + }; + + environment.systemPackages = with pkgs; [ + lutris + steam-run + gamescope + mangohud + ]; }; } diff --git a/modules/hosts/dnsc-machine/default.nix b/modules/hosts/dnsc-machine/default.nix index 60d71a1..6860343 100644 --- a/modules/hosts/dnsc-machine/default.nix +++ b/modules/hosts/dnsc-machine/default.nix @@ -9,10 +9,11 @@ in home-manager base nvidia-graphics - graphics-tablet + drawing-tablet printing shell desktop + gaming { imports = [ ./_hardware-configuration.nix ]; From 8363764798af261b111033c37c7a46b19816e6c2 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 22:58:48 +0100 Subject: [PATCH 12/77] migrates even more things --- modules/base/default.nix | 2 +- modules/cli-tools/default.nix | 32 ++++++++++++++++++++++++++ modules/gaming/default.nix | 1 + modules/hosts/dnsc-machine/default.nix | 4 +++- modules/nix/default.nix | 29 +++++++++++++++++++++++ modules/nvidia-graphics/default.nix | 5 ++-- 6 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 modules/cli-tools/default.nix create mode 100644 modules/nix/default.nix diff --git a/modules/base/default.nix b/modules/base/default.nix index c0dc000..43efccb 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, pkgs, ... }: let username = config.flake.globalConfig.username; in diff --git a/modules/cli-tools/default.nix b/modules/cli-tools/default.nix new file mode 100644 index 0000000..d5ba546 --- /dev/null +++ b/modules/cli-tools/default.nix @@ -0,0 +1,32 @@ +{ ... }: +let + commonPackages = + pkgs: with pkgs; [ + neofetch + zip + unzip + ripgrep + fzf + fd + sd + bat + tldr + fortune + just + mmv-go + usbutils + ]; +in +{ + flake.modules.nixos.cli-tools = + { pkgs, ... }: + { + environment.systemPackages = commonPackages pkgs; + }; + + flake.modules.darwin.cli-tools = + { pkgs, ... }: + { + environment.systemPackages = commonPackages pkgs; + }; +} diff --git a/modules/gaming/default.nix b/modules/gaming/default.nix index 1f60277..263c286 100644 --- a/modules/gaming/default.nix +++ b/modules/gaming/default.nix @@ -8,6 +8,7 @@ programs.steam = { enable = true; remotePlay.openFirewall = true; + gamescopeSession.enable = true; protontricks.enable = true; extraCompatPackages = with pkgs; [ diff --git a/modules/hosts/dnsc-machine/default.nix b/modules/hosts/dnsc-machine/default.nix index 6860343..2b0f3c4 100644 --- a/modules/hosts/dnsc-machine/default.nix +++ b/modules/hosts/dnsc-machine/default.nix @@ -8,10 +8,12 @@ in modules = with config.flake.modules.nixos; [ home-manager base + shell + cli-tools + nix nvidia-graphics drawing-tablet printing - shell desktop gaming diff --git a/modules/nix/default.nix b/modules/nix/default.nix new file mode 100644 index 0000000..b0a31c5 --- /dev/null +++ b/modules/nix/default.nix @@ -0,0 +1,29 @@ +{ ... }: +{ + flake.modules.nixos.nix = + { pkgs, ... }: + { + programs.direnv = { + enable = true; + silent = false; + loadInNixShell = true; + direnvrcExtra = ""; + nix-direnv = { + enable = true; + }; + }; + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + programs.nix-ld.enable = true; + nixpkgs.config.allowUnfree = true; + + environment.systemPackages = with pkgs; [ + nil + statix + manix + ]; + }; +} diff --git a/modules/nvidia-graphics/default.nix b/modules/nvidia-graphics/default.nix index b5f397f..a30a569 100644 --- a/modules/nvidia-graphics/default.nix +++ b/modules/nvidia-graphics/default.nix @@ -1,8 +1,9 @@ -{ config, ... }: +{ ... }: { flake.modules.nixos.nvidia-graphics = - { pkgs, ... }: + { config, pkgs, ... }: { + nixpkgs.config.allowUnfree = true; services.xserver.videoDrivers = [ "nvidia" ]; hardware = { graphics.enable = true; From 7d7f81d9cee375b1d9f712377105a0a39e7e2a5c Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 23:26:16 +0100 Subject: [PATCH 13/77] fully migrates dnsc-machine --- Justfile | 23 +++ flake.lock | 57 ++++++- flake.nix | 4 + modules/browser/default.nix | 18 ++ modules/desktop/default.nix | 13 ++ modules/drawing-tablet/default.nix | 4 + modules/hosts/dnsc-machine/default.nix | 2 + modules/ssh/default.nix | 67 ++++++++ modules/terminal/default.nix | 156 ++++++++++++++++++ modules/terminal/tmuxinator-layouts/dnsc.yml | 11 ++ modules/terminal/tmuxinator-layouts/main.yml | 7 + .../tmuxinator-layouts/nix-config.yml | 7 + modules/terminal/tmuxinator-layouts/notes.yml | 11 ++ .../terminal/tmuxinator-layouts/proglog.yml | 11 ++ 14 files changed, 390 insertions(+), 1 deletion(-) create mode 100644 Justfile create mode 100644 modules/browser/default.nix create mode 100644 modules/ssh/default.nix create mode 100644 modules/terminal/default.nix create mode 100644 modules/terminal/tmuxinator-layouts/dnsc.yml create mode 100644 modules/terminal/tmuxinator-layouts/main.yml create mode 100644 modules/terminal/tmuxinator-layouts/nix-config.yml create mode 100644 modules/terminal/tmuxinator-layouts/notes.yml create mode 100644 modules/terminal/tmuxinator-layouts/proglog.yml diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..c493abe --- /dev/null +++ b/Justfile @@ -0,0 +1,23 @@ +deploy host: + nixos-rebuild switch --flake .#{{host}} + +debug host: + nixos-rebuild switch --flake .#{{host}} --show-trace --verbose + +dry host: + nix build .#nixosConfigurations.{{host}}.config.system.build.toplevel --dry-run --no-link + +update: + nix flake update + +history: + nix profile history --profile /nix/var/nix/profiles/system + +repl: + nix repl -f flake:nixpkgs + +clean: + nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d + +gc: + sudo nix-collect-garbage --delete-old diff --git a/flake.lock b/flake.lock index ff8c6fd..6712a6e 100644 --- a/flake.lock +++ b/flake.lock @@ -41,6 +41,27 @@ "type": "github" } }, + "helium": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1772003810, + "narHash": "sha256-FfaHvYDfcWZ+0ZPkWDVywkglmQjBq0DoIqzl7TH2hXc=", + "owner": "schembriaiden", + "repo": "helium-browser-nix-flake", + "rev": "9001c8ec8bb3a4b9103eca2f2fc707bda1401977", + "type": "github" + }, + "original": { + "owner": "schembriaiden", + "repo": "helium-browser-nix-flake", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -130,7 +151,7 @@ "inputs": { "flake-parts": "flake-parts_2", "nixpkgs": "nixpkgs_2", - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1772402258, @@ -149,6 +170,7 @@ "root": { "inputs": { "flake-parts": "flake-parts", + "helium": "helium", "home-manager": "home-manager", "import-tree": "import-tree", "nix-darwin": "nix-darwin", @@ -173,6 +195,39 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 1632df0..b93f3bd 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,10 @@ inputs.nixpkgs.follows = "nixpkgs"; url = "github:LnL7/nix-darwin/master"; }; + helium = { + url = "github:schembriaiden/helium-browser-nix-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"; nixpkgs-lib.follows = "nixpkgs"; nixvim.url = "github:nix-community/nixvim"; diff --git a/modules/browser/default.nix b/modules/browser/default.nix new file mode 100644 index 0000000..d0ea770 --- /dev/null +++ b/modules/browser/default.nix @@ -0,0 +1,18 @@ +{ inputs, ... }: +{ + flake.modules.nixos.browser = + { pkgs, system, ... }: + { + environment.systemPackages = [ + inputs.helium.packages.${system}.default + ]; + }; + + flake.modules.darwin.browser = + { pkgs, system, ... }: + { + environment.systemPackages = [ + inputs.helium.packages.${system}.default + ]; + }; +} diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index b288dc5..3690be7 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -10,6 +10,19 @@ environment.cosmic.excludePackages = with pkgs; [ cosmic-term ]; + + environment.systemPackages = with pkgs; [ + bibata-cursors + nerd-fonts.victor-mono + gimp + darktable + ]; + + fonts.fontconfig = { + enable = true; + antialiasing = true; + defaultFonts.monospace = [ "VictorMono Nerd Font" ]; + }; }; # TODO: Persist ~/.config/cosmic after setup diff --git a/modules/drawing-tablet/default.nix b/modules/drawing-tablet/default.nix index aa10c00..f9e1a96 100644 --- a/modules/drawing-tablet/default.nix +++ b/modules/drawing-tablet/default.nix @@ -6,5 +6,9 @@ hardware.opentabletdriver.enable = true; hardware.uinput.enable = true; boot.kernelModules = [ "uinput" ]; + + environment.systemPackages = with pkgs; [ + krita + ]; }; } diff --git a/modules/hosts/dnsc-machine/default.nix b/modules/hosts/dnsc-machine/default.nix index 2b0f3c4..d4ef234 100644 --- a/modules/hosts/dnsc-machine/default.nix +++ b/modules/hosts/dnsc-machine/default.nix @@ -9,12 +9,14 @@ in home-manager base shell + ssh cli-tools nix nvidia-graphics drawing-tablet printing desktop + terminal gaming { diff --git a/modules/ssh/default.nix b/modules/ssh/default.nix new file mode 100644 index 0000000..432b27d --- /dev/null +++ b/modules/ssh/default.nix @@ -0,0 +1,67 @@ +{ inputs, ... }: +{ + flake.modules.nixos.ssh = + { pkgs, ... }: + { + services.openssh.enable = true; + + home-manager.sharedModules = [ + inputs.self.modules.homeManager.ssh + ]; + }; + + flake.modules.darwin.ssh = + { pkgs, ... }: + { + services.openssh.enable = true; + + home-manager.sharedModules = [ + inputs.self.modules.homeManager.ssh + ]; + }; + + flake.modules.homeManager.ssh = + { pkgs, config, ... }: + { + programs.ssh = { + enable = true; + enableDefaultConfig = false; + matchBlocks = { + "*" = { + addKeysToAgent = "yes"; + }; + "dnsc-machine" = { + hostname = "192.168.178.250"; + user = "dennis"; + identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519"; + identitiesOnly = true; + }; + "dnsc-server" = { + hostname = "192.168.178.69"; + user = "dennis"; + identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519"; + identitiesOnly = true; + }; + "dnsc-vps-sm" = { + hostname = "91.99.21.186"; + user = "dennis"; + identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519"; + identitiesOnly = true; + }; + "dnsc-storage" = { + hostname = "u295965.your-storagebox.de"; + user = "u295965"; + identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519"; + identitiesOnly = true; + port = 23; + }; + "dnsc-storage-sftp" = { + hostname = "u295965.your-storagebox.de"; + user = "u295965"; + identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519"; + port = 22; + }; + }; + }; + }; +} diff --git a/modules/terminal/default.nix b/modules/terminal/default.nix new file mode 100644 index 0000000..211d099 --- /dev/null +++ b/modules/terminal/default.nix @@ -0,0 +1,156 @@ +{ inputs, ... }: +{ + flake.modules.nixos.terminal = + { pkgs, ... }: + { + home-manager.sharedModules = [ + inputs.self.modules.homeManager.terminal + ]; + }; + + flake.modules.darwin.terminal = + { pkgs, ... }: + { + home-manager.sharedModules = [ + inputs.self.modules.homeManager.terminal + ]; + }; + + flake.modules.homeManager.terminal = + { pkgs, config, ... }: + { + programs.ghostty = { + enable = true; + enableFishIntegration = true; + settings = { + font-size = 14; + font-family = "VictorMono Nerd Font"; + font-style = "SemiBold"; + background-opacity = 0.945; + window-padding-x = 0; + window-padding-y = 0; + window-padding-balance = true; + window-inherit-working-directory = true; + window-theme = "ghostty"; + shell-integration-features = true; + scrollback-limit = 100000; + link-url = true; + link-previews = true; + title = " "; + background = "#0f0b15"; + foreground = "#ffffff"; + cursor-color = "#d369af"; + selection-foreground = "#af85ea"; + selection-background = "#572454"; + palette = [ + "0=#0f0b15" + "1=#f47359" + "2=#29a444" + "3=#b58a52" + "4=#3f95f6" + "5=#d369af" + "6=#4fbaef" + "7=#b8c6d5" + "8=#807c9f" + "9=#ff6a7a" + "10=#00a392" + "11=#df9080" + "12=#029fff" + "13=#af85ea" + "14=#35afbf" + "15=#ffffff" + ]; + keybind = [ + "ctrl+plus=increase_font_size:2" + "ctrl+minus=decrease_font_size:2" + "ctrl+0=reset_font_size" + "ctrl+shift+a=select_all" + "ctrl+shift+c=copy_to_clipboard" + "ctrl+shift+v=paste_from_clipboard" + "cmd+c=copy_to_clipboard" + "cmd+v=paste_from_clipboard" + ]; + }; + }; + + programs.tmux = { + enable = true; + package = pkgs.tmux; + baseIndex = 1; + clock24 = true; + disableConfirmationPrompt = true; + mouse = true; + newSession = true; + prefix = "C-b"; + shell = "${pkgs.fish}/bin/fish"; + terminal = "screen-256color"; + keyMode = "vi"; + escapeTime = 0; + plugins = with pkgs; [ + { + plugin = tmuxPlugins.resurrect; + extraConfig = '' + set -g @resurrect-strategy-nvim 'session' + set -g @resurrect-capture-pane-contents 'on' + ''; + } + { + plugin = tmuxPlugins.continuum; + extraConfig = '' + set -g @continuum-restore 'on' + set -g @continuum-boot 'on' + set -g @continuum-save-interval '10' + ''; + } + ]; + extraConfig = '' + set -g status-position top + set -g status-style bg=#1d202f,fg=white + set -g status-left "" + set -g status-right "#[bg=default,fg=magenta]>> #S << #[bg=default,fg=white]#H " + set-window-option -g window-status-style 'fg=magenta,bg=#1d202f' + set-window-option -g window-status-format ' #I #[fg=white]#W #[fg=cyan]#F ' + set-window-option -g window-status-current-style "fg=black,bg=magenta" + set-window-option -g window-status-current-format " #I #W #F " + set -g pane-border-style fg=#807c9f + set -g pane-active-border-style fg=magenta + set -g message-style "fg=black,bg=red,bold" + + unbind % + bind "|" split-window -h + unbind '"' + bind - split-window -l 15 -v + + bind r source-file "~/.config/tmux/tmux.conf" + + bind h select-pane -L + bind j select-pane -D + bind k select-pane -U + bind l select-pane -R + + bind -r H resize-pane -L 5 + bind -r J resize-pane -D 5 + bind -r K resize-pane -U 5 + bind -r L resize-pane -R 5 + + bind ? list-keys -a + + unbind s + bind s display-popup -h 50% -w 80% -E sessionizer + + unbind g + bind g display-popup -h 90% -w 95% -E lazygit + + unbind C-x + bind C-x kill-session + + unbind v + bind v choose-tree -Zw "join-pane -t '%%'" + ''; + }; + + xdg.configFile."tmuxinator" = { + source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/terminal/tmuxinator-layouts"; + }; + }; +} diff --git a/modules/terminal/tmuxinator-layouts/dnsc.yml b/modules/terminal/tmuxinator-layouts/dnsc.yml new file mode 100644 index 0000000..c182d28 --- /dev/null +++ b/modules/terminal/tmuxinator-layouts/dnsc.yml @@ -0,0 +1,11 @@ +name: dnsc-io +root: ~/dev/dnsc-io +windows: + - dev: + layout: main-horizontal + panes: + - nvim +"lua Snacks.picker.files({ hidden = true })" + - run: + layout: main-vertical + panes: + - "pnpm dev" diff --git a/modules/terminal/tmuxinator-layouts/main.yml b/modules/terminal/tmuxinator-layouts/main.yml new file mode 100644 index 0000000..aaf99be --- /dev/null +++ b/modules/terminal/tmuxinator-layouts/main.yml @@ -0,0 +1,7 @@ +name: main +root: ~/ +windows: + - default: + layout: main-vertical + panes: + - clear diff --git a/modules/terminal/tmuxinator-layouts/nix-config.yml b/modules/terminal/tmuxinator-layouts/nix-config.yml new file mode 100644 index 0000000..9f9db2e --- /dev/null +++ b/modules/terminal/tmuxinator-layouts/nix-config.yml @@ -0,0 +1,7 @@ +name: nix-config +root: ~/dev/nix-config/ +windows: + - code: + layout: main-horizontal + panes: + - nvim +"lua Snacks.picker.files({ hidden = true })" diff --git a/modules/terminal/tmuxinator-layouts/notes.yml b/modules/terminal/tmuxinator-layouts/notes.yml new file mode 100644 index 0000000..814af92 --- /dev/null +++ b/modules/terminal/tmuxinator-layouts/notes.yml @@ -0,0 +1,11 @@ +name: notes +root: ~/dev/notes +windows: + - code: + layout: main-horizontal + panes: + - nvim +"lua Snacks.picker.files({ hidden = true })" + - run: + layout: even-vertical + panes: + - clear diff --git a/modules/terminal/tmuxinator-layouts/proglog.yml b/modules/terminal/tmuxinator-layouts/proglog.yml new file mode 100644 index 0000000..4d0f235 --- /dev/null +++ b/modules/terminal/tmuxinator-layouts/proglog.yml @@ -0,0 +1,11 @@ +name: proglog +root: ~/dev/proglog +windows: + - dev: + layout: main-horizontal + panes: + - nvim +"lua Snacks.picker.files({ hidden = true })" + - run: + layout: main-vertical + panes: + - echo ">> Run proglog tasks here" From 257a49faac76ca0661ada10ffb5e4a30bb93f45a Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 23:28:07 +0100 Subject: [PATCH 14/77] fixes error --- modules/desktop/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 3690be7..a510a3e 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -20,7 +20,7 @@ fonts.fontconfig = { enable = true; - antialiasing = true; + antialias = true; defaultFonts.monospace = [ "VictorMono Nerd Font" ]; }; }; From 555c53d8a3896dbe6c7900b948070b28c813f7e7 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 23:19:56 +0000 Subject: [PATCH 15/77] some fixes --- modules/bluetooth/default.nix | 16 +++ modules/cli-tools/default.nix | 1 + modules/git/default.nix | 58 +++++++++++ modules/hosts/dnsc-machine/default.nix | 3 + .../{colorscheme.nix => _colorscheme.nix} | 2 - .../{completion.nix => _completion.nix} | 2 - modules/neovim/{editing.nix => _editing.nix} | 2 - .../neovim/{formatter.nix => _formatter.nix} | 2 - modules/neovim/{git.nix => _git.nix} | 2 - .../{keybindings.nix => _keybindings.nix} | 2 - modules/neovim/{lsp.nix => _lsp.nix} | 2 - modules/neovim/{options.nix => _options.nix} | 2 - modules/neovim/{picker.nix => _picker.nix} | 2 - modules/neovim/default.nix | 26 +++++ modules/neovim/statusline.nix | 99 ------------------- modules/terminal/default.nix | 10 ++ 16 files changed, 114 insertions(+), 117 deletions(-) create mode 100644 modules/bluetooth/default.nix create mode 100644 modules/git/default.nix rename modules/neovim/{colorscheme.nix => _colorscheme.nix} (88%) rename modules/neovim/{completion.nix => _completion.nix} (92%) rename modules/neovim/{editing.nix => _editing.nix} (96%) rename modules/neovim/{formatter.nix => _formatter.nix} (95%) rename modules/neovim/{git.nix => _git.nix} (94%) rename modules/neovim/{keybindings.nix => _keybindings.nix} (98%) rename modules/neovim/{lsp.nix => _lsp.nix} (99%) rename modules/neovim/{options.nix => _options.nix} (95%) rename modules/neovim/{picker.nix => _picker.nix} (98%) delete mode 100644 modules/neovim/statusline.nix diff --git a/modules/bluetooth/default.nix b/modules/bluetooth/default.nix new file mode 100644 index 0000000..f35bd29 --- /dev/null +++ b/modules/bluetooth/default.nix @@ -0,0 +1,16 @@ +{ inputs, ... }: +{ + flake.modules.nixos.ssh = + { pkgs, ... }: + { + hardware.bluetooth = { + enable = true; + settings = { + General = { + Enable = "Source,Sink,Media,Socket"; + Experimental = true; + }; + }; + }; + }; +} diff --git a/modules/cli-tools/default.nix b/modules/cli-tools/default.nix index d5ba546..b993470 100644 --- a/modules/cli-tools/default.nix +++ b/modules/cli-tools/default.nix @@ -15,6 +15,7 @@ let just mmv-go usbutils + lazygit ]; in { diff --git a/modules/git/default.nix b/modules/git/default.nix new file mode 100644 index 0000000..7d51347 --- /dev/null +++ b/modules/git/default.nix @@ -0,0 +1,58 @@ +{ inputs, ... }: +{ + flake.modules.nixos.git = + { pkgs, ... }: + { + environment.systemPackages = with pkgs; [ + git + ]; + + home-manager.sharedModules = [ + inputs.self.modules.homeManager.git + ]; + }; + + flake.modules.darwin.git = + { pkgs, ... }: + { + environment.systemPackages = with pkgs; [ + git + ]; + + home-manager.sharedModules = [ + inputs.self.modules.homeManager.git + ]; + }; + + flake.modules.homeManager.git = + { pkgs, config, ... }: + { + programs.git = { + enable = true; + settings = { + init = { + defaultBranch = "main"; + }; + + core = { + ignorecase = "false"; + }; + + pull = { + rebase = false; + }; + + push = { + autoSetupRemote = true; + }; + + user = { + # TODO get from config + name = "Dennis Schoepf"; + email = "me@dnsc.io"; + }; + }; + ignores = [ ".DS_Store" ]; + }; + }; +} diff --git a/modules/hosts/dnsc-machine/default.nix b/modules/hosts/dnsc-machine/default.nix index d4ef234..504cb10 100644 --- a/modules/hosts/dnsc-machine/default.nix +++ b/modules/hosts/dnsc-machine/default.nix @@ -9,11 +9,14 @@ in home-manager base shell + git ssh + neovim cli-tools nix nvidia-graphics drawing-tablet + bluetooth printing desktop terminal diff --git a/modules/neovim/colorscheme.nix b/modules/neovim/_colorscheme.nix similarity index 88% rename from modules/neovim/colorscheme.nix rename to modules/neovim/_colorscheme.nix index 5b8a799..3876c9c 100644 --- a/modules/neovim/colorscheme.nix +++ b/modules/neovim/_colorscheme.nix @@ -1,6 +1,5 @@ { ... }: { - flake.modules.homeManager.neovim-colorscheme = { programs.nixvim = { colorscheme = "winterly"; @@ -12,5 +11,4 @@ # discovers it automatically extraFiles."colors/winterly.lua".source = ./extraFiles/winterly.lua; }; - }; } diff --git a/modules/neovim/completion.nix b/modules/neovim/_completion.nix similarity index 92% rename from modules/neovim/completion.nix rename to modules/neovim/_completion.nix index ccbb93f..d8e115e 100644 --- a/modules/neovim/completion.nix +++ b/modules/neovim/_completion.nix @@ -1,6 +1,5 @@ { ... }: { - flake.modules.homeManager.neovim-completion = { programs.nixvim.plugins.blink-cmp = { enable = true; settings = { @@ -28,5 +27,4 @@ cmdline.completion.menu.auto_show = true; }; }; - }; } diff --git a/modules/neovim/editing.nix b/modules/neovim/_editing.nix similarity index 96% rename from modules/neovim/editing.nix rename to modules/neovim/_editing.nix index c1f984a..458849c 100644 --- a/modules/neovim/editing.nix +++ b/modules/neovim/_editing.nix @@ -1,6 +1,5 @@ { ... }: { - flake.modules.homeManager.neovim-editing = { pkgs, ... }: { programs.nixvim = { plugins.sleuth.enable = true; plugins.nvim-surround.enable = true; @@ -78,5 +77,4 @@ } ]; }; - }; } diff --git a/modules/neovim/formatter.nix b/modules/neovim/_formatter.nix similarity index 95% rename from modules/neovim/formatter.nix rename to modules/neovim/_formatter.nix index df2fb8d..7ca0b0e 100644 --- a/modules/neovim/formatter.nix +++ b/modules/neovim/_formatter.nix @@ -1,6 +1,5 @@ { ... }: { - flake.modules.homeManager.neovim-formatter = { pkgs, ... }: { programs.nixvim.plugins.conform-nvim = { enable = true; settings = { @@ -53,5 +52,4 @@ }; extraPackages = [ pkgs.stylua ]; }; - }; } diff --git a/modules/neovim/git.nix b/modules/neovim/_git.nix similarity index 94% rename from modules/neovim/git.nix rename to modules/neovim/_git.nix index ac8845d..69fa283 100644 --- a/modules/neovim/git.nix +++ b/modules/neovim/_git.nix @@ -1,6 +1,5 @@ { ... }: { - flake.modules.homeManager.neovim-git = { programs.nixvim = { plugins.gitportal = { enable = true; @@ -29,5 +28,4 @@ } ]; }; - }; } diff --git a/modules/neovim/keybindings.nix b/modules/neovim/_keybindings.nix similarity index 98% rename from modules/neovim/keybindings.nix rename to modules/neovim/_keybindings.nix index eb9e9ac..c67b159 100644 --- a/modules/neovim/keybindings.nix +++ b/modules/neovim/_keybindings.nix @@ -1,6 +1,5 @@ { ... }: { - flake.modules.homeManager.neovim-keybindings = { programs.nixvim = { plugins.which-key = { enable = true; @@ -130,5 +129,4 @@ } ]; }; - }; } diff --git a/modules/neovim/lsp.nix b/modules/neovim/_lsp.nix similarity index 99% rename from modules/neovim/lsp.nix rename to modules/neovim/_lsp.nix index 61861b4..002e79f 100644 --- a/modules/neovim/lsp.nix +++ b/modules/neovim/_lsp.nix @@ -1,6 +1,5 @@ { ... }: { - flake.modules.homeManager.neovim-lsp = { pkgs, ... }: { programs.nixvim = { plugins.lspconfig.enable = true; @@ -198,5 +197,4 @@ severity_sort = false; }; }; - }; } diff --git a/modules/neovim/options.nix b/modules/neovim/_options.nix similarity index 95% rename from modules/neovim/options.nix rename to modules/neovim/_options.nix index c36b7f4..e2b1fad 100644 --- a/modules/neovim/options.nix +++ b/modules/neovim/_options.nix @@ -1,6 +1,5 @@ { ... }: { - flake.modules.homeManager.neovim-options = { programs.nixvim = { globals = { mapleader = " "; @@ -48,5 +47,4 @@ foldlevelstart = 99; }; }; - }; } diff --git a/modules/neovim/picker.nix b/modules/neovim/_picker.nix similarity index 98% rename from modules/neovim/picker.nix rename to modules/neovim/_picker.nix index dd7dd06..cbb416b 100644 --- a/modules/neovim/picker.nix +++ b/modules/neovim/_picker.nix @@ -1,6 +1,5 @@ { ... }: { - flake.modules.homeManager.neovim-picker = { pkgs, ... }: { programs.nixvim = { plugins.oil = { enable = true; @@ -170,5 +169,4 @@ } ]; }; - }; } diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index eae14f8..86fe610 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -3,6 +3,22 @@ ... }: { + flake.modules.nixos.neovim = + { pkgs, ... }: + { + home-manager.sharedModules = [ + inputs.self.modules.homeManager.neovim + ]; + }; + + flake.modules.darwin.neovim = + { pkgs, ... }: + { + home-manager.sharedModules = [ + inputs.self.modules.homeManager.neovim + ]; + }; + flake.modules.homeManager.neovim = { pkgs, ... }: { imports = [ inputs.nixvim.homeModules.nixvim ]; programs.nixvim = { @@ -11,6 +27,16 @@ package = pkgs.neovim-unwrapped; vimAlias = true; vimdiffAlias = true; + imports = [ + ./_colorscheme.nix + ./_completion.nix + ./_editing.nix + ./_formatter.nix + ./_keybindings.nix + ./_lsp.nix + ./_options.nix + ./_picker.nix + ]; }; }; } diff --git a/modules/neovim/statusline.nix b/modules/neovim/statusline.nix deleted file mode 100644 index 64af6d7..0000000 --- a/modules/neovim/statusline.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ ... }: -{ - flake.modules.homeManager.neovim-statusline = { - programs.nixvim.plugins.lualine = { - enable = true; - - settings = { - options = { - theme = { - __raw = "winterly_lualine"; - }; - icons_enabled = false; - component_separators = { - left = "|"; - right = "|"; - }; - section_separators = { - left = ""; - right = ""; - }; - }; - sections = { - lualine_a = [ - { - __unkeyed-1 = "mode"; - fmt = { - __raw = "function(str) return str:sub(1, 1) end"; - }; - } - ]; - lualine_b = [ - { - __unkeyed-1 = "filename"; - file_status = true; - newfile_status = false; - path = 4; - shorting_target = 120; - symbols = { - modified = "[+]"; - readonly = "[-]"; - unnamed = "[No Name]"; - newfile = "[New]"; - }; - } - "encoding" - ]; - lualine_c = null; - lualine_x = null; - lualine_y = [ - "branch" - "diff" - "diagnostics" - ]; - lualine_z = [ - "location" - ]; - }; - }; - - # Sets up my custom colorscheme - luaConfig.pre = /* lua */ '' - local palette = require("dnsc.palette") - - local winterly_lualine = { - normal = { - a = { bg = palette.magenta, fg = palette.bg, gui = "bold" }, - b = { bg = palette.bg_secondary, fg = palette.magenta }, - c = { bg = palette.bg_secondary, fg = palette.magenta }, - }, - insert = { - a = { bg = palette.cyan_bright, fg = palette.bg, gui = "bold" }, - b = { bg = palette.bg_secondary, fg = palette.cyan_bright }, - c = { bg = palette.bg_secondary, fg = palette.cyan_bright }, - }, - visual = { - a = { bg = palette.blue_bright, fg = palette.bg, gui = "bold" }, - b = { bg = palette.bg_secondary, fg = palette.blue_bright }, - c = { bg = palette.bg_secondary, fg = palette.blue_bright }, - }, - replace = { - a = { bg = palette.red_bright, fg = palette.bg, gui = "bold" }, - b = { bg = palette.bg_secondary, fg = palette.red_bright }, - c = { bg = palette.bg_secondary, fg = palette.red_bright }, - }, - command = { - a = { bg = palette.green_bright, fg = palette.bg, gui = "bold" }, - b = { bg = palette.bg_secondary, fg = palette.green_bright }, - c = { bg = palette.bg_secondary, fg = palette.green_bright }, - }, - inactive = { - a = { bg = palette.bg_secondary, fg = palette.fg_dim }, - b = { bg = palette.bg_secondary, fg = palette.fg_dim }, - c = { bg = palette.bg_secondary, fg = palette.fg_dim }, - }, - } - ''; - }; - }; -} diff --git a/modules/terminal/default.nix b/modules/terminal/default.nix index 211d099..4a13819 100644 --- a/modules/terminal/default.nix +++ b/modules/terminal/default.nix @@ -3,6 +3,11 @@ flake.modules.nixos.terminal = { pkgs, ... }: { + environment.systemPackages = with pkgs; [ + tmux + tmuxinator + ]; + home-manager.sharedModules = [ inputs.self.modules.homeManager.terminal ]; @@ -11,6 +16,11 @@ flake.modules.darwin.terminal = { pkgs, ... }: { + environment.systemPackages = with pkgs; [ + tmux + tmuxinator + ]; + home-manager.sharedModules = [ inputs.self.modules.homeManager.terminal ]; From fabbcab6414fd180ea4319dedd66f0c03f69d371 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 23:21:29 +0000 Subject: [PATCH 16/77] some fixes --- modules/bluetooth/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/bluetooth/default.nix b/modules/bluetooth/default.nix index f35bd29..8a182a4 100644 --- a/modules/bluetooth/default.nix +++ b/modules/bluetooth/default.nix @@ -1,6 +1,6 @@ { inputs, ... }: { - flake.modules.nixos.ssh = + flake.modules.nixos.bluetooth = { pkgs, ... }: { hardware.bluetooth = { From bc4656299ab1fe2eae0fe50b6db96950df7b12bd Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 23:22:22 +0000 Subject: [PATCH 17/77] fixes --- modules/neovim/_editing.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/neovim/_editing.nix b/modules/neovim/_editing.nix index 458849c..aec04d3 100644 --- a/modules/neovim/_editing.nix +++ b/modules/neovim/_editing.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { programs.nixvim = { plugins.sleuth.enable = true; From 9a4437c5c5f3bd236a3b3422a746f4d885e2af45 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 23:22:55 +0000 Subject: [PATCH 18/77] fixes --- modules/neovim/_formatter.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/neovim/_formatter.nix b/modules/neovim/_formatter.nix index 7ca0b0e..c94bb31 100644 --- a/modules/neovim/_formatter.nix +++ b/modules/neovim/_formatter.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { programs.nixvim.plugins.conform-nvim = { enable = true; From 4aa451d22b4c08821762b83ed849994fb3abb8cf Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 23:23:36 +0000 Subject: [PATCH 19/77] fixes --- modules/neovim/_lsp.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/neovim/_lsp.nix b/modules/neovim/_lsp.nix index 002e79f..92f1d18 100644 --- a/modules/neovim/_lsp.nix +++ b/modules/neovim/_lsp.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { programs.nixvim = { plugins.lspconfig.enable = true; From a61feab69a8238b13892a6e94a287f57c4ea0fa4 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 23:23:51 +0000 Subject: [PATCH 20/77] fixes --- modules/neovim/_picker.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/neovim/_picker.nix b/modules/neovim/_picker.nix index cbb416b..c1f30b7 100644 --- a/modules/neovim/_picker.nix +++ b/modules/neovim/_picker.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { programs.nixvim = { plugins.oil = { From 38deff2315de69af2bb3eec326c5787d5576188d Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 23:24:55 +0000 Subject: [PATCH 21/77] fixes --- modules/cli-tools/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/cli-tools/default.nix b/modules/cli-tools/default.nix index b993470..54cff99 100644 --- a/modules/cli-tools/default.nix +++ b/modules/cli-tools/default.nix @@ -16,6 +16,7 @@ let mmv-go usbutils lazygit + opencode ]; in { From b76ff43f4ec99185868b31f0838d21f8e80413ea Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 23:32:35 +0000 Subject: [PATCH 22/77] fixes --- modules/base/default.nix | 1 + modules/bluetooth/default.nix | 2 + modules/desktop/default.nix | 20 +++++- modules/desktop/temp.nix | 118 ++++++++++++++++++++++++++++++++++ 4 files changed, 139 insertions(+), 2 deletions(-) create mode 100644 modules/desktop/temp.nix diff --git a/modules/base/default.nix b/modules/base/default.nix index 43efccb..ace3a9a 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -74,6 +74,7 @@ in }; networking.networkmanager.enable = true; + time.timeZone = "Europe/Berlin"; i18n = { defaultLocale = "en_US.UTF-8"; extraLocaleSettings = { diff --git a/modules/bluetooth/default.nix b/modules/bluetooth/default.nix index 8a182a4..f30a7df 100644 --- a/modules/bluetooth/default.nix +++ b/modules/bluetooth/default.nix @@ -5,6 +5,7 @@ { hardware.bluetooth = { enable = true; + powerOnBoot = true; settings = { General = { Enable = "Source,Sink,Media,Socket"; @@ -12,5 +13,6 @@ }; }; }; + services.blueman.enable = true; }; } diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index a510a3e..b006053 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -13,16 +13,32 @@ environment.systemPackages = with pkgs; [ bibata-cursors - nerd-fonts.victor-mono gimp darktable ]; + fonts.packages = with pkgs; [ + nerd-fonts.victor-mono + ]; + fonts.fontconfig = { enable = true; antialias = true; - defaultFonts.monospace = [ "VictorMono Nerd Font" ]; + hinting = { + enable = true; + style = "slight"; + }; + defaultFonts.monospace = [ "VictorMono Nerd Font Mono" ]; }; + + gtk = { + enable = true; + cursorTheme = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; + size = 24; + }; + }; }; # TODO: Persist ~/.config/cosmic after setup diff --git a/modules/desktop/temp.nix b/modules/desktop/temp.nix new file mode 100644 index 0000000..b65f4c9 --- /dev/null +++ b/modules/desktop/temp.nix @@ -0,0 +1,118 @@ +{ inputs, pkgs, ... }: + +{ + home.username = "dennis"; + home.homeDirectory = "/home/dennis"; + home.stateVersion = "24.11"; + + home.packages = with pkgs; [ + neofetch + zip + unzip + ripgrep + fzf + fd + sd + bat + tldr + fortune + just + mmv-go + zoxide + xwayland-satellite + nerd-fonts.victor-mono + adwaita-fonts + noto-fonts-color-emoji + bodoni-moda + reversal-icon-theme + fnm + libnotify + swww + loupe + nautilus + nautilus-open-any-terminal + swaynotificationcenter + gimp + wl-clipboard + hyprpicker + usbutils + krita + gpustat + tmux + tmuxinator + adw-gtk3 + kdePackages.qt6ct + ]; + + imports = [ + inputs.nixvim.homeModules.nixvim + inputs.noctalia.homeModules.default + ../modules/ssh + ../modules/git + ../modules/zoxide + ../modules/direnv + ../modules/ghostty/linux.nix + ../modules/fish + ../modules/tmux + ../modules/tmuxinator/personal.nix + ../modules/zen + ../modules/ungoogled-chromium + ../modules/wm/niri + ../modules/wm/noctalia + ]; + + programs.home-manager.enable = true; + programs.nixvim.imports = [ ../modules/nixvim ]; + + # Appearance + fonts.fontconfig = { + enable = true; + antialiasing = true; + defaultFonts = { + monospace = [ "VictorMono Nerd Font" ]; + sansSerif = [ + "Adwaita Sans" + "Noto Color Emoji" + ]; + serif = [ "Bodoni Moda" ]; + }; + }; + + gtk = { + enable = true; + colorScheme = "dark"; + theme.name = "adw-gtk3"; + font = { + package = pkgs.adwaita-fonts; + name = "Adwaita Sans"; + size = 11; + }; + iconTheme = { + package = pkgs.reversal-icon-theme; + name = "Reversal-dark"; + }; + gtk4.iconTheme = { + package = pkgs.reversal-icon-theme; + name = "Reversal-dark"; + }; + cursorTheme = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; + size = 24; + }; + }; + + # Services + # Mpris (Media Player) + services.mpris-proxy.enable = true; + + # Udiskie (Mass Storage Devices) + services.udiskie = { + enable = true; + settings = { + program_options = { + file_manager = "${pkgs.nautilus}/bin/nautilus"; + }; + }; + }; +} From 22fecee5285bb246ff48df111e2a252ed03efe4d Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 23:32:57 +0000 Subject: [PATCH 23/77] fixes --- modules/desktop/temp.nix | 118 --------------------------------------- 1 file changed, 118 deletions(-) delete mode 100644 modules/desktop/temp.nix diff --git a/modules/desktop/temp.nix b/modules/desktop/temp.nix deleted file mode 100644 index b65f4c9..0000000 --- a/modules/desktop/temp.nix +++ /dev/null @@ -1,118 +0,0 @@ -{ inputs, pkgs, ... }: - -{ - home.username = "dennis"; - home.homeDirectory = "/home/dennis"; - home.stateVersion = "24.11"; - - home.packages = with pkgs; [ - neofetch - zip - unzip - ripgrep - fzf - fd - sd - bat - tldr - fortune - just - mmv-go - zoxide - xwayland-satellite - nerd-fonts.victor-mono - adwaita-fonts - noto-fonts-color-emoji - bodoni-moda - reversal-icon-theme - fnm - libnotify - swww - loupe - nautilus - nautilus-open-any-terminal - swaynotificationcenter - gimp - wl-clipboard - hyprpicker - usbutils - krita - gpustat - tmux - tmuxinator - adw-gtk3 - kdePackages.qt6ct - ]; - - imports = [ - inputs.nixvim.homeModules.nixvim - inputs.noctalia.homeModules.default - ../modules/ssh - ../modules/git - ../modules/zoxide - ../modules/direnv - ../modules/ghostty/linux.nix - ../modules/fish - ../modules/tmux - ../modules/tmuxinator/personal.nix - ../modules/zen - ../modules/ungoogled-chromium - ../modules/wm/niri - ../modules/wm/noctalia - ]; - - programs.home-manager.enable = true; - programs.nixvim.imports = [ ../modules/nixvim ]; - - # Appearance - fonts.fontconfig = { - enable = true; - antialiasing = true; - defaultFonts = { - monospace = [ "VictorMono Nerd Font" ]; - sansSerif = [ - "Adwaita Sans" - "Noto Color Emoji" - ]; - serif = [ "Bodoni Moda" ]; - }; - }; - - gtk = { - enable = true; - colorScheme = "dark"; - theme.name = "adw-gtk3"; - font = { - package = pkgs.adwaita-fonts; - name = "Adwaita Sans"; - size = 11; - }; - iconTheme = { - package = pkgs.reversal-icon-theme; - name = "Reversal-dark"; - }; - gtk4.iconTheme = { - package = pkgs.reversal-icon-theme; - name = "Reversal-dark"; - }; - cursorTheme = { - package = pkgs.bibata-cursors; - name = "Bibata-Modern-Ice"; - size = 24; - }; - }; - - # Services - # Mpris (Media Player) - services.mpris-proxy.enable = true; - - # Udiskie (Mass Storage Devices) - services.udiskie = { - enable = true; - settings = { - program_options = { - file_manager = "${pkgs.nautilus}/bin/nautilus"; - }; - }; - }; -} From 07893685e22f43235277c89870592a8c4ff29943 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 23:36:01 +0000 Subject: [PATCH 24/77] fixes --- modules/desktop/default.nix | 24 ++++++++++++++++-------- modules/hosts/dnsc-machine/default.nix | 1 + modules/neovim/default.nix | 22 +++++++++++----------- 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index b006053..f8df02d 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -1,4 +1,4 @@ -{ ... }: +{ inputs, ... }: { flake.modules.nixos.desktop = { pkgs, ... }: @@ -31,14 +31,22 @@ defaultFonts.monospace = [ "VictorMono Nerd Font Mono" ]; }; - gtk = { - enable = true; - cursorTheme = { - package = pkgs.bibata-cursors; - name = "Bibata-Modern-Ice"; - size = 24; + home-manager.sharedModules = [ + inputs.self.modules.homeManager.desktop + ]; }; - }; + + flake.modules.homeManager.desktop = + { pkgs, ... }: + { + gtk = { + enable = true; + cursorTheme = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; + size = 24; + }; + }; }; # TODO: Persist ~/.config/cosmic after setup diff --git a/modules/hosts/dnsc-machine/default.nix b/modules/hosts/dnsc-machine/default.nix index 504cb10..b1604d7 100644 --- a/modules/hosts/dnsc-machine/default.nix +++ b/modules/hosts/dnsc-machine/default.nix @@ -21,6 +21,7 @@ in desktop terminal gaming + browser { imports = [ ./_hardware-configuration.nix ]; diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 86fe610..9efb882 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -20,23 +20,23 @@ }; flake.modules.homeManager.neovim = { pkgs, ... }: { - imports = [ inputs.nixvim.homeModules.nixvim ]; + imports = [ + inputs.nixvim.homeModules.nixvim + ./_colorscheme.nix + ./_completion.nix + ./_editing.nix + ./_formatter.nix + ./_keybindings.nix + ./_lsp.nix + ./_options.nix + ./_picker.nix + ]; programs.nixvim = { enable = true; defaultEditor = true; package = pkgs.neovim-unwrapped; vimAlias = true; vimdiffAlias = true; - imports = [ - ./_colorscheme.nix - ./_completion.nix - ./_editing.nix - ./_formatter.nix - ./_keybindings.nix - ./_lsp.nix - ./_options.nix - ./_picker.nix - ]; }; }; } From f87246b5ced909344675975a80b7f4fe28c009ee Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Tue, 3 Mar 2026 23:37:11 +0000 Subject: [PATCH 25/77] fixes --- modules/browser/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/browser/default.nix b/modules/browser/default.nix index d0ea770..75d3437 100644 --- a/modules/browser/default.nix +++ b/modules/browser/default.nix @@ -1,18 +1,18 @@ { inputs, ... }: { flake.modules.nixos.browser = - { pkgs, system, ... }: + { pkgs, ... }: { environment.systemPackages = [ - inputs.helium.packages.${system}.default + inputs.helium.packages.${pkgs.system}.default ]; }; flake.modules.darwin.browser = - { pkgs, system, ... }: + { pkgs, ... }: { environment.systemPackages = [ - inputs.helium.packages.${system}.default + inputs.helium.packages.${pkgs.system}.default ]; }; } From 606490e97515a837be10673c1b1c1f57c077b4a5 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 00:59:03 +0100 Subject: [PATCH 26/77] workaround --- modules/neovim/_editing.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/neovim/_editing.nix b/modules/neovim/_editing.nix index aec04d3..9b343fe 100644 --- a/modules/neovim/_editing.nix +++ b/modules/neovim/_editing.nix @@ -9,6 +9,22 @@ enable = true; }; + # Workaround: Neovim 0.11.x does not implement the is? / is-not? treesitter + # predicates, but newer grammar query files (tree-sitter-nix, tree-sitter-javascript) + # use (#is-not? local) to scope highlights to non-local identifiers. + # Register no-op handlers to suppress the error; remove once Neovim + # ships with built-in support for these predicates. + extraConfigLua = /* lua */ '' + -- (#is?) always returns false (node never "is" something) + vim.treesitter.query.add_predicate("is?", function() + return false + end, { force = true }) + -- (#is-not?) always returns true (node is always "not" something) + vim.treesitter.query.add_predicate("is-not?", function() + return true + end, { force = true }) + ''; + plugins.treesitter = { enable = true; highlight.enable = true; From 86a1d07eb8ad0f674a88c9000f16bf2061899c19 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 00:59:07 +0100 Subject: [PATCH 27/77] ts fix --- modules/bluetooth/default.nix | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/modules/bluetooth/default.nix b/modules/bluetooth/default.nix index f30a7df..0e1215b 100644 --- a/modules/bluetooth/default.nix +++ b/modules/bluetooth/default.nix @@ -1,18 +1,17 @@ { inputs, ... }: { - flake.modules.nixos.bluetooth = - { pkgs, ... }: - { - hardware.bluetooth = { - enable = true; - powerOnBoot = true; - settings = { - General = { - Enable = "Source,Sink,Media,Socket"; - Experimental = true; - }; - }; - }; - services.blueman.enable = true; - }; + flake.modules.nixos.bluetooth = + { pkgs, ... }: + { + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + settings = { + General = { + Enable = "Source,Sink,Media,Socket"; + Experimental = true; + }; + }; + }; + }; } From b18a469f03deaa94a854205a4afe577a55f832ed Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 01:00:46 +0100 Subject: [PATCH 28/77] updates bluetooth --- modules/bluetooth/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/bluetooth/default.nix b/modules/bluetooth/default.nix index 0e1215b..0a3d46f 100644 --- a/modules/bluetooth/default.nix +++ b/modules/bluetooth/default.nix @@ -10,6 +10,10 @@ General = { Enable = "Source,Sink,Media,Socket"; Experimental = true; + FastConnectable = true; + }; + Policy = { + AutoEnable = true; }; }; }; From c855979239dfd9c98ac821aade4f6f67e2a8d562 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 01:07:59 +0100 Subject: [PATCH 29/77] ts fix --- modules/bluetooth/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/bluetooth/default.nix b/modules/bluetooth/default.nix index 0a3d46f..9947cf2 100644 --- a/modules/bluetooth/default.nix +++ b/modules/bluetooth/default.nix @@ -3,6 +3,8 @@ flake.modules.nixos.bluetooth = { pkgs, ... }: { + hardware.firmware = [ pkgs.rtl8761b-firmware ]; + hardware.bluetooth = { enable = true; powerOnBoot = true; From 23de7e39b4d270651df8fc6eec5da11de5886e90 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 01:14:15 +0100 Subject: [PATCH 30/77] some more fixes --- modules/clipboard/default.nix | 23 +++++++++++++++++++++++ modules/desktop/default.nix | 10 ++++++++++ modules/hosts/dnsc-machine/default.nix | 1 + 3 files changed, 34 insertions(+) create mode 100644 modules/clipboard/default.nix diff --git a/modules/clipboard/default.nix b/modules/clipboard/default.nix new file mode 100644 index 0000000..abebd44 --- /dev/null +++ b/modules/clipboard/default.nix @@ -0,0 +1,23 @@ +{ inputs, ... }: +{ + flake.modules.nixos.clipboard = + { pkgs, ... }: + + { + environment.systemPackages = with pkgs; [ + wl-clipboard + cliphist + ]; + + home-manager.sharedModules = [ + inputs.self.modules.homeManager.clipboard + ]; + }; + + flake.modules.homeManager.clipboard = + { pkgs, ... }: + { + # Watch clipboard and store history via cliphist + services.cliphist.enable = true; + }; +} diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index f8df02d..41cb7ca 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -47,6 +47,16 @@ size = 24; }; }; + + home.sessionVariables = { + XCURSOR_THEME = "Bibata-Modern-Ice"; + XCURSOR_SIZE = "24"; + }; + + home.file.".icons/default/index.theme".text = '' + [Icon Theme] + Inherits=Bibata-Modern-Ice + ''; }; # TODO: Persist ~/.config/cosmic after setup diff --git a/modules/hosts/dnsc-machine/default.nix b/modules/hosts/dnsc-machine/default.nix index b1604d7..3d668ed 100644 --- a/modules/hosts/dnsc-machine/default.nix +++ b/modules/hosts/dnsc-machine/default.nix @@ -17,6 +17,7 @@ in nvidia-graphics drawing-tablet bluetooth + clipboard printing desktop terminal From b35e42ace541c4e11ee2d6d32c5cffb0b69d1cce Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 01:25:51 +0100 Subject: [PATCH 31/77] removes gtk handling --- modules/desktop/default.nix | 9 --------- 1 file changed, 9 deletions(-) diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 41cb7ca..f5d0c88 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -39,15 +39,6 @@ flake.modules.homeManager.desktop = { pkgs, ... }: { - gtk = { - enable = true; - cursorTheme = { - package = pkgs.bibata-cursors; - name = "Bibata-Modern-Ice"; - size = 24; - }; - }; - home.sessionVariables = { XCURSOR_THEME = "Bibata-Modern-Ice"; XCURSOR_SIZE = "24"; From feff7cdd40fca924d43fbbee2fde39520795b70c Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 01:27:28 +0100 Subject: [PATCH 32/77] fixes hardware issues --- modules/bluetooth/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/bluetooth/default.nix b/modules/bluetooth/default.nix index 9947cf2..e7e8086 100644 --- a/modules/bluetooth/default.nix +++ b/modules/bluetooth/default.nix @@ -1,9 +1,9 @@ { inputs, ... }: { flake.modules.nixos.bluetooth = - { pkgs, ... }: + { ... }: { - hardware.firmware = [ pkgs.rtl8761b-firmware ]; + hardware.enableRedistributableFirmware = true; hardware.bluetooth = { enable = true; From 65a428b116ec2928d7e50753bace1699df5e94b9 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 01:31:25 +0100 Subject: [PATCH 33/77] fixes window decorations --- modules/terminal/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/terminal/default.nix b/modules/terminal/default.nix index 4a13819..84ea476 100644 --- a/modules/terminal/default.nix +++ b/modules/terminal/default.nix @@ -4,8 +4,8 @@ { pkgs, ... }: { environment.systemPackages = with pkgs; [ - tmux - tmuxinator + tmux + tmuxinator ]; home-manager.sharedModules = [ @@ -17,8 +17,8 @@ { pkgs, ... }: { environment.systemPackages = with pkgs; [ - tmux - tmuxinator + tmux + tmuxinator ]; home-manager.sharedModules = [ @@ -37,6 +37,7 @@ font-family = "VictorMono Nerd Font"; font-style = "SemiBold"; background-opacity = 0.945; + window-decoration = "none"; window-padding-x = 0; window-padding-y = 0; window-padding-balance = true; From c69697bbd3b41dc2200c1f761a316e4b1f810e45 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 19:45:03 +0100 Subject: [PATCH 34/77] fixes cli tools config --- modules/cli-tools/default.nix | 39 ++++++++++++++++++++++++-- modules/git/default.nix | 52 +++++++++++++++++------------------ 2 files changed, 63 insertions(+), 28 deletions(-) diff --git a/modules/cli-tools/default.nix b/modules/cli-tools/default.nix index 54cff99..80dff42 100644 --- a/modules/cli-tools/default.nix +++ b/modules/cli-tools/default.nix @@ -1,4 +1,4 @@ -{ ... }: +{ inputs, ... }: let commonPackages = pkgs: with pkgs; [ @@ -15,7 +15,6 @@ let just mmv-go usbutils - lazygit opencode ]; in @@ -24,11 +23,47 @@ in { pkgs, ... }: { environment.systemPackages = commonPackages pkgs; + + home-manager.sharedModules = [ + inputs.self.modules.homeManager.git + ]; }; flake.modules.darwin.cli-tools = { pkgs, ... }: { environment.systemPackages = commonPackages pkgs; + + home-manager.sharedModules = [ + inputs.self.modules.homeManager.git + ]; + }; + + flake.modules.homeManager.cli-tools = + { pkgs, ... }: + { + programs.lazygit = { + enable = true; + settings = { + gui = { + nerdFontsVersion = "3"; + theme = { + lightTheme = false; + activeBorderColor = [ + "magenta" + "bold" + ]; + searchingActiveBorderColor = [ + "cyan" + "bold" + ]; + inactiveBorderColor = [ "#807c9f" ]; + optionsTextColor = [ "#807c9f" ]; + selectedLineBgColor = [ "#331531" ]; + inactiveViewSelectedLineBgColor = [ "#1d202f" ]; + }; + }; + }; + }; }; } diff --git a/modules/git/default.nix b/modules/git/default.nix index 7d51347..8adfbc7 100644 --- a/modules/git/default.nix +++ b/modules/git/default.nix @@ -4,7 +4,7 @@ { pkgs, ... }: { environment.systemPackages = with pkgs; [ - git + git ]; home-manager.sharedModules = [ @@ -16,7 +16,7 @@ { pkgs, ... }: { environment.systemPackages = with pkgs; [ - git + git ]; home-manager.sharedModules = [ @@ -24,35 +24,35 @@ ]; }; - flake.modules.homeManager.git = + flake.modules.homeManager.git = { pkgs, config, ... }: { - programs.git = { - enable = true; - settings = { - init = { - defaultBranch = "main"; - }; + programs.git = { + enable = true; + settings = { + init = { + defaultBranch = "main"; + }; - core = { - ignorecase = "false"; - }; + core = { + ignorecase = "false"; + }; - pull = { - rebase = false; - }; + pull = { + rebase = false; + }; - push = { - autoSetupRemote = true; - }; + push = { + autoSetupRemote = true; + }; - user = { - # TODO get from config - name = "Dennis Schoepf"; - email = "me@dnsc.io"; - }; - }; - ignores = [ ".DS_Store" ]; - }; + user = { + # TODO get from config + name = "Dennis Schoepf"; + email = "me@dnsc.io"; + }; + }; + ignores = [ ".DS_Store" ]; + }; }; } From 7632c3686fad9abd8006e6355f02c1794fe0b976 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 19:58:45 +0100 Subject: [PATCH 35/77] adapts neovim config --- modules/clipboard/default.nix | 23 --- modules/neovim/_editing.nix | 174 ++++++++-------- modules/neovim/_formatter.nix | 96 ++++----- modules/neovim/_git.nix | 54 ++--- modules/neovim/_lsp.nix | 364 +++++++++++++++++----------------- modules/neovim/_options.nix | 90 ++++----- modules/neovim/_picker.nix | 332 +++++++++++++++---------------- 7 files changed, 554 insertions(+), 579 deletions(-) delete mode 100644 modules/clipboard/default.nix diff --git a/modules/clipboard/default.nix b/modules/clipboard/default.nix deleted file mode 100644 index abebd44..0000000 --- a/modules/clipboard/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ inputs, ... }: -{ - flake.modules.nixos.clipboard = - { pkgs, ... }: - - { - environment.systemPackages = with pkgs; [ - wl-clipboard - cliphist - ]; - - home-manager.sharedModules = [ - inputs.self.modules.homeManager.clipboard - ]; - }; - - flake.modules.homeManager.clipboard = - { pkgs, ... }: - { - # Watch clipboard and store history via cliphist - services.cliphist.enable = true; - }; -} diff --git a/modules/neovim/_editing.nix b/modules/neovim/_editing.nix index 9b343fe..7ef4f3e 100644 --- a/modules/neovim/_editing.nix +++ b/modules/neovim/_editing.nix @@ -1,96 +1,96 @@ { pkgs, ... }: { - programs.nixvim = { - plugins.sleuth.enable = true; - plugins.nvim-surround.enable = true; - plugins.flash.enable = true; + programs.nixvim = { + plugins.sleuth.enable = true; + plugins.nvim-surround.enable = true; + plugins.flash.enable = true; - plugins.blink-pairs = { - enable = true; - }; + plugins.blink-pairs = { + enable = true; + }; - # Workaround: Neovim 0.11.x does not implement the is? / is-not? treesitter - # predicates, but newer grammar query files (tree-sitter-nix, tree-sitter-javascript) - # use (#is-not? local) to scope highlights to non-local identifiers. - # Register no-op handlers to suppress the error; remove once Neovim - # ships with built-in support for these predicates. - extraConfigLua = /* lua */ '' - -- (#is?) always returns false (node never "is" something) - vim.treesitter.query.add_predicate("is?", function() - return false - end, { force = true }) - -- (#is-not?) always returns true (node is always "not" something) - vim.treesitter.query.add_predicate("is-not?", function() - return true - end, { force = true }) - ''; + # Workaround: Neovim 0.11.x does not implement the is? / is-not? treesitter + # predicates, but newer grammar query files (tree-sitter-nix, tree-sitter-javascript) + # use (#is-not? local) to scope highlights to non-local identifiers. + # Register no-op handlers to suppress the error; remove once Neovim + # ships with built-in support for these predicates. + extraConfigLua = /* lua */ '' + -- (#is?) always returns false (node never "is" something) + vim.treesitter.query.add_predicate("is?", function() + return false + end, { force = true }) + -- (#is-not?) always returns true (node is always "not" something) + vim.treesitter.query.add_predicate("is-not?", function() + return true + end, { force = true }) + ''; - plugins.treesitter = { - enable = true; - highlight.enable = true; - indent.enable = true; - folding.enable = true; + plugins.treesitter = { + enable = true; + highlight.enable = true; + indent.enable = true; + folding.enable = true; - grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ - angular - bash - css - html - javascript - jsdoc - json - lua - make - markdown - markdown_inline - go - gomod - gotmpl - python - styled - tsx - typescript - nix - regex - toml - vim - vimdoc - xml - yaml - ]; - }; - - plugins.substitute = { - enable = true; - luaConfig.post = /* lua */ '' - local sub = require("substitute") - vim.keymap.set("n", "s", sub.operator, { noremap = true }) - vim.keymap.set("n", "ss", sub.line, { noremap = true }) - vim.keymap.set("n", "S", sub.eol, { noremap = true }) - vim.keymap.set("x", "s", sub.visual, { noremap = true }) - ''; - }; - - extraPlugins = [ - pkgs.vimPlugins.vim-cool - ]; - - autoCmd = [ - { - callback.__raw = "function() vim.highlight.on_yank() end"; - event = [ - "TextYankPost" - ]; - } - { - event = [ "FileType" ]; - pattern = "qf"; - callback.__raw = /* lua */ '' - function() - vim.keymap.set("n", "", "", { buffer = true }) - end - ''; - } + grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ + angular + bash + css + html + javascript + jsdoc + json + lua + make + markdown + markdown_inline + go + gomod + gotmpl + python + styled + tsx + typescript + nix + regex + toml + vim + vimdoc + xml + yaml ]; }; + + plugins.substitute = { + enable = true; + luaConfig.post = /* lua */ '' + local sub = require("substitute") + vim.keymap.set("n", "s", sub.operator, { noremap = true }) + vim.keymap.set("n", "ss", sub.line, { noremap = true }) + vim.keymap.set("n", "S", sub.eol, { noremap = true }) + vim.keymap.set("x", "s", sub.visual, { noremap = true }) + ''; + }; + + extraPlugins = [ + pkgs.vimPlugins.vim-cool + ]; + + autoCmd = [ + { + callback.__raw = "function() vim.highlight.on_yank() end"; + event = [ + "TextYankPost" + ]; + } + { + event = [ "FileType" ]; + pattern = "qf"; + callback.__raw = /* lua */ '' + function() + vim.keymap.set("n", "", "", { buffer = true }) + end + ''; + } + ]; + }; } diff --git a/modules/neovim/_formatter.nix b/modules/neovim/_formatter.nix index c94bb31..d3fe959 100644 --- a/modules/neovim/_formatter.nix +++ b/modules/neovim/_formatter.nix @@ -1,55 +1,55 @@ { pkgs, ... }: { - programs.nixvim.plugins.conform-nvim = { - enable = true; - settings = { - formatters_by_ft = { - typescriptreact = { - __unkeyed-1 = "biome-check"; - __unkeyed-2 = "prettierd"; - stop_after_first = true; - }; - astro = [ "prettierd" ]; - typescript = { - __unkeyed-1 = "biome-check"; - __unkeyed-2 = "prettierd"; - stop_after_first = true; - }; - javascript = { - __unkeyed-1 = "biome-check"; - __unkeyed-2 = "prettierd"; - stop_after_first = true; - }; - javascriptreact = { - __unkeyed-1 = "biome-check"; - __unkeyed-2 = "prettierd"; - stop_after_first = true; - }; - html = [ "prettierd" ]; - htmlangular = [ "prettierd" ]; - css = { - __unkeyed-1 = "biome-check"; - __unkeyed-2 = "prettierd"; - stop_after_first = true; - }; - yaml = [ "prettierd" ]; - markdown = [ "prettierd" ]; - json = { - __unkeyed-1 = "biome-check"; - __unkeyed-2 = "prettierd"; - stop_after_first = true; - }; - lua = [ "stylua" ]; - go = [ "goimports" ]; - gomod = [ "goimports" ]; - gowork = [ "goimports" ]; - gotmpl = [ "goimports" ]; + programs.nixvim.plugins.conform-nvim = { + enable = true; + settings = { + formatters_by_ft = { + typescriptreact = { + __unkeyed-1 = "biome-check"; + __unkeyed-2 = "prettierd"; + stop_after_first = true; }; - format_on_save = { - timeout_ms = 500; - lsp_format = "fallback"; + astro = [ "prettierd" ]; + typescript = { + __unkeyed-1 = "biome-check"; + __unkeyed-2 = "prettierd"; + stop_after_first = true; }; + javascript = { + __unkeyed-1 = "biome-check"; + __unkeyed-2 = "prettierd"; + stop_after_first = true; + }; + javascriptreact = { + __unkeyed-1 = "biome-check"; + __unkeyed-2 = "prettierd"; + stop_after_first = true; + }; + html = [ "prettierd" ]; + htmlangular = [ "prettierd" ]; + css = { + __unkeyed-1 = "biome-check"; + __unkeyed-2 = "prettierd"; + stop_after_first = true; + }; + yaml = [ "prettierd" ]; + markdown = [ "prettierd" ]; + json = { + __unkeyed-1 = "biome-check"; + __unkeyed-2 = "prettierd"; + stop_after_first = true; + }; + lua = [ "stylua" ]; + go = [ "goimports" ]; + gomod = [ "goimports" ]; + gowork = [ "goimports" ]; + gotmpl = [ "goimports" ]; + }; + format_on_save = { + timeout_ms = 500; + lsp_format = "fallback"; }; - extraPackages = [ pkgs.stylua ]; }; + extraPackages = [ pkgs.stylua ]; + }; } diff --git a/modules/neovim/_git.nix b/modules/neovim/_git.nix index 69fa283..598339c 100644 --- a/modules/neovim/_git.nix +++ b/modules/neovim/_git.nix @@ -1,31 +1,31 @@ { ... }: { - programs.nixvim = { - plugins.gitportal = { - enable = true; - }; - - keymaps = [ - { - key = "gll"; - action = "GitPortal"; - options.desc = "Open line in Git provider"; - } - { - key = "gll"; - action = "GitPortal"; - options.desc = "Open line in Git provider"; - } - { - key = "gly"; - action = "GitPortal copy_link_to_clipboard"; - options.desc = "Copy link to line at Git provider"; - } - { - key = "glo"; - action = "GitPortal open_link"; - options.desc = "Open link to line at Git provider"; - } - ]; + programs.nixvim = { + plugins.gitportal = { + enable = true; }; + + keymaps = [ + { + key = "gll"; + action = "GitPortal"; + options.desc = "Open line in Git provider"; + } + { + key = "gll"; + action = "GitPortal"; + options.desc = "Open line in Git provider"; + } + { + key = "gly"; + action = "GitPortal copy_link_to_clipboard"; + options.desc = "Copy link to line at Git provider"; + } + { + key = "glo"; + action = "GitPortal open_link"; + options.desc = "Open link to line at Git provider"; + } + ]; + }; } diff --git a/modules/neovim/_lsp.nix b/modules/neovim/_lsp.nix index 92f1d18..4c5ca71 100644 --- a/modules/neovim/_lsp.nix +++ b/modules/neovim/_lsp.nix @@ -1,200 +1,200 @@ { pkgs, ... }: { - programs.nixvim = { - plugins.lspconfig.enable = true; + programs.nixvim = { + plugins.lspconfig.enable = true; - lsp = { - enable = true; + lsp = { + enable = true; - servers = { - lua_ls = { - enable = true; - package = pkgs.lua-language-server; - packageFallback = true; - }; - nil_ls = { - enable = true; - package = pkgs.nil; - packageFallback = true; - }; - gopls = { - enable = true; - package = pkgs.gopls; - packageFallback = true; - }; - ts_ls = { - enable = true; - package = pkgs.typescript-language-server; - packageFallback = true; - }; - jsonls = { - enable = true; - package = pkgs.vscode-langservers-extracted; - packageFallback = true; - }; - cssls = { - enable = true; - package = pkgs.vscode-langservers-extracted; - packageFallback = true; - }; - html = { - enable = true; - package = pkgs.vscode-langservers-extracted; - packageFallback = true; - }; - astro = { - enable = true; - package = pkgs.astro-language-server; - packageFallback = true; - config.init_options.typescript.tsdk = "${pkgs.typescript}/lib/node_modules/typescript/lib"; - }; - eslint = { - enable = true; - package = pkgs.vscode-langservers-extracted; - packageFallback = true; - config = { - root_markers = [ - ".eslintrc" - ".eslintrc.js" - ".eslintrc.cjs" - ".eslintrc.yaml" - ".eslintrc.yml" - ".eslintrc.json" - "eslint.config.js" - "eslint.config.mjs" - "eslint.config.cjs" - "eslint.config.ts" - "eslint.config.mts" - "eslint.config.cts" - "package.json" - ]; - settings = { - validate = "on"; - useESLintClass = false; - experimental = { - useFlatConfig = true; + servers = { + lua_ls = { + enable = true; + package = pkgs.lua-language-server; + packageFallback = true; + }; + nil_ls = { + enable = true; + package = pkgs.nil; + packageFallback = true; + }; + gopls = { + enable = true; + package = pkgs.gopls; + packageFallback = true; + }; + ts_ls = { + enable = true; + package = pkgs.typescript-language-server; + packageFallback = true; + }; + jsonls = { + enable = true; + package = pkgs.vscode-langservers-extracted; + packageFallback = true; + }; + cssls = { + enable = true; + package = pkgs.vscode-langservers-extracted; + packageFallback = true; + }; + html = { + enable = true; + package = pkgs.vscode-langservers-extracted; + packageFallback = true; + }; + astro = { + enable = true; + package = pkgs.astro-language-server; + packageFallback = true; + config.init_options.typescript.tsdk = "${pkgs.typescript}/lib/node_modules/typescript/lib"; + }; + eslint = { + enable = true; + package = pkgs.vscode-langservers-extracted; + packageFallback = true; + config = { + root_markers = [ + ".eslintrc" + ".eslintrc.js" + ".eslintrc.cjs" + ".eslintrc.yaml" + ".eslintrc.yml" + ".eslintrc.json" + "eslint.config.js" + "eslint.config.mjs" + "eslint.config.cjs" + "eslint.config.ts" + "eslint.config.mts" + "eslint.config.cts" + "package.json" + ]; + settings = { + validate = "on"; + useESLintClass = false; + experimental = { + useFlatConfig = true; + }; + codeActionOnSave = { + enable = false; + mode = "all"; + }; + format = true; + quiet = false; + onIgnoredFiles = "off"; + rulesCustomizations = { }; + run = "onType"; + problems = { + shortenToSingleLine = false; + }; + nodePath = ""; + workingDirectory = { + mode = "location"; + }; + codeAction = { + disableRuleComment = { + enable = true; + location = "separateLine"; }; - codeActionOnSave = { - enable = false; - mode = "all"; - }; - format = true; - quiet = false; - onIgnoredFiles = "off"; - rulesCustomizations = { }; - run = "onType"; - problems = { - shortenToSingleLine = false; - }; - nodePath = ""; - workingDirectory = { - mode = "location"; - }; - codeAction = { - disableRuleComment = { - enable = true; - location = "separateLine"; - }; - showDocumentation = { - enable = true; - }; + showDocumentation = { + enable = true; }; }; - handlers = { - "eslint/openDoc".__raw = /* lua */ '' - function(_, result) - if result then - vim.ui.open(result.url) - end - return {} + }; + handlers = { + "eslint/openDoc".__raw = /* lua */ '' + function(_, result) + if result then + vim.ui.open(result.url) end - ''; - "eslint/confirmESLintExecution" = /* lua */ '' - function(_, result) - if not result then - return - end - return 4 -- approved - end - ''; - "eslint/probeFailed" = /* lua */ '' - function() - vim.notify("[lspconfig] ESLint probe failed.", vim.log.levels.WARN) - return {} - end - ''; - "eslint/noLibrary" = /* lua */ '' - function() - vim.notify("[lspconfig] Unable to find ESLint library.", vim.log.levels.WARN) - return {} - end - ''; - }; - on_new_config.__raw = /* lua */ '' - function(config, new_root_dir) - -- This function is called when LSP attaches to a new buffer - -- Set the working directory to the root where eslint config is found - config.settings = config.settings or {} - config.settings.workspaceFolder = { - uri = new_root_dir, - name = vim.fn.fnamemodify(new_root_dir, ":t"), - } - - -- Detect flat config - local flat_config_files = { - "eslint.config.js", - "eslint.config.mjs", - "eslint.config.cjs", - "eslint.config.ts", - "eslint.config.mts", - "eslint.config.cts", - } - - for _, file in ipairs(flat_config_files) do - local config_path = new_root_dir .. "/" .. file - if vim.uv.fs_stat(config_path) then - config.settings.experimental = config.settings.experimental or {} - config.settings.experimental.useFlatConfig = true - break - end - end - - -- Support Yarn PnP - local pnp_cjs = new_root_dir .. "/.pnp.cjs" - local pnp_js = new_root_dir .. "/.pnp.js" - if vim.uv.fs_stat(pnp_cjs) or vim.uv.fs_stat(pnp_js) then - config.cmd = vim.list_extend({ "yarn", "exec" }, config.cmd or {}) + return {} + end + ''; + "eslint/confirmESLintExecution" = /* lua */ '' + function(_, result) + if not result then + return end + return 4 -- approved + end + ''; + "eslint/probeFailed" = /* lua */ '' + function() + vim.notify("[lspconfig] ESLint probe failed.", vim.log.levels.WARN) + return {} + end + ''; + "eslint/noLibrary" = /* lua */ '' + function() + vim.notify("[lspconfig] Unable to find ESLint library.", vim.log.levels.WARN) + return {} end ''; }; - }; - biome = { - enable = true; - package = null; - packageFallback = false; + on_new_config.__raw = /* lua */ '' + function(config, new_root_dir) + -- This function is called when LSP attaches to a new buffer + -- Set the working directory to the root where eslint config is found + config.settings = config.settings or {} + config.settings.workspaceFolder = { + uri = new_root_dir, + name = vim.fn.fnamemodify(new_root_dir, ":t"), + } + + -- Detect flat config + local flat_config_files = { + "eslint.config.js", + "eslint.config.mjs", + "eslint.config.cjs", + "eslint.config.ts", + "eslint.config.mts", + "eslint.config.cts", + } + + for _, file in ipairs(flat_config_files) do + local config_path = new_root_dir .. "/" .. file + if vim.uv.fs_stat(config_path) then + config.settings.experimental = config.settings.experimental or {} + config.settings.experimental.useFlatConfig = true + break + end + end + + -- Support Yarn PnP + local pnp_cjs = new_root_dir .. "/.pnp.cjs" + local pnp_js = new_root_dir .. "/.pnp.js" + if vim.uv.fs_stat(pnp_cjs) or vim.uv.fs_stat(pnp_js) then + config.cmd = vim.list_extend({ "yarn", "exec" }, config.cmd or {}) + end + end + ''; }; }; - - keymaps = [ - { - key = "ca"; - lspBufAction = "code_action"; - } - { - key = "e"; - action = "lua vim.diagnostic.open_float()"; - } - ]; + biome = { + enable = true; + package = null; + packageFallback = false; + }; }; - # Define diagnostic appearance - diagnostic.settings = { - virtual_text = false; - signs = true; - underline = true; - update_in_insert = false; - severity_sort = false; - }; + keymaps = [ + { + key = "ca"; + lspBufAction = "code_action"; + } + { + key = "e"; + action = "lua vim.diagnostic.open_float()"; + } + ]; }; + + # Define diagnostic appearance + diagnostic.settings = { + virtual_text = false; + signs = true; + underline = true; + update_in_insert = false; + severity_sort = false; + }; + }; } diff --git a/modules/neovim/_options.nix b/modules/neovim/_options.nix index e2b1fad..7d8e3c1 100644 --- a/modules/neovim/_options.nix +++ b/modules/neovim/_options.nix @@ -1,50 +1,48 @@ { ... }: { - programs.nixvim = { - globals = { - mapleader = " "; - maplocalleader = " "; - }; - - clipboard.register = "unnamedplus"; - - opts = { - backup = false; - cmdheight = 1; - conceallevel = 0; - fileencoding = "utf-8"; - hlsearch = true; - ignorecase = true; - mouse = "a"; - pumheight = 10; - showmode = false; - smartindent = true; - breakindent = true; - showtabline = 0; - smartcase = true; - splitbelow = true; - splitright = true; - swapfile = false; - termguicolors = true; - timeoutlen = 600; - undofile = true; - updatetime = 230; - writebackup = false; - expandtab = true; - shiftwidth = 2; - tabstop = 2; - cursorline = true; - number = true; - relativenumber = true; - numberwidth = 2; - signcolumn = "yes"; - linebreak = true; - breakat = " ^I!@*-+;:,./?"; - scrolloff = 4; - sidescrolloff = 4; - winbar = ""; - foldlevel = 99; - foldlevelstart = 99; - }; + programs.nixvim = { + globals = { + mapleader = " "; + maplocalleader = " "; }; + + clipboard.register = "unnamedplus"; + + opts = { + backup = false; + cmdheight = 1; + conceallevel = 0; + fileencoding = "utf-8"; + hlsearch = true; + ignorecase = true; + mouse = "a"; + pumheight = 10; + showmode = false; + showtabline = 0; + smartcase = true; + splitbelow = true; + splitright = true; + swapfile = false; + termguicolors = true; + timeoutlen = 600; + undofile = true; + updatetime = 230; + writebackup = false; + expandtab = true; + shiftwidth = 2; + tabstop = 2; + cursorline = true; + number = true; + relativenumber = true; + numberwidth = 2; + signcolumn = "yes"; + linebreak = true; + breakat = " ^I!@*-+;:,./?"; + scrolloff = 4; + sidescrolloff = 4; + winbar = ""; + foldlevel = 99; + foldlevelstart = 99; + }; + }; } diff --git a/modules/neovim/_picker.nix b/modules/neovim/_picker.nix index c1f30b7..2f13fc8 100644 --- a/modules/neovim/_picker.nix +++ b/modules/neovim/_picker.nix @@ -1,172 +1,172 @@ { pkgs, ... }: { - programs.nixvim = { - plugins.oil = { - enable = true; - settings = { - keymaps = { - "q" = "actions.close"; - }; - columns = [ - "icon" - "permissions" - "size" - "mtime" - ]; + programs.nixvim = { + plugins.oil = { + enable = true; + settings = { + keymaps = { + "q" = "actions.close"; }; + columns = [ + "icon" + "permissions" + "size" + "mtime" + ]; }; - - extraPlugins = [ pkgs.vimPlugins.snacks-nvim ]; - extraConfigLua = /* lua */ '' - local Snacks = require("snacks"); - local filter_lsp_definitions = function(item) - if item.file:match("/react/ts5.0/") or item.file:match("react.d.ts") then - return false - end - return true - end - - Snacks.setup({ - bigfile = { enabled = true }, - bufdelete = { enabled = true }, - git = { enabled = true }, - indent = { enabled = true }, - input = { enabled = true }, - notifier = { enabled = true }, - picker = { - enabled = true, - prompt = "λ ", - layout = { preset = "ivy" }, - }, - statuscolumn = { enabled = true }, - }) - ''; - - keymaps = [ - # Git - { - key = "gb"; - action.__raw = "function() Snacks.git.blame_line() end"; - options.desc = "Show git blame for current line"; - } - # Picker - { - key = "."; - action.__raw = "function() Snacks.picker.files({ hidden = true }) end"; - options.desc = "Files"; - } - { - key = ""; - action.__raw = "function() Snacks.picker.git_files() end"; - options.desc = "Git files"; - } - # Find - { - key = "fr"; - action.__raw = "function() Snacks.picker.recent() end"; - options.desc = "Recent"; - } - { - key = "fp"; - action.__raw = "function() Snacks.picker.projects() end"; - options.desc = "Projects"; - } - { - key = "bb"; - action.__raw = "function() Snacks.picker.buffers() end"; - options.desc = "List buffers"; - } - { - key = "bd"; - action.__raw = "function() Snacks.bufdelete() end"; - options.desc = "Delete buffer"; - } - { - key = "bD"; - action.__raw = "function() Snacks.bufdelete.all() end"; - options.desc = "Delete all buffers"; - } - { - key = "bo"; - action.__raw = "function() Snacks.bufdelete.other() end"; - options.desc = "Delete other buffers"; - } - # Search - { - key = "ss"; - action.__raw = "function() Snacks.picker.grep() end"; - options.desc = "Grep"; - } - { - mode = [ - "n" - "x" - ]; - key = "sw"; - action.__raw = "function() Snacks.picker.grep_word() end"; - options.desc = "Visual selection or word"; - } - { - key = "su"; - action.__raw = "function() Snacks.picker.undo() end"; - options.desc = "Undo History"; - } - # Diagnostics - { - key = "td"; - action.__raw = "function() Snacks.picker.diagnostics_buffer() end"; - options.desc = "Buffer Diagnostics"; - } - { - key = "ta"; - action.__raw = "function() Snacks.picker.diagnostics() end"; - options.desc = "Diagnostics"; - } - # LSP - { - key = "gd"; - action.__raw = "function() Snacks.picker.lsp_definitions({ filter = { filter = filter_lsp_definitions } }) end"; - options.desc = "Goto Definition"; - } - { - key = "gD"; - action.__raw = "function() Snacks.picker.lsp_declarations() end"; - options.desc = "Goto Declaration"; - } - { - key = "grr"; - action.__raw = "function() Snacks.picker.lsp_references() end"; - options = { - desc = "References"; - nowait = true; - }; - } - { - key = "gI"; - action.__raw = "function() Snacks.picker.lsp_implementations() end"; - options.desc = "Goto Implementation"; - } - { - key = "gy"; - action.__raw = "function() Snacks.picker.lsp_type_definitions() end"; - options.desc = "Goto T[y]pe Definition"; - } - # Notifications and highlights - { - key = "on"; - action.__raw = "function() Snacks.notifier.show_history() end"; - options.desc = "Open notification history"; - } - { - key = "oh"; - action.__raw = "function() Snacks.picker.highlights() end"; - options.desc = "List highlights"; - } - { - key = "n"; - action = "Oil"; - options.desc = "Opens file explorer"; - } - ]; }; + + extraPlugins = [ pkgs.vimPlugins.snacks-nvim ]; + extraConfigLua = /* lua */ '' + local Snacks = require("snacks"); + local filter_lsp_definitions = function(item) + if item.file:match("/react/ts5.0/") or item.file:match("react.d.ts") then + return false + end + return true + end + + Snacks.setup({ + bigfile = { enabled = true }, + bufdelete = { enabled = true }, + git = { enabled = true }, + indent = { enabled = true }, + input = { enabled = true }, + notifier = { enabled = true }, + picker = { + enabled = true, + prompt = "λ ", + layout = { preset = "ivy" }, + }, + statuscolumn = { enabled = true }, + }) + ''; + + keymaps = [ + # Git + { + key = "gb"; + action.__raw = "function() Snacks.git.blame_line() end"; + options.desc = "Show git blame for current line"; + } + # Picker + { + key = "."; + action.__raw = "function() Snacks.picker.files({ hidden = true }) end"; + options.desc = "Files"; + } + { + key = ""; + action.__raw = "function() Snacks.picker.git_files() end"; + options.desc = "Git files"; + } + # Find + { + key = "fr"; + action.__raw = "function() Snacks.picker.recent() end"; + options.desc = "Recent"; + } + { + key = "fp"; + action.__raw = "function() Snacks.picker.projects() end"; + options.desc = "Projects"; + } + { + key = "bb"; + action.__raw = "function() Snacks.picker.buffers() end"; + options.desc = "List buffers"; + } + { + key = "bd"; + action.__raw = "function() Snacks.bufdelete() end"; + options.desc = "Delete buffer"; + } + { + key = "bD"; + action.__raw = "function() Snacks.bufdelete.all() end"; + options.desc = "Delete all buffers"; + } + { + key = "bo"; + action.__raw = "function() Snacks.bufdelete.other() end"; + options.desc = "Delete other buffers"; + } + # Search + { + key = "ss"; + action.__raw = "function() Snacks.picker.grep() end"; + options.desc = "Grep"; + } + { + mode = [ + "n" + "x" + ]; + key = "sw"; + action.__raw = "function() Snacks.picker.grep_word() end"; + options.desc = "Visual selection or word"; + } + { + key = "su"; + action.__raw = "function() Snacks.picker.undo() end"; + options.desc = "Undo History"; + } + # Diagnostics + { + key = "td"; + action.__raw = "function() Snacks.picker.diagnostics_buffer() end"; + options.desc = "Buffer Diagnostics"; + } + { + key = "ta"; + action.__raw = "function() Snacks.picker.diagnostics() end"; + options.desc = "Diagnostics"; + } + # LSP + { + key = "gd"; + action.__raw = "function() Snacks.picker.lsp_definitions({ filter = { filter = filter_lsp_definitions } }) end"; + options.desc = "Goto Definition"; + } + { + key = "gD"; + action.__raw = "function() Snacks.picker.lsp_declarations() end"; + options.desc = "Goto Declaration"; + } + { + key = "grr"; + action.__raw = "function() Snacks.picker.lsp_references() end"; + options = { + desc = "References"; + nowait = true; + }; + } + { + key = "gI"; + action.__raw = "function() Snacks.picker.lsp_implementations() end"; + options.desc = "Goto Implementation"; + } + { + key = "gy"; + action.__raw = "function() Snacks.picker.lsp_type_definitions() end"; + options.desc = "Goto T[y]pe Definition"; + } + # Notifications and highlights + { + key = "on"; + action.__raw = "function() Snacks.notifier.show_history() end"; + options.desc = "Open notification history"; + } + { + key = "oh"; + action.__raw = "function() Snacks.picker.highlights() end"; + options.desc = "List highlights"; + } + { + key = "n"; + action = "Oil"; + options.desc = "Opens file explorer"; + } + ]; + }; } From 0a079ff2b46ea96046daf1e6c76516b6f3ea5787 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 20:01:07 +0100 Subject: [PATCH 36/77] removes delete module --- modules/hosts/dnsc-machine/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/hosts/dnsc-machine/default.nix b/modules/hosts/dnsc-machine/default.nix index 3d668ed..b1604d7 100644 --- a/modules/hosts/dnsc-machine/default.nix +++ b/modules/hosts/dnsc-machine/default.nix @@ -17,7 +17,6 @@ in nvidia-graphics drawing-tablet bluetooth - clipboard printing desktop terminal From 399faa04399d40e90adedf212c292560f21204d8 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 20:04:07 +0100 Subject: [PATCH 37/77] adds back lazygit --- modules/cli-tools/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/cli-tools/default.nix b/modules/cli-tools/default.nix index 80dff42..8898ef3 100644 --- a/modules/cli-tools/default.nix +++ b/modules/cli-tools/default.nix @@ -16,6 +16,7 @@ let mmv-go usbutils opencode + lazygit ]; in { From d2ab322c0f5b6a0fd913897f9ca3c5253fe549de Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 20:04:23 +0100 Subject: [PATCH 38/77] uses guess-indent instead of sleuth --- modules/neovim/_editing.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/neovim/_editing.nix b/modules/neovim/_editing.nix index 7ef4f3e..619c968 100644 --- a/modules/neovim/_editing.nix +++ b/modules/neovim/_editing.nix @@ -1,7 +1,7 @@ { pkgs, ... }: { programs.nixvim = { - plugins.sleuth.enable = true; + plugins.guess-indent.enable = true; plugins.nvim-surround.enable = true; plugins.flash.enable = true; From 8fb36eeebb19836a3cba62dc568ef2ea869af648 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 20:09:37 +0100 Subject: [PATCH 39/77] tries to fix indenting --- modules/neovim/_editing.nix | 2 +- modules/neovim/_options.nix | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/neovim/_editing.nix b/modules/neovim/_editing.nix index 619c968..cf0eb1c 100644 --- a/modules/neovim/_editing.nix +++ b/modules/neovim/_editing.nix @@ -28,7 +28,7 @@ plugins.treesitter = { enable = true; highlight.enable = true; - indent.enable = true; + indent.enable = false; folding.enable = true; grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ diff --git a/modules/neovim/_options.nix b/modules/neovim/_options.nix index 7d8e3c1..f0dfaf4 100644 --- a/modules/neovim/_options.nix +++ b/modules/neovim/_options.nix @@ -20,6 +20,8 @@ showmode = false; showtabline = 0; smartcase = true; + autoindent = true; + smartindent = true; splitbelow = true; splitright = true; swapfile = false; From ad2a17a3cb90c6cdbf13dbee9de16cdffdfbc717 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 20:19:29 +0100 Subject: [PATCH 40/77] fixes neovim config --- modules/neovim/_editing.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/neovim/_editing.nix b/modules/neovim/_editing.nix index cf0eb1c..c645db9 100644 --- a/modules/neovim/_editing.nix +++ b/modules/neovim/_editing.nix @@ -4,10 +4,7 @@ plugins.guess-indent.enable = true; plugins.nvim-surround.enable = true; plugins.flash.enable = true; - - plugins.blink-pairs = { - enable = true; - }; + plugins.nvim-autopairs.enable = true; # Workaround: Neovim 0.11.x does not implement the is? / is-not? treesitter # predicates, but newer grammar query files (tree-sitter-nix, tree-sitter-javascript) From 566cf638f6b9c076f8b7f8e77322a159a9fa2e85 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 20:24:01 +0100 Subject: [PATCH 41/77] enables scrolling desktop --- AGENTS.md | 245 +++++++++++ flake.lock | 45 ++ flake.nix | 4 + modules/hosts/dnsc-machine/default.nix | 2 +- modules/scrolling-desktop/default.nix | 128 ++++++ modules/scrolling-desktop/niri/config.kdl | 499 ++++++++++++++++++++++ 6 files changed, 922 insertions(+), 1 deletion(-) create mode 100644 AGENTS.md create mode 100644 modules/scrolling-desktop/default.nix create mode 100644 modules/scrolling-desktop/niri/config.kdl diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..0b76ea8 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,245 @@ +# AGENTS.md — nix-config + +Personal NixOS/nix-darwin configuration using flake-parts, import-tree, home-manager, and nixvim. + +--- + +## Repository Overview + +``` +flake.nix # Thin entry: delegates to import-tree ./modules +Justfile # Task runner (deploy, dry-run, update, gc, etc.) +modules/ + config.nix # flake-parts options schema (flake.modules, flake.globalConfig) + systems.nix # Supported systems list + hosts/ + dnsc-machine/ # Only active NixOS host (x86_64-linux) + base/ # macOS system defaults + NixOS locale/boot/user base + / # One directory per feature module + default.nix # Always the primary file + _sub-module.nix # Underscore-prefixed for large module splits +``` + +`import-tree` auto-discovers every `.nix` file under `modules/` — **no manual imports list in flake.nix**. +New modules are picked up automatically; just create `modules//default.nix`. + +--- + +## Build / Validation Commands + +There is no CI and no `nix fmt`/`nix flake check` target configured. + +| Goal | Command | +|---|---| +| Deploy to host | `just deploy ` (`sudo nixos-rebuild switch --flake .#`) | +| Deploy with trace | `just debug ` (adds `--show-trace --verbose`) | +| Dry-run build | `just dry ` — evaluates the closure without realising it | +| Update all inputs | `just update` (`nix flake update`) | +| Garbage collect | `just gc` (`sudo nix-collect-garbage --delete-old`) | +| Wipe old profiles | `just clean` (removes profiles older than 7 days) | +| NixOS REPL | `just repl` | + +**Only active host:** `dnsc-machine` + +``` +just dry dnsc-machine # fastest sanity check — no sudo required +just deploy dnsc-machine +``` + +There are no unit tests or `checks` outputs. Validation = dry-run build succeeds + manual deploy. + +**Linting tools available** (installed as system packages): `nil` (LSP), `statix` (linter). +Run `statix check .` to lint Nix files for common anti-patterns. + +--- + +## Flake Architecture + +``` +inputs.flake-parts → mkFlake framework +inputs.import-tree → auto-loads modules/ +inputs.nixpkgs → nixpkgs-unstable (channel tarball URL, not github:) +inputs.home-manager → follows nixpkgs +inputs.nix-darwin → LnL7/nix-darwin master +inputs.nixvim → nix-community/nixvim +inputs.helium → custom browser flake +inputs.dms → DankMaterialShell (COSMIC alternative desktop) +``` + +**Custom flake-parts options** (defined in `modules/config.nix`): +- `flake.modules.nixos.` — NixOS system modules +- `flake.modules.darwin.` — nix-darwin system modules +- `flake.modules.homeManager.` — home-manager user modules +- `flake.globalConfig.{username,fullname,email}` — shared personal values + +--- + +## Module Pattern + +Every feature lives in `modules//default.nix` and registers itself into the module registry. +Host configs (`modules/hosts//default.nix`) opt in by listing modules explicitly. + +### Standard tri-layer module + +```nix +{ inputs, ... }: +{ + flake.modules.nixos. = + { pkgs, ... }: + { + # NixOS system-level config + home-manager.sharedModules = [ + inputs.self.modules.homeManager. + ]; + }; + + flake.modules.darwin. = + { pkgs, ... }: + { + # nix-darwin system-level config + home-manager.sharedModules = [ + inputs.self.modules.homeManager. + ]; + }; + + flake.modules.homeManager. = + { pkgs, config, ... }: + { + # home-manager user-level config + }; +} +``` + +### System-only module (no HM layer) + +```nix +{ ... }: +{ + flake.modules.nixos. = + { pkgs, ... }: + { + # NixOS config only, e.g. bluetooth, printing, gaming + }; +} +``` + +### Sub-module splitting (for large modules like neovim) + +```nix +flake.modules.homeManager.neovim = + { pkgs, ... }: + { + imports = [ + ./_options.nix + ./_lsp.nix + ./_formatter.nix + ]; + }; +``` + +### Host definition pattern + +```nix +{ inputs, config, ... }: +let + hostname = "dnsc-machine"; +in +{ + flake.nixosConfigurations.dnsc-machine = inputs.nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = with config.flake.modules.nixos; [ + home-manager + base + shell + # ... feature modules by name + { + imports = [ ./_hardware-configuration.nix ]; + networking.hostName = hostname; + system.stateVersion = "24.11"; + } + ]; + }; +} +``` + +--- + +## Code Style + +### Formatting + +- **2-space indentation** throughout, no tabs +- Opening brace on the same line as the attribute/binding +- Closing brace on its own line +- No trailing commas in attribute sets or lists (standard Nix) +- Multi-line function arguments use the exploded form: + ```nix + { + inputs, + config, + ... + }: + ``` + Short arg lists use the inline form: `{ pkgs, ... }:` + +### Inline embedded languages + +Use language comments to enable editor syntax highlighting inside multiline Nix strings: + +```nix +interactiveShellInit = /* fish */ '' + fish_vi_key_bindings insert +''; + +extraConfig = /* lua */ '' + vim.opt.number = true +''; +``` + +### Naming conventions + +| Thing | Convention | Example | +|---|---|---| +| Module directories | `kebab-case` | `cli-tools/`, `nvidia-graphics/` | +| Primary module file | `default.nix` | every feature dir | +| Sub-module files | `_kebab-case.nix` (underscore prefix) | `_lsp.nix`, `_formatter.nix` | +| Hardware config | `_hardware-configuration.nix` | matches sub-module style | +| `flake.modules.nixos.*` keys | `kebab-case` | `flake.modules.nixos.cli-tools` | +| `flake.modules.homeManager.*` keys | `kebab-case` name, `homeManager` namespace | `flake.modules.homeManager.shell` | +| `let` bindings | `camelCase` | `hmConfig`, `commonPackages` | +| Host names | `kebab-case` with owner prefix | `dnsc-machine`, `dnsc-server` | +| Fish functions | `snake_case` | `fish_greeting`, `tmux_sessionizer` | +| Fish abbrs | short lowercase | `lg`, `gg`, `g` | + +### Attribute ordering + +In NixOS/HM options, follow upstream conventions: +- `enable = true;` first +- then primary config attributes +- then nested option sets + +### No conditional feature flags + +Feature modules do **not** use `mkEnableOption`/`mkIf`. Everything in a module is unconditionally enabled when that module is included in a host's modules list. Opt-in/opt-out happens at the host level by adding or removing the module name. + +--- + +## Adding a New Feature Module + +1. Create `modules//default.nix` +2. Define `flake.modules.nixos.` and/or `flake.modules.homeManager.` +3. To activate on a host, add `` to the `modules = with config.flake.modules.nixos; [ ... ]` list in the host's `default.nix` +4. No registration in `flake.nix` needed — `import-tree` picks it up automatically + +--- + +## Commit Style + +Lowercase, brief, imperative — no conventional-commits prefix required: + +``` +add bluetooth module +fix cli tools config +remove gtk handling +update nixpkgs input +``` diff --git a/flake.lock b/flake.lock index 6712a6e..5de2b6a 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,27 @@ { "nodes": { + "dms": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "quickshell": "quickshell" + }, + "locked": { + "lastModified": 1772034342, + "narHash": "sha256-InX8kRyrpVL+MP/gW1qhH9tGtDx2z2gmJ9NfmvUJ35I=", + "owner": "AvengeMedia", + "repo": "DankMaterialShell", + "rev": "47b12d09fc8526f9c231de60848a41b5990b4a37", + "type": "github" + }, + "original": { + "owner": "AvengeMedia", + "ref": "stable", + "repo": "DankMaterialShell", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -167,8 +189,31 @@ "type": "github" } }, + "quickshell": { + "inputs": { + "nixpkgs": [ + "dms", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1766725085, + "narHash": "sha256-O2aMFdDUYJazFrlwL7aSIHbUSEm3ADVZjmf41uBJfHs=", + "ref": "refs/heads/master", + "rev": "41828c4180fb921df7992a5405f5ff05d2ac2fff", + "revCount": 715, + "type": "git", + "url": "https://git.outfoxxed.me/quickshell/quickshell" + }, + "original": { + "rev": "41828c4180fb921df7992a5405f5ff05d2ac2fff", + "type": "git", + "url": "https://git.outfoxxed.me/quickshell/quickshell" + } + }, "root": { "inputs": { + "dms": "dms", "flake-parts": "flake-parts", "helium": "helium", "home-manager": "home-manager", diff --git a/flake.nix b/flake.nix index b93f3bd..bdb77a1 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,10 @@ nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"; nixpkgs-lib.follows = "nixpkgs"; nixvim.url = "github:nix-community/nixvim"; + dms = { + url = "github:AvengeMedia/DankMaterialShell/stable"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = diff --git a/modules/hosts/dnsc-machine/default.nix b/modules/hosts/dnsc-machine/default.nix index b1604d7..1cd1efa 100644 --- a/modules/hosts/dnsc-machine/default.nix +++ b/modules/hosts/dnsc-machine/default.nix @@ -18,7 +18,7 @@ in drawing-tablet bluetooth printing - desktop + scrolling-desktop terminal gaming browser diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix new file mode 100644 index 0000000..49f4cd6 --- /dev/null +++ b/modules/scrolling-desktop/default.nix @@ -0,0 +1,128 @@ +{ inputs, ... }: +{ + flake.modules.nixos.scrolling-desktop = + { pkgs, ... }: + { + programs.niri.enable = true; + security.polkit.enable = true; + services.gnome.gnome-keyring.enable = true; + xdg.portal = { + enable = true; + extraPortals = [ + pkgs.xdg-desktop-portal-gtk + pkgs.xdg-desktop-portal-gnome + ]; + }; + services.gvfs.enable = true; + + services.displayManager = { + enable = true; + ly = { + enable = true; + settings = { + asterisk = "0x2022"; + bigclock = "en"; + default_input = "password"; + doom_fire_height = 1; + doom_top_color = "0x00c57faf"; + doom_middle_color = "0x00d369af"; + doom_bottom_color = "0x00572454"; + session_log = ".local/share/ly-session.log"; + vi_mode = true; + vi_default_mode = "insert"; + bg = "0x000f0b15"; + border_fg = "0x00807c9f"; + box-title = "dnsc-machine"; + }; + }; + }; + + environment.systemPackages = with pkgs; [ + bibata-cursors + gimp + darktable + ]; + + home-manager.sharedModules = [ + inputs.self.modules.homeManager.scrolling-desktop + ]; + }; + + flake.modules.homeManager.scrolling-desktop = + { pkgs, config, ... }: + { + services.polkit-gnome.enable = true; + xdg.desktopEntries = { + screenshot = { + type = "Application"; + name = "Screenshot"; + exec = "niri msg action screenshot"; + icon = "screenie"; + }; + screenshot-screen = { + type = "Application"; + name = "Screenshot Screen"; + exec = "niri msg action screenshot-screen"; + icon = "screenie"; + }; + color-pickers = { + type = "Application"; + name = "Color Picker"; + exec = "hyprpicker -a -f=hex -n -l -q"; + icon = "colorpicker"; + }; + notes = { + type = "Application"; + name = "Notes"; + exec = "ghostty --working-directory=${config.home.homeDirectory}/notes -e nvim -c \":lua Snacks.picker('files')\""; + icon = "gnotes"; + }; + lock = { + type = "Application"; + name = "Lock"; + exec = "hyprlock"; + icon = "lock-screen"; + }; + logout = { + type = "Application"; + name = "Logout"; + exec = "niri msg action quit"; + icon = "administration"; + }; + shutdown = { + type = "Application"; + name = "Shutdown"; + exec = "shutdown now"; + icon = "com.github.bcedu.shutdownscheduler"; + }; + }; + + imports = [ + inputs.dms.homeModules.dank-material-shell + ]; + + programs.dank-material-shell = { + enable = true; + systemd = { + enable = true; + restartIfChanged = true; + }; + + enableSystemMonitoring = true; + enableVPN = true; + enableClipboardPaste = true; + + settings = { + theme = "dark"; + }; + + session = { + isLightMode = false; + }; + }; + + xdg.configFile."niri" = { + source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/niri/config"; + }; + }; +} diff --git a/modules/scrolling-desktop/niri/config.kdl b/modules/scrolling-desktop/niri/config.kdl new file mode 100644 index 0000000..3628011 --- /dev/null +++ b/modules/scrolling-desktop/niri/config.kdl @@ -0,0 +1,499 @@ +// This config is in the KDL format: https://kdl.dev +// "/-" comments out the following node. +// Check the wiki for a full description of the configuration: +// https://yalter.github.io/niri/Configuration:-Introduction + +environment { + QT_QPA_PLATFORMTHEME "qt6ct" +} + +// Input device configuration. +// Find the full list of options on the wiki: +// https://yalter.github.io/niri/Configuration:-Input +input { + keyboard { + xkb { + layout "eu" + } + numlock + } + + // Next sections include libinput settings. + // Omitting settings disables them, or leaves them at their default values. + // All commented-out settings here are examples, not defaults. + touchpad { + // off + tap + // dwt + // dwtp + // drag false + // drag-lock + natural-scroll + // accel-speed 0.2 + // accel-profile "flat" + // scroll-method "two-finger" + // disabled-on-external-mouse + } + + mouse { + // off + // natural-scroll + accel-speed -0.3 + // accel-profile "flat" + // scroll-method "no-scroll" + } + + tablet { + map-to-output "DP-3" + // calibration-matrix 1.0 1.0 1.0 1.0 1.0 1.0 + } + + // Uncomment this to make the mouse warp to the center of newly focused windows. + // warp-mouse-to-focus + + // Focus windows and outputs automatically when moving the mouse into them. + // Setting max-scroll-amount="0%" makes it work only on windows already fully on screen. + // focus-follows-mouse max-scroll-amount="0%" +} + +output "DP-3" { + // off + mode "3440x1440@99.982" + scale 1 + transform "normal" +} + +cursor { + xcursor-theme "Bibata-Modern-Ice" + xcursor-size 24 + hide-when-typing + hide-after-inactive-ms 5000 +} + +layout { + gaps 8 + + // When to center a column when changing focus, options are: + // - "never", default behavior, focusing an off-screen column will keep at the left + // or right edge of the screen. + // - "always", the focused column will always be centered. + // - "on-overflow", focusing a column will center it if it doesn't fit + // together with the previously focused column. + center-focused-column "on-overflow" + + // You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between. + preset-column-widths { + proportion 0.33333 + proportion 0.5 + proportion 0.66667 + } + + default-column-width { proportion 0.5; } + + // By default focus ring and border are rendered as a solid background rectangle + // behind windows. That is, they will show up through semitransparent windows. + // This is because windows using client-side decorations can have an arbitrary shape. + // + // If you don't like that, you should uncomment `prefer-no-csd` below. + // Niri will draw focus ring and border *around* windows that agree to omit their + // client-side decorations. + // + // Alternatively, you can override it with a window rule called + // `draw-border-with-background`. + + // You can change how the focus ring looks. + focus-ring { + // off + width 3 + active-color "#c57faf" + inactive-color "#d369af" + } + + // You can also add a border. It's similar to the focus ring, but always visible. + border { + // The settings are the same as for the focus ring. + // If you enable the border, you probably want to disable the focus ring. + off + + width 4 + active-color "#ffc87f" + inactive-color "#505050" + + // Color of the border around windows that request your attention. + urgent-color "#9b0000" + + // Gradients can use a few different interpolation color spaces. + // For example, this is a pastel rainbow gradient via in="oklch longer hue". + // + // active-gradient from="#e5989b" to="#ffb4a2" angle=45 relative-to="workspace-view" in="oklch longer hue" + + // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view" + } + + // You can enable drop shadows for windows. + shadow { + // Uncomment the next line to enable shadows. + // on + + // By default, the shadow draws only around its window, and not behind it. + // Uncomment this setting to make the shadow draw behind its window. + // + // Note that niri has no way of knowing about the CSD window corner + // radius. It has to assume that windows have square corners, leading to + // shadow artifacts inside the CSD rounded corners. This setting fixes + // those artifacts. + // + // However, instead you may want to set prefer-no-csd and/or + // geometry-corner-radius. Then, niri will know the corner radius and + // draw the shadow correctly, without having to draw it behind the + // window. These will also remove client-side shadows if the window + // draws any. + // + // draw-behind-window true + + // You can change how shadows look. The values below are in logical + // pixels and match the CSS box-shadow properties. + + // Softness controls the shadow blur radius. + softness 30 + + // Spread expands the shadow. + spread 5 + + // Offset moves the shadow relative to the window. + offset x=0 y=5 + + // You can also change the shadow color and opacity. + color "#0007" + } + + // Struts shrink the area occupied by windows, similarly to layer-shell panels. + // You can think of them as a kind of outer gaps. They are set in logical pixels. + // Left and right struts will cause the next window to the side to always be visible. + // Top and bottom struts will simply add outer gaps in addition to the area occupied by + // layer-shell panels and regular gaps. + struts { + // left 64 + // right 64 + // top 64 + // bottom 64 + } +} + +// STARTUP +spawn-at-startup "waybar" +spawn-at-startup "swaync" +spawn-at-startup "swww-daemon" +spawn-sh-at-startup "~/.config/awww/bin/random-bg.sh ~/Pictures/Wallpapers/safe/dark" + +hotkey-overlay { + // Uncomment this line to disable the "Important Hotkeys" pop-up at startup. + skip-at-startup +} + +// Uncomment this line to ask the clients to omit their client-side decorations if possible. +// If the client will specifically ask for CSD, the request will be honored. +// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners. +// This option will also fix border/focus ring drawing behind some semitransparent windows. +// After enabling or disabling this, you need to restart the apps for this to take effect. +prefer-no-csd + +// You can change the path where screenshots are saved. +// A ~ at the front will be expanded to the home directory. +// The path is formatted with strftime(3) to give you the screenshot date and time. +screenshot-path "~/Pictures/Screenshots/taken_at_%Y-%m-%d %H-%M-%S.png" + +// Animation settings. +// The wiki explains how to configure individual animations: +// https://yalter.github.io/niri/Configuration:-Animations +animations { + // Uncomment to turn off all animations. + off + + // Slow down all animations by this factor. Values below 1 speed them up instead. + // slowdown 3.0 +} + +overview { + backdrop-color "#0f0b15" +} + +// Window rules let you adjust behavior for individual windows. +// Find more information on the wiki: +// https://yalter.github.io/niri/Configuration:-Window-Rules + +window-rule { + match app-id=r#"^steam$"# +} + +// window-rule { +// match at-startup=true app-id=r#"^Spotify$"# +// open-on-workspace "media" +// } + +// window-rule { +// match at-startup=true app-id=r#"^Signal$"# +// open-on-workspace "chat" +// } + +// Open the Firefox picture-in-picture player as floating by default. +window-rule { + // This app-id regular expression will work for both: + // - host Firefox (app-id is "firefox") + // - Flatpak Firefox (app-id is "org.mozilla.firefox") + match app-id=r#"zen-beta$"# title="^Picture-in-Picture$" + open-floating true +} + +window-rule { + match app-id=r#"gimp$"# title="^GIMP$" + open-maximized true +} + +// Example: block out two password managers from screen capture. +// (This example rule is commented out with a "/-" in front.) +/-window-rule { + match app-id=r#"^org\.keepassxc\.KeePassXC$"# + match app-id=r#"^org\.gnome\.World\.Secrets$"# + + block-out-from "screen-capture" + + // Use this instead if you want them visible on third-party screenshot tools. + // block-out-from "screencast" +} + +// Example: enable rounded corners for all windows. +// (This example rule is commented out with a "/-" in front.) +window-rule { + geometry-corner-radius 12 + clip-to-geometry true +} + +debug { + // Allows notification actions and window activation from Noctalia. + honor-xdg-activation-with-invalid-serial +} + +binds { + // Keys consist of modifiers separated by + signs, followed by an XKB key name + // in the end. To find an XKB name for a particular key, you may use a program + // like wev. + // + // "Mod" is a special modifier equal to Super when running on a TTY, and to Alt + // when running as a winit window. + // + // Most actions that you can bind here can also be invoked programmatically with + // `niri msg action do-something`. + + // Mod-Shift-/, which is usually the same as Mod-?, + // shows a list of important hotkeys. + Mod+Shift+Slash { show-hotkey-overlay; } + + // Suggested binds for running programs: terminal, app launcher, screen locker. + Mod+Return hotkey-overlay-title="Open a terminal" { spawn "ghostty"; } + Mod+Space hotkey-overlay-title="Launcher" { spawn-sh "noctalia-shell ipc call launcher toggle"; } + Mod+B hotkey-overlay-title="Browser" { spawn "zen-beta"; } + Mod+M hotkey-overlay-title="System Monitor" { spawn-sh "noctalia-shell ipc call systemMonitor toggle"; } + Mod+N hotkey-overlay-title="File Manager" { spawn "nautilus"; } + Mod+Shift+V hotkey-overlay-title="Clipboard" { spawn-sh "noctalia-shell ipc call launcher clipboard"; } + Mod+Shift+M hotkey-overlay-title="Emoji" { spawn-sh "noctalia-shell ipc call launcher emoji"; } + Mod+Alt+L hotkey-overlay-title="Open session menu" { spawn-sh "noctalia-shell ipc call sessionMenu toggle"; } + Mod+Comma hotkey-overlay-title="Open system settings" { spawn-sh "noctalia-shell ipc call settings toggle"; } + + // Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc. + // Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`. + // For example, this is a standard bind to toggle the screen reader (orca). + // Super+Alt+S allow-when-locked=true hotkey-overlay-title=null { spawn-sh "pkill orca || exec orca"; } + + // Example volume keys mappings for PipeWire & WirePlumber. + // The allow-when-locked=true property makes them work even when the session is locked. + // Using spawn-sh allows to pass multiple arguments together with the command. + XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+"; } + XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; } + XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; } + XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; } + + // Example brightness key mappings for brightnessctl. + // You can use regular spawn with multiple arguments too (to avoid going through "sh"), + // but you need to manually put each argument in separate "" quotes. + XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; } + XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; } + + // Open/close the Overview: a zoomed-out view of workspaces and windows. + // You can also move the mouse into the top-left hot corner, + // or do a four-finger swipe up on a touchpad. + Mod+O repeat=false { toggle-overview; } + Mod+Q repeat=false { close-window; } + + Mod+Left { focus-column-left; } + Mod+Down { focus-window-down; } + Mod+Up { focus-window-up; } + Mod+Right { focus-column-right; } + Mod+H { focus-column-left; } + Mod+J { focus-window-or-workspace-down; } + Mod+K { focus-window-or-workspace-up; } + Mod+L { focus-column-right; } + + Mod+Shift+H { move-column-left; } + Mod+Shift+J { move-column-to-workspace-down; } + Mod+Shift+K { move-column-to-workspace-up; } + Mod+Shift+L { move-column-right; } + + Mod+A { focus-column-first; } + Mod+E { focus-column-last; } + Mod+Ctrl+A { move-column-to-first; } + Mod+Ctrl+E { move-column-to-last; } + + Mod+D { focus-workspace-down; } + Mod+U { focus-workspace-up; } + Mod+Ctrl+D { move-column-to-workspace-down; } + Mod+Ctrl+U { move-column-to-workspace-up; } + + Mod+Shift+Page_Down { move-workspace-down; } + Mod+Shift+Page_Up { move-workspace-up; } + Mod+Shift+U { move-workspace-down; } + Mod+Shift+I { move-workspace-up; } + + // You can bind mouse wheel scroll ticks using the following syntax. + // These binds will change direction based on the natural-scroll setting. + // + // To avoid scrolling through workspaces really fast, you can use + // the cooldown-ms property. The bind will be rate-limited to this value. + // You can set a cooldown on any bind, but it's most useful for the wheel. + Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } + Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } + Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; } + Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; } + + Mod+WheelScrollRight { focus-column-right; } + Mod+WheelScrollLeft { focus-column-left; } + Mod+Ctrl+WheelScrollRight { move-column-right; } + Mod+Ctrl+WheelScrollLeft { move-column-left; } + + // Usually scrolling up and down with Shift in applications results in + // horizontal scrolling; these binds replicate that. + Mod+Shift+WheelScrollDown { focus-column-right; } + Mod+Shift+WheelScrollUp { focus-column-left; } + Mod+Ctrl+Shift+WheelScrollDown { move-column-right; } + Mod+Ctrl+Shift+WheelScrollUp { move-column-left; } + + // Similarly, you can bind touchpad scroll "ticks". + // Touchpad scrolling is continuous, so for these binds it is split into + // discrete intervals. + // These binds are also affected by touchpad's natural-scroll, so these + // example binds are "inverted", since we have natural-scroll enabled for + // touchpads by default. + // Mod+TouchpadScrollDown { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02+"; } + // Mod+TouchpadScrollUp { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02-"; } + + // You can refer to workspaces by index. However, keep in mind that + // niri is a dynamic workspace system, so these commands are kind of + // "best effort". Trying to refer to a workspace index bigger than + // the current workspace count will instead refer to the bottommost + // (empty) workspace. + // + // For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on + // will all refer to the 3rd workspace. + Alt+1 { focus-workspace 1; } + Alt+2 { focus-workspace 2; } + Alt+3 { focus-workspace 3; } + Alt+4 { focus-workspace 4; } + Alt+5 { focus-workspace 5; } + Alt+6 { focus-workspace 6; } + Alt+7 { focus-workspace 7; } + Alt+8 { focus-workspace 8; } + Alt+9 { focus-workspace 9; } + Alt+Ctrl+1 { move-column-to-workspace 1; } + Alt+Ctrl+2 { move-column-to-workspace 2; } + Alt+Ctrl+3 { move-column-to-workspace 3; } + Alt+Ctrl+4 { move-column-to-workspace 4; } + Alt+Ctrl+5 { move-column-to-workspace 5; } + Alt+Ctrl+6 { move-column-to-workspace 6; } + Alt+Ctrl+7 { move-column-to-workspace 7; } + Alt+Ctrl+8 { move-column-to-workspace 8; } + Alt+Ctrl+9 { move-column-to-workspace 9; } + + // Alternatively, there are commands to move just a single window: + // Mod+Ctrl+1 { move-window-to-workspace 1; } + + // Switches focus between the current and the previous workspace. + // Mod+Tab { focus-workspace-previous; } + + // The following binds move the focused window in and out of a column. + // If the window is alone, they will consume it into the nearby column to the side. + // If the window is already in a column, they will expel it out. + Mod+Period { consume-or-expel-window-right; } + + // Consume one window from the right to the bottom of the focused column. + // Mod+Comma { consume-window-into-column; } + // Expel the bottom window from the focused column to the right. + // Mod+Period { expel-window-from-column; } + + Mod+R { switch-preset-column-width; } + // Cycling through the presets in reverse order is also possible. + // Mod+R { switch-preset-column-width-back; } + Mod+Shift+R { switch-preset-window-height; } + Mod+Ctrl+R { reset-window-height; } + Mod+F { maximize-column; } + Mod+Shift+F { fullscreen-window; } + + // Expand the focused column to space not taken up by other fully visible columns. + // Makes the column "fill the rest of the space". + Mod+Ctrl+F { expand-column-to-available-width; } + + Mod+C { center-column; } + + // Center all fully visible columns on screen. + Mod+Ctrl+C { center-visible-columns; } + + // Finer width adjustments. + // This command can also: + // * set width in pixels: "1000" + // * adjust width in pixels: "-5" or "+5" + // * set width as a percentage of screen width: "25%" + // * adjust width as a percentage of screen width: "-10%" or "+10%" + // Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0, + // set-column-width "100" will make the column occupy 200 physical screen pixels. + Mod+Minus { set-column-width "-10%"; } + Mod+Equal { set-column-width "+10%"; } + + // Finer height adjustments when in column with other windows. + Mod+Shift+Minus { set-window-height "-10%"; } + Mod+Shift+Equal { set-window-height "+10%"; } + + // Move the focused window between the floating and the tiling layout. + Mod+Shift+S { toggle-window-floating; } + // Mod+Shift+V { switch-focus-between-floating-and-tiling; } + + // Toggle tabbed column display mode. + // Windows in this column will appear as vertical tabs, + // rather than stacked on top of each other. + // Mod+W { toggle-column-tabbed-display; } + + // Actions to switch layouts. + // Note: if you uncomment these, make sure you do NOT have + // a matching layout switch hotkey configured in xkb options above. + // Having both at once on the same hotkey will break the switching, + // since it will switch twice upon pressing the hotkey (once by xkb, once by niri). + // Mod+Space { switch-layout "next"; } + // Mod+Shift+Space { switch-layout "prev"; } + + Print { screenshot; } + + // Applications such as remote-desktop clients and software KVM switches may + // request that niri stops processing the keyboard shortcuts defined here + // so they may, for example, forward the key presses as-is to a remote machine. + // It's a good idea to bind an escape hatch to toggle the inhibitor, + // so a buggy application can't hold your session hostage. + // + // The allow-inhibiting=false property can be applied to other binds as well, + + // The quit action will show a confirmation dialog to avoid accidental exits. + Mod+Shift+E { quit; } + Ctrl+Alt+Delete { quit; } +} + +xwayland-satellite { + // off + path "xwayland-satellite" +} From f5111eeadfd2f1d2ff17d1f5b63a10e7a5d614d0 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 20:33:03 +0100 Subject: [PATCH 42/77] fixes desktop --- modules/scrolling-desktop/default.nix | 58 +++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index 49f4cd6..74ab18f 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -38,9 +38,20 @@ }; environment.systemPackages = with pkgs; [ + xwayland-satellite bibata-cursors gimp darktable + reversal-icon-theme + nerd-fonts.victor-mono + adwaita-fonts + bodoni-moda + nautilus + nautilus-open-any-terminal + noto-fonts-color-emoji + adw-gtk3 + kdePackages.qt6ct + usbutils ]; home-manager.sharedModules = [ @@ -52,6 +63,16 @@ { pkgs, config, ... }: { services.polkit-gnome.enable = true; + services.mpris-proxy.enable = true; + services.udiskie = { + enable = true; + settings = { + program_options = { + file_manager = "${pkgs.nautilus}/bin/nautilus"; + }; + }; + }; + xdg.desktopEntries = { screenshot = { type = "Application"; @@ -97,6 +118,43 @@ }; }; + fonts.fontconfig = { + enable = true; + antialiasing = true; + defaultFonts = { + monospace = [ "VictorMono Nerd Font" ]; + sansSerif = [ + "Adwaita Sans" + "Noto Color Emoji" + ]; + serif = [ "Bodoni Moda" ]; + }; + }; + + gtk = { + enable = true; + colorScheme = "dark"; + theme.name = "adw-gtk3"; + font = { + package = pkgs.adwaita-fonts; + name = "Adwaita Sans"; + size = 11; + }; + iconTheme = { + package = pkgs.reversal-icon-theme; + name = "Reversal-dark"; + }; + gtk4.iconTheme = { + package = pkgs.reversal-icon-theme; + name = "Reversal-dark"; + }; + cursorTheme = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; + size = 24; + }; + }; + imports = [ inputs.dms.homeModules.dank-material-shell ]; From 4ae45b7ddeaa8cf93b3e62e863b7c2c59b2109d2 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 20:46:15 +0100 Subject: [PATCH 43/77] updates niri config --- modules/scrolling-desktop/default.nix | 10 +-- modules/scrolling-desktop/niri/config.kdl | 86 ++++++++++++++--------- 2 files changed, 52 insertions(+), 44 deletions(-) diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index 74ab18f..00ed2b0 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -64,14 +64,6 @@ { services.polkit-gnome.enable = true; services.mpris-proxy.enable = true; - services.udiskie = { - enable = true; - settings = { - program_options = { - file_manager = "${pkgs.nautilus}/bin/nautilus"; - }; - }; - }; xdg.desktopEntries = { screenshot = { @@ -180,7 +172,7 @@ }; xdg.configFile."niri" = { - source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/niri/config"; + source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/scrolling-desktop/niri"; }; }; } diff --git a/modules/scrolling-desktop/niri/config.kdl b/modules/scrolling-desktop/niri/config.kdl index 3628011..f526899 100644 --- a/modules/scrolling-desktop/niri/config.kdl +++ b/modules/scrolling-desktop/niri/config.kdl @@ -4,7 +4,11 @@ // https://yalter.github.io/niri/Configuration:-Introduction environment { - QT_QPA_PLATFORMTHEME "qt6ct" + XDG_CURRENT_DESKTOP "niri" + QT_QPA_PLATFORM "wayland" + ELECTRON_OZONE_PLATFORM_HINT "auto" + QT_QPA_PLATFORMTHEME "gtk3" + QT_QPA_PLATFORMTHEME_QT6 "gtk3" } // Input device configuration. @@ -71,7 +75,8 @@ cursor { } layout { - gaps 8 + gaps 5 + background-color "transparent" // When to center a column when changing focus, options are: // - "never", default behavior, focusing an off-screen column will keep at the left @@ -180,12 +185,17 @@ layout { } } -// STARTUP -spawn-at-startup "waybar" -spawn-at-startup "swaync" -spawn-at-startup "swww-daemon" -spawn-sh-at-startup "~/.config/awww/bin/random-bg.sh ~/Pictures/Wallpapers/safe/dark" +layer-rule { + match namespace="^quickshell$" + place-within-backdrop true +} +layer-rule { + match namespace="dms:blurwallpaper" + place-within-backdrop true +} + +// STARTUP hotkey-overlay { // Uncomment this line to disable the "Important Hotkeys" pop-up at startup. skip-at-startup @@ -269,11 +279,6 @@ window-rule { clip-to-geometry true } -debug { - // Allows notification actions and window activation from Noctalia. - honor-xdg-activation-with-invalid-serial -} - binds { // Keys consist of modifiers separated by + signs, followed by an XKB key name // in the end. To find an XKB name for a particular key, you may use a program @@ -289,33 +294,44 @@ binds { // shows a list of important hotkeys. Mod+Shift+Slash { show-hotkey-overlay; } - // Suggested binds for running programs: terminal, app launcher, screen locker. - Mod+Return hotkey-overlay-title="Open a terminal" { spawn "ghostty"; } - Mod+Space hotkey-overlay-title="Launcher" { spawn-sh "noctalia-shell ipc call launcher toggle"; } - Mod+B hotkey-overlay-title="Browser" { spawn "zen-beta"; } - Mod+M hotkey-overlay-title="System Monitor" { spawn-sh "noctalia-shell ipc call systemMonitor toggle"; } + Mod+B hotkey-overlay-title="Browser" { spawn "helium"; } Mod+N hotkey-overlay-title="File Manager" { spawn "nautilus"; } - Mod+Shift+V hotkey-overlay-title="Clipboard" { spawn-sh "noctalia-shell ipc call launcher clipboard"; } - Mod+Shift+M hotkey-overlay-title="Emoji" { spawn-sh "noctalia-shell ipc call launcher emoji"; } - Mod+Alt+L hotkey-overlay-title="Open session menu" { spawn-sh "noctalia-shell ipc call sessionMenu toggle"; } - Mod+Comma hotkey-overlay-title="Open system settings" { spawn-sh "noctalia-shell ipc call settings toggle"; } + Mod+Return hotkey-overlay-title="Open a terminal" { spawn "ghostty"; } + Mod+Space hotkey-overlay-title="Application Launcher" { + spawn "dms" "ipc" "call" "spotlight" "toggle"; + } + Mod+V hotkey-overlay-title="Clipboard Manager" { + spawn "dms" "ipc" "call" "clipboard" "toggle"; + } + Mod+M hotkey-overlay-title="Task Manager" { + spawn "dms" "ipc" "call" "processlist" "focusOrToggle"; + } + Mod+Comma hotkey-overlay-title="Settings" { + spawn "dms" "ipc" "call" "settings" "focusOrToggle"; + } + Mod+N hotkey-overlay-title="Notification Center" { + spawn "dms" "ipc" "call" "notifications" "toggle"; + } + Mod+Y hotkey-overlay-title="Browse Wallpapers" { + spawn "dms" "ipc" "call" "dankdash" "wallpaper"; + } - // Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc. - // Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`. - // For example, this is a standard bind to toggle the screen reader (orca). - // Super+Alt+S allow-when-locked=true hotkey-overlay-title=null { spawn-sh "pkill orca || exec orca"; } + // Security + Mod+Alt+L hotkey-overlay-title="Lock Screen" { + spawn "dms" "ipc" "call" "lock" "lock"; + } - // Example volume keys mappings for PipeWire & WirePlumber. - // The allow-when-locked=true property makes them work even when the session is locked. - // Using spawn-sh allows to pass multiple arguments together with the command. - XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+"; } - XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; } - XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; } - XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; } + // Audio Controls + XF86AudioRaiseVolume allow-when-locked=true { + spawn "dms" "ipc" "call" "audio" "increment" "3"; + } + XF86AudioLowerVolume allow-when-locked=true { + spawn "dms" "ipc" "call" "audio" "decrement" "3"; + } + XF86AudioMute allow-when-locked=true { + spawn "dms" "ipc" "call" "audio" "mute"; + } - // Example brightness key mappings for brightnessctl. - // You can use regular spawn with multiple arguments too (to avoid going through "sh"), - // but you need to manually put each argument in separate "" quotes. XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; } XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; } From 91733a296b5aa2faca46240b39e59b712033d8fd Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 20:50:06 +0100 Subject: [PATCH 44/77] fixes keybinds --- modules/scrolling-desktop/niri/config.kdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/scrolling-desktop/niri/config.kdl b/modules/scrolling-desktop/niri/config.kdl index f526899..273a2f8 100644 --- a/modules/scrolling-desktop/niri/config.kdl +++ b/modules/scrolling-desktop/niri/config.kdl @@ -309,7 +309,7 @@ binds { Mod+Comma hotkey-overlay-title="Settings" { spawn "dms" "ipc" "call" "settings" "focusOrToggle"; } - Mod+N hotkey-overlay-title="Notification Center" { + Mod+S hotkey-overlay-title="Notification Center" { spawn "dms" "ipc" "call" "notifications" "toggle"; } Mod+Y hotkey-overlay-title="Browse Wallpapers" { From a4a12dd340bd1b42cd825263ceb15c59d272f7be Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 21:22:58 +0100 Subject: [PATCH 45/77] updates scrolling desktop config --- modules/scrolling-desktop/default.nix | 598 +++++++++++++++++- modules/scrolling-desktop/niri/config.kdl | 6 + .../niri/config.kdl.backup1772654511 | 515 +++++++++++++++ modules/scrolling-desktop/niri/dms/alttab.kdl | 10 + modules/scrolling-desktop/niri/dms/binds.kdl | 0 modules/scrolling-desktop/niri/dms/colors.kdl | 39 ++ modules/scrolling-desktop/niri/dms/cursor.kdl | 9 + modules/scrolling-desktop/niri/dms/layout.kdl | 22 + .../scrolling-desktop/niri/dms/outputs.kdl | 0 .../niri/dms/windowrules.kdl | 0 modules/scrolling-desktop/niri/dms/wpblur.kdl | 9 + 11 files changed, 1206 insertions(+), 2 deletions(-) create mode 100644 modules/scrolling-desktop/niri/config.kdl.backup1772654511 create mode 100644 modules/scrolling-desktop/niri/dms/alttab.kdl create mode 100644 modules/scrolling-desktop/niri/dms/binds.kdl create mode 100644 modules/scrolling-desktop/niri/dms/colors.kdl create mode 100644 modules/scrolling-desktop/niri/dms/cursor.kdl create mode 100644 modules/scrolling-desktop/niri/dms/layout.kdl create mode 100644 modules/scrolling-desktop/niri/dms/outputs.kdl create mode 100644 modules/scrolling-desktop/niri/dms/windowrules.kdl create mode 100644 modules/scrolling-desktop/niri/dms/wpblur.kdl diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index 00ed2b0..a25dd8a 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -43,7 +43,6 @@ gimp darktable reversal-icon-theme - nerd-fonts.victor-mono adwaita-fonts bodoni-moda nautilus @@ -151,6 +150,10 @@ inputs.dms.homeModules.dank-material-shell ]; + home.package = with pkgs; [ + nerd-fonts.victor-mono + ]; + programs.dank-material-shell = { enable = true; systemd = { @@ -163,11 +166,602 @@ enableClipboardPaste = true; settings = { - theme = "dark"; + currentThemeName = "dynamic"; + currentThemeCategory = "dynamic"; + customThemeFile = ""; + registryThemeVariants = { }; + matugenScheme = "scheme-tonal-spot"; + runUserMatugenTemplates = true; + matugenTargetMonitor = ""; + popupTransparency = 1; + dockTransparency = 1; + widgetBackgroundColor = "sch"; + widgetColorMode = "default"; + controlCenterTileColorMode = "primary"; + buttonColorMode = "primary"; + cornerRadius = 12; + niriLayoutGapsOverride = 8; + layoutBorderSize = 2; + showSeconds = false; + padHours12Hour = false; + useFahrenheit = false; + windSpeedUnit = "ms"; + nightModeEnabled = false; + animationSpeed = 1; + customAnimationDuration = 500; + syncComponentAnimationSpeeds = true; + popoutAnimationSpeed = 1; + popoutCustomAnimationDuration = 150; + modalAnimationSpeed = 1; + modalCustomAnimationDuration = 150; + enableRippleEffects = false; + wallpaperFillMode = "Fill"; + blurredWallpaperLayer = false; + blurWallpaperOnOverview = false; + showLauncherButton = true; + showWorkspaceSwitcher = true; + showFocusedWindow = true; + showWeather = true; + showMusic = true; + showClipboard = true; + showCpuUsage = true; + showMemUsage = true; + showCpuTemp = true; + showGpuTemp = true; + selectedGpuIndex = 0; + enabledGpuPciIds = [ ]; + showSystemTray = true; + showClock = true; + showNotificationButton = true; + showBattery = true; + showControlCenterButton = true; + showCapsLockIndicator = true; + controlCenterShowNetworkIcon = true; + controlCenterShowBluetoothIcon = true; + controlCenterShowAudioIcon = true; + controlCenterShowAudioPercent = false; + controlCenterShowVpnIcon = true; + controlCenterShowBrightnessIcon = false; + controlCenterShowBrightnessPercent = false; + controlCenterShowMicIcon = false; + controlCenterShowMicPercent = false; + controlCenterShowBatteryIcon = false; + controlCenterShowPrinterIcon = false; + controlCenterShowScreenSharingIcon = true; + showPrivacyButton = true; + privacyShowMicIcon = false; + privacyShowCameraIcon = false; + privacyShowScreenShareIcon = false; + controlCenterWidgets = [ + { + id = "volumeSlider"; + enabled = true; + width = 50; + } + { + id = "brightnessSlider"; + enabled = true; + width = 50; + } + { + id = "wifi"; + enabled = true; + width = 50; + } + { + id = "bluetooth"; + enabled = true; + width = 50; + } + { + id = "audioOutput"; + enabled = true; + width = 50; + } + { + id = "audioInput"; + enabled = true; + width = 50; + } + { + id = "nightMode"; + enabled = true; + width = 50; + } + { + id = "darkMode"; + enabled = true; + width = 50; + } + ]; + showWorkspaceIndex = true; + showWorkspaceName = false; + showWorkspacePadding = false; + workspaceScrolling = false; + showWorkspaceApps = false; + workspaceDragReorder = true; + maxWorkspaceIcons = 3; + workspaceAppIconSizeOffset = 0; + groupWorkspaceApps = true; + workspaceFollowFocus = false; + showOccupiedWorkspacesOnly = false; + reverseScrolling = false; + dwlShowAllTags = false; + workspaceColorMode = "default"; + workspaceOccupiedColorMode = "none"; + workspaceUnfocusedColorMode = "default"; + workspaceUrgentColorMode = "default"; + workspaceFocusedBorderEnabled = false; + workspaceFocusedBorderColor = "primary"; + workspaceFocusedBorderThickness = 2; + workspaceNameIcons = { }; + waveProgressEnabled = true; + scrollTitleEnabled = true; + audioVisualizerEnabled = false; + audioScrollMode = "volume"; + audioWheelScrollAmount = 5; + clockCompactMode = false; + focusedWindowCompactMode = false; + runningAppsCompactMode = true; + barMaxVisibleApps = 0; + barMaxVisibleRunningApps = 0; + barShowOverflowBadge = true; + appsDockHideIndicators = false; + appsDockColorizeActive = false; + appsDockActiveColorMode = "primary"; + appsDockEnlargeOnHover = false; + appsDockEnlargePercentage = 125; + appsDockIconSizePercentage = 100; + keyboardLayoutNameCompactMode = false; + runningAppsCurrentWorkspace = true; + runningAppsGroupByApp = false; + runningAppsCurrentMonitor = false; + appIdSubstitutions = [ + { + pattern = "Spotify"; + replacement = "spotify"; + type = "exact"; + } + { + pattern = "beepertexts"; + replacement = "beeper"; + type = "exact"; + } + { + pattern = "home assistant desktop"; + replacement = "homeassistant-desktop"; + type = "exact"; + } + { + pattern = "com.transmissionbt.transmission"; + replacement = "transmission-gtk"; + type = "contains"; + } + { + pattern = "^steam_app_(\\d+)$"; + replacement = "steam_icon_$1"; + type = "regex"; + } + ]; + centeringMode = "index"; + clockDateFormat = "dddd, MMMM d"; + lockDateFormat = "dddd, MMMM d"; + mediaSize = 1; + appLauncherViewMode = "list"; + spotlightModalViewMode = "list"; + browserPickerViewMode = "grid"; + browserUsageHistory = { }; + appPickerViewMode = "grid"; + filePickerUsageHistory = { }; + sortAppsAlphabetically = false; + appLauncherGridColumns = 4; + spotlightCloseNiriOverview = true; + spotlightSectionViewModes = { }; + appDrawerSectionViewModes = { }; + niriOverviewOverlayEnabled = true; + dankLauncherV2Size = "compact"; + dankLauncherV2BorderEnabled = false; + dankLauncherV2BorderThickness = 2; + dankLauncherV2BorderColor = "primary"; + dankLauncherV2ShowFooter = true; + dankLauncherV2UnloadOnClose = false; + useAutoLocation = false; + weatherEnabled = true; + networkPreference = "auto"; + iconTheme = "System Default"; + cursorSettings = { + theme = "Bibata-Modern-Ice"; + size = 24; + niri = { + hideWhenTyping = false; + hideAfterInactiveMs = 0; + }; + hyprland = { + hideOnKeyPress = false; + hideOnTouch = false; + inactiveTimeout = 0; + }; + dwl = { + cursorHideTimeout = 0; + }; + }; + launcherLogoMode = "apps"; + launcherLogoCustomPath = ""; + launcherLogoColorOverride = ""; + launcherLogoColorInvertOnMode = false; + launcherLogoBrightness = 0.5; + launcherLogoContrast = 1; + launcherLogoSizeOffset = 0; + fontFamily = "Adwaita Sans"; + monoFontFamily = "Fira Code"; + fontWeight = 400; + fontScale = 1; + notepadUseMonospace = true; + notepadFontFamily = ""; + notepadFontSize = 14; + notepadShowLineNumbers = false; + adLastCustomTransparency = 0.7; + soundsEnabled = true; + useSystemSoundTheme = false; + soundNewNotification = true; + soundVolumeChanged = true; + soundPluggedIn = true; + acMonitorTimeout = 0; + acLockTimeout = 0; + acSuspendTimeout = 0; + acSuspendBehavior = 0; + acProfileName = ""; + batteryMonitorTimeout = 0; + batteryLockTimeout = 0; + batterySuspendTimeout = 0; + batterySuspendBehavior = 0; + batteryProfileName = ""; + batteryChargeLimit = 100; + lockBeforeSuspend = false; + loginctlLockIntegration = true; + fadeToLockEnabled = true; + fadeToLockGracePeriod = 5; + fadeToDpmsEnabled = true; + fadeToDpmsGracePeriod = 5; + launchPrefix = ""; + brightnessDevicePins = { }; + wifiNetworkPins = { }; + bluetoothDevicePins = { }; + audioInputDevicePins = { }; + audioOutputDevicePins = { }; + gtkThemingEnabled = false; + qtThemingEnabled = false; + syncModeWithPortal = true; + terminalsAlwaysDark = false; + runDmsMatugenTemplates = true; + matugenTemplateGtk = true; + matugenTemplateNiri = true; + matugenTemplateHyprland = true; + matugenTemplateMangowc = true; + matugenTemplateQt5ct = true; + matugenTemplateQt6ct = true; + matugenTemplateFirefox = true; + matugenTemplatePywalfox = true; + matugenTemplateZenBrowser = true; + matugenTemplateVesktop = true; + matugenTemplateEquibop = true; + matugenTemplateGhostty = false; + matugenTemplateKitty = true; + matugenTemplateFoot = true; + matugenTemplateAlacritty = true; + matugenTemplateNeovim = false; + matugenTemplateWezterm = true; + matugenTemplateDgop = true; + matugenTemplateKcolorscheme = true; + matugenTemplateVscode = true; + matugenTemplateEmacs = true; + showDock = false; + dockAutoHide = false; + dockSmartAutoHide = false; + dockGroupByApp = false; + dockOpenOnOverview = false; + dockPosition = 1; + dockSpacing = 4; + dockBottomGap = 0; + dockMargin = 0; + dockIconSize = 40; + dockIndicatorStyle = "circle"; + dockBorderEnabled = false; + dockBorderColor = "surfaceText"; + dockBorderOpacity = 1; + dockBorderThickness = 1; + dockIsolateDisplays = false; + dockLauncherEnabled = false; + dockLauncherLogoMode = "apps"; + dockLauncherLogoCustomPath = ""; + dockLauncherLogoColorOverride = ""; + dockLauncherLogoSizeOffset = 0; + dockLauncherLogoBrightness = 0.5; + dockLauncherLogoContrast = 1; + dockMaxVisibleApps = 0; + dockMaxVisibleRunningApps = 0; + dockShowOverflowBadge = true; + notificationOverlayEnabled = false; + notificationPopupShadowEnabled = true; + notificationPopupPrivacyMode = false; + modalDarkenBackground = true; + lockScreenShowPowerActions = true; + lockScreenShowSystemIcons = true; + lockScreenShowTime = true; + lockScreenShowDate = true; + lockScreenShowProfileImage = true; + lockScreenShowPasswordField = true; + lockScreenShowMediaPlayer = true; + lockScreenPowerOffMonitorsOnLock = false; + lockAtStartup = false; + enableFprint = false; + maxFprintTries = 15; + lockScreenActiveMonitor = "all"; + lockScreenInactiveColor = "#000000"; + lockScreenNotificationMode = 0; + hideBrightnessSlider = false; + notificationTimeoutLow = 5000; + notificationTimeoutNormal = 5000; + notificationTimeoutCritical = 0; + notificationCompactMode = false; + notificationPopupPosition = 0; + notificationAnimationSpeed = 1; + notificationCustomAnimationDuration = 400; + notificationHistoryEnabled = true; + notificationHistoryMaxCount = 50; + notificationHistoryMaxAgeDays = 7; + notificationHistorySaveLow = true; + notificationHistorySaveNormal = true; + notificationHistorySaveCritical = true; + notificationRules = [ ]; + osdAlwaysShowValue = false; + osdPosition = 5; + osdVolumeEnabled = true; + osdMediaVolumeEnabled = true; + osdMediaPlaybackEnabled = false; + osdBrightnessEnabled = true; + osdIdleInhibitorEnabled = true; + osdMicMuteEnabled = true; + osdCapsLockEnabled = true; + osdPowerProfileEnabled = false; + osdAudioOutputEnabled = true; + powerActionConfirm = true; + powerActionHoldDuration = 0.5; + powerMenuActions = [ + "reboot" + "logout" + "poweroff" + "lock" + "suspend" + "restart" + ]; + powerMenuDefaultAction = "logout"; + powerMenuGridLayout = false; + customPowerActionLock = ""; + customPowerActionLogout = ""; + customPowerActionSuspend = ""; + customPowerActionHibernate = ""; + customPowerActionReboot = ""; + customPowerActionPowerOff = ""; + updaterHideWidget = false; + updaterUseCustomCommand = false; + updaterCustomCommand = ""; + updaterTerminalAdditionalParams = ""; + displayNameMode = "system"; + screenPreferences = { }; + showOnLastDisplay = { }; + niriOutputSettings = { }; + hyprlandOutputSettings = { }; + displayProfiles = { }; + activeDisplayProfile = { }; + displayProfileAutoSelect = false; + displayShowDisconnected = false; + displaySnapToEdge = true; + barConfigs = [ + { + id = "default"; + name = "Main Bar"; + enabled = true; + position = 0; + screenPreferences = [ + "all" + ]; + showOnLastDisplay = true; + leftWidgets = [ + { + id = "workspaceSwitcher"; + enabled = true; + } + { + id = "focusedWindow"; + enabled = true; + } + { + id = "appsDock"; + enabled = true; + } + ]; + centerWidgets = [ + "music" + ]; + rightWidgets = [ + { + id = "systemTray"; + enabled = true; + } + { + id = "clipboard"; + enabled = true; + } + { + id = "clock"; + enabled = true; + } + { + id = "controlCenterButton"; + enabled = true; + } + ]; + spacing = 0; + transparency = 1; + widgetTransparency = 1; + squareCorners = true; + noBackground = false; + gothCornersEnabled = false; + gothCornerRadiusOverride = false; + gothCornerRadiusValue = 12; + borderEnabled = false; + borderColor = "surfaceText"; + borderOpacity = 1; + borderThickness = 1; + fontScale = 1.05; + autoHide = false; + autoHideDelay = 250; + openOnOverview = false; + visible = true; + popupGapsAuto = true; + popupGapsManual = 0; + maximizeDetection = false; + widgetPadding = 12; + iconScale = 1.1; + maximizeWidgetIcons = false; + maximizeWidgetText = false; + removeWidgetPadding = false; + shadowIntensity = 0; + shadowOpacity = 37; + widgetOutlineEnabled = false; + } + ]; + desktopClockEnabled = false; + desktopClockStyle = "analog"; + desktopClockTransparency = 0.8; + desktopClockColorMode = "primary"; + desktopClockShowDate = true; + desktopClockShowAnalogNumbers = false; + desktopClockShowAnalogSeconds = true; + desktopClockWidth = 280; + desktopClockHeight = 180; + desktopClockDisplayPreferences = [ + "all" + ]; + systemMonitorEnabled = false; + systemMonitorShowHeader = true; + systemMonitorTransparency = 0.8; + systemMonitorColorMode = "primary"; + systemMonitorShowCpu = true; + systemMonitorShowCpuGraph = true; + systemMonitorShowCpuTemp = true; + systemMonitorShowGpuTemp = false; + systemMonitorGpuPciId = ""; + systemMonitorShowMemory = true; + systemMonitorShowMemoryGraph = true; + systemMonitorShowNetwork = true; + systemMonitorShowNetworkGraph = true; + systemMonitorShowDisk = true; + systemMonitorShowTopProcesses = false; + systemMonitorTopProcessCount = 3; + systemMonitorTopProcessSortBy = "cpu"; + systemMonitorGraphInterval = 60; + systemMonitorLayoutMode = "auto"; + systemMonitorWidth = 320; + systemMonitorHeight = 480; + systemMonitorDisplayPreferences = [ + "all" + ]; + systemMonitorVariants = [ ]; + desktopWidgetPositions = { }; + desktopWidgetGridSettings = { }; + desktopWidgetInstances = [ ]; + desktopWidgetGroups = [ ]; + builtInPluginSettings = { + dms_settings_search = { + trigger = "?"; + }; + }; + clipboardEnterToPaste = false; + launcherPluginVisibility = { }; + launcherPluginOrder = [ ]; + configVersion = 5; }; session = { isLightMode = false; + doNotDisturb = false; + wallpaperPath = "/home/dennis/Pictures/Wallpapers/safe/dark/mountain.jpg"; + perMonitorWallpaper = false; + monitorWallpapers = { }; + perModeWallpaper = false; + wallpaperPathLight = ""; + wallpaperPathDark = ""; + monitorWallpapersLight = { }; + monitorWallpapersDark = { }; + monitorWallpaperFillModes = { }; + wallpaperTransition = "fade"; + includedTransitions = [ + "fade" + "wipe" + "disc" + "stripes" + "iris bloom" + "pixelate" + "portal" + ]; + wallpaperCyclingEnabled = false; + wallpaperCyclingMode = "interval"; + wallpaperCyclingInterval = 300; + wallpaperCyclingTime = "06:00"; + monitorCyclingSettings = { }; + nightModeEnabled = false; + nightModeTemperature = 4500; + nightModeHighTemperature = 6500; + nightModeAutoEnabled = false; + nightModeAutoMode = "time"; + nightModeStartHour = 18; + nightModeStartMinute = 0; + nightModeEndHour = 6; + nightModeEndMinute = 0; + latitude = 0; + longitude = 0; + nightModeUseIPLocation = false; + nightModeLocationProvider = ""; + themeModeAutoEnabled = false; + themeModeAutoMode = "time"; + themeModeStartHour = 18; + themeModeStartMinute = 0; + themeModeEndHour = 6; + themeModeEndMinute = 0; + themeModeShareGammaSettings = true; + weatherLocation = "München, Bayern"; + weatherCoordinates = "48.1371079,11.5753822"; + pinnedApps = [ ]; + barPinnedApps = [ ]; + dockLauncherPosition = 0; + hiddenTrayIds = [ ]; + trayItemOrder = [ ]; + recentColors = [ ]; + showThirdPartyPlugins = false; + launchPrefix = ""; + lastBrightnessDevice = ""; + brightnessExponentialDevices = { }; + brightnessUserSetValues = { }; + brightnessExponentValues = { }; + selectedGpuIndex = 0; + nvidiaGpuTempEnabled = false; + nonNvidiaGpuTempEnabled = false; + enabledGpuPciIds = [ ]; + wifiDeviceOverride = ""; + weatherHourlyDetailed = true; + hiddenApps = [ ]; + appOverrides = { }; + searchAppActions = true; + vpnLastConnected = ""; + deviceMaxVolumes = { }; + hiddenOutputDeviceNames = [ ]; + hiddenInputDeviceNames = [ ]; + launcherLastMode = "all"; + appDrawerLastMode = "apps"; + niriOverviewLastMode = "apps"; + configVersion = 3; }; }; diff --git a/modules/scrolling-desktop/niri/config.kdl b/modules/scrolling-desktop/niri/config.kdl index 273a2f8..536a710 100644 --- a/modules/scrolling-desktop/niri/config.kdl +++ b/modules/scrolling-desktop/niri/config.kdl @@ -513,3 +513,9 @@ xwayland-satellite { // off path "xwayland-satellite" } + +include "dms/cursor.kdl" +include "dms/colors.kdl" +include "dms/layout.kdl" +include "dms/windowrules.kdl" +include "dms/wpblur.kdl" diff --git a/modules/scrolling-desktop/niri/config.kdl.backup1772654511 b/modules/scrolling-desktop/niri/config.kdl.backup1772654511 new file mode 100644 index 0000000..273a2f8 --- /dev/null +++ b/modules/scrolling-desktop/niri/config.kdl.backup1772654511 @@ -0,0 +1,515 @@ +// This config is in the KDL format: https://kdl.dev +// "/-" comments out the following node. +// Check the wiki for a full description of the configuration: +// https://yalter.github.io/niri/Configuration:-Introduction + +environment { + XDG_CURRENT_DESKTOP "niri" + QT_QPA_PLATFORM "wayland" + ELECTRON_OZONE_PLATFORM_HINT "auto" + QT_QPA_PLATFORMTHEME "gtk3" + QT_QPA_PLATFORMTHEME_QT6 "gtk3" +} + +// Input device configuration. +// Find the full list of options on the wiki: +// https://yalter.github.io/niri/Configuration:-Input +input { + keyboard { + xkb { + layout "eu" + } + numlock + } + + // Next sections include libinput settings. + // Omitting settings disables them, or leaves them at their default values. + // All commented-out settings here are examples, not defaults. + touchpad { + // off + tap + // dwt + // dwtp + // drag false + // drag-lock + natural-scroll + // accel-speed 0.2 + // accel-profile "flat" + // scroll-method "two-finger" + // disabled-on-external-mouse + } + + mouse { + // off + // natural-scroll + accel-speed -0.3 + // accel-profile "flat" + // scroll-method "no-scroll" + } + + tablet { + map-to-output "DP-3" + // calibration-matrix 1.0 1.0 1.0 1.0 1.0 1.0 + } + + // Uncomment this to make the mouse warp to the center of newly focused windows. + // warp-mouse-to-focus + + // Focus windows and outputs automatically when moving the mouse into them. + // Setting max-scroll-amount="0%" makes it work only on windows already fully on screen. + // focus-follows-mouse max-scroll-amount="0%" +} + +output "DP-3" { + // off + mode "3440x1440@99.982" + scale 1 + transform "normal" +} + +cursor { + xcursor-theme "Bibata-Modern-Ice" + xcursor-size 24 + hide-when-typing + hide-after-inactive-ms 5000 +} + +layout { + gaps 5 + background-color "transparent" + + // When to center a column when changing focus, options are: + // - "never", default behavior, focusing an off-screen column will keep at the left + // or right edge of the screen. + // - "always", the focused column will always be centered. + // - "on-overflow", focusing a column will center it if it doesn't fit + // together with the previously focused column. + center-focused-column "on-overflow" + + // You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between. + preset-column-widths { + proportion 0.33333 + proportion 0.5 + proportion 0.66667 + } + + default-column-width { proportion 0.5; } + + // By default focus ring and border are rendered as a solid background rectangle + // behind windows. That is, they will show up through semitransparent windows. + // This is because windows using client-side decorations can have an arbitrary shape. + // + // If you don't like that, you should uncomment `prefer-no-csd` below. + // Niri will draw focus ring and border *around* windows that agree to omit their + // client-side decorations. + // + // Alternatively, you can override it with a window rule called + // `draw-border-with-background`. + + // You can change how the focus ring looks. + focus-ring { + // off + width 3 + active-color "#c57faf" + inactive-color "#d369af" + } + + // You can also add a border. It's similar to the focus ring, but always visible. + border { + // The settings are the same as for the focus ring. + // If you enable the border, you probably want to disable the focus ring. + off + + width 4 + active-color "#ffc87f" + inactive-color "#505050" + + // Color of the border around windows that request your attention. + urgent-color "#9b0000" + + // Gradients can use a few different interpolation color spaces. + // For example, this is a pastel rainbow gradient via in="oklch longer hue". + // + // active-gradient from="#e5989b" to="#ffb4a2" angle=45 relative-to="workspace-view" in="oklch longer hue" + + // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view" + } + + // You can enable drop shadows for windows. + shadow { + // Uncomment the next line to enable shadows. + // on + + // By default, the shadow draws only around its window, and not behind it. + // Uncomment this setting to make the shadow draw behind its window. + // + // Note that niri has no way of knowing about the CSD window corner + // radius. It has to assume that windows have square corners, leading to + // shadow artifacts inside the CSD rounded corners. This setting fixes + // those artifacts. + // + // However, instead you may want to set prefer-no-csd and/or + // geometry-corner-radius. Then, niri will know the corner radius and + // draw the shadow correctly, without having to draw it behind the + // window. These will also remove client-side shadows if the window + // draws any. + // + // draw-behind-window true + + // You can change how shadows look. The values below are in logical + // pixels and match the CSS box-shadow properties. + + // Softness controls the shadow blur radius. + softness 30 + + // Spread expands the shadow. + spread 5 + + // Offset moves the shadow relative to the window. + offset x=0 y=5 + + // You can also change the shadow color and opacity. + color "#0007" + } + + // Struts shrink the area occupied by windows, similarly to layer-shell panels. + // You can think of them as a kind of outer gaps. They are set in logical pixels. + // Left and right struts will cause the next window to the side to always be visible. + // Top and bottom struts will simply add outer gaps in addition to the area occupied by + // layer-shell panels and regular gaps. + struts { + // left 64 + // right 64 + // top 64 + // bottom 64 + } +} + +layer-rule { + match namespace="^quickshell$" + place-within-backdrop true +} + +layer-rule { + match namespace="dms:blurwallpaper" + place-within-backdrop true +} + +// STARTUP +hotkey-overlay { + // Uncomment this line to disable the "Important Hotkeys" pop-up at startup. + skip-at-startup +} + +// Uncomment this line to ask the clients to omit their client-side decorations if possible. +// If the client will specifically ask for CSD, the request will be honored. +// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners. +// This option will also fix border/focus ring drawing behind some semitransparent windows. +// After enabling or disabling this, you need to restart the apps for this to take effect. +prefer-no-csd + +// You can change the path where screenshots are saved. +// A ~ at the front will be expanded to the home directory. +// The path is formatted with strftime(3) to give you the screenshot date and time. +screenshot-path "~/Pictures/Screenshots/taken_at_%Y-%m-%d %H-%M-%S.png" + +// Animation settings. +// The wiki explains how to configure individual animations: +// https://yalter.github.io/niri/Configuration:-Animations +animations { + // Uncomment to turn off all animations. + off + + // Slow down all animations by this factor. Values below 1 speed them up instead. + // slowdown 3.0 +} + +overview { + backdrop-color "#0f0b15" +} + +// Window rules let you adjust behavior for individual windows. +// Find more information on the wiki: +// https://yalter.github.io/niri/Configuration:-Window-Rules + +window-rule { + match app-id=r#"^steam$"# +} + +// window-rule { +// match at-startup=true app-id=r#"^Spotify$"# +// open-on-workspace "media" +// } + +// window-rule { +// match at-startup=true app-id=r#"^Signal$"# +// open-on-workspace "chat" +// } + +// Open the Firefox picture-in-picture player as floating by default. +window-rule { + // This app-id regular expression will work for both: + // - host Firefox (app-id is "firefox") + // - Flatpak Firefox (app-id is "org.mozilla.firefox") + match app-id=r#"zen-beta$"# title="^Picture-in-Picture$" + open-floating true +} + +window-rule { + match app-id=r#"gimp$"# title="^GIMP$" + open-maximized true +} + +// Example: block out two password managers from screen capture. +// (This example rule is commented out with a "/-" in front.) +/-window-rule { + match app-id=r#"^org\.keepassxc\.KeePassXC$"# + match app-id=r#"^org\.gnome\.World\.Secrets$"# + + block-out-from "screen-capture" + + // Use this instead if you want them visible on third-party screenshot tools. + // block-out-from "screencast" +} + +// Example: enable rounded corners for all windows. +// (This example rule is commented out with a "/-" in front.) +window-rule { + geometry-corner-radius 12 + clip-to-geometry true +} + +binds { + // Keys consist of modifiers separated by + signs, followed by an XKB key name + // in the end. To find an XKB name for a particular key, you may use a program + // like wev. + // + // "Mod" is a special modifier equal to Super when running on a TTY, and to Alt + // when running as a winit window. + // + // Most actions that you can bind here can also be invoked programmatically with + // `niri msg action do-something`. + + // Mod-Shift-/, which is usually the same as Mod-?, + // shows a list of important hotkeys. + Mod+Shift+Slash { show-hotkey-overlay; } + + Mod+B hotkey-overlay-title="Browser" { spawn "helium"; } + Mod+N hotkey-overlay-title="File Manager" { spawn "nautilus"; } + Mod+Return hotkey-overlay-title="Open a terminal" { spawn "ghostty"; } + Mod+Space hotkey-overlay-title="Application Launcher" { + spawn "dms" "ipc" "call" "spotlight" "toggle"; + } + Mod+V hotkey-overlay-title="Clipboard Manager" { + spawn "dms" "ipc" "call" "clipboard" "toggle"; + } + Mod+M hotkey-overlay-title="Task Manager" { + spawn "dms" "ipc" "call" "processlist" "focusOrToggle"; + } + Mod+Comma hotkey-overlay-title="Settings" { + spawn "dms" "ipc" "call" "settings" "focusOrToggle"; + } + Mod+S hotkey-overlay-title="Notification Center" { + spawn "dms" "ipc" "call" "notifications" "toggle"; + } + Mod+Y hotkey-overlay-title="Browse Wallpapers" { + spawn "dms" "ipc" "call" "dankdash" "wallpaper"; + } + + // Security + Mod+Alt+L hotkey-overlay-title="Lock Screen" { + spawn "dms" "ipc" "call" "lock" "lock"; + } + + // Audio Controls + XF86AudioRaiseVolume allow-when-locked=true { + spawn "dms" "ipc" "call" "audio" "increment" "3"; + } + XF86AudioLowerVolume allow-when-locked=true { + spawn "dms" "ipc" "call" "audio" "decrement" "3"; + } + XF86AudioMute allow-when-locked=true { + spawn "dms" "ipc" "call" "audio" "mute"; + } + + XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; } + XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; } + + // Open/close the Overview: a zoomed-out view of workspaces and windows. + // You can also move the mouse into the top-left hot corner, + // or do a four-finger swipe up on a touchpad. + Mod+O repeat=false { toggle-overview; } + Mod+Q repeat=false { close-window; } + + Mod+Left { focus-column-left; } + Mod+Down { focus-window-down; } + Mod+Up { focus-window-up; } + Mod+Right { focus-column-right; } + Mod+H { focus-column-left; } + Mod+J { focus-window-or-workspace-down; } + Mod+K { focus-window-or-workspace-up; } + Mod+L { focus-column-right; } + + Mod+Shift+H { move-column-left; } + Mod+Shift+J { move-column-to-workspace-down; } + Mod+Shift+K { move-column-to-workspace-up; } + Mod+Shift+L { move-column-right; } + + Mod+A { focus-column-first; } + Mod+E { focus-column-last; } + Mod+Ctrl+A { move-column-to-first; } + Mod+Ctrl+E { move-column-to-last; } + + Mod+D { focus-workspace-down; } + Mod+U { focus-workspace-up; } + Mod+Ctrl+D { move-column-to-workspace-down; } + Mod+Ctrl+U { move-column-to-workspace-up; } + + Mod+Shift+Page_Down { move-workspace-down; } + Mod+Shift+Page_Up { move-workspace-up; } + Mod+Shift+U { move-workspace-down; } + Mod+Shift+I { move-workspace-up; } + + // You can bind mouse wheel scroll ticks using the following syntax. + // These binds will change direction based on the natural-scroll setting. + // + // To avoid scrolling through workspaces really fast, you can use + // the cooldown-ms property. The bind will be rate-limited to this value. + // You can set a cooldown on any bind, but it's most useful for the wheel. + Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } + Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } + Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; } + Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; } + + Mod+WheelScrollRight { focus-column-right; } + Mod+WheelScrollLeft { focus-column-left; } + Mod+Ctrl+WheelScrollRight { move-column-right; } + Mod+Ctrl+WheelScrollLeft { move-column-left; } + + // Usually scrolling up and down with Shift in applications results in + // horizontal scrolling; these binds replicate that. + Mod+Shift+WheelScrollDown { focus-column-right; } + Mod+Shift+WheelScrollUp { focus-column-left; } + Mod+Ctrl+Shift+WheelScrollDown { move-column-right; } + Mod+Ctrl+Shift+WheelScrollUp { move-column-left; } + + // Similarly, you can bind touchpad scroll "ticks". + // Touchpad scrolling is continuous, so for these binds it is split into + // discrete intervals. + // These binds are also affected by touchpad's natural-scroll, so these + // example binds are "inverted", since we have natural-scroll enabled for + // touchpads by default. + // Mod+TouchpadScrollDown { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02+"; } + // Mod+TouchpadScrollUp { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02-"; } + + // You can refer to workspaces by index. However, keep in mind that + // niri is a dynamic workspace system, so these commands are kind of + // "best effort". Trying to refer to a workspace index bigger than + // the current workspace count will instead refer to the bottommost + // (empty) workspace. + // + // For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on + // will all refer to the 3rd workspace. + Alt+1 { focus-workspace 1; } + Alt+2 { focus-workspace 2; } + Alt+3 { focus-workspace 3; } + Alt+4 { focus-workspace 4; } + Alt+5 { focus-workspace 5; } + Alt+6 { focus-workspace 6; } + Alt+7 { focus-workspace 7; } + Alt+8 { focus-workspace 8; } + Alt+9 { focus-workspace 9; } + Alt+Ctrl+1 { move-column-to-workspace 1; } + Alt+Ctrl+2 { move-column-to-workspace 2; } + Alt+Ctrl+3 { move-column-to-workspace 3; } + Alt+Ctrl+4 { move-column-to-workspace 4; } + Alt+Ctrl+5 { move-column-to-workspace 5; } + Alt+Ctrl+6 { move-column-to-workspace 6; } + Alt+Ctrl+7 { move-column-to-workspace 7; } + Alt+Ctrl+8 { move-column-to-workspace 8; } + Alt+Ctrl+9 { move-column-to-workspace 9; } + + // Alternatively, there are commands to move just a single window: + // Mod+Ctrl+1 { move-window-to-workspace 1; } + + // Switches focus between the current and the previous workspace. + // Mod+Tab { focus-workspace-previous; } + + // The following binds move the focused window in and out of a column. + // If the window is alone, they will consume it into the nearby column to the side. + // If the window is already in a column, they will expel it out. + Mod+Period { consume-or-expel-window-right; } + + // Consume one window from the right to the bottom of the focused column. + // Mod+Comma { consume-window-into-column; } + // Expel the bottom window from the focused column to the right. + // Mod+Period { expel-window-from-column; } + + Mod+R { switch-preset-column-width; } + // Cycling through the presets in reverse order is also possible. + // Mod+R { switch-preset-column-width-back; } + Mod+Shift+R { switch-preset-window-height; } + Mod+Ctrl+R { reset-window-height; } + Mod+F { maximize-column; } + Mod+Shift+F { fullscreen-window; } + + // Expand the focused column to space not taken up by other fully visible columns. + // Makes the column "fill the rest of the space". + Mod+Ctrl+F { expand-column-to-available-width; } + + Mod+C { center-column; } + + // Center all fully visible columns on screen. + Mod+Ctrl+C { center-visible-columns; } + + // Finer width adjustments. + // This command can also: + // * set width in pixels: "1000" + // * adjust width in pixels: "-5" or "+5" + // * set width as a percentage of screen width: "25%" + // * adjust width as a percentage of screen width: "-10%" or "+10%" + // Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0, + // set-column-width "100" will make the column occupy 200 physical screen pixels. + Mod+Minus { set-column-width "-10%"; } + Mod+Equal { set-column-width "+10%"; } + + // Finer height adjustments when in column with other windows. + Mod+Shift+Minus { set-window-height "-10%"; } + Mod+Shift+Equal { set-window-height "+10%"; } + + // Move the focused window between the floating and the tiling layout. + Mod+Shift+S { toggle-window-floating; } + // Mod+Shift+V { switch-focus-between-floating-and-tiling; } + + // Toggle tabbed column display mode. + // Windows in this column will appear as vertical tabs, + // rather than stacked on top of each other. + // Mod+W { toggle-column-tabbed-display; } + + // Actions to switch layouts. + // Note: if you uncomment these, make sure you do NOT have + // a matching layout switch hotkey configured in xkb options above. + // Having both at once on the same hotkey will break the switching, + // since it will switch twice upon pressing the hotkey (once by xkb, once by niri). + // Mod+Space { switch-layout "next"; } + // Mod+Shift+Space { switch-layout "prev"; } + + Print { screenshot; } + + // Applications such as remote-desktop clients and software KVM switches may + // request that niri stops processing the keyboard shortcuts defined here + // so they may, for example, forward the key presses as-is to a remote machine. + // It's a good idea to bind an escape hatch to toggle the inhibitor, + // so a buggy application can't hold your session hostage. + // + // The allow-inhibiting=false property can be applied to other binds as well, + + // The quit action will show a confirmation dialog to avoid accidental exits. + Mod+Shift+E { quit; } + Ctrl+Alt+Delete { quit; } +} + +xwayland-satellite { + // off + path "xwayland-satellite" +} diff --git a/modules/scrolling-desktop/niri/dms/alttab.kdl b/modules/scrolling-desktop/niri/dms/alttab.kdl new file mode 100644 index 0000000..091ea07 --- /dev/null +++ b/modules/scrolling-desktop/niri/dms/alttab.kdl @@ -0,0 +1,10 @@ +// ! DO NOT EDIT ! + // ! AUTO-GENERATED BY DMS ! + // ! CHANGES WILL BE OVERWRITTEN ! + // ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE ! + + recent-windows { + highlight { + corner-radius 12 + } + } diff --git a/modules/scrolling-desktop/niri/dms/binds.kdl b/modules/scrolling-desktop/niri/dms/binds.kdl new file mode 100644 index 0000000..e69de29 diff --git a/modules/scrolling-desktop/niri/dms/colors.kdl b/modules/scrolling-desktop/niri/dms/colors.kdl new file mode 100644 index 0000000..705b90e --- /dev/null +++ b/modules/scrolling-desktop/niri/dms/colors.kdl @@ -0,0 +1,39 @@ +// ! Auto-generated file. Do not edit directly. +// Remove `include "dms/colors.kdl"` from your config to override. + +layout { + background-color "transparent" + + focus-ring { + active-color "#c3c0ff" + inactive-color "#928f9a" + urgent-color "#ffb4ab" + } + + border { + active-color "#c3c0ff" + inactive-color "#928f9a" + urgent-color "#ffb4ab" + } + + shadow { + color "#00000070" + } + + tab-indicator { + active-color "#c3c0ff" + inactive-color "#928f9a" + urgent-color "#ffb4ab" + } + + insert-hint { + color "#c3c0ff80" + } +} + +recent-windows { + highlight { + active-color "#424078" + urgent-color "#ffb4ab" + } +} diff --git a/modules/scrolling-desktop/niri/dms/cursor.kdl b/modules/scrolling-desktop/niri/dms/cursor.kdl new file mode 100644 index 0000000..531abd7 --- /dev/null +++ b/modules/scrolling-desktop/niri/dms/cursor.kdl @@ -0,0 +1,9 @@ +// ! DO NOT EDIT ! +// ! AUTO-GENERATED BY DMS ! +// ! CHANGES WILL BE OVERWRITTEN ! +// ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE ! + +cursor { + xcursor-theme "Bibata-Modern-Ice" + xcursor-size 24 +} \ No newline at end of file diff --git a/modules/scrolling-desktop/niri/dms/layout.kdl b/modules/scrolling-desktop/niri/dms/layout.kdl new file mode 100644 index 0000000..81c88f6 --- /dev/null +++ b/modules/scrolling-desktop/niri/dms/layout.kdl @@ -0,0 +1,22 @@ +// ! DO NOT EDIT ! + // ! AUTO-GENERATED BY DMS ! + // ! CHANGES WILL BE OVERWRITTEN ! + // ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE ! + + layout { + gaps 8 + + border { + width 2 + } + + focus-ring { + width 2 + } + } + window-rule { + geometry-corner-radius 12 + clip-to-geometry true + tiled-state true + draw-border-with-background false + } diff --git a/modules/scrolling-desktop/niri/dms/outputs.kdl b/modules/scrolling-desktop/niri/dms/outputs.kdl new file mode 100644 index 0000000..e69de29 diff --git a/modules/scrolling-desktop/niri/dms/windowrules.kdl b/modules/scrolling-desktop/niri/dms/windowrules.kdl new file mode 100644 index 0000000..e69de29 diff --git a/modules/scrolling-desktop/niri/dms/wpblur.kdl b/modules/scrolling-desktop/niri/dms/wpblur.kdl new file mode 100644 index 0000000..3d58802 --- /dev/null +++ b/modules/scrolling-desktop/niri/dms/wpblur.kdl @@ -0,0 +1,9 @@ +// ! DO NOT EDIT ! +// ! AUTO-GENERATED BY DMS ! +// ! CHANGES WILL BE OVERWRITTEN ! +// ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE ! + +layer-rule { + match namespace="dms:blurwallpaper" + place-within-backdrop true +} From ac4074245cf5f51daa014864afbfdfcca7194353 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 21:23:41 +0100 Subject: [PATCH 46/77] fixes config --- modules/scrolling-desktop/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index a25dd8a..de5d2e6 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -150,7 +150,7 @@ inputs.dms.homeModules.dank-material-shell ]; - home.package = with pkgs; [ + home.packages = with pkgs; [ nerd-fonts.victor-mono ]; From 996dc27419ab8a4f56deafdad8cd501a62d3b9a2 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 22:46:08 +0100 Subject: [PATCH 47/77] migrates dnsc-server --- flake.nix | 1 + modules/base/default.nix | 5 ++ modules/cli-tools/default.nix | 2 + .../dnsc-server/_hardware-configuration.nix | 52 ++++++++++++++++ modules/hosts/dnsc-server/default.nix | 41 +++++++++++++ modules/jellyfin/default.nix | 32 ++++++++++ modules/restic/default.nix | 40 +++++++++++++ modules/samba-share/default.nix | 56 ++++++++++++++++++ modules/scrolling-desktop/niri/dms/colors.kdl | 16 ++--- modules/ssh/default.nix | 10 +++- modules/ups/default.nix | 22 +++++++ modules/zfs/default.nix | 15 +++++ secrets/restic/password.age | 9 +++ secrets/secrets.nix | 26 ++++++++ secrets/vaultwarden/env.age | Bin 0 -> 616 bytes 15 files changed, 318 insertions(+), 9 deletions(-) create mode 100644 modules/hosts/dnsc-server/_hardware-configuration.nix create mode 100644 modules/hosts/dnsc-server/default.nix create mode 100644 modules/jellyfin/default.nix create mode 100644 modules/restic/default.nix create mode 100644 modules/samba-share/default.nix create mode 100644 modules/ups/default.nix create mode 100644 modules/zfs/default.nix create mode 100644 secrets/restic/password.age create mode 100644 secrets/secrets.nix create mode 100644 secrets/vaultwarden/env.age diff --git a/flake.nix b/flake.nix index bdb77a1..22f1926 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,7 @@ nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"; nixpkgs-lib.follows = "nixpkgs"; nixvim.url = "github:nix-community/nixvim"; + agenix.url = "github:ryantm/agenix"; dms = { url = "github:AvengeMedia/DankMaterialShell/stable"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/base/default.nix b/modules/base/default.nix index ace3a9a..1887adf 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -108,6 +108,11 @@ in "networkmanager" "wheel" ]; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILvXWZOPOJJDAoF+Sx/ZLoAVu6G/7/MAWoknBgMAzjul dennis@dnsc-mac" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKnmuxDkpDIku5t1Tykz21u78xoQ7LJR8JEcfth32LGu dennis@dnsc-work" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF8LXdDU3C4PcCHb/BEm1xQIZyo2KTR5Dcuw6ni+SxmH dennis@dnsc-machine" + ]; }; }; } diff --git a/modules/cli-tools/default.nix b/modules/cli-tools/default.nix index 8898ef3..f98e22b 100644 --- a/modules/cli-tools/default.nix +++ b/modules/cli-tools/default.nix @@ -17,6 +17,8 @@ let usbutils opencode lazygit + wget + btop ]; in { diff --git a/modules/hosts/dnsc-server/_hardware-configuration.nix b/modules/hosts/dnsc-server/_hardware-configuration.nix new file mode 100644 index 0000000..22b0247 --- /dev/null +++ b/modules/hosts/dnsc-server/_hardware-configuration.nix @@ -0,0 +1,52 @@ +{ + config, + lib, + modulesPath, + ... +}: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ + "vmd" + "xhci_pci" + "ahci" + "usb_storage" + "usbhid" + "sd_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/89318ceb-c0c6-47f2-9cad-99612498bd75"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/EE6C-978E"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/9c843b67-418a-4d11-8700-6a0eb866c02c"; } + ]; + + # 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.enp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules/hosts/dnsc-server/default.nix b/modules/hosts/dnsc-server/default.nix new file mode 100644 index 0000000..7d7e199 --- /dev/null +++ b/modules/hosts/dnsc-server/default.nix @@ -0,0 +1,41 @@ +{ inputs, config, ... }: +let + hostname = "dnsc-server"; +in +{ + flake.nixosConfigurations.${hostname} = inputs.nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = with config.flake.modules.nixos; [ + agenix.nixosModules.default + home-manager + base + git + ssh + zfs + ups + cli-tools + nix + jellyfin + restic + samba-share + + { + imports = [ ./_hardware-configuration.nix ]; + samba-share.path = "/main/share"; + samba-share.allowedHosts = "192.168.178. 127.0.0.1 localhost"; + networking.hostName = hostname; + system.stateVersion = "24.11"; + + # Secrets for this machine + age = { + identityPaths = [ + "${config.users.users.dennis.home}/.ssh/id_ed25519" + ]; + secrets."restic/password" = { + file = ../../secrets/restic/password.age; + }; + }; + } + ]; + }; +} diff --git a/modules/jellyfin/default.nix b/modules/jellyfin/default.nix new file mode 100644 index 0000000..ed35cca --- /dev/null +++ b/modules/jellyfin/default.nix @@ -0,0 +1,32 @@ +{ ... }: +{ + flake.modules.nixos.jellyfin = + { pkgs, ... }: + { + services.jellyfin = { + enable = true; + openFirewall = true; + }; + + nixpkgs.config.packageOverrides = pkgs: { + vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; + }; + + hardware.graphics = { + enable = true; + extraPackages = with pkgs; [ + intel-media-driver + intel-vaapi-driver + libva-vdpau-driver + intel-compute-runtime + vpl-gpu-rt + ]; + }; + + environment.systemPackages = with pkgs; [ + jellyfin + jellyfin-web + jellyfin-ffmpeg + ]; + }; +} diff --git a/modules/restic/default.nix b/modules/restic/default.nix new file mode 100644 index 0000000..eb0fbf8 --- /dev/null +++ b/modules/restic/default.nix @@ -0,0 +1,40 @@ +{ inputs, ... }: +{ + flake.modules.nixos.restic = + { pkgs, config, ... }: + { + # Root SSH for storage box + programs.ssh = { + extraConfig = '' + Host dnsc-storage + AddKeysToAgent yes + Hostname u295965.your-storagebox.de + User u295965 + IdentityFile /root/.ssh/id_ed25519 + IdentitiesOnly yes + Port 23 + ''; + }; + + services.restic.backups = { + "dnsc-storage" = { + initialize = true; + passwordFile = config.age.secrets."restic/password".path; + repository = "sftp:dnsc-storage:restic/dnsc-server"; + createWrapper = true; + paths = [ + "/main/share" + "/data/actual-server" + ]; + pruneOpts = [ + "--keep-last 3" + ]; + timerConfig = { + OnCalendar = "daily"; + Persistent = true; + RandomizedDelaySec = "5h"; + }; + }; + }; + }; +} diff --git a/modules/samba-share/default.nix b/modules/samba-share/default.nix new file mode 100644 index 0000000..3293633 --- /dev/null +++ b/modules/samba-share/default.nix @@ -0,0 +1,56 @@ +{ lib, ... }: +{ + flake.modules.nixos.samba-share = + { pkgs, config, lib, ... }: + { + options.samba-share = { + path = lib.mkOption { + type = lib.types.str; + description = "Path to the directory to share via Samba."; + }; + allowedHosts = lib.mkOption { + type = lib.types.str; + description = "Space-separated list of allowed hosts/subnets (e.g. \"192.168.1. 127.0.0.1\")."; + }; + }; + + config = { + services.samba = { + enable = true; + openFirewall = true; + settings = { + global = { + "workgroup" = "WORKGROUP"; + "security" = "user"; + "hosts allow" = config.samba-share.allowedHosts; + "hosts deny" = "0.0.0.0/0"; + "guest account" = "nobody"; + "map to guest" = "bad user"; + }; + "share" = { + "path" = config.samba-share.path; + "browseable" = "yes"; + "writeable" = "yes"; + "read only" = "no"; + "guest ok" = "yes"; + "force user" = "dennis"; + "force group" = "users"; + }; + }; + }; + + services.samba-wsdd = { + enable = true; + openFirewall = true; + }; + + services.avahi = { + publish.enable = true; + publish.userServices = true; + nssmdns4 = true; + enable = true; + openFirewall = true; + }; + }; + }; +} diff --git a/modules/scrolling-desktop/niri/dms/colors.kdl b/modules/scrolling-desktop/niri/dms/colors.kdl index 705b90e..149182f 100644 --- a/modules/scrolling-desktop/niri/dms/colors.kdl +++ b/modules/scrolling-desktop/niri/dms/colors.kdl @@ -5,14 +5,14 @@ layout { background-color "transparent" focus-ring { - active-color "#c3c0ff" - inactive-color "#928f9a" + active-color "#d2bcfd" + inactive-color "#948f99" urgent-color "#ffb4ab" } border { - active-color "#c3c0ff" - inactive-color "#928f9a" + active-color "#d2bcfd" + inactive-color "#948f99" urgent-color "#ffb4ab" } @@ -21,19 +21,19 @@ layout { } tab-indicator { - active-color "#c3c0ff" - inactive-color "#928f9a" + active-color "#d2bcfd" + inactive-color "#948f99" urgent-color "#ffb4ab" } insert-hint { - color "#c3c0ff80" + color "#d2bcfd80" } } recent-windows { highlight { - active-color "#424078" + active-color "#4f3d74" urgent-color "#ffb4ab" } } diff --git a/modules/ssh/default.nix b/modules/ssh/default.nix index 432b27d..dafaa63 100644 --- a/modules/ssh/default.nix +++ b/modules/ssh/default.nix @@ -3,7 +3,15 @@ flake.modules.nixos.ssh = { pkgs, ... }: { - services.openssh.enable = true; + services.openssh = { + enable = true; + settings = { + X11Forwarding = false; + PermitRootLogin = "no"; + PasswordAuthentication = false; + }; + openFirewall = true; + }; home-manager.sharedModules = [ inputs.self.modules.homeManager.ssh diff --git a/modules/ups/default.nix b/modules/ups/default.nix new file mode 100644 index 0000000..241a268 --- /dev/null +++ b/modules/ups/default.nix @@ -0,0 +1,22 @@ +{ ... }: +{ + flake.modules.nixos.ups = + { pkgs, ... }: + { + power.ups = { + enable = true; + + ups."eaton-ups" = { + driver = "usbhid-ups"; + port = "auto"; + }; + + users.upsmon = { + passwordFile = "/etc/upsmon.passwd"; + upsmon = "primary"; + }; + + upsmon.monitor."eaton-ups".user = "upsmon"; + }; + }; +} diff --git a/modules/zfs/default.nix b/modules/zfs/default.nix new file mode 100644 index 0000000..4fc5f04 --- /dev/null +++ b/modules/zfs/default.nix @@ -0,0 +1,15 @@ +{ ... }: +{ + flake.modules.nixos.zfs = + { pkgs, ... }: + { + boot.supportedFilesystems = [ "zfs" ]; + boot.zfs.forceImportRoot = false; + boot.zfs.extraPools = [ "main" ]; + + services.zfs = { + autoSnapshot.enable = true; + trim.enable = true; + }; + }; +} diff --git a/secrets/restic/password.age b/secrets/restic/password.age new file mode 100644 index 0000000..fff06c2 --- /dev/null +++ b/secrets/restic/password.age @@ -0,0 +1,9 @@ +age-encryption.org/v1 +-> ssh-ed25519 JIw3cQ u0VpHg/TVASeIVR7/mfbllXrlM71vNpqQhgnfya6vQY +HKopl3RT1S2+W1Sb95eFUhdH4Fh35KS5l6KLYyfdw/Y +-> ssh-ed25519 HufN+g Vfe9hzCZm69hjyk9S0/ZFbVkuvTe3nGbNw9BZfuiiAM +4H1Nfgd8usdv34RuCf3R3J+jyqHj4rnbNHmgkav7VDs +-> ssh-ed25519 cTYF0w H4NeFzgk/mTkEe6uPXutoh6r6wfpNS0SNJYUi1VNRgg +AAjgzAkbXLXBVLtMZAPfXOfgGnpgsF6DvH1BK/vW6E0 +--- rEeM9TuloOX1HuwGmtdxk+Mi+NnWYsHndCStBbCqSh4 +aǓ][&[|er'EZB?Hv4MrM E1fJrƫ% \ No newline at end of file diff --git a/secrets/secrets.nix b/secrets/secrets.nix new file mode 100644 index 0000000..cedfc8a --- /dev/null +++ b/secrets/secrets.nix @@ -0,0 +1,26 @@ +let + dnsc-air = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILvXWZOPOJJDAoF+Sx/ZLoAVu6G/7/MAWoknBgMAzjul dennis@dnsc-mac"; + dnsc-vps-sm = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF/sUA38t7TI1LYADLBn898Hh0MTR4maiHVwEtDoN9W5 dnsc-vps-sm"; + dnsc-server = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM3mkEgvHrwjsEReHQHpLbMP71JLvp6XxMPyW7PTaLCd dennis@dnsc-server"; + systems = [ + dnsc-air + dnsc-vps-sm + dnsc-server + ]; +in +{ + # Add like this: "secret1.age".publicKeys = systems; + "vaultwarden/env.age".publicKeys = systems; + "restic/password.age".publicKeys = systems; +} + +# 1. Create a file with secret +# nix run github:ryantm/agenix -- -e $FILE_PATH +# +# 2. Reference the file in NixOS config: +# { +# age.secrets.secret1.file = ../secrets/secret1.age; +# } +# +# 3. And use it like this: +# passwordFile = config.age.secrets.secret1.path; diff --git a/secrets/vaultwarden/env.age b/secrets/vaultwarden/env.age new file mode 100644 index 0000000000000000000000000000000000000000..0f8206836ddcb4423bf7d729e04f809cddc60d64 GIT binary patch literal 616 zcmYdHPt{G$OD?J`D9Oyv)5|YP*Do{V(zR14F3!+RO))YxHMCUl@+>z_4pi_iF;3Ig zwy-ERtgI+vH63iFIC^slPYch)a6 zEDbR;bWL{6@HY*0cJ;|O3NrI4clPpkO*N}&_B#4%QC4lt1>;& zFUip{x1zkNQolH?BtOK_Gr-t6vl!jBt{otbflHfo;rz%4OgRIij z0Cz)oA4`+6NUzEiKd)dnUv2M<@@%f$G&2K(WY_$hlB~RlaPPn>ZPQ4jtYA;?AdjHR zh)5UHbjy^eN|)@!0$(m&U0ns|kir7zQon-4@|2SFKm$w9qTqrm)8xbguOwrC@5<5w zGasKIH}`;yELX0YJ;B5UZwu{op~>IZK=L| iwyA%IS>V>sTVm>THFi~o8?92R{IvLlfyy;Gp;7?2lILvz literal 0 HcmV?d00001 From 7353edd59401c3dfe69dc32ee13ddee551eae7e3 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 22:48:46 +0100 Subject: [PATCH 48/77] adds agenix --- Justfile | 8 +- flake.lock | 108 ++++++++++++++++++++++++-- modules/hosts/dnsc-server/default.nix | 8 +- 3 files changed, 111 insertions(+), 13 deletions(-) diff --git a/Justfile b/Justfile index c493abe..8096d30 100644 --- a/Justfile +++ b/Justfile @@ -1,8 +1,8 @@ -deploy host: - nixos-rebuild switch --flake .#{{host}} +deploy: + nixos-rebuild switch --flake . -debug host: - nixos-rebuild switch --flake .#{{host}} --show-trace --verbose +debug: + nixos-rebuild switch --flake . --show-trace --verbose dry host: nix build .#nixosConfigurations.{{host}}.config.system.build.toplevel --dry-run --no-link diff --git a/flake.lock b/flake.lock index 5de2b6a..24f5719 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,48 @@ { "nodes": { + "agenix": { + "inputs": { + "darwin": "darwin", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1770165109, + "narHash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I=", + "owner": "ryantm", + "repo": "agenix", + "rev": "b027ee29d959fda4b60b57566d64c98a202e0feb", + "type": "github" + }, + "original": { + "owner": "ryantm", + "repo": "agenix", + "type": "github" + } + }, + "darwin": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1744478979, + "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "43975d782b418ebf4969e9ccba82466728c2851b", + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, "dms": { "inputs": { "nixpkgs": [ @@ -85,6 +128,27 @@ } }, "home-manager": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745494811, + "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -141,6 +205,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1754028485, + "narHash": "sha256-IiiXB3BDTi6UqzAZcf2S797hWEPCRZOwyNThJIYhUfk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "59e69648d345d6e8fef86158c555730fa12af9de", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1772525000, "narHash": "sha256-JVA3N5t5II0xI9+sJ44UgaN6tMrZGOox0w2xZzKYt9Q=", @@ -153,7 +233,7 @@ "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { "lastModified": 1770380644, "narHash": "sha256-P7dWMHRUWG5m4G+06jDyThXO7kwSk46C1kgjEWcybkE=", @@ -172,8 +252,8 @@ "nixvim": { "inputs": { "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_2", - "systems": "systems_2" + "nixpkgs": "nixpkgs_3", + "systems": "systems_3" }, "locked": { "lastModified": 1772402258, @@ -213,13 +293,14 @@ }, "root": { "inputs": { + "agenix": "agenix", "dms": "dms", "flake-parts": "flake-parts", "helium": "helium", - "home-manager": "home-manager", + "home-manager": "home-manager_2", "import-tree": "import-tree", "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixpkgs-lib": [ "nixpkgs" ], @@ -256,9 +337,24 @@ "type": "github" } }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "utils": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1731533236, diff --git a/modules/hosts/dnsc-server/default.nix b/modules/hosts/dnsc-server/default.nix index 7d7e199..495200b 100644 --- a/modules/hosts/dnsc-server/default.nix +++ b/modules/hosts/dnsc-server/default.nix @@ -6,7 +6,7 @@ in flake.nixosConfigurations.${hostname} = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = with config.flake.modules.nixos; [ - agenix.nixosModules.default + inputs.agenix.nixosModules.default home-manager base git @@ -21,8 +21,6 @@ in { imports = [ ./_hardware-configuration.nix ]; - samba-share.path = "/main/share"; - samba-share.allowedHosts = "192.168.178. 127.0.0.1 localhost"; networking.hostName = hostname; system.stateVersion = "24.11"; @@ -35,6 +33,10 @@ in file = ../../secrets/restic/password.age; }; }; + + # Options for my custom modules + samba-share.path = "/main/share"; + samba-share.allowedHosts = "192.168.178. 127.0.0.1 localhost"; } ]; }; From b0d4360415f61da21fe255dd1196cc25dbf72c70 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 22:51:00 +0100 Subject: [PATCH 49/77] fixes missing config --- modules/hosts/dnsc-server/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/hosts/dnsc-server/default.nix b/modules/hosts/dnsc-server/default.nix index 495200b..11b027e 100644 --- a/modules/hosts/dnsc-server/default.nix +++ b/modules/hosts/dnsc-server/default.nix @@ -19,7 +19,7 @@ in restic samba-share - { + ({ config, ... }: { imports = [ ./_hardware-configuration.nix ]; networking.hostName = hostname; system.stateVersion = "24.11"; @@ -37,7 +37,7 @@ in # Options for my custom modules samba-share.path = "/main/share"; samba-share.allowedHosts = "192.168.178. 127.0.0.1 localhost"; - } + }) ]; }; } From cd2ed4f9ec02605ca06f935350ffdd1f0682a89d Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 22:52:52 +0100 Subject: [PATCH 50/77] fixes agenix and zfs --- modules/hosts/dnsc-server/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/hosts/dnsc-server/default.nix b/modules/hosts/dnsc-server/default.nix index 11b027e..770f2e0 100644 --- a/modules/hosts/dnsc-server/default.nix +++ b/modules/hosts/dnsc-server/default.nix @@ -1,6 +1,7 @@ { inputs, config, ... }: let hostname = "dnsc-server"; + secretsDir = "${inputs.self}/secrets"; in { flake.nixosConfigurations.${hostname} = inputs.nixpkgs.lib.nixosSystem { @@ -22,6 +23,7 @@ in ({ config, ... }: { imports = [ ./_hardware-configuration.nix ]; networking.hostName = hostname; + networking.hostId = "e5d5a602"; system.stateVersion = "24.11"; # Secrets for this machine @@ -30,7 +32,7 @@ in "${config.users.users.dennis.home}/.ssh/id_ed25519" ]; secrets."restic/password" = { - file = ../../secrets/restic/password.age; + file = "${secretsDir}/restic/password.age"; }; }; From 5e6bb1b81a2d28a4319806806dc670bdee607ec4 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 22:54:24 +0100 Subject: [PATCH 51/77] ghostty window padding --- modules/terminal/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/terminal/default.nix b/modules/terminal/default.nix index 84ea476..2d8b09d 100644 --- a/modules/terminal/default.nix +++ b/modules/terminal/default.nix @@ -38,8 +38,8 @@ font-style = "SemiBold"; background-opacity = 0.945; window-decoration = "none"; - window-padding-x = 0; - window-padding-y = 0; + window-padding-x = 8; + window-padding-y = 8; window-padding-balance = true; window-inherit-working-directory = true; window-theme = "ghostty"; From 4e26d4b88096b31df15a1f6084823b3ac73f4dab Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Wed, 4 Mar 2026 23:02:36 +0100 Subject: [PATCH 52/77] includes server shell on server --- modules/hosts/dnsc-server/default.nix | 38 +++++++------ modules/server-shell/default.nix | 81 +++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 17 deletions(-) create mode 100644 modules/server-shell/default.nix diff --git a/modules/hosts/dnsc-server/default.nix b/modules/hosts/dnsc-server/default.nix index 770f2e0..800a616 100644 --- a/modules/hosts/dnsc-server/default.nix +++ b/modules/hosts/dnsc-server/default.nix @@ -10,6 +10,7 @@ in inputs.agenix.nixosModules.default home-manager base + server-shell git ssh zfs @@ -20,26 +21,29 @@ in restic samba-share - ({ config, ... }: { - imports = [ ./_hardware-configuration.nix ]; - networking.hostName = hostname; - networking.hostId = "e5d5a602"; - system.stateVersion = "24.11"; + ( + { config, ... }: + { + imports = [ ./_hardware-configuration.nix ]; + networking.hostName = hostname; + networking.hostId = "e5d5a602"; + system.stateVersion = "24.11"; - # Secrets for this machine - age = { - identityPaths = [ - "${config.users.users.dennis.home}/.ssh/id_ed25519" - ]; - secrets."restic/password" = { - file = "${secretsDir}/restic/password.age"; + # Secrets for this machine + age = { + identityPaths = [ + "${config.users.users.dennis.home}/.ssh/id_ed25519" + ]; + secrets."restic/password" = { + file = "${secretsDir}/restic/password.age"; + }; }; - }; - # Options for my custom modules - samba-share.path = "/main/share"; - samba-share.allowedHosts = "192.168.178. 127.0.0.1 localhost"; - }) + # Options for my custom modules + samba-share.path = "/main/share"; + samba-share.allowedHosts = "192.168.178. 127.0.0.1 localhost"; + } + ) ]; }; } diff --git a/modules/server-shell/default.nix b/modules/server-shell/default.nix new file mode 100644 index 0000000..4a6fc12 --- /dev/null +++ b/modules/server-shell/default.nix @@ -0,0 +1,81 @@ +{ + inputs, + ... +}: +{ + flake.modules.nixos.server-shell = + { pkgs, ... }: + { + programs.bash.enable = true; + + home-manager.sharedModules = [ + inputs.self.modules.homeManager.server-shell + ]; + }; + + flake.modules.homeManager.server-shell = + { pkgs, ... }: + { + home.packages = with pkgs; [ + neovim + tmux + iotop + iftop + ]; + + programs.tmux = { + enable = true; + package = pkgs.tmux; + baseIndex = 1; + clock24 = true; + disableConfirmationPrompt = true; + mouse = true; + newSession = true; + prefix = "C-a"; + terminal = "screen-256color"; + keyMode = "vi"; + escapeTime = 0; + extraConfig = '' + set -g status-position bottom + set -g status-style bg=#1d202f,fg=white + set -g status-left "" + set -g status-right "#[bg=default,fg=magenta]>> #S << #[bg=default,fg=white]#H " + set-window-option -g window-status-style 'fg=magenta,bg=#1d202f' + set-window-option -g window-status-format ' #I #[fg=white]#W #[fg=cyan]#F ' + set-window-option -g window-status-current-style "fg=black,bg=magenta" + set-window-option -g window-status-current-format " #I #W #F " + set -g pane-border-style fg=#807c9f + set -g pane-active-border-style fg=magenta + set -g message-style "fg=black,bg=red,bold" + + unbind % + bind "|" split-window -h + unbind '"' + bind - split-window -l 15 -v + + bind r source-file "~/.config/tmux/tmux.conf" + + bind h select-pane -L + bind j select-pane -D + bind k select-pane -U + bind l select-pane -R + + bind -r H resize-pane -L 5 + bind -r J resize-pane -D 5 + bind -r K resize-pane -U 5 + bind -r L resize-pane -R 5 + + bind ? list-keys -a + + unbind s + bind s display-popup -h 50% -w 80% -E sessionizer + + unbind C-x + bind C-x kill-session + + unbind v + bind v choose-tree -Zw "join-pane -t '%%'" + ''; + }; + }; +} From 25d3917db6f95d16d795cd1a894e2391098007d0 Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 22:26:16 +0100 Subject: [PATCH 53/77] migrates dnsc-air --- Justfile | 3 ++ flake.lock | 36 +++++++++++++++++ flake.nix | 1 + modules/base/default.nix | 10 ++++- modules/cli-tools/default.nix | 1 + modules/homebrew/default.nix | 56 +++++++++++++++++++++++++++ modules/hosts/dnsc-air/default.nix | 32 +++++++++++++++ modules/scrolling-desktop/default.nix | 4 ++ modules/shell/default.nix | 1 + 9 files changed, 142 insertions(+), 2 deletions(-) create mode 100644 modules/homebrew/default.nix create mode 100644 modules/hosts/dnsc-air/default.nix diff --git a/Justfile b/Justfile index 8096d30..acbcb8e 100644 --- a/Justfile +++ b/Justfile @@ -1,6 +1,9 @@ deploy: nixos-rebuild switch --flake . +dd: + darwin-rebuild switch --flake . + debug: nixos-rebuild switch --flake . --show-trace --verbose diff --git a/flake.lock b/flake.lock index 24f5719..ae836aa 100644 --- a/flake.lock +++ b/flake.lock @@ -21,6 +21,23 @@ "type": "github" } }, + "brew-src": { + "flake": false, + "locked": { + "lastModified": 1769363988, + "narHash": "sha256-BiGPeulrDVetXP+tjxhMcGLUROZAtZIhU5m4MqawCfM=", + "owner": "Homebrew", + "repo": "brew", + "rev": "d01011cac6d72032c75fd2cd9489909e95d9faf2", + "type": "github" + }, + "original": { + "owner": "Homebrew", + "ref": "5.0.12", + "repo": "brew", + "type": "github" + } + }, "darwin": { "inputs": { "nixpkgs": [ @@ -204,6 +221,24 @@ "type": "github" } }, + "nix-homebrew": { + "inputs": { + "brew-src": "brew-src" + }, + "locked": { + "lastModified": 1769437432, + "narHash": "sha256-8d7KnCpT2LweRvSzZYEGd9IM3eFX+A78opcnDM0+ndk=", + "owner": "zhaofengli", + "repo": "nix-homebrew", + "rev": "a5409abd0d5013d79775d3419bcac10eacb9d8c5", + "type": "github" + }, + "original": { + "owner": "zhaofengli", + "repo": "nix-homebrew", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1754028485, @@ -300,6 +335,7 @@ "home-manager": "home-manager_2", "import-tree": "import-tree", "nix-darwin": "nix-darwin", + "nix-homebrew": "nix-homebrew", "nixpkgs": "nixpkgs_2", "nixpkgs-lib": [ "nixpkgs" diff --git a/flake.nix b/flake.nix index 22f1926..7635066 100644 --- a/flake.nix +++ b/flake.nix @@ -21,6 +21,7 @@ nixpkgs-lib.follows = "nixpkgs"; nixvim.url = "github:nix-community/nixvim"; agenix.url = "github:ryantm/agenix"; + nix-homebrew.url = "github:zhaofengli/nix-homebrew"; dms = { url = "github:AvengeMedia/DankMaterialShell/stable"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/base/default.nix b/modules/base/default.nix index 1887adf..44c23b8 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -1,11 +1,17 @@ -{ config, pkgs, ... }: +{ config, ... }: let username = config.flake.globalConfig.username; + fullname = config.flake.globalConfig.fullname; in { - flake.modules.darwin.system = + flake.modules.darwin.base = { pkgs, ... }: { + users.users.${username} = { + home = "/Users/${username}"; + description = fullname; + }; + system = { primaryUser = username; stateVersion = 5; diff --git a/modules/cli-tools/default.nix b/modules/cli-tools/default.nix index f98e22b..f015699 100644 --- a/modules/cli-tools/default.nix +++ b/modules/cli-tools/default.nix @@ -19,6 +19,7 @@ let lazygit wget btop + rsync ]; in { diff --git a/modules/homebrew/default.nix b/modules/homebrew/default.nix new file mode 100644 index 0000000..6781eb6 --- /dev/null +++ b/modules/homebrew/default.nix @@ -0,0 +1,56 @@ +{ config, ... }: +let + username = config.flake.globalConfig.username; +in +{ + flake.modules.darwin.homebrew = + { pkgs, ... }: + { + nix-homebrew = { + enable = true; + user = username; + autoMigrate = true; + }; + + homebrew = { + user = username; + enable = true; + + onActivation = { + autoUpdate = true; + upgrade = true; + cleanup = "zap"; + }; + + brews = [ + "go" + "mas" + "yt-dlp" + ]; + + casks = [ + "font-victor-mono" + "font-victor-mono-nerd-font" + "vlc" + "ghostty" + "hiddenbar" + "eurkey" + "karabiner-elements" + "caffeine" + "raycast" + "spotify" + "keyboard-cowboy" + "krita" + "darktable" + ]; + + masApps = { + Bitwarden = 1352778147; + "Yesterday For Old Reddit" = 1603279883; + "Final Cut Pro" = 424389933; + Wireguard = 1451685025; + Pages = 409201541; + }; + }; + }; +} diff --git a/modules/hosts/dnsc-air/default.nix b/modules/hosts/dnsc-air/default.nix new file mode 100644 index 0000000..8bef6fc --- /dev/null +++ b/modules/hosts/dnsc-air/default.nix @@ -0,0 +1,32 @@ +{ inputs, config, ... }: +let + hostname = "dnsc-air"; +in +{ + flake.darwinConfigurations.${hostname} = inputs.nix-darwin.lib.darwinSystem { + system = "aarch64-darwin"; + modules = with config.flake.modules.darwin; [ + inputs.nix-homebrew.darwinModules.nix-homebrew + + base + home-manager + shell + git + ssh + cli-tools + nix + neovim + terminal + browser + + ( + { ... }: + { + networking.hostName = hostname; + networking.computerName = hostname; + system.defaults.smb.NetBIOSName = hostname; + } + ) + ]; + }; +} diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index de5d2e6..40f6548 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -61,6 +61,10 @@ flake.modules.homeManager.scrolling-desktop = { pkgs, config, ... }: { + imports = [ + ({ lib, pkgs, ... }: lib.mkIf pkgs.stdenv.isDarwin { }) + ]; + services.polkit-gnome.enable = true; services.mpris-proxy.enable = true; diff --git a/modules/shell/default.nix b/modules/shell/default.nix index a734158..4a4e584 100644 --- a/modules/shell/default.nix +++ b/modules/shell/default.nix @@ -19,6 +19,7 @@ { programs.fish.enable = true; users.defaultUserShell = pkgs.fish; + environment.shells = [ pkgs.fish ]; home-manager.sharedModules = [ inputs.self.modules.homeManager.shell From 68321de234d1ee72cc4a26a6404a9de28c1eac39 Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 22:27:34 +0100 Subject: [PATCH 54/77] fixes scrolling desktop --- modules/scrolling-desktop/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index 40f6548..2724413 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -62,6 +62,7 @@ { pkgs, config, ... }: { imports = [ + inputs.dms.homeModules.dank-material-shell ({ lib, pkgs, ... }: lib.mkIf pkgs.stdenv.isDarwin { }) ]; @@ -150,10 +151,6 @@ }; }; - imports = [ - inputs.dms.homeModules.dank-material-shell - ]; - home.packages = with pkgs; [ nerd-fonts.victor-mono ]; From dcca6430f24bf829f9b9e61a72e0ccd96811028b Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 22:28:26 +0100 Subject: [PATCH 55/77] adds darwin config to nix --- modules/nix/default.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/modules/nix/default.nix b/modules/nix/default.nix index b0a31c5..e942d6c 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -20,6 +20,32 @@ programs.nix-ld.enable = true; nixpkgs.config.allowUnfree = true; + environment.systemPackages = with pkgs; [ + nil + statix + manix + ]; + }; + + flake.modules.darwin.nix = + { pkgs, ... }: + { + programs.direnv = { + enable = true; + silent = false; + loadInNixShell = true; + direnvrcExtra = ""; + nix-direnv = { + enable = true; + }; + }; + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + nixpkgs.config.allowUnfree = true; + environment.systemPackages = with pkgs; [ nil statix From b0a4318b74fd53ec96a8d9c95a75600ae5621d1d Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 22:31:18 +0100 Subject: [PATCH 56/77] removes non darwin option --- modules/shell/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/shell/default.nix b/modules/shell/default.nix index 4a4e584..98a3c51 100644 --- a/modules/shell/default.nix +++ b/modules/shell/default.nix @@ -18,7 +18,6 @@ { pkgs, ... }: { programs.fish.enable = true; - users.defaultUserShell = pkgs.fish; environment.shells = [ pkgs.fish ]; home-manager.sharedModules = [ From 6d018f32b5d8d5ff01412e25c6fa86723dc89b53 Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 22:34:30 +0100 Subject: [PATCH 57/77] installs ghostty only on linux --- modules/terminal/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/terminal/default.nix b/modules/terminal/default.nix index 2d8b09d..eea270e 100644 --- a/modules/terminal/default.nix +++ b/modules/terminal/default.nix @@ -27,10 +27,11 @@ }; flake.modules.homeManager.terminal = - { pkgs, config, ... }: + { pkgs, config, lib, ... }: { programs.ghostty = { enable = true; + package = if pkgs.stdenv.isDarwin then null else pkgs.ghostty; enableFishIntegration = true; settings = { font-size = 14; From 652e74f790d4b24f16a52bca22d83b3746bd67a2 Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 22:49:08 +0100 Subject: [PATCH 58/77] configures paneru for mac --- flake.nix | 4 + modules/homebrew/default.nix | 3 + modules/hosts/dnsc-air/default.nix | 1 + modules/scrolling-desktop/default.nix | 1465 +++++++++++++------------ 4 files changed, 768 insertions(+), 705 deletions(-) diff --git a/flake.nix b/flake.nix index 7635066..c461fb9 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,10 @@ nixvim.url = "github:nix-community/nixvim"; agenix.url = "github:ryantm/agenix"; nix-homebrew.url = "github:zhaofengli/nix-homebrew"; + inputs.paneru = { + url = "github:karinushka/paneru"; + inputs.nixpkgs.follows = "nixpkgs"; + }; dms = { url = "github:AvengeMedia/DankMaterialShell/stable"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/homebrew/default.nix b/modules/homebrew/default.nix index 6781eb6..5b7281a 100644 --- a/modules/homebrew/default.nix +++ b/modules/homebrew/default.nix @@ -42,6 +42,9 @@ in "keyboard-cowboy" "krita" "darktable" + "beekeeper-studio" + "qbittorrent" + "tpvirtual" ]; masApps = { diff --git a/modules/hosts/dnsc-air/default.nix b/modules/hosts/dnsc-air/default.nix index 8bef6fc..ff1226f 100644 --- a/modules/hosts/dnsc-air/default.nix +++ b/modules/hosts/dnsc-air/default.nix @@ -18,6 +18,7 @@ in neovim terminal browser + scrolling-desktop ( { ... }: diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index 2724413..0dacaad 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -63,711 +63,766 @@ { imports = [ inputs.dms.homeModules.dank-material-shell - ({ lib, pkgs, ... }: lib.mkIf pkgs.stdenv.isDarwin { }) + inputs.paneru.homeModules.paneru + ( + { lib, pkgs, ... }: + lib.mkIf pkgs.stdenv.isDarwin { + services.paneru = { + enable = true; + settings = { + options = { + preset_column_widths = [ + 0.25 + 0.5 + 0.75 + ]; + swipe_gesture_fingers = 4; + swipe_gesture_direction = "Natural"; + animation_speed = 4000; + padding_top = 4; + padding_bottom = 4; + padding_left = 4; + padding_right = 4; + }; + bindings = { + window_focus_west = "cmd - h"; + window_focus_east = "cmd - l"; + window_focus_north = "cmd - k"; + window_focus_south = "cmd - j"; + window_swap_west = "alt - h"; + window_swap_east = "alt - l"; + window_swap_first = "alt + shift - h"; + window_swap_last = "alt + shift - l"; + window_center = "alt - c"; + window_resize = "alt - r"; + window_fullwidth = "alt - f"; + window_manage = "ctrl + alt - t"; + window_stack = "alt - ]"; + window_unstack = "alt + shift - ]"; + quit = "ctrl + alt - q"; + }; + windows = { + all = { + horizontal_padding = 4; + vertical_padding = 4; + }; + pip = { + title = "Picture.*(in)?.*[Pp]icture"; + floating = true; + }; + }; + }; + }; + } + ) + ( + { lib, pkgs, ... }: + lib.mkIf pkgs.stdenv.isLinux { + services.polkit-gnome.enable = true; + services.mpris-proxy.enable = true; + + xdg.desktopEntries = { + screenshot = { + type = "Application"; + name = "Screenshot"; + exec = "niri msg action screenshot"; + icon = "screenie"; + }; + screenshot-screen = { + type = "Application"; + name = "Screenshot Screen"; + exec = "niri msg action screenshot-screen"; + icon = "screenie"; + }; + color-pickers = { + type = "Application"; + name = "Color Picker"; + exec = "hyprpicker -a -f=hex -n -l -q"; + icon = "colorpicker"; + }; + notes = { + type = "Application"; + name = "Notes"; + exec = "ghostty --working-directory=${config.home.homeDirectory}/notes -e nvim -c \":lua Snacks.picker('files')\""; + icon = "gnotes"; + }; + lock = { + type = "Application"; + name = "Lock"; + exec = "hyprlock"; + icon = "lock-screen"; + }; + logout = { + type = "Application"; + name = "Logout"; + exec = "niri msg action quit"; + icon = "administration"; + }; + shutdown = { + type = "Application"; + name = "Shutdown"; + exec = "shutdown now"; + icon = "com.github.bcedu.shutdownscheduler"; + }; + }; + + fonts.fontconfig = { + enable = true; + antialiasing = true; + defaultFonts = { + monospace = [ "VictorMono Nerd Font" ]; + sansSerif = [ + "Adwaita Sans" + "Noto Color Emoji" + ]; + serif = [ "Bodoni Moda" ]; + }; + }; + + gtk = { + enable = true; + colorScheme = "dark"; + theme.name = "adw-gtk3"; + font = { + package = pkgs.adwaita-fonts; + name = "Adwaita Sans"; + size = 11; + }; + iconTheme = { + package = pkgs.reversal-icon-theme; + name = "Reversal-dark"; + }; + gtk4.iconTheme = { + package = pkgs.reversal-icon-theme; + name = "Reversal-dark"; + }; + cursorTheme = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; + size = 24; + }; + }; + + home.packages = with pkgs; [ + nerd-fonts.victor-mono + ]; + + programs.dank-material-shell = { + enable = true; + systemd = { + enable = true; + restartIfChanged = true; + }; + + enableSystemMonitoring = true; + enableVPN = true; + enableClipboardPaste = true; + + settings = { + currentThemeName = "dynamic"; + currentThemeCategory = "dynamic"; + customThemeFile = ""; + registryThemeVariants = { }; + matugenScheme = "scheme-tonal-spot"; + runUserMatugenTemplates = true; + matugenTargetMonitor = ""; + popupTransparency = 1; + dockTransparency = 1; + widgetBackgroundColor = "sch"; + widgetColorMode = "default"; + controlCenterTileColorMode = "primary"; + buttonColorMode = "primary"; + cornerRadius = 12; + niriLayoutGapsOverride = 8; + layoutBorderSize = 2; + showSeconds = false; + padHours12Hour = false; + useFahrenheit = false; + windSpeedUnit = "ms"; + nightModeEnabled = false; + animationSpeed = 1; + customAnimationDuration = 500; + syncComponentAnimationSpeeds = true; + popoutAnimationSpeed = 1; + popoutCustomAnimationDuration = 150; + modalAnimationSpeed = 1; + modalCustomAnimationDuration = 150; + enableRippleEffects = false; + wallpaperFillMode = "Fill"; + blurredWallpaperLayer = false; + blurWallpaperOnOverview = false; + showLauncherButton = true; + showWorkspaceSwitcher = true; + showFocusedWindow = true; + showWeather = true; + showMusic = true; + showClipboard = true; + showCpuUsage = true; + showMemUsage = true; + showCpuTemp = true; + showGpuTemp = true; + selectedGpuIndex = 0; + enabledGpuPciIds = [ ]; + showSystemTray = true; + showClock = true; + showNotificationButton = true; + showBattery = true; + showControlCenterButton = true; + showCapsLockIndicator = true; + controlCenterShowNetworkIcon = true; + controlCenterShowBluetoothIcon = true; + controlCenterShowAudioIcon = true; + controlCenterShowAudioPercent = false; + controlCenterShowVpnIcon = true; + controlCenterShowBrightnessIcon = false; + controlCenterShowBrightnessPercent = false; + controlCenterShowMicIcon = false; + controlCenterShowMicPercent = false; + controlCenterShowBatteryIcon = false; + controlCenterShowPrinterIcon = false; + controlCenterShowScreenSharingIcon = true; + showPrivacyButton = true; + privacyShowMicIcon = false; + privacyShowCameraIcon = false; + privacyShowScreenShareIcon = false; + controlCenterWidgets = [ + { + id = "volumeSlider"; + enabled = true; + width = 50; + } + { + id = "brightnessSlider"; + enabled = true; + width = 50; + } + { + id = "wifi"; + enabled = true; + width = 50; + } + { + id = "bluetooth"; + enabled = true; + width = 50; + } + { + id = "audioOutput"; + enabled = true; + width = 50; + } + { + id = "audioInput"; + enabled = true; + width = 50; + } + { + id = "nightMode"; + enabled = true; + width = 50; + } + { + id = "darkMode"; + enabled = true; + width = 50; + } + ]; + showWorkspaceIndex = true; + showWorkspaceName = false; + showWorkspacePadding = false; + workspaceScrolling = false; + showWorkspaceApps = false; + workspaceDragReorder = true; + maxWorkspaceIcons = 3; + workspaceAppIconSizeOffset = 0; + groupWorkspaceApps = true; + workspaceFollowFocus = false; + showOccupiedWorkspacesOnly = false; + reverseScrolling = false; + dwlShowAllTags = false; + workspaceColorMode = "default"; + workspaceOccupiedColorMode = "none"; + workspaceUnfocusedColorMode = "default"; + workspaceUrgentColorMode = "default"; + workspaceFocusedBorderEnabled = false; + workspaceFocusedBorderColor = "primary"; + workspaceFocusedBorderThickness = 2; + workspaceNameIcons = { }; + waveProgressEnabled = true; + scrollTitleEnabled = true; + audioVisualizerEnabled = false; + audioScrollMode = "volume"; + audioWheelScrollAmount = 5; + clockCompactMode = false; + focusedWindowCompactMode = false; + runningAppsCompactMode = true; + barMaxVisibleApps = 0; + barMaxVisibleRunningApps = 0; + barShowOverflowBadge = true; + appsDockHideIndicators = false; + appsDockColorizeActive = false; + appsDockActiveColorMode = "primary"; + appsDockEnlargeOnHover = false; + appsDockEnlargePercentage = 125; + appsDockIconSizePercentage = 100; + keyboardLayoutNameCompactMode = false; + runningAppsCurrentWorkspace = true; + runningAppsGroupByApp = false; + runningAppsCurrentMonitor = false; + appIdSubstitutions = [ + { + pattern = "Spotify"; + replacement = "spotify"; + type = "exact"; + } + { + pattern = "beepertexts"; + replacement = "beeper"; + type = "exact"; + } + { + pattern = "home assistant desktop"; + replacement = "homeassistant-desktop"; + type = "exact"; + } + { + pattern = "com.transmissionbt.transmission"; + replacement = "transmission-gtk"; + type = "contains"; + } + { + pattern = "^steam_app_(\\d+)$"; + replacement = "steam_icon_$1"; + type = "regex"; + } + ]; + centeringMode = "index"; + clockDateFormat = "dddd, MMMM d"; + lockDateFormat = "dddd, MMMM d"; + mediaSize = 1; + appLauncherViewMode = "list"; + spotlightModalViewMode = "list"; + browserPickerViewMode = "grid"; + browserUsageHistory = { }; + appPickerViewMode = "grid"; + filePickerUsageHistory = { }; + sortAppsAlphabetically = false; + appLauncherGridColumns = 4; + spotlightCloseNiriOverview = true; + spotlightSectionViewModes = { }; + appDrawerSectionViewModes = { }; + niriOverviewOverlayEnabled = true; + dankLauncherV2Size = "compact"; + dankLauncherV2BorderEnabled = false; + dankLauncherV2BorderThickness = 2; + dankLauncherV2BorderColor = "primary"; + dankLauncherV2ShowFooter = true; + dankLauncherV2UnloadOnClose = false; + useAutoLocation = false; + weatherEnabled = true; + networkPreference = "auto"; + iconTheme = "System Default"; + cursorSettings = { + theme = "Bibata-Modern-Ice"; + size = 24; + niri = { + hideWhenTyping = false; + hideAfterInactiveMs = 0; + }; + hyprland = { + hideOnKeyPress = false; + hideOnTouch = false; + inactiveTimeout = 0; + }; + dwl = { + cursorHideTimeout = 0; + }; + }; + launcherLogoMode = "apps"; + launcherLogoCustomPath = ""; + launcherLogoColorOverride = ""; + launcherLogoColorInvertOnMode = false; + launcherLogoBrightness = 0.5; + launcherLogoContrast = 1; + launcherLogoSizeOffset = 0; + fontFamily = "Adwaita Sans"; + monoFontFamily = "Fira Code"; + fontWeight = 400; + fontScale = 1; + notepadUseMonospace = true; + notepadFontFamily = ""; + notepadFontSize = 14; + notepadShowLineNumbers = false; + adLastCustomTransparency = 0.7; + soundsEnabled = true; + useSystemSoundTheme = false; + soundNewNotification = true; + soundVolumeChanged = true; + soundPluggedIn = true; + acMonitorTimeout = 0; + acLockTimeout = 0; + acSuspendTimeout = 0; + acSuspendBehavior = 0; + acProfileName = ""; + batteryMonitorTimeout = 0; + batteryLockTimeout = 0; + batterySuspendTimeout = 0; + batterySuspendBehavior = 0; + batteryProfileName = ""; + batteryChargeLimit = 100; + lockBeforeSuspend = false; + loginctlLockIntegration = true; + fadeToLockEnabled = true; + fadeToLockGracePeriod = 5; + fadeToDpmsEnabled = true; + fadeToDpmsGracePeriod = 5; + launchPrefix = ""; + brightnessDevicePins = { }; + wifiNetworkPins = { }; + bluetoothDevicePins = { }; + audioInputDevicePins = { }; + audioOutputDevicePins = { }; + gtkThemingEnabled = false; + qtThemingEnabled = false; + syncModeWithPortal = true; + terminalsAlwaysDark = false; + runDmsMatugenTemplates = true; + matugenTemplateGtk = true; + matugenTemplateNiri = true; + matugenTemplateHyprland = true; + matugenTemplateMangowc = true; + matugenTemplateQt5ct = true; + matugenTemplateQt6ct = true; + matugenTemplateFirefox = true; + matugenTemplatePywalfox = true; + matugenTemplateZenBrowser = true; + matugenTemplateVesktop = true; + matugenTemplateEquibop = true; + matugenTemplateGhostty = false; + matugenTemplateKitty = true; + matugenTemplateFoot = true; + matugenTemplateAlacritty = true; + matugenTemplateNeovim = false; + matugenTemplateWezterm = true; + matugenTemplateDgop = true; + matugenTemplateKcolorscheme = true; + matugenTemplateVscode = true; + matugenTemplateEmacs = true; + showDock = false; + dockAutoHide = false; + dockSmartAutoHide = false; + dockGroupByApp = false; + dockOpenOnOverview = false; + dockPosition = 1; + dockSpacing = 4; + dockBottomGap = 0; + dockMargin = 0; + dockIconSize = 40; + dockIndicatorStyle = "circle"; + dockBorderEnabled = false; + dockBorderColor = "surfaceText"; + dockBorderOpacity = 1; + dockBorderThickness = 1; + dockIsolateDisplays = false; + dockLauncherEnabled = false; + dockLauncherLogoMode = "apps"; + dockLauncherLogoCustomPath = ""; + dockLauncherLogoColorOverride = ""; + dockLauncherLogoSizeOffset = 0; + dockLauncherLogoBrightness = 0.5; + dockLauncherLogoContrast = 1; + dockMaxVisibleApps = 0; + dockMaxVisibleRunningApps = 0; + dockShowOverflowBadge = true; + notificationOverlayEnabled = false; + notificationPopupShadowEnabled = true; + notificationPopupPrivacyMode = false; + modalDarkenBackground = true; + lockScreenShowPowerActions = true; + lockScreenShowSystemIcons = true; + lockScreenShowTime = true; + lockScreenShowDate = true; + lockScreenShowProfileImage = true; + lockScreenShowPasswordField = true; + lockScreenShowMediaPlayer = true; + lockScreenPowerOffMonitorsOnLock = false; + lockAtStartup = false; + enableFprint = false; + maxFprintTries = 15; + lockScreenActiveMonitor = "all"; + lockScreenInactiveColor = "#000000"; + lockScreenNotificationMode = 0; + hideBrightnessSlider = false; + notificationTimeoutLow = 5000; + notificationTimeoutNormal = 5000; + notificationTimeoutCritical = 0; + notificationCompactMode = false; + notificationPopupPosition = 0; + notificationAnimationSpeed = 1; + notificationCustomAnimationDuration = 400; + notificationHistoryEnabled = true; + notificationHistoryMaxCount = 50; + notificationHistoryMaxAgeDays = 7; + notificationHistorySaveLow = true; + notificationHistorySaveNormal = true; + notificationHistorySaveCritical = true; + notificationRules = [ ]; + osdAlwaysShowValue = false; + osdPosition = 5; + osdVolumeEnabled = true; + osdMediaVolumeEnabled = true; + osdMediaPlaybackEnabled = false; + osdBrightnessEnabled = true; + osdIdleInhibitorEnabled = true; + osdMicMuteEnabled = true; + osdCapsLockEnabled = true; + osdPowerProfileEnabled = false; + osdAudioOutputEnabled = true; + powerActionConfirm = true; + powerActionHoldDuration = 0.5; + powerMenuActions = [ + "reboot" + "logout" + "poweroff" + "lock" + "suspend" + "restart" + ]; + powerMenuDefaultAction = "logout"; + powerMenuGridLayout = false; + customPowerActionLock = ""; + customPowerActionLogout = ""; + customPowerActionSuspend = ""; + customPowerActionHibernate = ""; + customPowerActionReboot = ""; + customPowerActionPowerOff = ""; + updaterHideWidget = false; + updaterUseCustomCommand = false; + updaterCustomCommand = ""; + updaterTerminalAdditionalParams = ""; + displayNameMode = "system"; + screenPreferences = { }; + showOnLastDisplay = { }; + niriOutputSettings = { }; + hyprlandOutputSettings = { }; + displayProfiles = { }; + activeDisplayProfile = { }; + displayProfileAutoSelect = false; + displayShowDisconnected = false; + displaySnapToEdge = true; + barConfigs = [ + { + id = "default"; + name = "Main Bar"; + enabled = true; + position = 0; + screenPreferences = [ + "all" + ]; + showOnLastDisplay = true; + leftWidgets = [ + { + id = "workspaceSwitcher"; + enabled = true; + } + { + id = "focusedWindow"; + enabled = true; + } + { + id = "appsDock"; + enabled = true; + } + ]; + centerWidgets = [ + "music" + ]; + rightWidgets = [ + { + id = "systemTray"; + enabled = true; + } + { + id = "clipboard"; + enabled = true; + } + { + id = "clock"; + enabled = true; + } + { + id = "controlCenterButton"; + enabled = true; + } + ]; + spacing = 0; + transparency = 1; + widgetTransparency = 1; + squareCorners = true; + noBackground = false; + gothCornersEnabled = false; + gothCornerRadiusOverride = false; + gothCornerRadiusValue = 12; + borderEnabled = false; + borderColor = "surfaceText"; + borderOpacity = 1; + borderThickness = 1; + fontScale = 1.05; + autoHide = false; + autoHideDelay = 250; + openOnOverview = false; + visible = true; + popupGapsAuto = true; + popupGapsManual = 0; + maximizeDetection = false; + widgetPadding = 12; + iconScale = 1.1; + maximizeWidgetIcons = false; + maximizeWidgetText = false; + removeWidgetPadding = false; + shadowIntensity = 0; + shadowOpacity = 37; + widgetOutlineEnabled = false; + } + ]; + desktopClockEnabled = false; + desktopClockStyle = "analog"; + desktopClockTransparency = 0.8; + desktopClockColorMode = "primary"; + desktopClockShowDate = true; + desktopClockShowAnalogNumbers = false; + desktopClockShowAnalogSeconds = true; + desktopClockWidth = 280; + desktopClockHeight = 180; + desktopClockDisplayPreferences = [ + "all" + ]; + systemMonitorEnabled = false; + systemMonitorShowHeader = true; + systemMonitorTransparency = 0.8; + systemMonitorColorMode = "primary"; + systemMonitorShowCpu = true; + systemMonitorShowCpuGraph = true; + systemMonitorShowCpuTemp = true; + systemMonitorShowGpuTemp = false; + systemMonitorGpuPciId = ""; + systemMonitorShowMemory = true; + systemMonitorShowMemoryGraph = true; + systemMonitorShowNetwork = true; + systemMonitorShowNetworkGraph = true; + systemMonitorShowDisk = true; + systemMonitorShowTopProcesses = false; + systemMonitorTopProcessCount = 3; + systemMonitorTopProcessSortBy = "cpu"; + systemMonitorGraphInterval = 60; + systemMonitorLayoutMode = "auto"; + systemMonitorWidth = 320; + systemMonitorHeight = 480; + systemMonitorDisplayPreferences = [ + "all" + ]; + systemMonitorVariants = [ ]; + desktopWidgetPositions = { }; + desktopWidgetGridSettings = { }; + desktopWidgetInstances = [ ]; + desktopWidgetGroups = [ ]; + builtInPluginSettings = { + dms_settings_search = { + trigger = "?"; + }; + }; + clipboardEnterToPaste = false; + launcherPluginVisibility = { }; + launcherPluginOrder = [ ]; + configVersion = 5; + }; + + session = { + isLightMode = false; + doNotDisturb = false; + wallpaperPath = "/home/dennis/Pictures/Wallpapers/safe/dark/mountain.jpg"; + perMonitorWallpaper = false; + monitorWallpapers = { }; + perModeWallpaper = false; + wallpaperPathLight = ""; + wallpaperPathDark = ""; + monitorWallpapersLight = { }; + monitorWallpapersDark = { }; + monitorWallpaperFillModes = { }; + wallpaperTransition = "fade"; + includedTransitions = [ + "fade" + "wipe" + "disc" + "stripes" + "iris bloom" + "pixelate" + "portal" + ]; + wallpaperCyclingEnabled = false; + wallpaperCyclingMode = "interval"; + wallpaperCyclingInterval = 300; + wallpaperCyclingTime = "06:00"; + monitorCyclingSettings = { }; + nightModeEnabled = false; + nightModeTemperature = 4500; + nightModeHighTemperature = 6500; + nightModeAutoEnabled = false; + nightModeAutoMode = "time"; + nightModeStartHour = 18; + nightModeStartMinute = 0; + nightModeEndHour = 6; + nightModeEndMinute = 0; + latitude = 0; + longitude = 0; + nightModeUseIPLocation = false; + nightModeLocationProvider = ""; + themeModeAutoEnabled = false; + themeModeAutoMode = "time"; + themeModeStartHour = 18; + themeModeStartMinute = 0; + themeModeEndHour = 6; + themeModeEndMinute = 0; + themeModeShareGammaSettings = true; + weatherLocation = "München, Bayern"; + weatherCoordinates = "48.1371079,11.5753822"; + pinnedApps = [ ]; + barPinnedApps = [ ]; + dockLauncherPosition = 0; + hiddenTrayIds = [ ]; + trayItemOrder = [ ]; + recentColors = [ ]; + showThirdPartyPlugins = false; + launchPrefix = ""; + lastBrightnessDevice = ""; + brightnessExponentialDevices = { }; + brightnessUserSetValues = { }; + brightnessExponentValues = { }; + selectedGpuIndex = 0; + nvidiaGpuTempEnabled = false; + nonNvidiaGpuTempEnabled = false; + enabledGpuPciIds = [ ]; + wifiDeviceOverride = ""; + weatherHourlyDetailed = true; + hiddenApps = [ ]; + appOverrides = { }; + searchAppActions = true; + vpnLastConnected = ""; + deviceMaxVolumes = { }; + hiddenOutputDeviceNames = [ ]; + hiddenInputDeviceNames = [ ]; + launcherLastMode = "all"; + appDrawerLastMode = "apps"; + niriOverviewLastMode = "apps"; + configVersion = 3; + }; + }; + + xdg.configFile."niri" = { + source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/scrolling-desktop/niri"; + }; + } + ) ]; - - services.polkit-gnome.enable = true; - services.mpris-proxy.enable = true; - - xdg.desktopEntries = { - screenshot = { - type = "Application"; - name = "Screenshot"; - exec = "niri msg action screenshot"; - icon = "screenie"; - }; - screenshot-screen = { - type = "Application"; - name = "Screenshot Screen"; - exec = "niri msg action screenshot-screen"; - icon = "screenie"; - }; - color-pickers = { - type = "Application"; - name = "Color Picker"; - exec = "hyprpicker -a -f=hex -n -l -q"; - icon = "colorpicker"; - }; - notes = { - type = "Application"; - name = "Notes"; - exec = "ghostty --working-directory=${config.home.homeDirectory}/notes -e nvim -c \":lua Snacks.picker('files')\""; - icon = "gnotes"; - }; - lock = { - type = "Application"; - name = "Lock"; - exec = "hyprlock"; - icon = "lock-screen"; - }; - logout = { - type = "Application"; - name = "Logout"; - exec = "niri msg action quit"; - icon = "administration"; - }; - shutdown = { - type = "Application"; - name = "Shutdown"; - exec = "shutdown now"; - icon = "com.github.bcedu.shutdownscheduler"; - }; - }; - - fonts.fontconfig = { - enable = true; - antialiasing = true; - defaultFonts = { - monospace = [ "VictorMono Nerd Font" ]; - sansSerif = [ - "Adwaita Sans" - "Noto Color Emoji" - ]; - serif = [ "Bodoni Moda" ]; - }; - }; - - gtk = { - enable = true; - colorScheme = "dark"; - theme.name = "adw-gtk3"; - font = { - package = pkgs.adwaita-fonts; - name = "Adwaita Sans"; - size = 11; - }; - iconTheme = { - package = pkgs.reversal-icon-theme; - name = "Reversal-dark"; - }; - gtk4.iconTheme = { - package = pkgs.reversal-icon-theme; - name = "Reversal-dark"; - }; - cursorTheme = { - package = pkgs.bibata-cursors; - name = "Bibata-Modern-Ice"; - size = 24; - }; - }; - - home.packages = with pkgs; [ - nerd-fonts.victor-mono - ]; - - programs.dank-material-shell = { - enable = true; - systemd = { - enable = true; - restartIfChanged = true; - }; - - enableSystemMonitoring = true; - enableVPN = true; - enableClipboardPaste = true; - - settings = { - currentThemeName = "dynamic"; - currentThemeCategory = "dynamic"; - customThemeFile = ""; - registryThemeVariants = { }; - matugenScheme = "scheme-tonal-spot"; - runUserMatugenTemplates = true; - matugenTargetMonitor = ""; - popupTransparency = 1; - dockTransparency = 1; - widgetBackgroundColor = "sch"; - widgetColorMode = "default"; - controlCenterTileColorMode = "primary"; - buttonColorMode = "primary"; - cornerRadius = 12; - niriLayoutGapsOverride = 8; - layoutBorderSize = 2; - showSeconds = false; - padHours12Hour = false; - useFahrenheit = false; - windSpeedUnit = "ms"; - nightModeEnabled = false; - animationSpeed = 1; - customAnimationDuration = 500; - syncComponentAnimationSpeeds = true; - popoutAnimationSpeed = 1; - popoutCustomAnimationDuration = 150; - modalAnimationSpeed = 1; - modalCustomAnimationDuration = 150; - enableRippleEffects = false; - wallpaperFillMode = "Fill"; - blurredWallpaperLayer = false; - blurWallpaperOnOverview = false; - showLauncherButton = true; - showWorkspaceSwitcher = true; - showFocusedWindow = true; - showWeather = true; - showMusic = true; - showClipboard = true; - showCpuUsage = true; - showMemUsage = true; - showCpuTemp = true; - showGpuTemp = true; - selectedGpuIndex = 0; - enabledGpuPciIds = [ ]; - showSystemTray = true; - showClock = true; - showNotificationButton = true; - showBattery = true; - showControlCenterButton = true; - showCapsLockIndicator = true; - controlCenterShowNetworkIcon = true; - controlCenterShowBluetoothIcon = true; - controlCenterShowAudioIcon = true; - controlCenterShowAudioPercent = false; - controlCenterShowVpnIcon = true; - controlCenterShowBrightnessIcon = false; - controlCenterShowBrightnessPercent = false; - controlCenterShowMicIcon = false; - controlCenterShowMicPercent = false; - controlCenterShowBatteryIcon = false; - controlCenterShowPrinterIcon = false; - controlCenterShowScreenSharingIcon = true; - showPrivacyButton = true; - privacyShowMicIcon = false; - privacyShowCameraIcon = false; - privacyShowScreenShareIcon = false; - controlCenterWidgets = [ - { - id = "volumeSlider"; - enabled = true; - width = 50; - } - { - id = "brightnessSlider"; - enabled = true; - width = 50; - } - { - id = "wifi"; - enabled = true; - width = 50; - } - { - id = "bluetooth"; - enabled = true; - width = 50; - } - { - id = "audioOutput"; - enabled = true; - width = 50; - } - { - id = "audioInput"; - enabled = true; - width = 50; - } - { - id = "nightMode"; - enabled = true; - width = 50; - } - { - id = "darkMode"; - enabled = true; - width = 50; - } - ]; - showWorkspaceIndex = true; - showWorkspaceName = false; - showWorkspacePadding = false; - workspaceScrolling = false; - showWorkspaceApps = false; - workspaceDragReorder = true; - maxWorkspaceIcons = 3; - workspaceAppIconSizeOffset = 0; - groupWorkspaceApps = true; - workspaceFollowFocus = false; - showOccupiedWorkspacesOnly = false; - reverseScrolling = false; - dwlShowAllTags = false; - workspaceColorMode = "default"; - workspaceOccupiedColorMode = "none"; - workspaceUnfocusedColorMode = "default"; - workspaceUrgentColorMode = "default"; - workspaceFocusedBorderEnabled = false; - workspaceFocusedBorderColor = "primary"; - workspaceFocusedBorderThickness = 2; - workspaceNameIcons = { }; - waveProgressEnabled = true; - scrollTitleEnabled = true; - audioVisualizerEnabled = false; - audioScrollMode = "volume"; - audioWheelScrollAmount = 5; - clockCompactMode = false; - focusedWindowCompactMode = false; - runningAppsCompactMode = true; - barMaxVisibleApps = 0; - barMaxVisibleRunningApps = 0; - barShowOverflowBadge = true; - appsDockHideIndicators = false; - appsDockColorizeActive = false; - appsDockActiveColorMode = "primary"; - appsDockEnlargeOnHover = false; - appsDockEnlargePercentage = 125; - appsDockIconSizePercentage = 100; - keyboardLayoutNameCompactMode = false; - runningAppsCurrentWorkspace = true; - runningAppsGroupByApp = false; - runningAppsCurrentMonitor = false; - appIdSubstitutions = [ - { - pattern = "Spotify"; - replacement = "spotify"; - type = "exact"; - } - { - pattern = "beepertexts"; - replacement = "beeper"; - type = "exact"; - } - { - pattern = "home assistant desktop"; - replacement = "homeassistant-desktop"; - type = "exact"; - } - { - pattern = "com.transmissionbt.transmission"; - replacement = "transmission-gtk"; - type = "contains"; - } - { - pattern = "^steam_app_(\\d+)$"; - replacement = "steam_icon_$1"; - type = "regex"; - } - ]; - centeringMode = "index"; - clockDateFormat = "dddd, MMMM d"; - lockDateFormat = "dddd, MMMM d"; - mediaSize = 1; - appLauncherViewMode = "list"; - spotlightModalViewMode = "list"; - browserPickerViewMode = "grid"; - browserUsageHistory = { }; - appPickerViewMode = "grid"; - filePickerUsageHistory = { }; - sortAppsAlphabetically = false; - appLauncherGridColumns = 4; - spotlightCloseNiriOverview = true; - spotlightSectionViewModes = { }; - appDrawerSectionViewModes = { }; - niriOverviewOverlayEnabled = true; - dankLauncherV2Size = "compact"; - dankLauncherV2BorderEnabled = false; - dankLauncherV2BorderThickness = 2; - dankLauncherV2BorderColor = "primary"; - dankLauncherV2ShowFooter = true; - dankLauncherV2UnloadOnClose = false; - useAutoLocation = false; - weatherEnabled = true; - networkPreference = "auto"; - iconTheme = "System Default"; - cursorSettings = { - theme = "Bibata-Modern-Ice"; - size = 24; - niri = { - hideWhenTyping = false; - hideAfterInactiveMs = 0; - }; - hyprland = { - hideOnKeyPress = false; - hideOnTouch = false; - inactiveTimeout = 0; - }; - dwl = { - cursorHideTimeout = 0; - }; - }; - launcherLogoMode = "apps"; - launcherLogoCustomPath = ""; - launcherLogoColorOverride = ""; - launcherLogoColorInvertOnMode = false; - launcherLogoBrightness = 0.5; - launcherLogoContrast = 1; - launcherLogoSizeOffset = 0; - fontFamily = "Adwaita Sans"; - monoFontFamily = "Fira Code"; - fontWeight = 400; - fontScale = 1; - notepadUseMonospace = true; - notepadFontFamily = ""; - notepadFontSize = 14; - notepadShowLineNumbers = false; - adLastCustomTransparency = 0.7; - soundsEnabled = true; - useSystemSoundTheme = false; - soundNewNotification = true; - soundVolumeChanged = true; - soundPluggedIn = true; - acMonitorTimeout = 0; - acLockTimeout = 0; - acSuspendTimeout = 0; - acSuspendBehavior = 0; - acProfileName = ""; - batteryMonitorTimeout = 0; - batteryLockTimeout = 0; - batterySuspendTimeout = 0; - batterySuspendBehavior = 0; - batteryProfileName = ""; - batteryChargeLimit = 100; - lockBeforeSuspend = false; - loginctlLockIntegration = true; - fadeToLockEnabled = true; - fadeToLockGracePeriod = 5; - fadeToDpmsEnabled = true; - fadeToDpmsGracePeriod = 5; - launchPrefix = ""; - brightnessDevicePins = { }; - wifiNetworkPins = { }; - bluetoothDevicePins = { }; - audioInputDevicePins = { }; - audioOutputDevicePins = { }; - gtkThemingEnabled = false; - qtThemingEnabled = false; - syncModeWithPortal = true; - terminalsAlwaysDark = false; - runDmsMatugenTemplates = true; - matugenTemplateGtk = true; - matugenTemplateNiri = true; - matugenTemplateHyprland = true; - matugenTemplateMangowc = true; - matugenTemplateQt5ct = true; - matugenTemplateQt6ct = true; - matugenTemplateFirefox = true; - matugenTemplatePywalfox = true; - matugenTemplateZenBrowser = true; - matugenTemplateVesktop = true; - matugenTemplateEquibop = true; - matugenTemplateGhostty = false; - matugenTemplateKitty = true; - matugenTemplateFoot = true; - matugenTemplateAlacritty = true; - matugenTemplateNeovim = false; - matugenTemplateWezterm = true; - matugenTemplateDgop = true; - matugenTemplateKcolorscheme = true; - matugenTemplateVscode = true; - matugenTemplateEmacs = true; - showDock = false; - dockAutoHide = false; - dockSmartAutoHide = false; - dockGroupByApp = false; - dockOpenOnOverview = false; - dockPosition = 1; - dockSpacing = 4; - dockBottomGap = 0; - dockMargin = 0; - dockIconSize = 40; - dockIndicatorStyle = "circle"; - dockBorderEnabled = false; - dockBorderColor = "surfaceText"; - dockBorderOpacity = 1; - dockBorderThickness = 1; - dockIsolateDisplays = false; - dockLauncherEnabled = false; - dockLauncherLogoMode = "apps"; - dockLauncherLogoCustomPath = ""; - dockLauncherLogoColorOverride = ""; - dockLauncherLogoSizeOffset = 0; - dockLauncherLogoBrightness = 0.5; - dockLauncherLogoContrast = 1; - dockMaxVisibleApps = 0; - dockMaxVisibleRunningApps = 0; - dockShowOverflowBadge = true; - notificationOverlayEnabled = false; - notificationPopupShadowEnabled = true; - notificationPopupPrivacyMode = false; - modalDarkenBackground = true; - lockScreenShowPowerActions = true; - lockScreenShowSystemIcons = true; - lockScreenShowTime = true; - lockScreenShowDate = true; - lockScreenShowProfileImage = true; - lockScreenShowPasswordField = true; - lockScreenShowMediaPlayer = true; - lockScreenPowerOffMonitorsOnLock = false; - lockAtStartup = false; - enableFprint = false; - maxFprintTries = 15; - lockScreenActiveMonitor = "all"; - lockScreenInactiveColor = "#000000"; - lockScreenNotificationMode = 0; - hideBrightnessSlider = false; - notificationTimeoutLow = 5000; - notificationTimeoutNormal = 5000; - notificationTimeoutCritical = 0; - notificationCompactMode = false; - notificationPopupPosition = 0; - notificationAnimationSpeed = 1; - notificationCustomAnimationDuration = 400; - notificationHistoryEnabled = true; - notificationHistoryMaxCount = 50; - notificationHistoryMaxAgeDays = 7; - notificationHistorySaveLow = true; - notificationHistorySaveNormal = true; - notificationHistorySaveCritical = true; - notificationRules = [ ]; - osdAlwaysShowValue = false; - osdPosition = 5; - osdVolumeEnabled = true; - osdMediaVolumeEnabled = true; - osdMediaPlaybackEnabled = false; - osdBrightnessEnabled = true; - osdIdleInhibitorEnabled = true; - osdMicMuteEnabled = true; - osdCapsLockEnabled = true; - osdPowerProfileEnabled = false; - osdAudioOutputEnabled = true; - powerActionConfirm = true; - powerActionHoldDuration = 0.5; - powerMenuActions = [ - "reboot" - "logout" - "poweroff" - "lock" - "suspend" - "restart" - ]; - powerMenuDefaultAction = "logout"; - powerMenuGridLayout = false; - customPowerActionLock = ""; - customPowerActionLogout = ""; - customPowerActionSuspend = ""; - customPowerActionHibernate = ""; - customPowerActionReboot = ""; - customPowerActionPowerOff = ""; - updaterHideWidget = false; - updaterUseCustomCommand = false; - updaterCustomCommand = ""; - updaterTerminalAdditionalParams = ""; - displayNameMode = "system"; - screenPreferences = { }; - showOnLastDisplay = { }; - niriOutputSettings = { }; - hyprlandOutputSettings = { }; - displayProfiles = { }; - activeDisplayProfile = { }; - displayProfileAutoSelect = false; - displayShowDisconnected = false; - displaySnapToEdge = true; - barConfigs = [ - { - id = "default"; - name = "Main Bar"; - enabled = true; - position = 0; - screenPreferences = [ - "all" - ]; - showOnLastDisplay = true; - leftWidgets = [ - { - id = "workspaceSwitcher"; - enabled = true; - } - { - id = "focusedWindow"; - enabled = true; - } - { - id = "appsDock"; - enabled = true; - } - ]; - centerWidgets = [ - "music" - ]; - rightWidgets = [ - { - id = "systemTray"; - enabled = true; - } - { - id = "clipboard"; - enabled = true; - } - { - id = "clock"; - enabled = true; - } - { - id = "controlCenterButton"; - enabled = true; - } - ]; - spacing = 0; - transparency = 1; - widgetTransparency = 1; - squareCorners = true; - noBackground = false; - gothCornersEnabled = false; - gothCornerRadiusOverride = false; - gothCornerRadiusValue = 12; - borderEnabled = false; - borderColor = "surfaceText"; - borderOpacity = 1; - borderThickness = 1; - fontScale = 1.05; - autoHide = false; - autoHideDelay = 250; - openOnOverview = false; - visible = true; - popupGapsAuto = true; - popupGapsManual = 0; - maximizeDetection = false; - widgetPadding = 12; - iconScale = 1.1; - maximizeWidgetIcons = false; - maximizeWidgetText = false; - removeWidgetPadding = false; - shadowIntensity = 0; - shadowOpacity = 37; - widgetOutlineEnabled = false; - } - ]; - desktopClockEnabled = false; - desktopClockStyle = "analog"; - desktopClockTransparency = 0.8; - desktopClockColorMode = "primary"; - desktopClockShowDate = true; - desktopClockShowAnalogNumbers = false; - desktopClockShowAnalogSeconds = true; - desktopClockWidth = 280; - desktopClockHeight = 180; - desktopClockDisplayPreferences = [ - "all" - ]; - systemMonitorEnabled = false; - systemMonitorShowHeader = true; - systemMonitorTransparency = 0.8; - systemMonitorColorMode = "primary"; - systemMonitorShowCpu = true; - systemMonitorShowCpuGraph = true; - systemMonitorShowCpuTemp = true; - systemMonitorShowGpuTemp = false; - systemMonitorGpuPciId = ""; - systemMonitorShowMemory = true; - systemMonitorShowMemoryGraph = true; - systemMonitorShowNetwork = true; - systemMonitorShowNetworkGraph = true; - systemMonitorShowDisk = true; - systemMonitorShowTopProcesses = false; - systemMonitorTopProcessCount = 3; - systemMonitorTopProcessSortBy = "cpu"; - systemMonitorGraphInterval = 60; - systemMonitorLayoutMode = "auto"; - systemMonitorWidth = 320; - systemMonitorHeight = 480; - systemMonitorDisplayPreferences = [ - "all" - ]; - systemMonitorVariants = [ ]; - desktopWidgetPositions = { }; - desktopWidgetGridSettings = { }; - desktopWidgetInstances = [ ]; - desktopWidgetGroups = [ ]; - builtInPluginSettings = { - dms_settings_search = { - trigger = "?"; - }; - }; - clipboardEnterToPaste = false; - launcherPluginVisibility = { }; - launcherPluginOrder = [ ]; - configVersion = 5; - }; - - session = { - isLightMode = false; - doNotDisturb = false; - wallpaperPath = "/home/dennis/Pictures/Wallpapers/safe/dark/mountain.jpg"; - perMonitorWallpaper = false; - monitorWallpapers = { }; - perModeWallpaper = false; - wallpaperPathLight = ""; - wallpaperPathDark = ""; - monitorWallpapersLight = { }; - monitorWallpapersDark = { }; - monitorWallpaperFillModes = { }; - wallpaperTransition = "fade"; - includedTransitions = [ - "fade" - "wipe" - "disc" - "stripes" - "iris bloom" - "pixelate" - "portal" - ]; - wallpaperCyclingEnabled = false; - wallpaperCyclingMode = "interval"; - wallpaperCyclingInterval = 300; - wallpaperCyclingTime = "06:00"; - monitorCyclingSettings = { }; - nightModeEnabled = false; - nightModeTemperature = 4500; - nightModeHighTemperature = 6500; - nightModeAutoEnabled = false; - nightModeAutoMode = "time"; - nightModeStartHour = 18; - nightModeStartMinute = 0; - nightModeEndHour = 6; - nightModeEndMinute = 0; - latitude = 0; - longitude = 0; - nightModeUseIPLocation = false; - nightModeLocationProvider = ""; - themeModeAutoEnabled = false; - themeModeAutoMode = "time"; - themeModeStartHour = 18; - themeModeStartMinute = 0; - themeModeEndHour = 6; - themeModeEndMinute = 0; - themeModeShareGammaSettings = true; - weatherLocation = "München, Bayern"; - weatherCoordinates = "48.1371079,11.5753822"; - pinnedApps = [ ]; - barPinnedApps = [ ]; - dockLauncherPosition = 0; - hiddenTrayIds = [ ]; - trayItemOrder = [ ]; - recentColors = [ ]; - showThirdPartyPlugins = false; - launchPrefix = ""; - lastBrightnessDevice = ""; - brightnessExponentialDevices = { }; - brightnessUserSetValues = { }; - brightnessExponentValues = { }; - selectedGpuIndex = 0; - nvidiaGpuTempEnabled = false; - nonNvidiaGpuTempEnabled = false; - enabledGpuPciIds = [ ]; - wifiDeviceOverride = ""; - weatherHourlyDetailed = true; - hiddenApps = [ ]; - appOverrides = { }; - searchAppActions = true; - vpnLastConnected = ""; - deviceMaxVolumes = { }; - hiddenOutputDeviceNames = [ ]; - hiddenInputDeviceNames = [ ]; - launcherLastMode = "all"; - appDrawerLastMode = "apps"; - niriOverviewLastMode = "apps"; - configVersion = 3; - }; - }; - - xdg.configFile."niri" = { - source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/scrolling-desktop/niri"; - }; }; } From f2eff46b75e400b912af3189b38b53d8dd039f6f Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 23:01:15 +0100 Subject: [PATCH 59/77] fixes some things --- modules/base/default.nix | 2 +- modules/terminal/default.nix | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/base/default.nix b/modules/base/default.nix index 44c23b8..9d8ff20 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -32,7 +32,7 @@ in orientation = "right"; show-recents = false; persistent-apps = [ - "/Applications/Helium.app" + "/Applications/Nix Apps/Helium.app" "/Applications/Ghostty.app" "/System/Applications/System Settings.app/" ]; diff --git a/modules/terminal/default.nix b/modules/terminal/default.nix index eea270e..6c256b3 100644 --- a/modules/terminal/default.nix +++ b/modules/terminal/default.nix @@ -27,18 +27,24 @@ }; flake.modules.homeManager.terminal = - { pkgs, config, lib, ... }: + { + pkgs, + config, + lib, + ... + }: { programs.ghostty = { enable = true; package = if pkgs.stdenv.isDarwin then null else pkgs.ghostty; enableFishIntegration = true; settings = { - font-size = 14; + font-size = if pkgs.stdenv.isDarwin then 18 else 14; font-family = "VictorMono Nerd Font"; font-style = "SemiBold"; background-opacity = 0.945; - window-decoration = "none"; + macos-titlebar-style = "transparent"; + window-decoration = if pkgs.stdenv.isDarwin then "auto" else "none"; window-padding-x = 8; window-padding-y = 8; window-padding-balance = true; From fa3b862ff35ffd8c9683430efa49f2e5b6a0d85e Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 23:05:37 +0100 Subject: [PATCH 60/77] fixes paneru flake --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c461fb9..b731672 100644 --- a/flake.nix +++ b/flake.nix @@ -22,7 +22,7 @@ nixvim.url = "github:nix-community/nixvim"; agenix.url = "github:ryantm/agenix"; nix-homebrew.url = "github:zhaofengli/nix-homebrew"; - inputs.paneru = { + paneru = { url = "github:karinushka/paneru"; inputs.nixpkgs.follows = "nixpkgs"; }; From d4f14279fa2f9bb16fc55fb08cc47bb056ca3fc5 Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 23:12:28 +0100 Subject: [PATCH 61/77] fixes penaeru --- flake.lock | 23 ++++++++++++++++++++++- modules/scrolling-desktop/default.nix | 8 ++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index ae836aa..3601b9f 100644 --- a/flake.lock +++ b/flake.lock @@ -304,6 +304,26 @@ "type": "github" } }, + "paneru": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772734644, + "narHash": "sha256-+vmK3OBNboX4LBxlC+1gYvnofko6/dxvc0Dx3UYGTuo=", + "owner": "karinushka", + "repo": "paneru", + "rev": "0a2b802eb5d922ca726901b71d6e813f779ae0d2", + "type": "github" + }, + "original": { + "owner": "karinushka", + "repo": "paneru", + "type": "github" + } + }, "quickshell": { "inputs": { "nixpkgs": [ @@ -340,7 +360,8 @@ "nixpkgs-lib": [ "nixpkgs" ], - "nixvim": "nixvim" + "nixvim": "nixvim", + "paneru": "paneru" } }, "systems": { diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index 0dacaad..f54b23f 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -58,6 +58,14 @@ ]; }; + flake.modules.darwin.scrolling-desktop = + { pkgs, ... }: + { + home-manager.sharedModules = [ + inputs.self.modules.homeManager.scrolling-desktop + ]; + }; + flake.modules.homeManager.scrolling-desktop = { pkgs, config, ... }: { From 91c4311bb41dbf562fb94021a06640f8c1dd27b8 Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 23:14:57 +0100 Subject: [PATCH 62/77] configures statusline --- modules/neovim/_statusline.nix | 9 +++++++ modules/neovim/default.nix | 45 ++++++++++++++++++---------------- 2 files changed, 33 insertions(+), 21 deletions(-) create mode 100644 modules/neovim/_statusline.nix diff --git a/modules/neovim/_statusline.nix b/modules/neovim/_statusline.nix new file mode 100644 index 0000000..e19cfb5 --- /dev/null +++ b/modules/neovim/_statusline.nix @@ -0,0 +1,9 @@ +{ ... }: +{ + programs.nixvim.plugins.mini-statusline = { + enable = true; + settings = { + use_icons = false; + }; + }; +} diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 9efb882..6839c62 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -3,7 +3,7 @@ ... }: { - flake.modules.nixos.neovim = + flake.modules.nixos.neovim = { pkgs, ... }: { home-manager.sharedModules = [ @@ -18,25 +18,28 @@ inputs.self.modules.homeManager.neovim ]; }; - - flake.modules.homeManager.neovim = { pkgs, ... }: { - imports = [ - inputs.nixvim.homeModules.nixvim - ./_colorscheme.nix - ./_completion.nix - ./_editing.nix - ./_formatter.nix - ./_keybindings.nix - ./_lsp.nix - ./_options.nix - ./_picker.nix - ]; - programs.nixvim = { - enable = true; - defaultEditor = true; - package = pkgs.neovim-unwrapped; - vimAlias = true; - vimdiffAlias = true; + + flake.modules.homeManager.neovim = + { pkgs, ... }: + { + imports = [ + inputs.nixvim.homeModules.nixvim + ./_colorscheme.nix + ./_completion.nix + ./_editing.nix + ./_formatter.nix + ./_keybindings.nix + ./_lsp.nix + ./_options.nix + ./_picker.nix + ./_statusline.nix + ]; + programs.nixvim = { + enable = true; + defaultEditor = true; + package = pkgs.neovim-unwrapped; + vimAlias = true; + vimdiffAlias = true; + }; }; - }; } From 7305d9cb6bed21b38d994365823ae9354e82d5e5 Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 23:18:37 +0100 Subject: [PATCH 63/77] fixes paneru --- modules/scrolling-desktop/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index f54b23f..9d5fe7a 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -111,6 +111,7 @@ }; windows = { all = { + title = ".*"; horizontal_padding = 4; vertical_padding = 4; }; From 8c1438bf10ca6c7c7e218cf559073acde040fe56 Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 23:19:13 +0100 Subject: [PATCH 64/77] some ghostty fixes --- modules/terminal/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/terminal/default.nix b/modules/terminal/default.nix index 6c256b3..1158afa 100644 --- a/modules/terminal/default.nix +++ b/modules/terminal/default.nix @@ -39,14 +39,14 @@ package = if pkgs.stdenv.isDarwin then null else pkgs.ghostty; enableFishIntegration = true; settings = { - font-size = if pkgs.stdenv.isDarwin then 18 else 14; + font-size = if pkgs.stdenv.isDarwin then 17 else 14; font-family = "VictorMono Nerd Font"; font-style = "SemiBold"; background-opacity = 0.945; macos-titlebar-style = "transparent"; window-decoration = if pkgs.stdenv.isDarwin then "auto" else "none"; - window-padding-x = 8; - window-padding-y = 8; + window-padding-x = 4; + window-padding-y = 4; window-padding-balance = true; window-inherit-working-directory = true; window-theme = "ghostty"; From c8b73ad84671139030800f7131d69fa46d1bb396 Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 23:31:03 +0100 Subject: [PATCH 65/77] some more fixes --- modules/neovim/_picker.nix | 1 - modules/neovim/extraFiles/winterly.lua | 6 +++--- modules/scrolling-desktop/default.nix | 19 +++++++++++-------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/modules/neovim/_picker.nix b/modules/neovim/_picker.nix index 2f13fc8..d911342 100644 --- a/modules/neovim/_picker.nix +++ b/modules/neovim/_picker.nix @@ -36,7 +36,6 @@ picker = { enabled = true, prompt = "λ ", - layout = { preset = "ivy" }, }, statuscolumn = { enabled = true }, }) diff --git a/modules/neovim/extraFiles/winterly.lua b/modules/neovim/extraFiles/winterly.lua index d3b6a51..4710c9f 100644 --- a/modules/neovim/extraFiles/winterly.lua +++ b/modules/neovim/extraFiles/winterly.lua @@ -25,8 +25,8 @@ hi("IncSearch", { bg = palette.magenta_subtle_bg, fg = palette.magenta }) hi("ModeMsg", { bold = true, cterm = { bold = true } }) hi("NonText", { fg = palette.grey, ctermfg = "DarkGrey" }) hi("PmenuSbar", { bg = palette.grey, ctermbg = "Grey" }) -hi("StatusLine", { reverse = true, bold = true, cterm = { reverse = true, bold = true } }) -hi("StatusLineNC", { reverse = true, cterm = { reverse = true } }) +hi("StatusLine", { bg = palette.bg_secondary, fg = palette.fg, bold = true, cterm = { reverse = true, bold = true } }) +hi("StatusLineNC", { bg = palette.bg_secondary, fg = palette.fg, cterm = { reverse = true } }) hi("TabLineFill", { reverse = true, cterm = { reverse = true } }) hi("TabLineSel", { bold = true, cterm = { bold = true } }) hi("TermCursor", { reverse = true, cterm = { reverse = true } }) @@ -210,7 +210,7 @@ hi("@lsp.type.variable", { link = "Identifier" }) hi("@lsp.typemod.keyword.documentation", { fg = palette.grey, bold = true }) if vim.o.background == "light" then --- TODO: Define light scheme + -- TODO: Define light scheme else -- Default colors only used with a dark background. hi("ColorColumn", { bg = palette.red_subtle_bg, ctermbg = "DarkRed" }) diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index 9d5fe7a..69b37dd 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -79,6 +79,9 @@ enable = true; settings = { options = { + border_active_window = true; + border_color = "#c57faf"; + sliver_width = 10; preset_column_widths = [ 0.25 0.5 @@ -93,14 +96,14 @@ padding_right = 4; }; bindings = { - window_focus_west = "cmd - h"; - window_focus_east = "cmd - l"; - window_focus_north = "cmd - k"; - window_focus_south = "cmd - j"; - window_swap_west = "alt - h"; - window_swap_east = "alt - l"; - window_swap_first = "alt + shift - h"; - window_swap_last = "alt + shift - l"; + window_focus_west = "alt - h"; + window_focus_east = "alt - l"; + window_focus_north = "alt - k"; + window_focusalt_south = "alt - j"; + window_swap_west = "alt - shift - h"; + window_swap_east = "alt - shift - l"; + window_swap_first = "alt + shift - a"; + window_swap_last = "alt + shift - e"; window_center = "alt - c"; window_resize = "alt - r"; window_fullwidth = "alt - f"; From c1e3f842655cbfc6929aaf61151cf4465f2d0888 Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 23:31:34 +0100 Subject: [PATCH 66/77] some more fixes --- modules/scrolling-desktop/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index 69b37dd..b91c731 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -93,7 +93,7 @@ padding_top = 4; padding_bottom = 4; padding_left = 4; - padding_right = 4; + padding_right = 0; }; bindings = { window_focus_west = "alt - h"; From 7501302d0c6430c9a5bd66a5a2bf9ac905feac7a Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 23:36:39 +0100 Subject: [PATCH 67/77] some more --- modules/scrolling-desktop/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index b91c731..0227cab 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -89,6 +89,7 @@ ]; swipe_gesture_fingers = 4; swipe_gesture_direction = "Natural"; + continous_swipe = false; animation_speed = 4000; padding_top = 4; padding_bottom = 4; From 27866b68378f9fe3761b3920270afa2d1183f64e Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 23:48:30 +0100 Subject: [PATCH 68/77] some more fixes --- modules/neovim/extraFiles/winterly.lua | 2 +- modules/shell/default.nix | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/neovim/extraFiles/winterly.lua b/modules/neovim/extraFiles/winterly.lua index 4710c9f..14981b9 100644 --- a/modules/neovim/extraFiles/winterly.lua +++ b/modules/neovim/extraFiles/winterly.lua @@ -25,7 +25,7 @@ hi("IncSearch", { bg = palette.magenta_subtle_bg, fg = palette.magenta }) hi("ModeMsg", { bold = true, cterm = { bold = true } }) hi("NonText", { fg = palette.grey, ctermfg = "DarkGrey" }) hi("PmenuSbar", { bg = palette.grey, ctermbg = "Grey" }) -hi("StatusLine", { bg = palette.bg_secondary, fg = palette.fg, bold = true, cterm = { reverse = true, bold = true } }) +hi("StatusLine", { bg = palette.bg_secondary, fg = palette.fg_dim, bold = true, cterm = { reverse = true, bold = true } }) hi("StatusLineNC", { bg = palette.bg_secondary, fg = palette.fg, cterm = { reverse = true } }) hi("TabLineFill", { reverse = true, cterm = { reverse = true } }) hi("TabLineSel", { bold = true, cterm = { bold = true } }) diff --git a/modules/shell/default.nix b/modules/shell/default.nix index 98a3c51..5191a41 100644 --- a/modules/shell/default.nix +++ b/modules/shell/default.nix @@ -192,12 +192,12 @@ setup_homebrew = /* fish */ '' fish_add_path /opt/homebrew/bin - if test -d (brew --prefix)"/share/fish/completions" - set -p fish_complete_path (brew --prefix)/share/fish/completions + if test -d /opt/homebrew/share/fish/completions + set -p fish_complete_path /opt/homebrew/share/fish/completions end - if test -d (brew --prefix)"/share/fish/vendor_completions.d" - set -p fish_complete_path (brew --prefix)/share/fish/vendor_completions.d + if test -d /opt/homebrew/share/fish/vendor_completions.d + set -p fish_complete_path /opt/homebrew/share/fish/vendor_completions.d end ''; setup_path = /* fish */ '' From c062e64866129786544cbfacaae9338d63e04c83 Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 23:49:31 +0100 Subject: [PATCH 69/77] fixes keybinds for paneru --- modules/scrolling-desktop/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index 0227cab..271fba3 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -101,8 +101,8 @@ window_focus_east = "alt - l"; window_focus_north = "alt - k"; window_focusalt_south = "alt - j"; - window_swap_west = "alt - shift - h"; - window_swap_east = "alt - shift - l"; + window_swap_west = "alt + shift - h"; + window_swap_east = "alt + shift - l"; window_swap_first = "alt + shift - a"; window_swap_last = "alt + shift - e"; window_center = "alt - c"; From 6873492897e40aadeb2920a241cb52d6c0fef222 Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 23:52:51 +0100 Subject: [PATCH 70/77] fixes --- modules/neovim/extraFiles/winterly.lua | 2 +- modules/scrolling-desktop/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/neovim/extraFiles/winterly.lua b/modules/neovim/extraFiles/winterly.lua index 14981b9..52ef6b3 100644 --- a/modules/neovim/extraFiles/winterly.lua +++ b/modules/neovim/extraFiles/winterly.lua @@ -25,7 +25,7 @@ hi("IncSearch", { bg = palette.magenta_subtle_bg, fg = palette.magenta }) hi("ModeMsg", { bold = true, cterm = { bold = true } }) hi("NonText", { fg = palette.grey, ctermfg = "DarkGrey" }) hi("PmenuSbar", { bg = palette.grey, ctermbg = "Grey" }) -hi("StatusLine", { bg = palette.bg_secondary, fg = palette.fg_dim, bold = true, cterm = { reverse = true, bold = true } }) +hi("StatusLine", { bg = palette.bg_secondary, fg = palette.bg, bold = true, cterm = { reverse = true, bold = true } }) hi("StatusLineNC", { bg = palette.bg_secondary, fg = palette.fg, cterm = { reverse = true } }) hi("TabLineFill", { reverse = true, cterm = { reverse = true } }) hi("TabLineSel", { bold = true, cterm = { bold = true } }) diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index 271fba3..cf88820 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -100,7 +100,7 @@ window_focus_west = "alt - h"; window_focus_east = "alt - l"; window_focus_north = "alt - k"; - window_focusalt_south = "alt - j"; + window_focus_south = "alt - j"; window_swap_west = "alt + shift - h"; window_swap_east = "alt + shift - l"; window_swap_first = "alt + shift - a"; From 3bd002632272fc869368d3c839c6d4e16f4abb74 Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 5 Mar 2026 23:59:31 +0100 Subject: [PATCH 71/77] some more fixes --- modules/neovim/extraFiles/winterly.lua | 6 +++++- modules/scrolling-desktop/default.nix | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/neovim/extraFiles/winterly.lua b/modules/neovim/extraFiles/winterly.lua index 52ef6b3..c9f05d3 100644 --- a/modules/neovim/extraFiles/winterly.lua +++ b/modules/neovim/extraFiles/winterly.lua @@ -25,7 +25,7 @@ hi("IncSearch", { bg = palette.magenta_subtle_bg, fg = palette.magenta }) hi("ModeMsg", { bold = true, cterm = { bold = true } }) hi("NonText", { fg = palette.grey, ctermfg = "DarkGrey" }) hi("PmenuSbar", { bg = palette.grey, ctermbg = "Grey" }) -hi("StatusLine", { bg = palette.bg_secondary, fg = palette.bg, bold = true, cterm = { reverse = true, bold = true } }) +hi("StatusLine", { bg = palette.bg_secondary, fg = palette.fg_dim, bold = true, cterm = { reverse = true, bold = true } }) hi("StatusLineNC", { bg = palette.bg_secondary, fg = palette.fg, cterm = { reverse = true } }) hi("TabLineFill", { reverse = true, cterm = { reverse = true } }) hi("TabLineSel", { bold = true, cterm = { bold = true } }) @@ -365,4 +365,8 @@ else hi("NeogitCommitViewHeader", { bg = palette.bg_secondary, fg = palette.fg }) hi("NeogitDiffHeader", { bg = palette.bg, fg = palette.grey_bright, bold = true }) hi("NeogitActiveItem", { bg = palette.grey_bright, fg = palette.bg, bold = true }) + + -- Mini Statusline + hi("MiniStatusLineModeNormal", { fg = palette.bg, bold = true }) + hi("MiniStatusLineModeCommand", { bg = palette.blue_subtle_bg, fg = palette.blue_bright, bold = true }) end diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index cf88820..6db5745 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -81,6 +81,7 @@ options = { border_active_window = true; border_color = "#c57faf"; + border_radius = 12; sliver_width = 10; preset_column_widths = [ 0.25 From 1b6fef20df53c0689c822315fb98918d66540f08 Mon Sep 17 00:00:00 2001 From: Dennis Date: Fri, 6 Mar 2026 00:04:57 +0100 Subject: [PATCH 72/77] some additional fixes --- modules/neovim/extraFiles/winterly.lua | 2 +- modules/scrolling-desktop/default.nix | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/neovim/extraFiles/winterly.lua b/modules/neovim/extraFiles/winterly.lua index c9f05d3..d305a6d 100644 --- a/modules/neovim/extraFiles/winterly.lua +++ b/modules/neovim/extraFiles/winterly.lua @@ -367,6 +367,6 @@ else hi("NeogitActiveItem", { bg = palette.grey_bright, fg = palette.bg, bold = true }) -- Mini Statusline - hi("MiniStatusLineModeNormal", { fg = palette.bg, bold = true }) + hi("MiniStatusLineModeNormal", { fg = palette.magenta_brighter, bg = palette.magenta_subtle_bg, bold = true }) hi("MiniStatusLineModeCommand", { bg = palette.blue_subtle_bg, fg = palette.blue_bright, bold = true }) end diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index 6db5745..1ad16b6 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -81,7 +81,7 @@ options = { border_active_window = true; border_color = "#c57faf"; - border_radius = 12; + border_radius = 15; sliver_width = 10; preset_column_widths = [ 0.25 @@ -124,6 +124,11 @@ title = "Picture.*(in)?.*[Pp]icture"; floating = true; }; + settings = { + title = ".*"; + bundle_id = "com.apple.systempreferences"; + border_radius = 25; + }; }; }; }; From 5b425bf0c486db6f8ae8a62c9a646eca437c5087 Mon Sep 17 00:00:00 2001 From: Dennis Date: Fri, 6 Mar 2026 00:08:20 +0100 Subject: [PATCH 73/77] adds keybinds for paneru --- modules/scrolling-desktop/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/scrolling-desktop/default.nix b/modules/scrolling-desktop/default.nix index 1ad16b6..f9d475c 100644 --- a/modules/scrolling-desktop/default.nix +++ b/modules/scrolling-desktop/default.nix @@ -102,9 +102,11 @@ window_focus_east = "alt - l"; window_focus_north = "alt - k"; window_focus_south = "alt - j"; + window_focus_first = "alt - b"; + window_focus_last = "alt - e"; window_swap_west = "alt + shift - h"; window_swap_east = "alt + shift - l"; - window_swap_first = "alt + shift - a"; + window_swap_first = "alt + shift - b"; window_swap_last = "alt + shift - e"; window_center = "alt - c"; window_resize = "alt - r"; From f583fe82d7fcf90db4352b6c9b27583594d3e567 Mon Sep 17 00:00:00 2001 From: Dennis Date: Sat, 7 Mar 2026 17:25:24 +0100 Subject: [PATCH 74/77] uses tiling instead of scrolling --- modules/cli-tools/default.nix | 4 +- modules/hosts/dnsc-air/default.nix | 2 +- modules/tiling-desktop/default.nix | 114 +++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 modules/tiling-desktop/default.nix diff --git a/modules/cli-tools/default.nix b/modules/cli-tools/default.nix index f015699..4147599 100644 --- a/modules/cli-tools/default.nix +++ b/modules/cli-tools/default.nix @@ -29,7 +29,7 @@ in environment.systemPackages = commonPackages pkgs; home-manager.sharedModules = [ - inputs.self.modules.homeManager.git + inputs.self.modules.homeManager.cli-tools ]; }; @@ -39,7 +39,7 @@ in environment.systemPackages = commonPackages pkgs; home-manager.sharedModules = [ - inputs.self.modules.homeManager.git + inputs.self.modules.homeManager.cli-tools ]; }; diff --git a/modules/hosts/dnsc-air/default.nix b/modules/hosts/dnsc-air/default.nix index ff1226f..7d936e3 100644 --- a/modules/hosts/dnsc-air/default.nix +++ b/modules/hosts/dnsc-air/default.nix @@ -18,7 +18,7 @@ in neovim terminal browser - scrolling-desktop + tiling-desktop ( { ... }: diff --git a/modules/tiling-desktop/default.nix b/modules/tiling-desktop/default.nix new file mode 100644 index 0000000..6476d67 --- /dev/null +++ b/modules/tiling-desktop/default.nix @@ -0,0 +1,114 @@ +{ inputs, ... }: +{ + flake.modules.darwin.tiling-desktop = + { pkgs, ... }: + { + services.aerospace = { + enable = true; + settings = { + accordion-padding = 10; + gaps = { + inner.horizontal = 6; + inner.vertical = 6; + outer.left = 6; + outer.bottom = 6; + outer.top = 6; + outer.right = 6; + }; + workspace-to-monitor-force-assignment = { + "1" = "main"; + "2" = "main"; + "3" = "main"; + "4" = "main"; + "5" = "secondary"; + "6" = "secondary"; + }; + mode.main.binding = { + alt-h = "focus left"; + alt-j = "focus down"; + alt-k = "focus up"; + alt-l = "focus right"; + alt-shift-h = "move left"; + alt-shift-j = "move down"; + alt-shift-k = "move up"; + alt-shift-l = "move right"; + alt-comma = "layout tiles horizontal vertical"; + alt-period = "layout accordion horizontal vertical"; + alt-f = "fullscreen"; + alt-1 = "workspace 1"; + alt-2 = "workspace 2"; + alt-3 = "workspace 3"; + alt-4 = "workspace 4"; + alt-5 = "workspace 5"; + alt-6 = "workspace 6"; + alt-shift-1 = [ + "move-node-to-workspace 1" + "workspace 1" + ]; + alt-shift-2 = [ + "move-node-to-workspace 2" + "workspace 2" + ]; + alt-shift-3 = [ + "move-node-to-workspace 3" + "workspace 3" + ]; + alt-shift-4 = [ + "move-node-to-workspace 4" + "workspace 4" + ]; + alt-shift-5 = [ + "move-node-to-workspace 5" + "workspace 5" + ]; + alt-shift-6 = [ + "move-node-to-workspace 6" + "workspace 6" + ]; + }; + on-window-detected = [ + { + "if".app-id = "app.zen-browser.zen"; + run = "move-node-to-workspace 1"; + } + { + "if".app-id = "net.imput.helium"; + run = "move-node-to-workspace 1"; + } + { + "if".app-id = "com.mitchellh.ghostty"; + run = "move-node-to-workspace 2"; + } + { + "if".app-id = "com.apple.Preview"; + run = "move-node-to-workspace 3"; + } + { + "if".app-id = "com.apple.dt.Xcode"; + run = "move-node-to-workspace 3"; + } + { + "if".app-id = "com.postmanlabs.mac"; + run = "move-node-to-workspace 3"; + } + { + "if".app-id = "com.apple.iCal"; + run = "move-node-to-workspace 4"; + } + { + "if".app-id = "com.microsoft.teams2"; + run = "move-node-to-workspace 5"; + } + { + "if".app-id = "com.spotify.client"; + run = "move-node-to-workspace 6"; + } + { + "if".app-id = "com.apple.reminders"; + run = "move-node-to-workspace 6"; + } + ]; + }; + }; + }; +} From c694a4b484245b278700bb0397b8b2d252905812 Mon Sep 17 00:00:00 2001 From: Dennis Date: Sat, 7 Mar 2026 17:39:24 +0100 Subject: [PATCH 75/77] adds borders to macos tiling --- modules/tiling-desktop/default.nix | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/modules/tiling-desktop/default.nix b/modules/tiling-desktop/default.nix index 6476d67..38c7a9c 100644 --- a/modules/tiling-desktop/default.nix +++ b/modules/tiling-desktop/default.nix @@ -1,4 +1,4 @@ -{ inputs, ... }: +{ inputs, lib, ... }: { flake.modules.darwin.tiling-desktop = { pkgs, ... }: @@ -110,5 +110,31 @@ ]; }; }; + + home-manager.sharedModules = [ + inputs.self.modules.homeManager.tiling-desktop + ]; + }; + + flake.modules.homeManager.tiling-desktop = + { pkgs, ... }: + { + imports = [ + ( + { ... }: + lib.mkIf pkgs.stdenv.isDarwin { + services.jankyborders = { + enable = true; + settings = { + style = "round"; + width = 4.0; + hidpi = "on"; + active_color = "0xffc57faf"; + inactive_color = "0xff1d202f"; + }; + }; + } + ) + ]; }; } From 95bb47549dfe304815c2224119ef4ffd141d5d3f Mon Sep 17 00:00:00 2001 From: Dennis Date: Sat, 7 Mar 2026 17:42:56 +0100 Subject: [PATCH 76/77] updates border width --- modules/tiling-desktop/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tiling-desktop/default.nix b/modules/tiling-desktop/default.nix index 38c7a9c..988a0ec 100644 --- a/modules/tiling-desktop/default.nix +++ b/modules/tiling-desktop/default.nix @@ -127,7 +127,7 @@ enable = true; settings = { style = "round"; - width = 4.0; + width = 7.0; hidpi = "on"; active_color = "0xffc57faf"; inactive_color = "0xff1d202f"; From 206c054218a95a4f2397363edea679b39d9da02a Mon Sep 17 00:00:00 2001 From: Dennis Date: Mon, 9 Mar 2026 19:04:13 +0100 Subject: [PATCH 77/77] uninstalls jankyborders --- modules/tiling-desktop/default.nix | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/modules/tiling-desktop/default.nix b/modules/tiling-desktop/default.nix index 988a0ec..a0ca26a 100644 --- a/modules/tiling-desktop/default.nix +++ b/modules/tiling-desktop/default.nix @@ -123,16 +123,7 @@ ( { ... }: lib.mkIf pkgs.stdenv.isDarwin { - services.jankyborders = { - enable = true; - settings = { - style = "round"; - width = 7.0; - hidpi = "on"; - active_color = "0xffc57faf"; - inactive_color = "0xff1d202f"; - }; - }; + # Configuration for Mac tiling desktop } ) ];