2023-09-12 08:44:05 -06:00
|
|
|
{ config
|
|
|
|
, lib
|
|
|
|
, pkgs
|
|
|
|
, xinlib
|
2023-11-22 09:31:57 -07:00
|
|
|
, inputs
|
2023-09-12 08:44:05 -06:00
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
let
|
2023-11-22 09:31:57 -07:00
|
|
|
inherit (builtins) toJSON;
|
|
|
|
inherit (inputs.traygent.packages.${pkgs.system}) traygent;
|
2024-10-29 13:23:04 -06:00
|
|
|
inherit (inputs.fynado.packages.${pkgs.system}) fynado;
|
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; });
|
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; });
|
2024-08-29 07:34:55 -06:00
|
|
|
promnesia =
|
|
|
|
pkgs.python3Packages.callPackage ../pkgs/promnesia.nix { inherit pkgs; };
|
|
|
|
hpi = pkgs.python3Packages.callPackage ../pkgs/hpi.nix { inherit pkgs; };
|
|
|
|
promnesiaService = {
|
|
|
|
promnesia = {
|
|
|
|
description = "Service for promnesia.server";
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
|
|
|
partOf = [ "graphical-session.target" ];
|
|
|
|
after = [ "graphical-session.target" ];
|
|
|
|
script = ''
|
|
|
|
${promnesia}/bin/promnesia serve
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2023-07-11 09:12:50 -06:00
|
|
|
jobs = [
|
2024-08-29 07:34:55 -06:00
|
|
|
{
|
|
|
|
name = "promnesia-index";
|
|
|
|
script = "${promnesia}/bin/promnesia index";
|
|
|
|
startAt = "*:0/5";
|
|
|
|
path = [ promnesia hpi ];
|
|
|
|
}
|
2023-07-11 09:12:50 -06:00
|
|
|
];
|
2023-10-11 07:37:34 -06:00
|
|
|
fontSet = with pkgs; [
|
|
|
|
go-font
|
|
|
|
#(callPackage ../pkgs/kurinto.nix {})
|
|
|
|
];
|
2023-11-22 09:31:57 -07:00
|
|
|
traygentCmds = toJSON [
|
|
|
|
{
|
2024-10-22 10:13:04 -06:00
|
|
|
command_path = "${pkgs.kdePackages.ksshaskpass}/bin/ksshaskpass";
|
2024-05-09 09:22:07 -06:00
|
|
|
#command_path = "${pkgs.ssh-askpass-fullscreen}/bin/ssh-askpass-fullscreen";
|
2023-11-22 09:31:57 -07:00
|
|
|
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 = {
|
2024-06-30 17:26:58 -06:00
|
|
|
xserver.enable = true;
|
2024-06-26 12:03:51 -06:00
|
|
|
lock-action.enable = true;
|
2023-09-12 08:44:05 -06:00
|
|
|
pcscd.enable = true;
|
|
|
|
};
|
2023-05-20 13:05:58 -06:00
|
|
|
|
2023-09-12 08:44:05 -06:00
|
|
|
documentation.enable = true;
|
2023-08-30 08:00:34 -06:00
|
|
|
|
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-11-22 09:31:57 -07:00
|
|
|
environment = {
|
|
|
|
etc."traygent.json" = { text = traygentCmds; };
|
|
|
|
sessionVariables = {
|
|
|
|
SSH_AUTH_SOCK = "$HOME/.traygent";
|
2024-06-28 08:37:31 -06:00
|
|
|
OLLAMA_HOST = "https://ollama.otter-alligator.ts.net";
|
2023-11-22 09:31:57 -07:00
|
|
|
};
|
|
|
|
systemPackages = with pkgs; (xinlib.filterList [
|
|
|
|
bc
|
2024-01-03 13:00:36 -07:00
|
|
|
beyt
|
2023-11-22 09:31:57 -07:00
|
|
|
black
|
2024-05-22 19:46:13 -06:00
|
|
|
drawterm-wayland
|
2023-11-22 09:31:57 -07:00
|
|
|
exiftool
|
|
|
|
go-font
|
|
|
|
govulncheck
|
2024-08-29 07:34:55 -06:00
|
|
|
hpi
|
2024-04-02 07:46:19 -06:00
|
|
|
keepassxc
|
2024-07-17 07:03:37 -06:00
|
|
|
mpv
|
2023-11-22 09:31:57 -07:00
|
|
|
pcsctools
|
|
|
|
plan9port
|
2024-08-29 07:34:55 -06:00
|
|
|
promnesia
|
2023-11-22 09:31:57 -07:00
|
|
|
rage
|
2024-09-16 13:42:49 -06:00
|
|
|
recoll
|
2023-11-22 09:31:57 -07:00
|
|
|
rpr
|
|
|
|
traygent
|
2024-10-29 13:23:04 -06:00
|
|
|
fynado
|
2024-09-16 13:42:49 -06:00
|
|
|
trayscale
|
2023-11-22 09:31:57 -07:00
|
|
|
vlc
|
|
|
|
zeal
|
|
|
|
]);
|
|
|
|
};
|
2023-05-20 13:05:58 -06:00
|
|
|
|
2024-07-02 06:11:44 -06:00
|
|
|
programs = {
|
2024-10-22 09:41:58 -06:00
|
|
|
ladybird.enable = false;
|
2024-07-02 06:11:44 -06:00
|
|
|
} // firefox.programs;
|
2023-05-20 18:31:25 -06:00
|
|
|
|
2023-09-12 08:44:05 -06:00
|
|
|
systemd.user.services =
|
2024-08-29 07:34:55 -06:00
|
|
|
(lib.listToAttrs (builtins.map xinlib.jobToUserService jobs))
|
|
|
|
// promnesiaService;
|
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;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|