diff --git a/configs/ags/default.nix b/configs/ags/default.nix deleted file mode 100644 index f7c7197..0000000 --- a/configs/ags/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ pkgs }: - -{ - configDir = ./.; - - enable = pkgs.stdenv.isLinux; - - extraPackages = with pkgs; [ cowsay ]; - - # package = pkgs.hiPrio ( - # pkgs.writeShellApplication { - # name = "ags"; - # runtimeInputs = [ pkgs.bun ]; - # text = "${pkgs.ags}"; - # } - # ); -} diff --git a/configs/default.nix b/configs/default.nix index 4ea35ab..8f3c4d0 100644 --- a/configs/default.nix +++ b/configs/default.nix @@ -7,7 +7,6 @@ }: { - ags = import ./ags { inherit pkgs; }; alacritty = import ./alacritty { inherit config diff --git a/home.nix b/home.nix index c67ae91..6e49ce3 100644 --- a/home.nix +++ b/home.nix @@ -155,6 +155,10 @@ in username = userName; }; + imports = [ + ./modules/home/all.nix + ]; + nix = { package = pkgs.nixVersions.latest; settings = { @@ -172,7 +176,6 @@ in programs = { inherit (configs) - ags alacritty bat direnv diff --git a/configs/ags/.gitignore b/modules/home/ags/.gitignore similarity index 100% rename from configs/ags/.gitignore rename to modules/home/ags/.gitignore diff --git a/configs/ags/config.js b/modules/home/ags/config.js similarity index 100% rename from configs/ags/config.js rename to modules/home/ags/config.js diff --git a/modules/home/ags/config.nix b/modules/home/ags/config.nix new file mode 100644 index 0000000..f344b60 --- /dev/null +++ b/modules/home/ags/config.nix @@ -0,0 +1,6 @@ +{ pkgs }: + +{ + configDir = ./.; + enable = pkgs.stdenv.isLinux; +} diff --git a/modules/home/ags/default.nix b/modules/home/ags/default.nix new file mode 100644 index 0000000..e61e1dc --- /dev/null +++ b/modules/home/ags/default.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + pkgs, + ... +}: + +with lib; +let + cfg = config.modules.ags; +in +{ + options.modules.ags = { + enable = mkEnableOption "ags"; + }; + + config = mkIf cfg.enable ({ + home.packages = [ + (pkgs.hiPrio ( + pkgs.writeShellApplication { + name = "ags"; + runtimeInputs = [ pkgs.bun ]; + text = "${pkgs.ags}/bin/ags"; + } + )) + ]; + + programs.ags = import ./config.nix { inherit pkgs; }; + }); +} diff --git a/configs/ags/lib/utils.ts b/modules/home/ags/lib/utils.ts similarity index 100% rename from configs/ags/lib/utils.ts rename to modules/home/ags/lib/utils.ts diff --git a/configs/ags/main.ts b/modules/home/ags/main.ts similarity index 100% rename from configs/ags/main.ts rename to modules/home/ags/main.ts diff --git a/configs/ags/package-lock.json b/modules/home/ags/package-lock.json similarity index 100% rename from configs/ags/package-lock.json rename to modules/home/ags/package-lock.json diff --git a/configs/ags/package.json b/modules/home/ags/package.json similarity index 100% rename from configs/ags/package.json rename to modules/home/ags/package.json diff --git a/configs/ags/tsconfig.json b/modules/home/ags/tsconfig.json similarity index 100% rename from configs/ags/tsconfig.json rename to modules/home/ags/tsconfig.json diff --git a/configs/ags/widgets/bar/index.ts b/modules/home/ags/widgets/bar/index.ts similarity index 100% rename from configs/ags/widgets/bar/index.ts rename to modules/home/ags/widgets/bar/index.ts diff --git a/configs/ags/widgets/osd/Progress.ts b/modules/home/ags/widgets/osd/Progress.ts similarity index 100% rename from configs/ags/widgets/osd/Progress.ts rename to modules/home/ags/widgets/osd/Progress.ts diff --git a/configs/ags/widgets/osd/index.ts b/modules/home/ags/widgets/osd/index.ts similarity index 100% rename from configs/ags/widgets/osd/index.ts rename to modules/home/ags/widgets/osd/index.ts diff --git a/modules/home/all.nix b/modules/home/all.nix new file mode 100644 index 0000000..1327680 --- /dev/null +++ b/modules/home/all.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + imports = [ + ./ags + ]; + + modules = { + ags.enable = true; + }; +}