diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index e9912e71ed20e01201e9335700eda971518922e6..3c3e97295c780c70ae5abeba0df45c5599f5a749 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -6,13 +6,13 @@ zls, ... }: let - shared-programs = import ../shared/home-programs.nix {inherit inputs config pkgs lib;}; + shared-programs = import ../../modules/shared/homeManagerPrograms.nix {inherit inputs config pkgs lib;}; in { home = { stateVersion = "23.05"; # Please read the comment before changing. packages = with pkgs; let - shared-packages = import ../shared/packages.nix {inherit pkgs;}; + shared-packages = import ../../modules/shared/packages.nix {inherit pkgs;}; in shared-packages ++ [ diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 24651f396788490c67836d94578fa905c01ca32f..8b91846a482dc299c33e7142339f15079367c8e6 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -6,7 +6,7 @@ userSettings, ... }: { - programs = import ../shared/home-programs.nix {inherit inputs config pkgs lib userSettings;}; + programs = import ../../modules/shared/homeManagerPrograms.nix {inherit inputs config pkgs lib userSettings;}; home = { inherit (userSettings) username; @@ -14,7 +14,7 @@ # shell = pkgs.fish; stateVersion = "23.05"; # Please read the comment before changing. - packages = pkgs.callPackage ../shared/packages.nix {}; + packages = pkgs.callPackage ../../modules/shared/packages.nix {}; sessionPath = [ "$HOME/.emacs.d/bin" diff --git a/hosts/shared/home-programs.nix b/hosts/shared/home-programs.nix deleted file mode 100644 index c0a692fdb862475284f69248247426911cb19613..0000000000000000000000000000000000000000 --- a/hosts/shared/home-programs.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ - pkgs, - userSettings, - ... -}: { - nix-index.enable = true; - atuin = { - enable = true; - enableBashIntegration = true; - enableFishIntegration = true; - daemon.enable = true; - }; - - direnv = { - enable = true; - enableZshIntegration = true; - nix-direnv.enable = true; - }; - - kitty = { - enable = true; - themeFile = "Catppuccin-Mocha"; - extraConfig = "font_family Iosevka NF - italic_font auto - bold_italic_font auto - bold_font auto"; - }; - - bat = { - enable = true; - extraPackages = with pkgs.bat-extras; [batdiff batman batgrep batwatch batpipe prettybat]; - }; - - hyfetch = { - enable = true; - settings = { - backend = "fastfetch"; - preset = userSettings.sexuality; - mode = "rgb"; - light_dark = "dark"; - lightness = { - }; - color_align = { - mode = "horizontal"; - }; - }; - }; - - fish = { - enable = true; - - plugins = [ - { - name = "tide"; - inherit (pkgs.fishPlugins.tide) src; - } - { - name = "!!"; - inherit (pkgs.fishPlugins.bang-bang) src; - } - ]; - shellAliases = { - reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now"; - }; - shellInit = '' - test -r '/Users/${userSettings.username}/.opam/opam-init/init.fish' && source '/Users/${userSettings.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true - batman --export-env | source - ''; - }; - home-manager.enable = true; -} diff --git a/hosts/shared/packages.nix b/hosts/shared/packages.nix deleted file mode 100644 index c7f890448891f8fdaec9b6aad5afdeb554e6d2d9..0000000000000000000000000000000000000000 --- a/hosts/shared/packages.nix +++ /dev/null @@ -1,114 +0,0 @@ -{pkgs, ...}: -with pkgs; [ - #general development - just - pkg-config - gnumake - caddy - pm2 - clang-tools - wget - git - unzip - clang - cmake - gnupg - - #ides - zed-editor - emacs - - #virtualization - qemu - podman - docker - - #productivity - glance - anki-bin - tailscale - openconnect - - #nix tools - cachix - direnv - nh - - #terminal stuff - (btop.override {cudaSupport = true;}) - tmux - zellij - lazygit - fzf - neofetch - hyfetch - fastfetch - eza - ollama - uv - fd - ripgrep - file - fish - - #image tools - imagemagick - - #chatting apps - (discord.override { - withMoonlight = true; - }) - vesktop - signal-desktop-bin - - #media - spotify - - #language servers - typst-live - lua-language-server - nil - nixd - texlab - texlivePackages.chktex - - #formatters/linters - stylua - alejandra - statix - - #neovim deps - lua51Packages.lua - lua51Packages.luarocks-nix - codespell - typst - - #python - pyright - basedpyright - ruff - python312Packages.python - python312Packages.pynvim - python312Packages.pip - - #programming languages - R - deno - ruby - nodePackages.npm - go - coq - elan - - #browsers - tor - firefox - - #math - texlive.combined.scheme-full - - #fun things - cowsay - cmatrix - sl -] diff --git a/modules/shared/home-manager.nix b/modules/shared/home-manager.nix deleted file mode 100644 index 4d18f17c194cd14fa9a777459fb7ad11af6c2fb5..0000000000000000000000000000000000000000 --- a/modules/shared/home-manager.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: { - -} diff --git a/modules/shared/homeManagerPrograms.nix b/modules/shared/homeManagerPrograms.nix new file mode 100644 index 0000000000000000000000000000000000000000..c0a692fdb862475284f69248247426911cb19613 --- /dev/null +++ b/modules/shared/homeManagerPrograms.nix @@ -0,0 +1,71 @@ +{ + pkgs, + userSettings, + ... +}: { + nix-index.enable = true; + atuin = { + enable = true; + enableBashIntegration = true; + enableFishIntegration = true; + daemon.enable = true; + }; + + direnv = { + enable = true; + enableZshIntegration = true; + nix-direnv.enable = true; + }; + + kitty = { + enable = true; + themeFile = "Catppuccin-Mocha"; + extraConfig = "font_family Iosevka NF + italic_font auto + bold_italic_font auto + bold_font auto"; + }; + + bat = { + enable = true; + extraPackages = with pkgs.bat-extras; [batdiff batman batgrep batwatch batpipe prettybat]; + }; + + hyfetch = { + enable = true; + settings = { + backend = "fastfetch"; + preset = userSettings.sexuality; + mode = "rgb"; + light_dark = "dark"; + lightness = { + }; + color_align = { + mode = "horizontal"; + }; + }; + }; + + fish = { + enable = true; + + plugins = [ + { + name = "tide"; + inherit (pkgs.fishPlugins.tide) src; + } + { + name = "!!"; + inherit (pkgs.fishPlugins.bang-bang) src; + } + ]; + shellAliases = { + reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now"; + }; + shellInit = '' + test -r '/Users/${userSettings.username}/.opam/opam-init/init.fish' && source '/Users/${userSettings.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true + batman --export-env | source + ''; + }; + home-manager.enable = true; +} diff --git a/modules/shared/packages.nix b/modules/shared/packages.nix new file mode 100644 index 0000000000000000000000000000000000000000..c7f890448891f8fdaec9b6aad5afdeb554e6d2d9 --- /dev/null +++ b/modules/shared/packages.nix @@ -0,0 +1,114 @@ +{pkgs, ...}: +with pkgs; [ + #general development + just + pkg-config + gnumake + caddy + pm2 + clang-tools + wget + git + unzip + clang + cmake + gnupg + + #ides + zed-editor + emacs + + #virtualization + qemu + podman + docker + + #productivity + glance + anki-bin + tailscale + openconnect + + #nix tools + cachix + direnv + nh + + #terminal stuff + (btop.override {cudaSupport = true;}) + tmux + zellij + lazygit + fzf + neofetch + hyfetch + fastfetch + eza + ollama + uv + fd + ripgrep + file + fish + + #image tools + imagemagick + + #chatting apps + (discord.override { + withMoonlight = true; + }) + vesktop + signal-desktop-bin + + #media + spotify + + #language servers + typst-live + lua-language-server + nil + nixd + texlab + texlivePackages.chktex + + #formatters/linters + stylua + alejandra + statix + + #neovim deps + lua51Packages.lua + lua51Packages.luarocks-nix + codespell + typst + + #python + pyright + basedpyright + ruff + python312Packages.python + python312Packages.pynvim + python312Packages.pip + + #programming languages + R + deno + ruby + nodePackages.npm + go + coq + elan + + #browsers + tor + firefox + + #math + texlive.combined.scheme-full + + #fun things + cowsay + cmatrix + sl +]