diff --git a/devices/binto/default.nix b/devices/binto/default.nix index 5064e14d..30da64d6 100644 --- a/devices/binto/default.nix +++ b/devices/binto/default.nix @@ -2,6 +2,7 @@ imports = [ ./hardware-configuration.nix + ../../modules/ags ../../modules/audio.nix ../../modules/greetd ../../modules/kmscon.nix @@ -30,7 +31,6 @@ "input" "uinput" "adm" - "mlocate" "video" "libvirtd" ]; @@ -42,7 +42,6 @@ ../../home/firefox ../../home/hyprland - ./home/ags.nix ./home/packages.nix ]; diff --git a/devices/binto/home/ags.nix b/devices/binto/home/ags.nix deleted file mode 100644 index 34c32a60..00000000 --- a/devices/binto/home/ags.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - pkgs, - config, - ags, - ... -}: let - configDir = config.services.device-vars.configDir; - symlink = config.lib.file.mkOutOfStoreSymlink; -in { - imports = [ - ags.homeManagerModules.default - ]; - - programs.ags = { - enable = true; - configDir = symlink "${configDir}/ags"; - package = ags.packages.x86_64-linux.default; - extraPackages = [pkgs.libgudev]; - }; - - home.packages = with pkgs; [ - # ags - sassc - coloryou - playerctl - - ## gui - pavucontrol # TODO: replace with ags widget - networkmanagerapplet # TODO: replace with ags widget - ]; -} diff --git a/devices/oksys/default.nix b/devices/oksys/default.nix index fd202be7..da2d7e2c 100644 --- a/devices/oksys/default.nix +++ b/devices/oksys/default.nix @@ -16,7 +16,6 @@ extraGroups = [ "wheel" "adm" - "mlocate" ]; }; home-manager.users = { diff --git a/devices/wim/default.nix b/devices/wim/default.nix index 88caca61..92080884 100644 --- a/devices/wim/default.nix +++ b/devices/wim/default.nix @@ -2,6 +2,7 @@ imports = [ ./hardware-configuration.nix + ../../modules/ags ../../modules/audio.nix ../../modules/greetd ../../modules/kmscon.nix @@ -27,7 +28,6 @@ "input" "uinput" "adm" - "mlocate" "video" "libvirtd" ]; @@ -41,7 +41,6 @@ ./home/dotfiles.nix ./home/packages.nix - ./home/ags.nix ]; # No touchy diff --git a/devices/wim/home/ags.nix b/devices/wim/home/ags.nix deleted file mode 100644 index 8036355c..00000000 --- a/devices/wim/home/ags.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - pkgs, - config, - ags, - ... -}: let - configDir = config.services.device-vars.configDir; - symlink = config.lib.file.mkOutOfStoreSymlink; -in { - imports = [ - ags.homeManagerModules.default - ]; - - programs.ags = { - enable = true; - configDir = symlink "${configDir}/ags"; - package = ags.packages.x86_64-linux.default; - extraPackages = [pkgs.libgudev]; - }; - - wayland.windowManager.hyprland = { - settings = { - env = [ - "AGS_PATH, ${configDir}/ags/bin" - "HYPR_PATH, ${configDir}/hypr/scripts" - "LOCK_PATH, ${configDir}/gtklock/scripts" - ]; - }; - }; - - home.packages = with pkgs; [ - # ags - ydotool - sassc - coloryou - playerctl - - ## gui - pavucontrol # TODO: replace with ags widget - networkmanagerapplet # TODO: replace with ags widget - blueberry # TODO: replace with ags widget - - # touchscreen - lisgd - squeekboard - ]; -} diff --git a/devices/wim/home/dotfiles.nix b/devices/wim/home/dotfiles.nix index 584c9b01..3edea35b 100644 --- a/devices/wim/home/dotfiles.nix +++ b/devices/wim/home/dotfiles.nix @@ -6,6 +6,16 @@ configDir = config.services.device-vars.configDir; symlink = config.lib.file.mkOutOfStoreSymlink; in { + wayland.windowManager.hyprland = { + settings = { + env = [ + "AGS_PATH, ${configDir}/ags/bin" + "HYPR_PATH, ${configDir}/hypr/scripts" + "LOCK_PATH, ${configDir}/gtklock/scripts" + ]; + }; + }; + xdg.configFile = { "gtklock/config.ini".source = pkgs.writeText "config.ini" '' [main] diff --git a/modules/ags/default.nix b/modules/ags/default.nix new file mode 100644 index 00000000..a994fc3a --- /dev/null +++ b/modules/ags/default.nix @@ -0,0 +1,49 @@ +{ + ags, + config, + pkgs, + ... +}: let + vars = config.services.device-vars; + isNvidia = config.hardware.nvidia.modesetting.enable; + isTouchscreen = config.hardware.sensor.iio.enable; +in { + services.upower.enable = true; + + home-manager.users.${vars.username}.imports = [ + ags.homeManagerModules.default + + ({ + config, + lib, + ... + }: let + symlink = config.lib.file.mkOutOfStoreSymlink; + optionals = lib.lists.optionals; + in { + programs.ags = { + enable = true; + configDir = symlink "${vars.configDir}/ags"; + package = ags.packages.x86_64-linux.default; + extraPackages = [pkgs.libgudev]; + }; + + home.packages = with pkgs; + [ + # ags + sassc + coloryou + playerctl + + ## gui + pavucontrol # TODO: replace with ags widget + networkmanagerapplet # TODO: replace with ags widget + ] + ++ (optionals isTouchscreen [ + # touchscreen + lisgd + squeekboard + ]); + }) + ]; +}