diff --git a/home/dot_config/nvim/ftplugin/cs.lua b/home/dot_config/nvim/ftplugin/cs.lua new file mode 100644 index 0000000..f5418ce --- /dev/null +++ b/home/dot_config/nvim/ftplugin/cs.lua @@ -0,0 +1 @@ +vim.diagnostic.config({ virtual_lines = true }) diff --git a/home/dot_config/nvim/ftplugin/java.lua b/home/dot_config/nvim/ftplugin/java.lua new file mode 100644 index 0000000..8996232 --- /dev/null +++ b/home/dot_config/nvim/ftplugin/java.lua @@ -0,0 +1,2 @@ +-- Enable virtual lines for diagnostics in Java files (nvim >= 0.11) +vim.diagnostic.config({ virtual_lines = true, virtual_text = false }) diff --git a/home/dot_config/nvim/lua/plugins/mod/blink-cmp.lua b/home/dot_config/nvim/lua/plugins/mod/blink-cmp.lua index cfb9c44..29eea2b 100644 --- a/home/dot_config/nvim/lua/plugins/mod/blink-cmp.lua +++ b/home/dot_config/nvim/lua/plugins/mod/blink-cmp.lua @@ -31,7 +31,7 @@ return { }, [""] = { "select_and_accept" }, [""] = { "hide", "fallback" }, - [""] = { "accept", "fallback" }, + [""] = { "fallback" }, }, completion = { menu = { border = "single" }, @@ -69,7 +69,7 @@ return { }, completion = { menu = { auto_show = true }, - documentation = { auto_show = true, auto_show_delay_ms = 1000 }, + -- documentation = { auto_show = true }, --, auto_show_delay_ms = 1000 }, }, }, diff --git a/nixcfgs/flake.lock b/nixcfgs/flake.lock index da759a1..fd7cb73 100644 --- a/nixcfgs/flake.lock +++ b/nixcfgs/flake.lock @@ -37,6 +37,74 @@ "type": "github" } }, + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1755819240, + "narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1754405784, + "narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1752979451, + "narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "27cf1e66e50abc622fb76a3019012dc07c678fac", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1732806396, + "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + } + }, "betterfox-nix": { "inputs": { "flake-parts": "flake-parts", @@ -139,7 +207,7 @@ }, "devshell": { "inputs": { - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1741473158, @@ -195,6 +263,22 @@ "type": "github" } }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1758112371, + "narHash": "sha256-lizRM2pj6PHrR25yimjyFn04OS4wcdbc38DCdBVa2rk=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "0909cfe4a2af8d358ad13b20246a350e14c2473d", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, "flake-compat": { "locked": { "lastModified": 1733328505, @@ -286,6 +370,27 @@ } }, "flake-parts_4": { + "inputs": { + "nixpkgs-lib": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1756770412, + "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "4524271976b625a4a605beefd893f270620fd751", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_5": { "inputs": { "nixpkgs-lib": "nixpkgs-lib_2" }, @@ -320,6 +425,22 @@ "type": "indirect" } }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -343,6 +464,25 @@ "type": "github" } }, + "gnome-shell": { + "flake": false, + "locked": { + "host": "gitlab.gnome.org", + "lastModified": 1762869044, + "narHash": "sha256-nwm/GJ2Syigf7VccLAZ66mFC8mZJFqpJmIxSGKl7+Ds=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "680e3d195a92203f28d4bf8c6e8bb537cc3ed4ad", + "type": "gitlab" + }, + "original": { + "host": "gitlab.gnome.org", + "owner": "GNOME", + "ref": "gnome-49", + "repo": "gnome-shell", + "type": "gitlab" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -365,7 +505,7 @@ }, "home-manager_2": { "inputs": { - "nixpkgs": "nixpkgs_10" + "nixpkgs": "nixpkgs_11" }, "locked": { "lastModified": 1756842514, @@ -455,9 +595,9 @@ "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs_11", + "nixpkgs": "nixpkgs_12", "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems_5", + "systems": "systems_6", "xdph": "xdph" }, "locked": { @@ -888,6 +1028,22 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1722073938, + "narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e36e9f57337d0ff0cf77aceb58af4c805472bfae", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { "locked": { "lastModified": 1756542300, "narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=", @@ -903,7 +1059,7 @@ "type": "github" } }, - "nixpkgs_11": { + "nixpkgs_12": { "locked": { "lastModified": 1751792365, "narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=", @@ -919,7 +1075,7 @@ "type": "github" } }, - "nixpkgs_12": { + "nixpkgs_13": { "locked": { "lastModified": 1756819007, "narHash": "sha256-12V64nKG/O/guxSYnr5/nq1EfqwJCdD2+cIGmhz3nrE=", @@ -935,7 +1091,7 @@ "type": "github" } }, - "nixpkgs_13": { + "nixpkgs_14": { "locked": { "lastModified": 1747958103, "narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=", @@ -1049,11 +1205,11 @@ }, "nixpkgs_8": { "locked": { - "lastModified": 1757068644, - "narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=", + "lastModified": 1762977756, + "narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8eb28adfa3dc4de28e792e3bf49fcf9007ca8ac9", + "rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55", "type": "github" }, "original": { @@ -1065,16 +1221,16 @@ }, "nixpkgs_9": { "locked": { - "lastModified": 1722073938, - "narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=", + "lastModified": 1757068644, + "narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e36e9f57337d0ff0cf77aceb58af4c805472bfae", + "rev": "8eb28adfa3dc4de28e792e3bf49fcf9007ca8ac9", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -1098,6 +1254,31 @@ "type": "github" } }, + "nur_2": { + "inputs": { + "flake-parts": [ + "stylix", + "flake-parts" + ], + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1758998580, + "narHash": "sha256-VLx0z396gDCGSiowLMFz5XRO/XuNV+4EnDYjdJhHvUk=", + "owner": "nix-community", + "repo": "NUR", + "rev": "ba8d9c98f5f4630bcb0e815ab456afd90c930728", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "plasma-manager": { "inputs": { "home-manager": [ @@ -1184,6 +1365,7 @@ "nur": "nur", "plasma-manager": "plasma-manager", "sops-nix": "sops-nix", + "stylix": "stylix", "walker": "walker", "xremap-flake": "xremap-flake", "zen-browser": "zen-browser" @@ -1209,6 +1391,38 @@ "type": "github" } }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-helix": "base16-helix", + "base16-vim": "base16-vim", + "firefox-gnome-theme": "firefox-gnome-theme", + "flake-parts": "flake-parts_4", + "gnome-shell": "gnome-shell", + "nixpkgs": "nixpkgs_8", + "nur": "nur_2", + "systems": "systems_4", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-schemes": "tinted-schemes", + "tinted-tmux": "tinted-tmux", + "tinted-zed": "tinted-zed" + }, + "locked": { + "lastModified": 1764191810, + "narHash": "sha256-rofXPD/9TGpHveo1MTlUfpnF0MCG1/uHUB9f0rosdqc=", + "owner": "nix-community", + "repo": "stylix", + "rev": "70c444a10d0c9ef71a25580dfa79af9cd43f3a5e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "stylix", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, @@ -1256,16 +1470,16 @@ }, "systems_4": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default-linux", + "repo": "default", "type": "github" } }, @@ -1284,9 +1498,105 @@ "type": "github" } }, + "systems_6": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "tinted-foot": { + "flake": false, + "locked": { + "lastModified": 1726913040, + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1735730497, + "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "type": "github" + } + }, + "tinted-schemes": { + "flake": false, + "locked": { + "lastModified": 1757716333, + "narHash": "sha256-d4km8W7w2zCUEmPAPUoLk1NlYrGODuVa3P7St+UrqkM=", + "owner": "tinted-theming", + "repo": "schemes", + "rev": "317a5e10c35825a6c905d912e480dfe8e71c7559", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "schemes", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1757811970, + "narHash": "sha256-n5ZJgmzGZXOD9pZdAl1OnBu3PIqD+X3vEBUGbTi4JiI=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "d217ba31c846006e9e0ae70775b0ee0f00aa6b1e", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, + "tinted-zed": { + "flake": false, + "locked": { + "lastModified": 1757811247, + "narHash": "sha256-4EFOUyLj85NRL3OacHoLGEo0wjiRJzfsXtR4CZWAn6w=", + "owner": "tinted-theming", + "repo": "base16-zed", + "rev": "824fe0aacf82b3c26690d14e8d2cedd56e18404e", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-zed", + "type": "github" + } + }, "treefmt-nix": { "inputs": { - "nixpkgs": "nixpkgs_13" + "nixpkgs": "nixpkgs_14" }, "locked": { "lastModified": 1750931469, @@ -1307,8 +1617,8 @@ "elephant": [ "elephant" ], - "nixpkgs": "nixpkgs_8", - "systems": "systems_4" + "nixpkgs": "nixpkgs_9", + "systems": "systems_5" }, "locked": { "lastModified": 1763837811, @@ -1392,10 +1702,10 @@ "inputs": { "crane": "crane", "devshell": "devshell", - "flake-parts": "flake-parts_4", + "flake-parts": "flake-parts_5", "home-manager": "home-manager_2", "hyprland": "hyprland", - "nixpkgs": "nixpkgs_12", + "nixpkgs": "nixpkgs_13", "treefmt-nix": "treefmt-nix", "xremap": "xremap" }, diff --git a/nixcfgs/flake.nix b/nixcfgs/flake.nix index f92c682..51d1b1b 100644 --- a/nixcfgs/flake.nix +++ b/nixcfgs/flake.nix @@ -57,6 +57,8 @@ url = "github:abenz1267/walker"; inputs.elephant.follows = "elephant"; }; + + stylix.url = "github:nix-community/stylix"; }; outputs = { @@ -79,6 +81,7 @@ catppuccin, nix-index-database, walker, + stylix, ... } @ inputs: let overlays = [ @@ -149,6 +152,7 @@ catppuccin.homeModules.catppuccin nix-index-database.homeModules.nix-index walker.homeManagerModules.default + stylix.homeModules.stylix ]; }; "js0ny@zen" = home-manager.lib.homeManagerConfiguration { @@ -159,6 +163,7 @@ catppuccin.homeModules.catppuccin betterfox-nix.modules.homeManager.betterfox sops-nix.homeManagerModules.sops + stylix.homeModules.stylix ]; }; }; diff --git a/nixcfgs/hosts/zephyrus/default.nix b/nixcfgs/hosts/zephyrus/default.nix index 23d90e4..cf81ef0 100644 --- a/nixcfgs/hosts/zephyrus/default.nix +++ b/nixcfgs/hosts/zephyrus/default.nix @@ -24,8 +24,9 @@ ../../modules/nixos/desktop/xremap.nix # desktop environment and display manager - ../../modules/nixos/desktop/dm/ly.nix + ../../modules/nixos/desktop/dm/tuigreet.nix ../../modules/nixos/desktop/de/niri.nix + ../../modules/nixos/desktop/de/hyprland.nix # desktop programs ../../modules/nixos/programs/zsh.nix diff --git a/nixcfgs/modules/home/dev/rust.nix b/nixcfgs/modules/home/dev/rust.nix new file mode 100644 index 0000000..fb34c5c --- /dev/null +++ b/nixcfgs/modules/home/dev/rust.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + rust-analyzer + rustc + cargo + clippy + rustfmt + make + cmake + ]; + + programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [ + rust-lang.rust-analyzer + ]; +} diff --git a/nixcfgs/modules/home/do-not-track.nix b/nixcfgs/modules/home/do-not-track.nix index 6fb3766..93215ea 100644 --- a/nixcfgs/modules/home/do-not-track.nix +++ b/nixcfgs/modules/home/do-not-track.nix @@ -8,5 +8,6 @@ DOTNET_CLI_TELEMETRY_OPTOUT = "1"; SAM_CLI_TELEMETRY = "0"; AZURE_CORE_COLLECT_TELEMETRY = "0"; + GEMINI_TELEMETRY_ENABLED = "false"; }; } diff --git a/nixcfgs/modules/nixos/core/configuration.nix b/nixcfgs/modules/nixos/core/configuration.nix index d7756cb..d2c7bee 100644 --- a/nixcfgs/modules/nixos/core/configuration.nix +++ b/nixcfgs/modules/nixos/core/configuration.nix @@ -47,4 +47,8 @@ extraArgs = "--keep 5 --keep-since 3d"; }; }; + + nix.extraOptions = '' + use-xdg-base-directories = true + ''; } diff --git a/nixcfgs/modules/nixos/core/do-not-track.nix b/nixcfgs/modules/nixos/core/do-not-track.nix index cbada11..72a3638 100644 --- a/nixcfgs/modules/nixos/core/do-not-track.nix +++ b/nixcfgs/modules/nixos/core/do-not-track.nix @@ -8,5 +8,6 @@ DOTNET_CLI_TELEMETRY_OPTOUT = "1"; SAM_CLI_TELEMETRY = "0"; AZURE_CORE_COLLECT_TELEMETRY = "0"; + GEMINI_TELEMETRY_ENABLED = "false"; }; } diff --git a/nixcfgs/modules/nixos/desktop/de/hyprland.nix b/nixcfgs/modules/nixos/desktop/de/hyprland.nix index 77c84ed..4e329de 100644 --- a/nixcfgs/modules/nixos/desktop/de/hyprland.nix +++ b/nixcfgs/modules/nixos/desktop/de/hyprland.nix @@ -9,6 +9,5 @@ # caelestia-shell xdg-desktop-portal-hyprland hyprpolkitagent - xdg-desktop-portal-wlr ]; } diff --git a/nixcfgs/modules/nixos/desktop/default.nix b/nixcfgs/modules/nixos/desktop/default.nix index 9feba6c..2407071 100644 --- a/nixcfgs/modules/nixos/desktop/default.nix +++ b/nixcfgs/modules/nixos/desktop/default.nix @@ -47,6 +47,7 @@ environment.systemPackages = with pkgs; [ wl-clipboard libnotify + gnome-disk-utility ]; xdg.portal = { diff --git a/nixcfgs/modules/nixos/desktop/diskutil.nix b/nixcfgs/modules/nixos/desktop/diskutil.nix new file mode 100644 index 0000000..1e0ccc0 --- /dev/null +++ b/nixcfgs/modules/nixos/desktop/diskutil.nix @@ -0,0 +1,7 @@ +{pkgs, ...}: { + services.udisks2.enable = true; + programs.gnome-disks.enable = true; + environment.systempackages = [ + pkgs.smartmontools + ]; +} diff --git a/nixcfgs/modules/nixos/desktop/dm/tuigreet.nix b/nixcfgs/modules/nixos/desktop/dm/tuigreet.nix new file mode 100644 index 0000000..c4e0ed6 --- /dev/null +++ b/nixcfgs/modules/nixos/desktop/dm/tuigreet.nix @@ -0,0 +1,11 @@ +{pkgs, ...}: { + services.greetd = { + enable = true; + settings = { + default_session = { + user = "js0ny"; + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd 'uwsm start hyprland'"; + }; + }; + }; +} diff --git a/nixcfgs/modules/nixos/desktop/xremap.nix b/nixcfgs/modules/nixos/desktop/xremap.nix index 17f7db8..81d4800 100644 --- a/nixcfgs/modules/nixos/desktop/xremap.nix +++ b/nixcfgs/modules/nixos/desktop/xremap.nix @@ -12,7 +12,7 @@ services.xremap = { enable = true; - withNiri = true; + withHypr = true; # modmap: single key serviceMode = "user"; userName = "js0ny"; @@ -39,23 +39,23 @@ } ]; keymap = [ - { - name = "IM Navigator - Alt-Up/Down"; - application = { - only = [ - "org.telegram.desktop" - "telegram-desktop" - "io.github.kukuruzka165.materialgram" - "materialgram" - "com.ayugram.desktop" - "wechat" - ]; - }; - remap = { - "M-j" = "M-down"; - "M-k" = "M-up"; - }; - } + # { + # name = "IM Navigator - Alt-Up/Down"; + # application = { + # only = [ + # "org.telegram.desktop" + # "telegram-desktop" + # "io.github.kukuruzka165.materialgram" + # "materialgram" + # "com.ayugram.desktop" + # "wechat" + # ]; + # }; + # remap = { + # "M-j" = "M-down"; + # "M-k" = "M-up"; + # }; + # } { name = "IM Navigator - Ctrl-Up/Down"; application = { diff --git a/nixcfgs/users/js0ny/packages/catppuccin.nix b/nixcfgs/users/js0ny/packages/catppuccin.nix deleted file mode 100644 index 533722d..0000000 --- a/nixcfgs/users/js0ny/packages/catppuccin.nix +++ /dev/null @@ -1,26 +0,0 @@ -{pkgs, ...}: let - my-catppuccin-kde = pkgs.catppuccin-kde.override { - flavour = [ - "mocha" - "latte" - ]; - accents = ["pink"]; - winDecStyles = ["classic"]; - }; -in { - home.packages = with pkgs; [ - catppuccin - # my-catppuccin-gtk - my-catppuccin-kde - catppuccin-fcitx5 - ]; - - catppuccin = { - enable = true; - flavor = "mocha"; - accent = "pink"; - zed.enable = false; - zsh-syntax-highlighting.enable = false; - nvim.enable = false; # Defined in lua config - }; -} diff --git a/nixcfgs/users/js0ny/packages/cli.nix b/nixcfgs/users/js0ny/packages/cli.nix index 5795568..44fee16 100644 --- a/nixcfgs/users/js0ny/packages/cli.nix +++ b/nixcfgs/users/js0ny/packages/cli.nix @@ -66,6 +66,7 @@ gron jless unar + trash-cli ] ++ ( if pkgs.stdenv.isDarwin diff --git a/nixcfgs/users/js0ny/packages/gui.nix b/nixcfgs/users/js0ny/packages/gui.nix index 4bd19d6..65ddfad 100644 --- a/nixcfgs/users/js0ny/packages/gui.nix +++ b/nixcfgs/users/js0ny/packages/gui.nix @@ -163,6 +163,8 @@ in { # }; # }; + programs.alacritty.enable = true; + services.protonmail-bridge.enable = true; services.remmina.enable = true; } diff --git a/nixcfgs/users/js0ny/packages/stylix.nix b/nixcfgs/users/js0ny/packages/stylix.nix new file mode 100644 index 0000000..191b1cb --- /dev/null +++ b/nixcfgs/users/js0ny/packages/stylix.nix @@ -0,0 +1,77 @@ +{pkgs, ...}: let + my-catppuccin-kde = pkgs.catppuccin-kde.override { + flavour = [ + "mocha" + "latte" + ]; + accents = ["pink"]; + winDecStyles = ["classic"]; + }; +in { + home.packages = with pkgs; [ + catppuccin + # my-catppuccin-gtk + my-catppuccin-kde + catppuccin-fcitx5 + ]; + + catppuccin = { + enable = false; + flavor = "mocha"; + accent = "pink"; + zed.enable = false; + zsh-syntax-highlighting.enable = false; + nvim.enable = false; # Defined in lua config + }; + stylix = { + enable = true; + autoEnable = true; + + fonts = { + sansSerif = { + package = pkgs.lxgw-neoxihei; + name = "LXGW Neo XiHei"; + }; + + serif = { + package = pkgs.lxgw-wenkai; + name = "LXGW WenKai"; + }; + + monospace = { + package = pkgs.maple-mono.NF-CN; + name = "Maple Mono NF CN"; + }; + + emoji = { + package = pkgs.noto-fonts-emoji-blob-bin; + name = "Blobmoji"; + }; + }; + + cursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; + size = 24; + }; + + icons = { + enable = true; + light = "Papirus-Light"; + dark = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + + targets = { + neovide.enable = false; + neovim.enable = false; + firefox = { + profileNames = ["default"]; + colorTheme.enable = false; # Firefox Color + }; + }; + + image = ./wallpaper.jpg; + polarity = "dark"; + }; +} diff --git a/nixcfgs/users/js0ny/packages/wallpaper.jpg b/nixcfgs/users/js0ny/packages/wallpaper.jpg new file mode 100644 index 0000000..e4df4ee Binary files /dev/null and b/nixcfgs/users/js0ny/packages/wallpaper.jpg differ diff --git a/nixcfgs/users/js0ny/programs/anki.nix b/nixcfgs/users/js0ny/programs/anki.nix index 8a127f7..e4a453f 100644 --- a/nixcfgs/users/js0ny/programs/anki.nix +++ b/nixcfgs/users/js0ny/programs/anki.nix @@ -9,7 +9,7 @@ addons = with pkgs.ankiAddons; [ anki-connect review-heatmap - recolor + # recolor # Use stylix ]; sync = { autoSync = true; diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/hyprland/default.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/hyprland/default.nix index 942fe27..ca051b6 100644 --- a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/hyprland/default.nix +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/hyprland/default.nix @@ -2,6 +2,8 @@ home.packages = with pkgs; [ grimblast ]; + # TODO: Try to isolate these variables to just Hyprland and its children + # Maybe use systemctl --user import-environment? imports = [ ../packages.nix ./keymaps.nix @@ -19,20 +21,21 @@ ecosystem = { no_update_news = true; }; - exec-once = [ - "waybar" - "dunst" - "${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent" - ]; + # exec-once = [ + # "waybar" + # "dunst" + # "${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent" + # ]; general = { - gaps_in = 0; - gaps_out = 0; + gaps_in = 2; + gaps_out = 2; - border_size = 5; + border_size = 2; # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors - "col.active_border" = "$lavender $pink 45deg"; - "col.inactive_border" = "$overlay1"; + # NOTE: use stylix + # "col.active_border" = "$lavender $pink 45deg"; + # "col.inactive_border" = "$overlay1"; # Set to true enable resizing windows by clicking and dragging on borders and gaps resize_on_border = true; @@ -108,7 +111,7 @@ }; decoration = { - rounding = 20; + rounding = 10; # Change transparency of focused and unfocused windows # active_opacity = 1 @@ -120,7 +123,7 @@ enabled = true; range = 4; render_power = 3; - color = "$base"; + # color = "$base"; # NOTE: use stylix }; # https://wiki.hyprland.org/Configuring/Variables/#blur diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/hyprland/keymaps.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/hyprland/keymaps.nix index 46001e5..f11a20e 100644 --- a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/hyprland/keymaps.nix +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/hyprland/keymaps.nix @@ -1,29 +1,47 @@ -{config, ...}: let +{ + config, + pkgs, + lib, + ... +}: let term = config.currentUser.defaultTerminal; termRunner = config.currentUser.defaultTerminalRunner; iconTheme = config.currentUser.iconTheme; explorer = config.currentUser.defaultExplorer; explorerTerm = config.currentUser.defaultTerminalExplorer; - launcher = "rofi"; + launcher = "walker"; kbdBacklightDev = config.currentHost.keyboardBacklightDevice; kbdBacklightStep = config.currentHost.keyboardBacklightStep; mainMod = "SUPER"; screenshotPath = "$HOME/Pictures/Screenshots/\"$(%Y-%m-%d_%H-%M-%S.png)\""; + my = import ./scripts.nix {inherit pkgs;}; + resizeStep = builtins.toString 20; in { wayland.windowManager.hyprland.settings = { "$mainMod" = "${mainMod}"; bind = [ + # === Run Applications === "$mainMod, return, exec, ${term}" + "$mainMod SHIFT, return, exec, ${termRunner} --directory ~/Atelier -e nvim" + "$mainMod, B, exec, ${lib.getExe my.launch-or-focus} firefox firefox" + "$mainMod SHIFT, B, exec, firefox --private-window" + "$mainMod, A, exec, kitty --class=kitty-terminal-popup -e aichat --session" + "$mainMod SHIFT, A, exec, ${lib.getExe my.launch-or-focus} 'Cherry Studio' 'cherry-studio'" + "$mainMod, T, exec, kitty --class=kitty-terminal-popup" + "$mainMod SHIFT, T, exec, kitty --class=kitty-terminal-popup --working-directory='${config.home.homeDirectory}/.config/shells/nohist' -e nix develop" + "$mainMod, O, exec, ${lib.getExe my.launch-or-focus} 'obsidian' 'obsidian'" "$mainMod, Q, killactive" ''$mainMod SHIFT, F, exec, hyprctl --batch "dispatch togglefloating ; dispatch resizeactive exact 1440 810 ; dispatch centerwindow 1;"'' "$mainMod SHIFT, M, fullscreen" - "$mainMod, W, exec, ${launcher} -show window -icon-theme ${iconTheme} -show-icons" - "$mainMod, V, exec, cliphist list | ${launcher} -dmenu | cliphist decode | wl-copy" - "alt, space, exec, ${launcher} -show drun -icon-theme ${iconTheme} -show-icons" + "$mainMod, W, exec, ${launcher} -m windows" + "$mainMod, Apostrophe, exec, EDITOR_MINIMAL=1 ${termRunner} -o close_on_child_death=yes --class=${termRunner}-terminal-popup -e edit-clipboard --minimal" + "$mainMod, V, exec, ${launcher} -m clipboard" + "alt, space, exec, ${launcher} -m desktopapplications" "$mainMod, E, exec, ${explorer}" "$mainMod SHIFT, E, exec, ${termRunner} -e ${explorerTerm}" + "CTRL ALT, DELETE, exec, uwsm exit" "$mainMod, P, pseudo" - "$mainMod, X, togglesplit" + "$mainMod, Y, togglesplit" "$mainMod, left, movefocus, l" "$mainMod, right, movefocus, r" "$mainMod, up, movefocus, u" @@ -36,10 +54,6 @@ in { "$mainMod SHIFT, L, swapwindow, r" "$mainMod SHIFT, K, swapwindow, u" "$mainMod SHIFT, J, swapwindow, d" - "$mainMod CTRL, H, resizeactive, 10 0" - "$mainMod CTRL, L, resizeactive, -10 0" - "$mainMod CTRL, K, resizeactive, 0 10" - "$mainMod CTRL, J, resizeactive, 0 10" "$mainMod, s, exec, grimblast copysave active ${screenshotPath}" "$mainMod SHIFT, s, exec, grimblast copysave area ${screenshotPath}" "alt, PRINT, exec, grimblast copysave active ${screenshotPath}" @@ -93,6 +107,10 @@ in { ", XF86KbdBrightnessDown, exec, brightnessctl --device ${kbdBacklightDev} set ${kbdBacklightStep}-" ", XF86Launch4, exec, powerprofiles-next" ", XF86Launch1, exec, ${launcher} -show drun -icon-theme ${iconTheme} -show-icons" + "$mainMod, equal, resizeactive, ${resizeStep} 0" + "$mainMod, minus, resizeactive, -${resizeStep} 0" + "$mainMod SHIFT, equal, resizeactive, 0 ${resizeStep}" + "$mainMod SHIFT, minus, resizeactive, 0 -${resizeStep}" ]; gesture = [ "4, horizontal, workspace" diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/hyprland/scripts.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/hyprland/scripts.nix new file mode 100644 index 0000000..08d7db4 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/hyprland/scripts.nix @@ -0,0 +1,22 @@ +{pkgs, ...}: { + launch-or-focus = pkgs.writeShellApplication { + name = "hyprscript-launch-or-focus"; + runtimeInputs = [pkgs.jq pkgs.hyprland pkgs.uwsm]; + text = '' + if (($# == 0)); then + echo "Usage: hyprscript-launch-or-focus [window-pattern] [launch-command]" + exit 1 + fi + + WINDOW_PATTERN="$1" + LAUNCH_COMMAND="''${2:-"uwsm-app -- $WINDOW_PATTERN"}" + WINDOW_ADDRESS=$(hyprctl clients -j | jq -r --arg p "$WINDOW_PATTERN" '.[]|select((.class|test("\\b" + $p + "\\b";"i")) or (.title|test("\\b" + $p + "\\b";"i")))|.address' | head -n1) + + if [[ -n $WINDOW_ADDRESS ]]; then + hyprctl dispatch focuswindow "address:$WINDOW_ADDRESS" + else + eval exec setsid "$LAUNCH_COMMAND" + fi + ''; + }; +} diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/hyprland/window-rules.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/hyprland/window-rules.nix index b261201..247d02f 100644 --- a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/hyprland/window-rules.nix +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/hyprland/window-rules.nix @@ -22,6 +22,7 @@ "float, center, size 50%, class:^(QQ)$, title:^(群聊的聊天记录)$" "float, center, size 50%, class:^(CherryStudio)$, title:^(Cherry Studio Quick Assistant)$" "float, center, size 50%, class:^(anki)$, title:^(Add)$" + "float, center, size 50%, class:^(kitty-terminal-popup)$" "float, center, title:^(Open File|打开文件|Select a File|选择文件|Choose wallpaper|Open Folder|Save As|保存|Library|File Upload)(.*)$" "float, center, class:^(qt6ct)$" # no focus diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/kanshi.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/kanshi.nix index e63ca8a..3bb4f9a 100644 --- a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/kanshi.nix +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/kanshi.nix @@ -19,7 +19,7 @@ in { criteria = lg4k60; alias = "lg4k60"; mode = "3840x2160@59.997"; - scale = 1.6666; + scale = 1.875; # Hyprland doesn't support 1.75 scale }; } # Profiles diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/packages.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/packages.nix index e082325..1a6e799 100644 --- a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/packages.nix +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/packages.nix @@ -38,6 +38,7 @@ in { ./swww.nix ./kanshi.nix ./swaylock.nix + ./polkit.nix ]; home.packages = with pkgs; [ swayidle # Screensaver @@ -54,13 +55,6 @@ in { }; services.cliphist.enable = true; services.dunst.enable = true; + services.network-manager-applet.enable = true; catppuccin.dunst.enable = false; - home.pointerCursor = { - enable = true; - gtk.enable = true; - x11.enable = true; - size = 24; - package = pkgs.bibata-cursors; - name = "Bibata-Modern-Ice"; - }; } diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/polkit.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/polkit.nix new file mode 100644 index 0000000..05a0cb6 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/polkit.nix @@ -0,0 +1,21 @@ +{pkgs, ...}: { + systemd.user.services.hyprpolkitagent = { + Unit = { + Description = "Hyprland Polkit Authentication Agent"; + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + }; + + Service = { + Type = "simple"; + ExecStart = "${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + + Install = { + WantedBy = ["graphical-session.target"]; + }; + }; +} diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar/default.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar/default.nix index 547413d..0e9ea66 100644 --- a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar/default.nix +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar/default.nix @@ -7,57 +7,62 @@ services.blueman-applet.enable = true; programs.waybar = { enable = true; + systemd = { + enable = true; + target = "graphical-session.target"; + }; style = '' * { font-family: "LXGW Neo XiHei", "Font Awesome 7 Free", "JetBrainsMono Nerd Font"; font-size: 14px; font-feature-settings: "tnum"; } - - window#waybar { - background-color: @base; - padding: 0px; - } - - #workspaces { - color: #f0f0ff; - background-color: rgba(30, 30, 46, 0.6); - } - - #workspaces button:hover { - background: @pink; - } - - #workspaces button.urgent { - background-color: @red; - } - - - #custom-osicon { - color: @blue; - padding: 0 6px; - } - - #clock, - #tray, - #battery, - #cpu, - #memory, - #disk, - #temperature, - #backlight, - #network, - #pulseaudio, - #wireplumber, - #custom-media, - #mode, - #idle_inhibitor, - #scratchpad, - #mpd { - padding: 0 10px; - color: @text; - background-color: @base; - } ''; + + # window#waybar { + # background-color: @base; + # padding: 0px; + # } + # + # #workspaces { + # color: #f0f0ff; + # background-color: rgba(30, 30, 46, 0.6); + # } + # + # #workspaces button:hover { + # background: @pink; + # } + # + # #workspaces button.urgent { + # background-color: @red; + # } + # + # + # #custom-osicon { + # color: @blue; + # padding: 0 6px; + # } + # + # #clock, + # #tray, + # #battery, + # #cpu, + # #memory, + # #disk, + # #temperature, + # #backlight, + # #network, + # #pulseaudio, + # #wireplumber, + # #custom-media, + # #mode, + # #idle_inhibitor, + # #scratchpad, + # #mpd { + # padding: 0 10px; + # color: @text; + # background-color: @base; + # } + # ''; }; } diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar/modules.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar/modules.nix index 879fd2d..bea598f 100644 --- a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar/modules.nix +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar/modules.nix @@ -18,7 +18,7 @@ "pulseaudio" "cpu" "memory" - "network" + # "network" # Use nm-applet instead "battery" "clock" ]; @@ -99,6 +99,7 @@ cpu = { format = "{usage}% "; tooltip = false; + on-click = "kitty -e btop"; }; memory = { format = "{}% "; @@ -216,7 +217,7 @@ }; "custom/osicon" = { format = ""; - on-click-right = "rofi -show drun -icon-theme Papirus -show-icons"; + on-click = "walker -m desktopapplications"; }; } ]; diff --git a/nixcfgs/users/js0ny/programs/fcitx.nix b/nixcfgs/users/js0ny/programs/fcitx.nix index 32dae03..7f55259 100644 --- a/nixcfgs/users/js0ny/programs/fcitx.nix +++ b/nixcfgs/users/js0ny/programs/fcitx.nix @@ -197,30 +197,31 @@ "Vertical Candidate List" = ''True''; # Use mouse wheel to go to prev or next page "WheelForPaging" = ''True''; + # NOTE: manged by stylix # Font - "Font" = ''"LXGW WenKai Medium 14"''; - # Menu Font - "MenuFont" = ''"LXGW WenKai 14"''; - # Tray Font - "TrayFont" = ''"Sans Bold 10"''; - # Tray Label Outline Color - "TrayOutlineColor" = ''''; #000000 - # Tray Label Text Color - "TrayTextColor" = ''''; #ffffff + # "Font" = ''"LXGW WenKai Medium 14"''; + # # Menu Font + # "MenuFont" = ''"LXGW WenKai 14"''; + # # Tray Font + # "TrayFont" = ''"Sans Bold 10"''; + # # Tray Label Outline Color + # "TrayOutlineColor" = ''''; #000000 + # # Tray Label Text Color + # "TrayTextColor" = ''''; #ffffff + # Theme + # "Theme" = ''plasma''; + # # Dark Theme + # "DarkTheme" = ''plasma''; + # # Follow system light/dark color scheme + # "UseDarkTheme" = ''True''; + # # Follow system accent color if it is supported by theme and desktop + # "UseAccentColor" = ''True''; # Prefer Text Icon "PreferTextIcon" = ''False''; # Show Layout Name In Icon "ShowLayoutNameInIcon" = ''True''; # Use input method language to display text "UseInputMethodLanguageToDisplayText" = ''True''; - # Theme - "Theme" = ''plasma''; - # Dark Theme - "DarkTheme" = ''plasma''; - # Follow system light/dark color scheme - "UseDarkTheme" = ''True''; - # Follow system accent color if it is supported by theme and desktop - "UseAccentColor" = ''True''; # Use Per Screen DPI on X11 "PerScreenDPI" = ''False''; # Force font DPI on Wayland @@ -280,5 +281,4 @@ }; }; }; - catppuccin.fcitx5.enable = true; } diff --git a/nixcfgs/users/js0ny/programs/firefox/addons.nix b/nixcfgs/users/js0ny/programs/firefox/addons.nix index 9a8a573..1ac7d08 100644 --- a/nixcfgs/users/js0ny/programs/firefox/addons.nix +++ b/nixcfgs/users/js0ny/programs/firefox/addons.nix @@ -48,7 +48,7 @@ in { # Misc rsshub-radar proton-pass - proton-vpn + # proton-vpn styl-us kiss-translator diff --git a/nixcfgs/users/js0ny/programs/fzf.nix b/nixcfgs/users/js0ny/programs/fzf.nix index dd1b287..0d7ca57 100644 --- a/nixcfgs/users/js0ny/programs/fzf.nix +++ b/nixcfgs/users/js0ny/programs/fzf.nix @@ -1,53 +1,44 @@ -{...}: let - editFzfPosix = '' - edit-fzf() { - local _file +{pkgs, ...}: let + edit-fzf = pkgs.writeShellApplication { + name = "edit-fzf"; + runtimeInputs = with pkgs; [fzf]; + text = '' + _file="" - if command -v fd >/dev/null 2>&1; then - _file=$(fd --type f --exclude '*.lock' | fzf --height 40% --reverse -1 -q "$1") - else - # Fallback to 'find' - _file=$(find . -type f ! -name '*.lock' | fzf --height 40% --reverse -1 -q "$1") - fi + if command -v fd >/dev/null 2>&1; then + _file=$(fd --type f --exclude '*.lock' | fzf --height 40% --reverse -1 -q "''${1:-}") + else + # Fallback to 'find' + _file=$(find . -type f ! -name '*.lock' | fzf --height 40% --reverse -1 -q "''${1:-}") + fi - # In POSIX shell, if fzf is cancelled (Esc/Ctrl-C), - # the command substitution simply returns an empty string. - # So, we check if the variable '_file' is non-empty ('-n'). - if [ -n "$_file" ]; then - "$EDITOR" "$_file" - else - echo "No file selected." - fi - } - alias ef="edit-fzf" - ''; + # In POSIX shell, if fzf is cancelled (Esc/Ctrl-C), + # the command substitution simply returns an empty string. + # So, we check if the variable '_file' is non-empty ('-n'). + if [ -n "$_file" ]; then + "$EDITOR" "$_file" + else + echo "No file selected." + fi + ''; + }; in { + home.packages = [edit-fzf]; programs.fzf = { enable = true; enableBashIntegration = true; enableZshIntegration = true; enableFishIntegration = true; }; - programs.fish.interactiveShellInit = '' - function edit-fzf --description "Find and edit a file using fzf and $EDITOR" - set -l file - - if command -q fd - set file (fd --type f --exclude '*.lock' | fzf --height 40% --reverse -1 -q "$argv[1]") - else - set file (find . -type f ! -name '*.lock' | fzf --height 40% --reverse -1 -q "$argv[1]") - end - - set -l fzf_status $status - - if test $fzf_status -eq 0; and test -n "$file" - $EDITOR $file - else - echo "No file selected." - end - end - abbr --add ef edit-fzf - ''; - programs.bash.bashrcExtra = editFzfPosix; - programs.zsh.initContent = editFzfPosix; + programs = { + bash.shellAliases = { + ef = "edit-fzf"; + }; + zsh.shellAliases = { + ef = "edit-fzf"; + }; + fish.shellAbbrs = { + ef = "edit-fzf"; + }; + }; } diff --git a/nixcfgs/users/js0ny/programs/mime.nix b/nixcfgs/users/js0ny/programs/mime.nix index 908ba2d..d8ed804 100644 --- a/nixcfgs/users/js0ny/programs/mime.nix +++ b/nixcfgs/users/js0ny/programs/mime.nix @@ -74,6 +74,11 @@ in { "image/avif" = imageViewers; "image/webp" = imageViewers; + # Microsoft Office + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" = "onlyoffice-desktopeditors.desktop"; + "application/vnd.openxmlformats-officedocument.wordprocessingml.document" = "onlyoffice-desktopeditors.desktop"; + "application/vnd.openxmlformats-officedocument.presentationml.presentation" = "onlyoffice-desktopeditors.desktop"; + # Audio: # music: elisa: fully featured, good cjk support # audio: mpv: simple and fast diff --git a/nixcfgs/users/js0ny/programs/nvim.nix b/nixcfgs/users/js0ny/programs/nvim.nix index e807a1a..6158c6f 100644 --- a/nixcfgs/users/js0ny/programs/nvim.nix +++ b/nixcfgs/users/js0ny/programs/nvim.nix @@ -24,4 +24,6 @@ in { programs.bash.shellAliases = nvimAlias; programs.zsh.shellAliases = nvimAlias; programs.nushell.shellAliases = nvimAlias; + + home.sessionVariables.EDITOR = "nvim"; } diff --git a/nixcfgs/users/js0ny/programs/shell/nu.nix b/nixcfgs/users/js0ny/programs/shell/nu.nix index 51868c1..b1953b1 100644 --- a/nixcfgs/users/js0ny/programs/shell/nu.nix +++ b/nixcfgs/users/js0ny/programs/shell/nu.nix @@ -6,6 +6,8 @@ in { shellAliases = { "la" = "ls -a"; "lt" = "lsd --tree"; + "l" = "ls -la"; + "ll" = "ls -lh"; }; extraConfig = '' $env.config.show_banner = false diff --git a/nixcfgs/users/js0ny/programs/zed-editor.nix b/nixcfgs/users/js0ny/programs/zed-editor.nix index 563de6d..dba46a9 100644 --- a/nixcfgs/users/js0ny/programs/zed-editor.nix +++ b/nixcfgs/users/js0ny/programs/zed-editor.nix @@ -124,11 +124,6 @@ userSettings = { icon_theme = "Material Icon Theme"; - theme = { - mode = "system"; - light = "Catppuccin Latte"; - dark = "Catppuccin Mocha"; - }; tabs = { show_diagnostics = "errors"; show_close_button = "hover"; @@ -157,10 +152,16 @@ proxy_no_verify = null; }; }; - ui_font_size = 16; - buffer_font_size = null; - relative_line_numbers = true; - buffer_font_family = "Maple Mono NF CN"; + # NOTE: managed by stylix + # ui_font_size = 16; + # buffer_font_size = null; + # relative_line_numbers = true; + # buffer_font_family = "Maple Mono NF CN"; + # theme = { + # mode = "system"; + # light = "Catppuccin Latte"; + # dark = "Catppuccin Mocha"; + # }; remove_trailing_whitespace_on_save = true; agent = { default_model = { diff --git a/nixcfgs/users/js0ny/zen.nix b/nixcfgs/users/js0ny/zen.nix index 59e4733..b5d361f 100644 --- a/nixcfgs/users/js0ny/zen.nix +++ b/nixcfgs/users/js0ny/zen.nix @@ -4,7 +4,7 @@ # Packages ./packages/cli.nix - ./packages/catppuccin.nix + ./packages/stylix.nix # Shell ./programs/shell/bash.nix diff --git a/nixcfgs/users/js0ny/zephyrus.nix b/nixcfgs/users/js0ny/zephyrus.nix index f9d09bf..4aecb53 100644 --- a/nixcfgs/users/js0ny/zephyrus.nix +++ b/nixcfgs/users/js0ny/zephyrus.nix @@ -12,7 +12,7 @@ ./packages/gui.nix ./packages/flatpak.nix ./packages/fonts.nix - ./packages/catppuccin.nix + ./packages/stylix.nix # Shell ./programs/shell/bash.nix @@ -63,9 +63,8 @@ ./programs/walker.nix # Desktop Linux - ./programs/desktop/plasma - ./programs/desktop/wayland-wm/niri ./programs/desktop/wayland-wm/hyprland + ./programs/desktop/wayland-wm/niri ../../modules/home/do-not-track.nix @@ -79,6 +78,7 @@ # Development setup ../../modules/home/dev/nix.nix ../../modules/home/dev/java.nix + ../../modules/home/dev/rust.nix ]; nixpkgs.config.allowUnfree = true;