diff --git a/flake.nix b/flake.nix index 1e591c35..11990d14 100644 --- a/flake.nix +++ b/flake.nix @@ -34,13 +34,13 @@ ]; }; - outputs = inputs@{ nixpkgs, home-manager, nixpkgs-unstable - , home-manager-unstable, nixos-hardware, ... }: { + outputs = + inputs@{ nixpkgs-unstable, home-manager-unstable, nixos-hardware, ... }: { homeConfigurations."aly" = home-manager-unstable.lib.homeManagerConfiguration { pkgs = import nixpkgs-unstable { system = "x86_64-linux"; }; - modules = [ ./home/aly.nix ]; + modules = [ ./homeManagerModules ]; }; nixosConfigurations = { @@ -48,6 +48,7 @@ # Framework 13 with AMD Ryzen 7640U and 32GB RAM. lavaridge = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; + specialArgs = { inherit inputs; }; modules = [ nixos-hardware.nixosModules.framework-13-7040-amd home-manager-unstable.nixosModules.home-manager @@ -59,6 +60,7 @@ # Home Lab. Ryzen 5 2600 with 16GB RAM, RX 6700. mauville = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; + specialArgs = { inherit inputs; }; modules = [ home-manager-unstable.nixosModules.home-manager ./hosts/mauville @@ -69,6 +71,7 @@ # Lenovo Yoga 9i with i7-1360P and 16GB RAM. petalburg = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; + specialArgs = { inherit inputs; }; modules = [ nixos-hardware.nixosModules.common-pc-laptop-ssd nixos-hardware.nixosModules.common-cpu-intel @@ -81,6 +84,7 @@ # T440p with i5-4210M and 16GB RAM. rustboro = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; + specialArgs = { inherit inputs; }; modules = [ nixos-hardware.nixosModules.lenovo-thinkpad-t440p home-manager-unstable.nixosModules.home-manager diff --git a/home/alacritty/default.nix b/home/alacritty/default.nix deleted file mode 100644 index c8a34b16..00000000 --- a/home/alacritty/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ config, pkgs, ... }: - -{ - programs.alacritty = { - enable = true; - settings = { - colors = { - primary = { - foreground = "#fafafa"; - background = "#232634"; - }; - draw_bold_text_with_bright_colors = true; - }; - font = { - normal = { - family = "NotoSansM Nerd Font"; - style = "Regular"; - }; - size = 10; - }; - selection.save_to_clipboard = true; - window = { - blur = true; - # decorations = "None"; - dynamic_padding = true; - opacity = 0.8; - }; - }; - }; -} diff --git a/home/aly-gnome.nix b/home/aly-gnome.nix deleted file mode 100644 index 09bcbc1e..00000000 --- a/home/aly-gnome.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = [ ./common.nix ./common-gui.nix ./gnome ]; -} diff --git a/home/aly-hyprland.nix b/home/aly-hyprland.nix deleted file mode 100644 index 55da75be..00000000 --- a/home/aly-hyprland.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = [ ./common.nix ./common-gui.nix ./hypr ./waybar ./mako ./fuzzel ]; -} diff --git a/home/aly-kde.nix b/home/aly-kde.nix deleted file mode 100644 index f3195194..00000000 --- a/home/aly-kde.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = [ ./common.nix ./common-gui.nix ]; -} diff --git a/home/aly-nox.nix b/home/aly-nox.nix deleted file mode 100644 index 296cb525..00000000 --- a/home/aly-nox.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = [ ./common.nix ./shell ]; -} diff --git a/home/common-gui.nix b/home/common-gui.nix deleted file mode 100644 index 03b9e4cf..00000000 --- a/home/common-gui.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = [ ./alacritty ]; - - programs.librewolf = { - enable = true; - settings = { - "browser.safebrowsing.malware.enabled" = true; - "browser.safebrowsing.phishing.enabled" = true; - "browser.safebrowsing.blockedURIs.enabled" = true; - - "browser.safebrowsing.provider.google4.gethashURL" = - "https://safebrowsing.googleapis.com/v4/fullHashes:find?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST"; - - "browser.safebrowsing.provider.google4.updateURL" = - "https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST"; - - "browser.safebrowsing.provider.google.gethashURL" = - "https://safebrowsing.google.com/safebrowsing/gethash?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2"; - - "browser.safebrowsing.provider.google.updateURL" = - "https://safebrowsing.google.com/safebrowsing/downloads?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2&key=%GOOGLE_SAFEBROWSING_API_KEY%"; - "browser.safebrowsing.downloads.enabled" = true; - - "identity.fxaccounts.enabled" = true; - - "privacy.clearOnShutdown.history" = false; - - "middlemouse.paste" = false; - "general.autoScroll" = true; - }; - }; -} - diff --git a/home/common.nix b/home/common.nix deleted file mode 100644 index 36d6c3d4..00000000 --- a/home/common.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = [ ./shell ]; - home.username = "aly"; - home.homeDirectory = "/home/aly"; - - home.stateVersion = "23.11"; - programs.home-manager.enable = true; - - services.syncthing.enable = true; -} diff --git a/home/dustin-gnome.nix b/home/dustin-gnome.nix deleted file mode 100644 index 5a2e21f4..00000000 --- a/home/dustin-gnome.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = [ ./gnome ./common-gui.nix ]; - home.username = "dustin"; - home.homeDirectory = "/home/dustin"; - - home.stateVersion = "23.11"; - programs.home-manager.enable = true; - - services.syncthing.enable = true; -} diff --git a/home/fuzzel/default.nix b/home/fuzzel/default.nix deleted file mode 100644 index efdbb9c5..00000000 --- a/home/fuzzel/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ config, pkgs, ... }: - -{ - programs.fuzzel = { - enable = true; - settings = { - main = { - font = "NotoSansM Nerd Font Regular"; - icon-theme = "Papirus-Dark"; - layer = "overlay"; - terminal = "${pkgs.alacritty}/bin/alacritty -e"; - }; - border = { width = 2; }; - colors = { - background = "#232634CC"; - selection = "#232634FF"; - selection-match = "#e78284FF"; - selection-text = "#f4b8e4FF"; - text = "#fafafaFF"; - }; - }; - }; -} diff --git a/home/gnome/default.nix b/home/gnome/default.nix deleted file mode 100644 index 9253dda3..00000000 --- a/home/gnome/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ config, pkgs, ... }: - -{ - dconf.enable = true; - dconf.settings = { - "org/gnome/desktop/datetime".automatic-timezone = true; - "org/gnome/desktop/interface".clock-format = "12h"; - "org/gnome/desktop/interface".enable-hot-corners = true; - "org/gnome/desktop/peripherals/touchpad".tap-to-click = true; - "org/gnome/desktop/search-providers".enabled = - "['org.gnome.Calendar.desktop', 'org.gnome.Weather.desktop', 'org.gnome.Contacts.desktop', 'org.gnome.Calculator.desktop', 'org.gnome.Characters.desktop', 'org.gnome.clocks.desktop']"; - "org/gnome/desktop/wm/preferences".auto-raise = true; - "org/gnome/mutter".dynamic-workspaces = true; - "org/gnome/mutter".edge-tiling = true; - "org/gnome/mutter".workspaces-only-on-primary = true; - "org/gnome/shell/extensions/blur-my-shell/overview".style-components = 3; - "org/gnome/shell/extensions/blur-my-shell/panel".blur = false; - "org/gnome/shell/extensions/blur-my-shell/panel".customize = true; - "org/gnome/shell/extensions/blur-my-shell/panel".style-panel = 0; - "org/gnome/shell/extensions/blur-my-shell/panel".override-background = - false; - "org/gnome/shell/extensions/blur-my-shell/panel".override-background-dynamically = - false; - "org/gnome/shell/extensions/blur-my-shell/panel".unblur-in-overview = true; - "org/gnome/system/location".enabled = true; - "org/gtk/gtk4/settings/file-chooser".sort-directories-first = true; - "org/gtk/settings/file-chooser".sort-directories-first = true; - "org/gnome/shell".enabled-extensions = [ - "appindicatorsupport@rgcjonas.gmail.com" - "blur-my-shell@aunetx" - "gsconnect@andyholmes.github.io" - "nightthemeswitcher@romainvigier.fr" - "noannoyance-fork@vrba.dev" - "tailscale-status@maxgallup.github.com" - "tiling-assistant@leleat-on-github" - "drive-menu@gnome-shell-extensions.gcampax.github.com" - ]; - "org/virt-manager/virt-manager/connections" = { - autoconnect = [ "qemu:///system" ]; - uris = [ "qemu:///system" ]; - }; - }; -} diff --git a/home/hypr/default.nix b/home/hypr/default.nix deleted file mode 100644 index 2cf4794f..00000000 --- a/home/hypr/default.nix +++ /dev/null @@ -1,96 +0,0 @@ -{ config, pkgs, ... }: - -{ - # Packages that should be installed to the user profile. - home.packages = with pkgs; [ - brightnessctl - evince - hyprcursor - hypridle - hyprland-protocols - hyprlock - hyprnome - hyprpaper - hyprshade - hyprshot - playerctl - pyprland - xdg-desktop-portal-hyprland - xfce.exo - xfce.ristretto - xfce.thunar - xfce.thunar-archive-plugin - xfce.thunar-media-tags-plugin - xfce.thunar-volman - xfce.tumbler - xfce.xfce4-settings - xfce.xfce4-taskmanager - xfce.xfconf - ]; - - services.gpg-agent.enable = true; - - wayland.windowManager.hyprland = { - enable = true; - extraConfig = builtins.readFile ./hyprland.conf; - }; - - xdg.configFile."hypr/hypridle.conf".source = ./hypridle.conf; - - xdg.configFile."hypr/hyprlock.conf".source = ./hyprlock.conf; - - xdg.configFile."hypr/hyprpaper.conf".source = ./hyprpaper.conf; - - xdg.configFile."hypr/wallpapers/greenCity.jpg".source = - ./wallpapers/greenCity.jpg; - xdg.configFile."hypr/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg".source = - ./wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg; - xdg.configFile."hypr/wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg".source = - ./wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg; - - xdg.configFile."hypr/shaders/blue-light-filter.glsl".source = - ./blue-light-filter.glsl; - xdg.configFile."hypr/hyprshade.toml".source = ./hyprshade.toml; - - xdg.configFile."hypr/pyprland.toml".source = ./pyprland.toml; - - xdg.configFile."xfce4/helpers.rc".source = ../xfce/helpers.rc; - - home.pointerCursor = { - gtk.enable = true; - # x11.enable = true; - package = pkgs.catppuccin-cursors.frappeDark; - name = "Catppuccin-Frappe-Dark-Cursors"; - size = 24; - }; - - qt = { - enable = true; - platformTheme = "gtk"; - style.name = "Catppuccin-Frappe-Compact-Mauve-Dark"; - }; - - gtk = { - enable = true; - theme = { - package = pkgs.catppuccin-gtk.override { - accents = [ "mauve" ]; - size = "compact"; - variant = "frappe"; - tweaks = [ "normal" ]; - }; - name = "Catppuccin-Frappe-Compact-Mauve-Dark"; - }; - iconTheme = { - package = pkgs.catppuccin-papirus-folders.override { - flavor = "frappe"; - accent = "mauve"; - }; - name = "Papirus-Dark"; - }; - font = { - name = "NotoSans Nerd Font Regular"; - size = 11; - }; - }; -} diff --git a/home/hypr/pyprland.toml b/home/hypr/pyprland.toml deleted file mode 100644 index ca4b191c..00000000 --- a/home/hypr/pyprland.toml +++ /dev/null @@ -1,3 +0,0 @@ -[pyprland] -plugins = ["expose", "scratchpads"] - diff --git a/home/mako/default.nix b/home/mako/default.nix deleted file mode 100644 index 73b739bb..00000000 --- a/home/mako/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ config, pkgs, ... }: - -{ - services.mako = { - enable = true; - anchor = "top-center"; - backgroundColor = "#232634CC"; - borderColor = "#ca9ee6"; - borderRadius = 10; - defaultTimeout = 10000; - font = "NotoSans Nerd Font Regular 10"; - height = 300; - layer = "top"; - padding = "15"; - textColor = "#FAFAFA"; - width = 400; - margin = "20,0"; - }; -} diff --git a/home/shell/default.nix b/home/shell/default.nix deleted file mode 100644 index e5513d59..00000000 --- a/home/shell/default.nix +++ /dev/null @@ -1,98 +0,0 @@ -{ config, pkgs, ... }: - -{ - - home.packages = with pkgs; [ - # backblaze-b2 - curl - gh - git - nixfmt - python3 - ruby - wget - browsh - ]; - - programs.bash = { - enable = true; - enableCompletion = true; - initExtra = '' - export PS1="[\[$(tput setaf 27)\]\u\[$(tput setaf 135)\]@\[$(tput setaf 45)\]\h:\[$(tput setaf 33)\]\w] \[$(tput sgr0)\]$ " - ''; - }; - - programs.emacs = { - enable = true; - extraPackages = (epkgs: - (with epkgs; [ - better-defaults - catppuccin-theme - markdown-mode - nix-mode - org - org-bullets - org-journal - org-roam - ox-pandoc - projectile - python - treemacs - treemacs-projectile - treemacs-tab-bar - use-package - yaml - yaml-mode - ])); - package = pkgs.emacs-nox; - extraConfig = builtins.readFile ./emacs.el; - }; - - programs.eza = { - enable = true; - git = true; - icons = true; - extraOptions = [ "--group-directories-first" "--header" ]; - }; - - programs.fzf = { - enable = true; - tmux.enableShellIntegration = true; - }; - - programs.neovim = { - enable = true; - viAlias = true; - vimAlias = true; - defaultEditor = true; - }; - - programs.nnn.enable = true; - - programs.rbw.enable = true; - - programs.tmux = { - enable = true; - mouse = true; - newSession = true; - plugins = with pkgs; [ - tmuxPlugins.weather - tmuxPlugins.better-mouse-mode - tmuxPlugins.cpu - tmuxPlugins.battery - tmuxPlugins.resurrect - ]; - terminal = "tmux-256color"; - extraConfig = '' - set-option -g status-bg plum4 - set-option -g pane-active-border-style fg=plum4 - set-option -g @tmux-weather-format "%x+%t" - set-option -g @tmux-weather-units "u" - set -g status-right '#{cpu_percentage} CPU | #{battery_percentage} BAT | %I:%M %p | #{weather}' - run-shell ${pkgs.tmuxPlugins.weather}/share/tmux-plugins/weather/tmux-weather.tmux - run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux - run-shell ${pkgs.tmuxPlugins.battery}/share/tmux-plugins/battery/battery.tmux - run-shell ${pkgs.tmuxPlugins.battery}/share/tmux-plugins/resurrect/resurrect.tmux - ''; - }; -} diff --git a/home/waybar/default.nix b/home/waybar/default.nix deleted file mode 100644 index 0c3df7e7..00000000 --- a/home/waybar/default.nix +++ /dev/null @@ -1,97 +0,0 @@ -{ config, pkgs, ... }: - -{ - # Packages that should be installed to the user profile. - home.packages = with pkgs; [ blueberry pavucontrol ]; - - xdg.configFile."waybar/style.css".source = ./waybar.css; - - programs.waybar.enable = true; - programs.waybar.settings = { - mainBar = { - height = 36; - layer = "top"; - output = [ "*" ]; - position = "top"; - reload_style_on_change = true; - modules-left = [ "hyprland/workspaces" "hyprland/submap" ]; - modules-center = [ "hyprland/window" ]; - modules-right = [ - "tray" - "bluetooth" - "network" - "pulseaudio" - "battery" - "power-profiles-daemon" - "clock" - ]; - - "hyprland/workspaces" = { - "all-outputs" = true; - "format" = "󰧞"; - }; - "hyprland/window" = { "max-length" = 100; }; - "clock" = { - "tooltip-format" = "{:%Y-%m-%d | %H:%M}"; - "interval" = 60; - "format" = "{:%I:%M%p}"; - }; - "battery" = { - "states" = { "critical" = 20; }; - "format" = "{icon}"; - "format-icons" = [ "󰁺" "󰁼" "󰁿" "󰂁" "󰁹" ]; - "tooltip-format" = '' - {capacity}%: {timeTo}. - Using {power} watts.''; - }; - "bluetooth" = { - "format" = "󰂯 {status}"; - "format-disabled" = ""; # an empty format will hide the module - "format-connected" = "󰂯 {num_connections} connected"; - "tooltip-format" = "{controller_alias} {controller_address}"; - "tooltip-format-connected" = '' - {controller_alias} {controller_address} - - {device_enumerate}''; - "tooltip-format-enumerate-connected" = - "{device_alias} {device_address}"; - "on-click" = "blueberry"; - }; - "pulseaudio" = { - "format" = " {volume}%"; - "format-bluetooth" = "{volume}% {icon}󰂯"; - "format-muted" = ""; - "format-icons" = { - "headphones" = "󰋋"; - "handsfree" = "󰋎"; - "headset" = "󰋎"; - }; - "on-click" = "pavucontrol -t 3"; - }; - "network" = { - "format-wifi" = "󰣾 {signalStrength}%"; - "format-ethernet" = "󰈀"; - "format-disconnected" = "⚠"; - "tooltip-format" = "{ifname} via {gwaddr} 󰊗"; - "tooltip-format-wifi" = "{essid} ({signalStrength}%) 󰣾"; - "tooltip-format-ethernet" = "{ifname} "; - "tooltip-format-disconnected" = "Disconnected"; - "on-click" = "alacritty --class nmtui -e nmtui"; - }; - "tray" = { "spacing" = 10; }; - "power-profiles-daemon" = { - "format" = "{icon}"; - "tooltip-format" = '' - Profile: {profile} - Driver: {driver}''; - "tooltip" = true; - "format-icons" = { - "default" = "󱐌"; - "performance" = "󱐌"; - "balanced" = "󰗑"; - "power-saver" = "󰌪"; - }; - }; - }; - }; -} diff --git a/home/xfce/helpers.rc b/home/xfce/helpers.rc deleted file mode 100644 index c44f0cd7..00000000 --- a/home/xfce/helpers.rc +++ /dev/null @@ -1,4 +0,0 @@ -TerminalEmulator=alacritty -FileManager=thunar -WebBrowser=firefox - diff --git a/homeManagerModules/cliApps/bash/default.nix b/homeManagerModules/cliApps/bash/default.nix new file mode 100644 index 00000000..6eb63aee --- /dev/null +++ b/homeManagerModules/cliApps/bash/default.nix @@ -0,0 +1,14 @@ +{ pkgs, lib, config, ... }: { + + options = { cliApps.bash.enable = lib.mkEnableOption "Enables bash."; }; + + config = lib.mkIf config.cliApps.bash.enable { + programs.bash = { + enable = true; + enableCompletion = true; + initExtra = '' + export PS1="[\[$(tput setaf 27)\]\u\[$(tput setaf 135)\]@\[$(tput setaf 45)\]\h:\[$(tput setaf 33)\]\w] \[$(tput sgr0)\]$ " + ''; + }; + }; +} diff --git a/homeManagerModules/cliApps/default.nix b/homeManagerModules/cliApps/default.nix new file mode 100644 index 00000000..72ba12aa --- /dev/null +++ b/homeManagerModules/cliApps/default.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ./bash ./emacs ./eza ./fzf ./neovim ./tmux ]; + + home.packages = with pkgs; [ + # backblaze-b2 + browsh + curl + gh + git + nixfmt + python3 + ruby + wget + ]; + + programs.nnn.enable = lib.mkDefault true; + + programs.rbw.enable = lib.mkDefault true; + + cliApps.bash.enable = lib.mkDefault true; + cliApps.emacs.enable = lib.mkDefault true; + cliApps.eza.enable = lib.mkDefault true; + cliApps.fzf.enable = lib.mkDefault true; + cliApps.neovim.enable = lib.mkDefault true; + cliApps.tmux.enable = lib.mkDefault true; +} diff --git a/homeManagerModules/cliApps/emacs/default.nix b/homeManagerModules/cliApps/emacs/default.nix new file mode 100644 index 00000000..a67c27c1 --- /dev/null +++ b/homeManagerModules/cliApps/emacs/default.nix @@ -0,0 +1,34 @@ +{ pkgs, lib, config, ... }: { + + options = { cliApps.emacs.enable = lib.mkEnableOption "Enables emacs."; }; + + config = lib.mkIf config.cliApps.emacs.enable { + home.packages = with pkgs; [ nixfmt python3 ]; + + programs.emacs = { + enable = true; + extraPackages = (epkgs: + (with epkgs; [ + better-defaults + catppuccin-theme + markdown-mode + nix-mode + org + org-bullets + org-journal + org-roam + ox-pandoc + projectile + python + treemacs + treemacs-projectile + treemacs-tab-bar + use-package + yaml + yaml-mode + ])); + package = pkgs.emacs-nox; + extraConfig = builtins.readFile ./emacs.el; + }; + }; +} diff --git a/home/shell/emacs.el b/homeManagerModules/cliApps/emacs/emacs.el similarity index 100% rename from home/shell/emacs.el rename to homeManagerModules/cliApps/emacs/emacs.el diff --git a/homeManagerModules/cliApps/eza/default.nix b/homeManagerModules/cliApps/eza/default.nix new file mode 100644 index 00000000..08e0db3e --- /dev/null +++ b/homeManagerModules/cliApps/eza/default.nix @@ -0,0 +1,13 @@ +{ pkgs, lib, config, ... }: { + + options = { cliApps.eza.enable = lib.mkEnableOption "Enables eza."; }; + + config = lib.mkIf config.cliApps.eza.enable { + programs.eza = { + enable = true; + git = true; + icons = true; + extraOptions = [ "--group-directories-first" "--header" ]; + }; + }; +} diff --git a/homeManagerModules/cliApps/fzf/default.nix b/homeManagerModules/cliApps/fzf/default.nix new file mode 100644 index 00000000..6ba0e673 --- /dev/null +++ b/homeManagerModules/cliApps/fzf/default.nix @@ -0,0 +1,11 @@ +{ pkgs, lib, config, ... }: { + + options = { cliApps.fzf.enable = lib.mkEnableOption "Enables fzf."; }; + + config = lib.mkIf config.cliApps.fzf.enable { + programs.fzf = { + enable = true; + tmux.enableShellIntegration = true; + }; + }; +} diff --git a/homeManagerModules/cliApps/neovim/default.nix b/homeManagerModules/cliApps/neovim/default.nix new file mode 100644 index 00000000..9934bc51 --- /dev/null +++ b/homeManagerModules/cliApps/neovim/default.nix @@ -0,0 +1,13 @@ +{ pkgs, lib, config, ... }: { + + options = { cliApps.neovim.enable = lib.mkEnableOption "Enables neovim."; }; + + config = lib.mkIf config.cliApps.neovim.enable { + programs.neovim = { + enable = true; + viAlias = true; + vimAlias = true; + defaultEditor = true; + }; + }; +} diff --git a/homeManagerModules/cliApps/tmux/default.nix b/homeManagerModules/cliApps/tmux/default.nix new file mode 100644 index 00000000..ef1793c2 --- /dev/null +++ b/homeManagerModules/cliApps/tmux/default.nix @@ -0,0 +1,31 @@ +{ pkgs, lib, config, ... }: { + + options = { cliApps.tmux.enable = lib.mkEnableOption "Enables tmux."; }; + + config = lib.mkIf config.cliApps.tmux.enable { + programs.tmux = { + enable = true; + mouse = true; + newSession = true; + plugins = with pkgs; [ + tmuxPlugins.battery + tmuxPlugins.better-mouse-mode + tmuxPlugins.cpu + tmuxPlugins.resurrect + tmuxPlugins.weather + ]; + terminal = "tmux-256color"; + extraConfig = '' + set-option -g status-bg plum4 + set-option -g pane-active-border-style fg=plum4 + set-option -g @tmux-weather-format "%x+%t" + set-option -g @tmux-weather-units "u" + set -g status-right '#{cpu_percentage} CPU | #{battery_percentage} BAT | %I:%M %p | #{weather}' + run-shell ${pkgs.tmuxPlugins.battery}/share/tmux-plugins/battery/battery.tmux + run-shell ${pkgs.tmuxPlugins.resurrect}/share/tmux-plugins/resurrect/resurrect.tmux + run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux + run-shell ${pkgs.tmuxPlugins.weather}/share/tmux-plugins/weather/tmux-weather.tmux + ''; + }; + }; +} diff --git a/homeManagerModules/default.nix b/homeManagerModules/default.nix new file mode 100644 index 00000000..3311e04c --- /dev/null +++ b/homeManagerModules/default.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + imports = [ ./cliApps ./guiApps ./desktopEnv ./userServices ]; +} diff --git a/homeManagerModules/desktopEnv/default.nix b/homeManagerModules/desktopEnv/default.nix new file mode 100644 index 00000000..37580f72 --- /dev/null +++ b/homeManagerModules/desktopEnv/default.nix @@ -0,0 +1,7 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ./gnome ./hypr ]; + + desktopEnv.hyprland.enable = lib.mkDefault true; +} diff --git a/homeManagerModules/desktopEnv/gnome/default.nix b/homeManagerModules/desktopEnv/gnome/default.nix new file mode 100644 index 00000000..64cb6d19 --- /dev/null +++ b/homeManagerModules/desktopEnv/gnome/default.nix @@ -0,0 +1,50 @@ +{ pkgs, lib, config, ... }: { + + options = { + desktopEnv.gnome.enable = + lib.mkEnableOption "Enables GNOME with basic settings configuration."; + }; + + config = lib.mkIf config.desktopEnv.gnome.enable { + dconf.enable = true; + dconf.settings = { + "org/gnome/desktop/datetime".automatic-timezone = true; + "org/gnome/desktop/interface".clock-format = "12h"; + "org/gnome/desktop/interface".enable-hot-corners = true; + "org/gnome/desktop/peripherals/touchpad".tap-to-click = true; + "org/gnome/desktop/search-providers".enabled = + "['org.gnome.Calendar.desktop', 'org.gnome.Weather.desktop', 'org.gnome.Contacts.desktop', 'org.gnome.Calculator.desktop', 'org.gnome.Characters.desktop', 'org.gnome.clocks.desktop']"; + "org/gnome/desktop/wm/preferences".auto-raise = true; + "org/gnome/mutter".dynamic-workspaces = true; + "org/gnome/mutter".edge-tiling = true; + "org/gnome/mutter".workspaces-only-on-primary = true; + "org/gnome/shell/extensions/blur-my-shell/overview".style-components = 3; + "org/gnome/shell/extensions/blur-my-shell/panel".blur = false; + "org/gnome/shell/extensions/blur-my-shell/panel".customize = true; + "org/gnome/shell/extensions/blur-my-shell/panel".style-panel = 0; + "org/gnome/shell/extensions/blur-my-shell/panel".override-background = + false; + "org/gnome/shell/extensions/blur-my-shell/panel".override-background-dynamically = + false; + "org/gnome/shell/extensions/blur-my-shell/panel".unblur-in-overview = + true; + "org/gnome/system/location".enabled = true; + "org/gtk/gtk4/settings/file-chooser".sort-directories-first = true; + "org/gtk/settings/file-chooser".sort-directories-first = true; + "org/gnome/shell".enabled-extensions = [ + "appindicatorsupport@rgcjonas.gmail.com" + "blur-my-shell@aunetx" + "gsconnect@andyholmes.github.io" + "nightthemeswitcher@romainvigier.fr" + "noannoyance-fork@vrba.dev" + "tailscale-status@maxgallup.github.com" + "tiling-assistant@leleat-on-github" + "drive-menu@gnome-shell-extensions.gcampax.github.com" + ]; + "org/virt-manager/virt-manager/connections" = { + autoconnect = [ "qemu:///system" ]; + uris = [ "qemu:///system" ]; + }; + }; + }; +} diff --git a/home/hypr/blue-light-filter.glsl b/homeManagerModules/desktopEnv/hypr/blue-light-filter.glsl similarity index 100% rename from home/hypr/blue-light-filter.glsl rename to homeManagerModules/desktopEnv/hypr/blue-light-filter.glsl diff --git a/homeManagerModules/desktopEnv/hypr/default.nix b/homeManagerModules/desktopEnv/hypr/default.nix new file mode 100644 index 00000000..6c06a082 --- /dev/null +++ b/homeManagerModules/desktopEnv/hypr/default.nix @@ -0,0 +1,111 @@ +{ pkgs, lib, config, ... }: { + + options = { + desktopEnv.hyprland.enable = + lib.mkEnableOption "Enables hyprland with extra apps."; + }; + + config = lib.mkIf config.desktopEnv.hyprland.enable { + + # Basic apps needed to run a hyprland desktop. + guiApps.waybar.enable = lib.mkDefault true; + guiApps.mako.enable = lib.mkDefault true; + guiApps.fuzzel.enable = lib.mkDefault true; + guiApps.alacritty.enable = lib.mkDefault true; + + # Packages that should be installed to the user profile. + home.packages = with pkgs; [ + brightnessctl + evince + hyprcursor + hypridle + hyprland-protocols + hyprlock + hyprnome + hyprpaper + hyprshade + hyprshot + playerctl + pyprland + xdg-desktop-portal-hyprland + xfce.exo + xfce.ristretto + xfce.thunar + xfce.thunar-archive-plugin + xfce.thunar-media-tags-plugin + xfce.thunar-volman + xfce.tumbler + xfce.xfce4-settings + xfce.xfce4-taskmanager + xfce.xfconf + ]; + + services.gpg-agent.enable = true; + + wayland.windowManager.hyprland = { + enable = true; + extraConfig = builtins.readFile ./hyprland.conf; + }; + + xdg.configFile."hypr/hypridle.conf".source = ./hypridle.conf; + + xdg.configFile."hypr/hyprlock.conf".source = ./hyprlock.conf; + + xdg.configFile."hypr/hyprpaper.conf".source = ./hyprpaper.conf; + + xdg.configFile."hypr/wallpapers/greenCity.jpg".source = + ./wallpapers/greenCity.jpg; + xdg.configFile."hypr/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg".source = + ./wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg; + xdg.configFile."hypr/wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg".source = + ./wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg; + + xdg.configFile."hypr/shaders/blue-light-filter.glsl".source = + ./blue-light-filter.glsl; + xdg.configFile."hypr/hyprshade.toml".source = ./hyprshade.toml; + + xdg.configFile."xfce4/helpers.rc".text = '' + TerminalEmulator=alacritty + FileManager=thunar + WebBrowser=firefox + ''; + + home.pointerCursor = { + gtk.enable = true; + # x11.enable = true; + package = pkgs.catppuccin-cursors.frappeDark; + name = "Catppuccin-Frappe-Dark-Cursors"; + size = 24; + }; + + qt = { + enable = true; + platformTheme = "gtk"; + style.name = "Catppuccin-Frappe-Compact-Mauve-Dark"; + }; + + gtk = { + enable = true; + theme = { + package = pkgs.catppuccin-gtk.override { + accents = [ "mauve" ]; + size = "compact"; + variant = "frappe"; + tweaks = [ "normal" ]; + }; + name = "Catppuccin-Frappe-Compact-Mauve-Dark"; + }; + iconTheme = { + package = pkgs.catppuccin-papirus-folders.override { + flavor = "frappe"; + accent = "mauve"; + }; + name = "Papirus-Dark"; + }; + font = { + name = "NotoSans Nerd Font Regular"; + size = 11; + }; + }; + }; +} diff --git a/home/hypr/hypridle.conf b/homeManagerModules/desktopEnv/hypr/hypridle.conf similarity index 100% rename from home/hypr/hypridle.conf rename to homeManagerModules/desktopEnv/hypr/hypridle.conf diff --git a/home/hypr/hyprland.conf b/homeManagerModules/desktopEnv/hypr/hyprland.conf similarity index 100% rename from home/hypr/hyprland.conf rename to homeManagerModules/desktopEnv/hypr/hyprland.conf diff --git a/home/hypr/hyprlock.conf b/homeManagerModules/desktopEnv/hypr/hyprlock.conf similarity index 100% rename from home/hypr/hyprlock.conf rename to homeManagerModules/desktopEnv/hypr/hyprlock.conf diff --git a/home/hypr/hyprpaper.conf b/homeManagerModules/desktopEnv/hypr/hyprpaper.conf similarity index 100% rename from home/hypr/hyprpaper.conf rename to homeManagerModules/desktopEnv/hypr/hyprpaper.conf diff --git a/home/hypr/hyprshade.toml b/homeManagerModules/desktopEnv/hypr/hyprshade.toml similarity index 100% rename from home/hypr/hyprshade.toml rename to homeManagerModules/desktopEnv/hypr/hyprshade.toml diff --git a/home/hypr/wallpapers/greenCity.jpg b/homeManagerModules/desktopEnv/hypr/wallpapers/greenCity.jpg similarity index 100% rename from home/hypr/wallpapers/greenCity.jpg rename to homeManagerModules/desktopEnv/hypr/wallpapers/greenCity.jpg diff --git a/home/hypr/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg b/homeManagerModules/desktopEnv/hypr/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg similarity index 100% rename from home/hypr/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg rename to homeManagerModules/desktopEnv/hypr/wallpapers/jr-korpa-9XngoIpxcEo-unsplash.jpg diff --git a/home/hypr/wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg b/homeManagerModules/desktopEnv/hypr/wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg similarity index 100% rename from home/hypr/wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg rename to homeManagerModules/desktopEnv/hypr/wallpapers/salty-justice-NOMebOREvtc-unsplash.jpg diff --git a/homeManagerModules/guiApps/alacritty/default.nix b/homeManagerModules/guiApps/alacritty/default.nix new file mode 100644 index 00000000..17cedb14 --- /dev/null +++ b/homeManagerModules/guiApps/alacritty/default.nix @@ -0,0 +1,36 @@ +{ pkgs, lib, config, ... }: { + + options = { + guiApps.alacritty.enable = lib.mkEnableOption "Enables alacritty."; + }; + + config = lib.mkIf config.guiApps.alacritty.enable { + programs.alacritty = { + enable = true; + settings = { + colors = { + primary = { + foreground = "#fafafa"; + background = "#232634"; + }; + draw_bold_text_with_bright_colors = true; + }; + font = { + normal = { + family = "NotoSansM Nerd Font"; + style = "Regular"; + }; + size = 10; + }; + selection.save_to_clipboard = true; + window = { + blur = true; + # decorations = "None"; + dynamic_padding = true; + opacity = 0.8; + }; + }; + }; + }; +} + diff --git a/homeManagerModules/guiApps/default.nix b/homeManagerModules/guiApps/default.nix new file mode 100644 index 00000000..56765228 --- /dev/null +++ b/homeManagerModules/guiApps/default.nix @@ -0,0 +1,8 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ./alacritty ./fuzzel ./librewolf ./mako ./waybar ]; + + guiApps.librewolf.enable = lib.mkDefault true; + guiApps.alacritty.enable = lib.mkDefault true; +} diff --git a/homeManagerModules/guiApps/fuzzel/default.nix b/homeManagerModules/guiApps/fuzzel/default.nix new file mode 100644 index 00000000..82a9fa9d --- /dev/null +++ b/homeManagerModules/guiApps/fuzzel/default.nix @@ -0,0 +1,26 @@ +{ pkgs, lib, config, ... }: { + + options = { guiApps.fuzzel.enable = lib.mkEnableOption "Enables fuzzel."; }; + + config = lib.mkIf config.guiApps.fuzzel.enable { + programs.fuzzel = { + enable = true; + settings = { + main = { + font = "NotoSansM Nerd Font Regular"; + icon-theme = "Papirus-Dark"; + layer = "overlay"; + terminal = "${pkgs.alacritty}/bin/alacritty -e"; + }; + border = { width = 2; }; + colors = { + background = "#232634CC"; + selection = "#232634FF"; + selection-match = "#e78284FF"; + selection-text = "#f4b8e4FF"; + text = "#fafafaFF"; + }; + }; + }; + }; +} diff --git a/homeManagerModules/guiApps/librewolf/default.nix b/homeManagerModules/guiApps/librewolf/default.nix new file mode 100644 index 00000000..3fe4ae64 --- /dev/null +++ b/homeManagerModules/guiApps/librewolf/default.nix @@ -0,0 +1,37 @@ +{ pkgs, lib, config, ... }: { + + options = { + guiApps.librewolf.enable = lib.mkEnableOption "Enables librewolf."; + }; + + config = lib.mkIf config.guiApps.librewolf.enable { + programs.librewolf = { + enable = true; + settings = { + "browser.safebrowsing.malware.enabled" = true; + "browser.safebrowsing.phishing.enabled" = true; + "browser.safebrowsing.blockedURIs.enabled" = true; + + "browser.safebrowsing.provider.google4.gethashURL" = + "https://safebrowsing.googleapis.com/v4/fullHashes:find?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST"; + + "browser.safebrowsing.provider.google4.updateURL" = + "https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST"; + + "browser.safebrowsing.provider.google.gethashURL" = + "https://safebrowsing.google.com/safebrowsing/gethash?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2"; + + "browser.safebrowsing.provider.google.updateURL" = + "https://safebrowsing.google.com/safebrowsing/downloads?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2&key=%GOOGLE_SAFEBROWSING_API_KEY%"; + "browser.safebrowsing.downloads.enabled" = true; + + "identity.fxaccounts.enabled" = true; + + "privacy.clearOnShutdown.history" = false; + + "middlemouse.paste" = false; + "general.autoScroll" = true; + }; + }; + }; +} diff --git a/homeManagerModules/guiApps/mako/default.nix b/homeManagerModules/guiApps/mako/default.nix new file mode 100644 index 00000000..5c2c0a4e --- /dev/null +++ b/homeManagerModules/guiApps/mako/default.nix @@ -0,0 +1,22 @@ +{ pkgs, lib, config, ... }: { + + options = { guiApps.mako.enable = lib.mkEnableOption "Enables mako."; }; + + config = lib.mkIf config.guiApps.mako.enable { + services.mako = { + enable = true; + anchor = "top-center"; + backgroundColor = "#232634CC"; + borderColor = "#ca9ee6"; + borderRadius = 10; + defaultTimeout = 10000; + font = "NotoSans Nerd Font Regular 10"; + height = 300; + layer = "top"; + padding = "15"; + textColor = "#FAFAFA"; + width = 400; + margin = "20,0"; + }; + }; +} diff --git a/homeManagerModules/guiApps/waybar/default.nix b/homeManagerModules/guiApps/waybar/default.nix new file mode 100644 index 00000000..e6587790 --- /dev/null +++ b/homeManagerModules/guiApps/waybar/default.nix @@ -0,0 +1,100 @@ +{ pkgs, lib, config, ... }: { + + options = { guiApps.waybar.enable = lib.mkEnableOption "Enables waybar."; }; + + config = lib.mkIf config.guiApps.waybar.enable { + # Packages that should be installed to the user profile. + home.packages = with pkgs; [ blueberry pavucontrol ]; + + xdg.configFile."waybar/style.css".source = ./waybar.css; + + programs.waybar.enable = true; + programs.waybar.settings = { + mainBar = { + height = 36; + layer = "top"; + output = [ "*" ]; + position = "top"; + reload_style_on_change = true; + modules-left = [ "hyprland/workspaces" "hyprland/submap" ]; + modules-center = [ "hyprland/window" ]; + modules-right = [ + "tray" + "bluetooth" + "network" + "pulseaudio" + "battery" + "power-profiles-daemon" + "clock" + ]; + + "hyprland/workspaces" = { + "all-outputs" = true; + "format" = "󰧞"; + }; + "hyprland/window" = { "max-length" = 100; }; + "clock" = { + "tooltip-format" = "{:%Y-%m-%d | %H:%M}"; + "interval" = 60; + "format" = "{:%I:%M%p}"; + }; + "battery" = { + "states" = { "critical" = 20; }; + "format" = "{icon}"; + "format-icons" = [ "󰁺" "󰁼" "󰁿" "󰂁" "󰁹" ]; + "tooltip-format" = '' + {capacity}%: {timeTo}. + Using {power} watts.''; + }; + "bluetooth" = { + "format" = "󰂯 {status}"; + "format-disabled" = ""; # an empty format will hide the module + "format-connected" = "󰂯 {num_connections} connected"; + "tooltip-format" = "{controller_alias} {controller_address}"; + "tooltip-format-connected" = '' + {controller_alias} {controller_address} + + {device_enumerate}''; + "tooltip-format-enumerate-connected" = + "{device_alias} {device_address}"; + "on-click" = "blueberry"; + }; + "pulseaudio" = { + "format" = " {volume}%"; + "format-bluetooth" = "{volume}% {icon}󰂯"; + "format-muted" = ""; + "format-icons" = { + "headphones" = "󰋋"; + "handsfree" = "󰋎"; + "headset" = "󰋎"; + }; + "on-click" = "pavucontrol -t 3"; + }; + "network" = { + "format-wifi" = "󰣾 {signalStrength}%"; + "format-ethernet" = "󰈀"; + "format-disconnected" = "⚠"; + "tooltip-format" = "{ifname} via {gwaddr} 󰊗"; + "tooltip-format-wifi" = "{essid} ({signalStrength}%) 󰣾"; + "tooltip-format-ethernet" = "{ifname} "; + "tooltip-format-disconnected" = "Disconnected"; + "on-click" = "alacritty --class nmtui -e nmtui"; + }; + "tray" = { "spacing" = 10; }; + "power-profiles-daemon" = { + "format" = "{icon}"; + "tooltip-format" = '' + Profile: {profile} + Driver: {driver}''; + "tooltip" = true; + "format-icons" = { + "default" = "󱐌"; + "performance" = "󱐌"; + "balanced" = "󰗑"; + "power-saver" = "󰌪"; + }; + }; + }; + }; + }; +} diff --git a/home/waybar/waybar.css b/homeManagerModules/guiApps/waybar/waybar.css similarity index 100% rename from home/waybar/waybar.css rename to homeManagerModules/guiApps/waybar/waybar.css diff --git a/homeManagerModules/userServices/default.nix b/homeManagerModules/userServices/default.nix new file mode 100644 index 00000000..c8cd9f85 --- /dev/null +++ b/homeManagerModules/userServices/default.nix @@ -0,0 +1,7 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ./syncthing ]; + + userServices.syncthing.enable = lib.mkDefault true; +} diff --git a/homeManagerModules/userServices/syncthing/default.nix b/homeManagerModules/userServices/syncthing/default.nix new file mode 100644 index 00000000..d3ef60fc --- /dev/null +++ b/homeManagerModules/userServices/syncthing/default.nix @@ -0,0 +1,11 @@ +{ pkgs, lib, config, ... }: { + + options = { + userServices.syncthing.enable = + lib.mkEnableOption "Enables syncthing as user."; + }; + + config = lib.mkIf config.userServices.syncthing.enable { + services.syncthing.enable = true; + }; +} diff --git a/hosts/lavaridge/default.nix b/hosts/lavaridge/default.nix index 3df3fc7e..9bad079b 100644 --- a/hosts/lavaridge/default.nix +++ b/hosts/lavaridge/default.nix @@ -1,10 +1,11 @@ # Framework Laptop 13 with AMD Ryzen 7640U, 32GB RAM, 1TB SSD. -{ config, pkgs, lib, ... }: +{ inputs, config, pkgs, lib, ... }: { imports = [ ./hardware-configuration.nix # Include the results of the hardware scan. + ./home.nix ]; boot = { @@ -24,8 +25,6 @@ mesonCheckFlags = [ "--no-suite" "fprintd:TestPamFprintd" ]; }; - home-manager.users.aly = import ../../home/aly-hyprland.nix; - desktopConfig = { enable = true; windowManagers.hyprland.enable = true; diff --git a/hosts/lavaridge/home.nix b/hosts/lavaridge/home.nix new file mode 100644 index 00000000..09b1fe78 --- /dev/null +++ b/hosts/lavaridge/home.nix @@ -0,0 +1,14 @@ +{ inputs, config, pkgs, lib, ... }: + +{ + home-manager.users.aly = { + imports = [ ../../homeManagerModules ]; + home.username = "aly"; + home.homeDirectory = "/home/aly"; + + home.stateVersion = "23.11"; + programs.home-manager.enable = true; + + desktopEnv.hyprland.enable = true; + }; +} diff --git a/hosts/mauville/default.nix b/hosts/mauville/default.nix index 468c2fb5..af38b9a3 100644 --- a/hosts/mauville/default.nix +++ b/hosts/mauville/default.nix @@ -3,9 +3,7 @@ { config, pkgs, lib, ... }: { - imports = [ - ./hardware-configuration.nix - ]; + imports = [ ./hardware-configuration.nix ./home.nix ]; # Bootloader. boot.loader.systemd-boot.enable = true; @@ -28,8 +26,6 @@ extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ]; }; - home-manager.users.aly = import ../../home/aly-hyprland.nix; - homeLab.enable = true; desktopConfig.enable = true; diff --git a/hosts/mauville/home.nix b/hosts/mauville/home.nix new file mode 100644 index 00000000..09b1fe78 --- /dev/null +++ b/hosts/mauville/home.nix @@ -0,0 +1,14 @@ +{ inputs, config, pkgs, lib, ... }: + +{ + home-manager.users.aly = { + imports = [ ../../homeManagerModules ]; + home.username = "aly"; + home.homeDirectory = "/home/aly"; + + home.stateVersion = "23.11"; + programs.home-manager.enable = true; + + desktopEnv.hyprland.enable = true; + }; +} diff --git a/hosts/petalburg/default.nix b/hosts/petalburg/default.nix index 8cf819b3..be29c5f4 100644 --- a/hosts/petalburg/default.nix +++ b/hosts/petalburg/default.nix @@ -54,6 +54,7 @@ let in { imports = [ ./hardware-configuration.nix # Include the results of the hardware scan. + ./home.nix ]; boot = { @@ -72,13 +73,8 @@ in { powerManagement.powertop.enable = true; services.thermald.enable = true; - home-manager.users.aly = import ../../home/aly-gnome.nix; - home-manager.users.dustin = import ../../home/dustin-gnome.nix; - environment.systemPackages = [ cs-adjuster cs-adjuster-plasma pp-adjuster ]; - userConfig.dustin.enable = true; - desktopConfig = { enable = true; windowManagers.hyprland.enable = false; diff --git a/hosts/petalburg/home.nix b/hosts/petalburg/home.nix new file mode 100644 index 00000000..9f1530aa --- /dev/null +++ b/hosts/petalburg/home.nix @@ -0,0 +1,27 @@ +{ inputs, config, pkgs, lib, ... }: + +{ + home-manager.users.aly = { + imports = [ ../../homeManagerModules ]; + home.username = "aly"; + home.homeDirectory = "/home/aly"; + + home.stateVersion = "23.11"; + programs.home-manager.enable = true; + + desktopEnv.hyprland.enable = true; + }; + + userConfig.dustin.enable = true; + home-manager.users.dustin = { + imports = [ ../../homeManagerModules ]; + home.username = "dustin"; + home.homeDirectory = "/home/dustin"; + + home.stateVersion = "23.11"; + programs.home-manager.enable = true; + + desktopEnv.hyprland.enable = false; + desktopEnv.gnome.enable = true; + }; +} diff --git a/hosts/rustboro/default.nix b/hosts/rustboro/default.nix index cdc83e26..51351606 100644 --- a/hosts/rustboro/default.nix +++ b/hosts/rustboro/default.nix @@ -5,6 +5,7 @@ { imports = [ ./hardware-configuration.nix # Include the results of the hardware scan. + ./home.nix ]; # Bootloader. @@ -16,8 +17,6 @@ powerManagement.cpuFreqGovernor = "ondemand"; - home-manager.users.aly = import ../../home/aly-hyprland.nix; - desktopConfig = { enable = true; windowManagers.hyprland.enable = true; diff --git a/hosts/rustboro/home.nix b/hosts/rustboro/home.nix new file mode 100644 index 00000000..09b1fe78 --- /dev/null +++ b/hosts/rustboro/home.nix @@ -0,0 +1,14 @@ +{ inputs, config, pkgs, lib, ... }: + +{ + home-manager.users.aly = { + imports = [ ../../homeManagerModules ]; + home.username = "aly"; + home.homeDirectory = "/home/aly"; + + home.stateVersion = "23.11"; + programs.home-manager.enable = true; + + desktopEnv.hyprland.enable = true; + }; +} diff --git a/nixosModules/systemConfig/default.nix b/nixosModules/systemConfig/default.nix index 21453742..f18952d9 100644 --- a/nixosModules/systemConfig/default.nix +++ b/nixosModules/systemConfig/default.nix @@ -82,9 +82,4 @@ ]; }; }; - - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - }; } diff --git a/nixosModules/userConfig/aly/default.nix b/nixosModules/userConfig/aly/default.nix index b7ff3a0c..e41a44b2 100644 --- a/nixosModules/userConfig/aly/default.nix +++ b/nixosModules/userConfig/aly/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, config, ... }: { +{ inputs, pkgs, lib, config, ... }: { options = { userConfig.aly.enable = lib.mkEnableOption "Enables Aly's user."; diff --git a/nixosModules/userConfig/default.nix b/nixosModules/userConfig/default.nix index 9bf6103d..f1c2e383 100644 --- a/nixosModules/userConfig/default.nix +++ b/nixosModules/userConfig/default.nix @@ -3,4 +3,9 @@ imports = [ ./aly ./dustin ]; userConfig.aly.enable = lib.mkDefault true; + + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + }; }