2023-11-30 17:17:34 -05:00
|
|
|
{
|
|
|
|
ags,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
2024-01-17 19:18:41 -05:00
|
|
|
inherit (config.vars) mainUser hostName;
|
2023-11-30 17:17:34 -05:00
|
|
|
isTouchscreen = config.hardware.sensor.iio.enable;
|
|
|
|
in {
|
|
|
|
services.upower.enable = true;
|
|
|
|
|
2024-01-09 13:13:04 -05:00
|
|
|
home-manager.users.${mainUser}.imports = [
|
2023-11-30 17:17:34 -05:00
|
|
|
ags.homeManagerModules.default
|
|
|
|
|
|
|
|
({
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
symlink = config.lib.file.mkOutOfStoreSymlink;
|
2024-01-22 10:23:32 -05:00
|
|
|
inherit (lib) optionals;
|
2023-11-30 17:17:34 -05:00
|
|
|
in {
|
|
|
|
programs.ags = {
|
|
|
|
enable = true;
|
2024-01-17 19:18:41 -05:00
|
|
|
configDir = symlink /home/${mainUser}/.nix/modules/ags/config;
|
2023-11-30 17:17:34 -05:00
|
|
|
};
|
|
|
|
|
2024-01-17 19:18:41 -05:00
|
|
|
home = {
|
|
|
|
file = {
|
|
|
|
".config/ags/config.js".text =
|
|
|
|
/*
|
|
|
|
javascript
|
|
|
|
*/
|
|
|
|
''
|
|
|
|
import { transpileTypeScript } from './js/utils.js';
|
2023-11-30 17:17:34 -05:00
|
|
|
|
2024-01-18 09:41:57 -05:00
|
|
|
export default (await transpileTypeScript('${hostName}')).default;
|
2024-01-17 19:18:41 -05:00
|
|
|
'';
|
|
|
|
};
|
2024-01-14 20:52:30 -05:00
|
|
|
|
2024-01-17 19:18:41 -05:00
|
|
|
packages =
|
|
|
|
[config.customPkgs.coloryou]
|
|
|
|
++ (with pkgs; [
|
|
|
|
# ags
|
|
|
|
sassc
|
|
|
|
bun
|
|
|
|
playerctl
|
2024-01-14 20:52:30 -05:00
|
|
|
|
2024-01-17 19:18:41 -05:00
|
|
|
## gui
|
|
|
|
pavucontrol # TODO: replace with ags widget
|
|
|
|
])
|
|
|
|
++ (optionals isTouchscreen (with pkgs; [
|
|
|
|
lisgd
|
|
|
|
squeekboard
|
|
|
|
ydotool
|
|
|
|
]));
|
|
|
|
};
|
2023-11-30 17:17:34 -05:00
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|