From 669d231761689f90e939d2712fa99266ec4538ac Mon Sep 17 00:00:00 2001 From: joy Date: Sat, 31 Aug 2024 14:46:41 +0200 Subject: [PATCH] allin modules --- modules/ags/default.nix | 2 +- modules/default.nix | 7 ++++--- modules/gtk/default.nix | 10 +++++----- modules/helix/default.nix | 6 +++--- modules/homemisc/default.nix | 6 +++--- modules/hypridle/default.nix | 2 +- modules/hyprland/default.nix | 6 +++--- modules/misc/default.nix | 6 ------ modules/newsboat/default.nix | 2 +- modules/rofi/default.nix | 2 +- modules/zsh/default.nix | 2 +- 11 files changed, 23 insertions(+), 28 deletions(-) diff --git a/modules/ags/default.nix b/modules/ags/default.nix index 65ba0d1..dd4c841 100644 --- a/modules/ags/default.nix +++ b/modules/ags/default.nix @@ -1,5 +1,5 @@ {inputs, ...}: { - imports = [inputs.ags.homeManagerModules.default]; + home-manager.users.joy.imports = [inputs.ags.homeManagerModules.default]; home-manager.users.joy.programs.ags = { enable = true; configDir = ./bar; diff --git a/modules/default.nix b/modules/default.nix index e95fd36..02f1b92 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -17,9 +17,6 @@ ./ssh ./dunst ./zsh - ./gtk - ./git - ./ags ./misc ./rofi ./helix @@ -28,5 +25,9 @@ ./hyprland ./hypridle ./newsboat + ./homemisc + ./git + ./gtk + ./ags ]; } diff --git a/modules/gtk/default.nix b/modules/gtk/default.nix index 69a45ac..44bc138 100644 --- a/modules/gtk/default.nix +++ b/modules/gtk/default.nix @@ -1,14 +1,14 @@ {pkgs, ...}: let gruvboxPlus = import ./gruvbox-plus.nix {inherit pkgs;}; in { - home.file = { + home-manager.users.joy.home.file = { ".local/share/icons/GruvboxPlus".source = "${gruvboxPlus}"; }; - gtk = { - enable = true; - iconTheme.package = gruvboxPlus; - iconTheme.name = "GruvboxPlus"; + home-manager.users.joy.gtk = { + enable = true; + iconTheme.package = gruvboxPlus; + iconTheme.name = "GruvboxPlus"; }; # qt.enable = true; diff --git a/modules/helix/default.nix b/modules/helix/default.nix index 13ca24b..a9274fb 100644 --- a/modules/helix/default.nix +++ b/modules/helix/default.nix @@ -1,5 +1,5 @@ {pkgs, ...}: { - programs.helix = { + home-manager.users.joy.programs.helix = { enable = true; defaultEditor = true; settings = { @@ -11,11 +11,11 @@ }; }; - home.packages = with pkgs; [ + home-manager.users.joy.home.packages = with pkgs; [ nil clang-tools javascript-typescript-langserver - # vscode-langservers-extracted + vscode-langservers-extracted rust-analyzer lldb_18 lua-language-server diff --git a/modules/homemisc/default.nix b/modules/homemisc/default.nix index e8f5bdd..96ffe22 100644 --- a/modules/homemisc/default.nix +++ b/modules/homemisc/default.nix @@ -1,5 +1,5 @@ {lib, ...}: { - home = { + home-manager.users.joy.home = { username = "joy"; homeDirectory = "/home/joy"; stateVersion = "23.11"; @@ -7,9 +7,9 @@ }; }; - programs.home-manager.enable = true; + home-manager.users.joy.programs.home-manager.enable = true; - xdg.mimeApps.defaultApplications = { + home-manager.users.joy.xdg.mimeApps.defaultApplications = { "text/plain" = ["helix.desktop"]; "image/*" = ["imv.desktop"]; "video/png" = ["mpv.desktop"]; diff --git a/modules/hypridle/default.nix b/modules/hypridle/default.nix index 9108214..c4f0e87 100644 --- a/modules/hypridle/default.nix +++ b/modules/hypridle/default.nix @@ -1,5 +1,5 @@ {...}: { - services.hypridle = { + home-manager.users.joy.services.hypridle = { # enable = true; settings = { listener = [ diff --git a/modules/hyprland/default.nix b/modules/hyprland/default.nix index cb0fac2..4959914 100644 --- a/modules/hyprland/default.nix +++ b/modules/hyprland/default.nix @@ -1,5 +1,5 @@ {pkgs, ...}: { - home.packages = with pkgs; [ + home-manager.users.joy.home.packages = with pkgs; [ rofi-wayland pwvucontrol swww @@ -13,9 +13,9 @@ playerctl ]; - services.cliphist.enable = true; + home-manager.users.joy.services.cliphist.enable = true; - wayland.windowManager.hyprland = { + home-manager.users.joy.wayland.windowManager.hyprland = { enable = true; settings = { diff --git a/modules/misc/default.nix b/modules/misc/default.nix index e6fe280..9484e3c 100644 --- a/modules/misc/default.nix +++ b/modules/misc/default.nix @@ -3,12 +3,6 @@ pkgs, ... }: { - home-manager = { - extraSpecialArgs = {inherit inputs;}; - users = { - "joy" = import ./../../home; - }; - }; users.users.joy = { isNormalUser = true; diff --git a/modules/newsboat/default.nix b/modules/newsboat/default.nix index a269f7f..179f3a6 100644 --- a/modules/newsboat/default.nix +++ b/modules/newsboat/default.nix @@ -1,5 +1,5 @@ {...}: { - programs.newsboat = { + home-manager.users.joy.programs.newsboat = { enable = true; browser = "firefox"; urls = [ diff --git a/modules/rofi/default.nix b/modules/rofi/default.nix index c98b3af..1d0a66d 100644 --- a/modules/rofi/default.nix +++ b/modules/rofi/default.nix @@ -3,7 +3,7 @@ lib, ... }: { - programs.rofi = { + home-manager.users.joy.programs.rofi = { enable = true; package = pkgs.rofi-wayland; theme = lib.mkForce "~/nix/home/rofi/gruvbox-material.rasi"; diff --git a/modules/zsh/default.nix b/modules/zsh/default.nix index 82afd5c..9d98172 100644 --- a/modules/zsh/default.nix +++ b/modules/zsh/default.nix @@ -1,5 +1,5 @@ {pkgs, ...}: { - programs.zsh = { + home-manager.users.joy.programs.zsh = { enable = true; syntaxHighlighting.enable = true; enableCompletion = true;