nixos-configs/modules/ags/default.nix
matt1432 7fd12f5b04
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(ags): update to new types
2024-01-22 10:23:32 -05:00

60 lines
1.2 KiB
Nix

{
ags,
config,
pkgs,
...
}: let
inherit (config.vars) mainUser hostName;
isTouchscreen = config.hardware.sensor.iio.enable;
in {
services.upower.enable = true;
home-manager.users.${mainUser}.imports = [
ags.homeManagerModules.default
({
config,
lib,
...
}: let
symlink = config.lib.file.mkOutOfStoreSymlink;
inherit (lib) optionals;
in {
programs.ags = {
enable = true;
configDir = symlink /home/${mainUser}/.nix/modules/ags/config;
};
home = {
file = {
".config/ags/config.js".text =
/*
javascript
*/
''
import { transpileTypeScript } from './js/utils.js';
export default (await transpileTypeScript('${hostName}')).default;
'';
};
packages =
[config.customPkgs.coloryou]
++ (with pkgs; [
# ags
sassc
bun
playerctl
## gui
pavucontrol # TODO: replace with ags widget
])
++ (optionals isTouchscreen (with pkgs; [
lisgd
squeekboard
ydotool
]));
};
})
];
}