xin/gui/default.nix

131 lines
3.2 KiB
Nix
Raw Normal View History

2023-09-12 08:44:05 -06:00
{ config
, lib
, pkgs
, xinlib
, isUnstable
, inputs
2023-09-12 08:44:05 -06:00
, ...
}:
let
inherit (builtins) toJSON;
inherit (inputs.traygent.packages.${pkgs.system}) traygent;
2024-01-03 13:00:36 -07:00
inherit (inputs.beyt.packages.${pkgs.system}) beyt;
2023-09-12 08:44:05 -06:00
firefox = import ../configs/firefox.nix { inherit pkgs; };
rage = pkgs.writeScriptBin "rage" (import ../bins/rage.nix { inherit pkgs; });
2024-05-24 11:22:53 -06:00
myEmacs = pkgs.callPackage ../configs/emacs.nix { inherit isUnstable; };
2023-07-11 09:12:50 -06:00
rpr =
pkgs.writeScriptBin "rpr"
2023-09-12 08:44:05 -06:00
(import ../bins/rpr.nix { inherit (pkgs) hut gh tea; });
2023-07-11 09:12:50 -06:00
jobs = [
];
fontSet = with pkgs; [
go-font
#(callPackage ../pkgs/kurinto.nix {})
];
traygentCmds = toJSON [
{
command_path = "${pkgs.ksshaskpass}/bin/ksshaskpass";
#command_path = "${pkgs.ssh-askpass-fullscreen}/bin/ssh-askpass-fullscreen";
event = "sign";
msg_format = "Allow access to key %q?";
exit_code = 0;
}
{
command_path = "${pkgs.kdialog}/bin/kdialog";
command_args = [ "--title" "traygent" "--passivepopup" "SSH Key Added" "5" ];
event = "added";
}
{
command_path = "${pkgs.kdialog}/bin/kdialog";
command_args = [ "--title" "traygent" "--passivepopup" "SSH Key Removed" "5" ];
event = "removed";
}
];
2023-07-11 09:12:50 -06:00
in
2023-09-12 08:44:05 -06:00
with lib; {
2023-12-08 06:44:22 -07:00
imports = [ ./gnome.nix ./kde.nix ./xfce.nix ];
2022-08-25 12:21:35 -06:00
2023-09-12 08:44:05 -06:00
options = {
pulse = {
enable = mkOption {
description = "Enable PulseAudio";
default = false;
example = true;
type = types.bool;
2022-08-25 12:21:35 -06:00
};
2023-09-12 08:44:05 -06:00
};
pipewire = {
enable = mkOption {
description = "Enable PipeWire";
default = true;
example = true;
type = types.bool;
2022-08-25 12:21:35 -06:00
};
};
2023-09-12 08:44:05 -06:00
};
2022-08-25 12:21:35 -06:00
2023-09-12 08:44:05 -06:00
config = mkMerge [
(mkIf (config.kde.enable || config.gnome.enable || config.xfce.enable) {
services = {
xserver.enable = true;
lock-action.enable = true;
2023-09-12 08:44:05 -06:00
pcscd.enable = true;
};
2023-09-12 08:44:05 -06:00
documentation.enable = true;
2023-09-12 08:44:05 -06:00
# TODO: TEMP FIX
systemd.services.NetworkManager-wait-online.serviceConfig.ExecStart =
lib.mkForce [ "" "${pkgs.networkmanager}/bin/nm-online -q" ];
2024-07-02 06:12:18 -06:00
fonts = {
packages = fontSet;
};
2023-09-12 08:44:05 -06:00
sound.enable = true;
environment = {
etc."traygent.json" = { text = traygentCmds; };
sessionVariables = {
SSH_AUTH_SOCK = "$HOME/.traygent";
OLLAMA_HOST = "https://ollama.otter-alligator.ts.net";
};
systemPackages = with pkgs; (xinlib.filterList [
2024-01-19 08:24:34 -07:00
alacritty
bc
2024-01-03 13:00:36 -07:00
beyt
black
2024-05-22 19:46:13 -06:00
drawterm-wayland
exiftool
go-font
govulncheck
keepassxc
pcsctools
plan9port
rage
rpr
traygent
vlc
zeal
myEmacs
(callPackage ../configs/helix.nix { })
]);
};
2024-07-02 06:11:44 -06:00
programs = {
ladybird.enable = true;
} // firefox.programs;
2023-09-12 08:44:05 -06:00
systemd.user.services =
2024-04-04 09:29:49 -06:00
lib.listToAttrs (builtins.map xinlib.jobToUserService jobs);
2023-09-12 08:44:05 -06:00
security.rtkit.enable = true;
})
(mkIf config.pipewire.enable {
services.pipewire = {
enable = true;
pulse.enable = true;
jack.enable = true;
alsa.enable = true;
};
})
];
}