From 251a7bacac7ed2aeb9e6806d003e916ad65b448b Mon Sep 17 00:00:00 2001 From: Miran Bastaja Date: Fri, 10 Nov 2023 19:57:21 +0100 Subject: Refactor shared module --- share/home/default.nix | 77 ---------------------------------------------- share/home/hyprdesktop.nix | 70 +++++++++++++++++++++++++++++++++++++++++ share/home/minimal.nix | 51 ++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+), 77 deletions(-) delete mode 100644 share/home/default.nix create mode 100644 share/home/hyprdesktop.nix create mode 100644 share/home/minimal.nix (limited to 'share') diff --git a/share/home/default.nix b/share/home/default.nix deleted file mode 100644 index 6213e8b..0000000 --- a/share/home/default.nix +++ /dev/null @@ -1,77 +0,0 @@ -# Minimal home configuration containing everything that I want on all of -# my machines -{ pkgs, config, ... }: { - imports = [ ./helix.nix ./zsh.nix ]; - - home.packages = with pkgs; [ - wget - git - age - gnupg - xh - - # Modern unix - ripgrep # grep - fd # find - sd # sed - dua # du - - bc # CLI calculator - ffmpeg - amfora # Gemini CLI browser - trashy # Trash CLI - git-annex - git-remote-gcrypt - - # tools for dealing with all sorts archives - atool - unzip - gnutar - - # Useful nix tooling - nix-tree - ]; - - programs.direnv = { - enable = true; - nix-direnv.enable = true; - }; - - xdg = { - enable = true; - systemDirs.data = - let - gds = pkgs.gsettings-desktop-schemas; - gtk3 = pkgs.gtk3; - in - [ - "${gds}/share/gsettings-schemas/${gds.name}" - "${gtk3}/share/gsettings-schemas/${gtk3.name}" - ]; - userDirs = - let - home = config.home.homeDirectory; - in - { - enable = true; - createDirectories = true; - pictures = "${home}/Annex/Pictures"; - music = "${home}/Annex/Music"; - }; - }; - - # Lots of these are courtesy of xdg-ninja - # https://github.com/b3nj5m1n/xdg-ninja - home.sessionVariables = with config.xdg; { - CARGO_HOME = "${dataHome}/cargo"; - GOPATH = "${dataHome}/go"; - WINEPREFIX = "${dataHome}/wine"; - XCOMPOSECACHE = "${cacheHome}/X11/xcompose"; - GTK2_RC_FILES = "${configHome}/gtk-2.0/gtkrc"; - NODE_REPL_HISTORY = "${dataHome}/node_repl_history"; - NPM_CONFIG_USERCONFIG = "${configHome}/npm/npmrc"; - # shell - HISTFILE = "${stateHome}/shell/history"; - ZDOTDIR = "${configHome}/zsh"; - }; -} diff --git a/share/home/hyprdesktop.nix b/share/home/hyprdesktop.nix new file mode 100644 index 0000000..fc657ea --- /dev/null +++ b/share/home/hyprdesktop.nix @@ -0,0 +1,70 @@ +# Module containing a bunch of things that make up a `desktop environment` built +# off of hyprland. I install this on all my desktop/laptop machines. +{ pkgs, config, inputs, ... }: { + imports = [ + ./minimal.nix + ./hyprland.nix + ./git.nix + ./mpv.nix + ./kitty.nix + ./firefox + ]; + + home.packages = with pkgs; [ + xh # Nice to use HTTP client + bc # CLI calculator + amfora # Gemini CLI browser + trashy # Trash CLI + tokei # counts lines of code + btop # modern top + brightnessctl + wineWowPackages.full + winetricks + inputs.scripts.packages.${pkgs.system}.image-move + qemu_kvm + + # TUI/GUI programs + cmus # music player + calibre # Document organisation/reading program + libreoffice-qt + beekeeper-studio # SQL database client + thunderbird # email client + nsxiv # image viewer + discord + signal-desktop + tdesktop # Telegram desktop + fluffychat # matrix client + qbittorrent # bittorrent client + + # Gaming + jdk17_headless + superTuxKart + ]; + + programs.direnv = { + enable = true; + nix-direnv.enable = true; + }; + + xdg = { + systemDirs.data = + let + gds = pkgs.gsettings-desktop-schemas; + gtk3 = pkgs.gtk3; + in + [ + "${gds}/share/gsettings-schemas/${gds.name}" + "${gtk3}/share/gsettings-schemas/${gtk3.name}" + ]; + userDirs = + let + home = config.home.homeDirectory; + in + { + enable = true; + createDirectories = true; + pictures = "${home}/Annex/Pictures"; + music = "${home}/Annex/Music"; + }; + }; +} diff --git a/share/home/minimal.nix b/share/home/minimal.nix new file mode 100644 index 0000000..c844000 --- /dev/null +++ b/share/home/minimal.nix @@ -0,0 +1,51 @@ +# This module contains a bunch of things that make up a minimal environment that +# I want on ALL of my machines. +{ pkgs, config, ... }: { + imports = [ ./helix.nix ./zsh.nix ]; + + home.packages = with pkgs; [ + wget + git + age + gnupg + ffmpeg + + # Modern unix + ripgrep # grep + fd # find + sd # sed + dua # du + + git-annex + git-remote-gcrypt + + # tools for dealing with all sorts archives + atool + unzip + gnutar + + # Useful nix tooling + nix-tree + ]; + + xdg.enable = true; + + # Lots of these are courtesy of xdg-ninja + # https://github.com/b3nj5m1n/xdg-ninja + # + # Even though these tools may or may not be installed on any particular system + # having these variables here is a preventative measure to make sure that + # $HOME doesn't get polluted + home.sessionVariables = with config.xdg; { + CARGO_HOME = "${dataHome}/cargo"; + GOPATH = "${dataHome}/go"; + WINEPREFIX = "${dataHome}/wine"; + XCOMPOSECACHE = "${cacheHome}/X11/xcompose"; + GTK2_RC_FILES = "${configHome}/gtk-2.0/gtkrc"; + NODE_REPL_HISTORY = "${dataHome}/node_repl_history"; + NPM_CONFIG_USERCONFIG = "${configHome}/npm/npmrc"; + # shell + HISTFILE = "${stateHome}/shell/history"; + ZDOTDIR = "${configHome}/zsh"; + }; +} -- cgit v1.3.1