2023-07-11 09:12:50 -06:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
xinlib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
firefox = import ../configs/firefox.nix {inherit pkgs;};
|
|
|
|
rage = pkgs.writeScriptBin "rage" (import ../bins/rage.nix {inherit pkgs;});
|
|
|
|
rpr =
|
|
|
|
pkgs.writeScriptBin "rpr"
|
|
|
|
(import ../bins/rpr.nix {inherit (pkgs) hut gh tea;});
|
2023-02-08 13:39:41 -07:00
|
|
|
promnesia =
|
2023-07-11 09:12:50 -06:00
|
|
|
pkgs.python3Packages.callPackage ../pkgs/promnesia.nix {inherit pkgs;};
|
|
|
|
hpi = pkgs.python3Packages.callPackage ../pkgs/hpi.nix {inherit pkgs;};
|
2023-02-06 13:25:57 -07:00
|
|
|
promnesiaService = {
|
|
|
|
promnesia = {
|
|
|
|
description = "Service for promnesia.server";
|
2023-07-11 09:12:50 -06:00
|
|
|
wantedBy = ["graphical-session.target"];
|
|
|
|
partOf = ["graphical-session.target"];
|
|
|
|
after = ["graphical-session.target"];
|
2023-02-06 13:25:57 -07:00
|
|
|
script = ''
|
|
|
|
${promnesia}/bin/promnesia serve
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2023-07-11 09:12:50 -06:00
|
|
|
jobs = [
|
|
|
|
{
|
|
|
|
name = "promnesia-index";
|
|
|
|
script = "${promnesia}/bin/promnesia index";
|
|
|
|
startAt = "*:0/5";
|
|
|
|
path = [promnesia hpi];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
in
|
|
|
|
with lib; {
|
|
|
|
imports = [./gnome.nix ./kde.nix ./xfce.nix ./arcan.nix];
|
2022-08-25 12:21:35 -06:00
|
|
|
|
2023-07-11 09:12:50 -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-07-11 09:12:50 -06:00
|
|
|
pipewire = {
|
|
|
|
enable = mkOption {
|
|
|
|
description = "Enable PipeWire";
|
|
|
|
default = true;
|
|
|
|
example = true;
|
|
|
|
type = types.bool;
|
|
|
|
};
|
2022-08-25 12:21:35 -06:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-07-11 09:12:50 -06:00
|
|
|
config = mkMerge [
|
|
|
|
(mkIf (config.kde.enable || config.gnome.enable || config.xfce.enable) {
|
|
|
|
services = {
|
|
|
|
xserver.enable = true;
|
|
|
|
pcscd.enable = true;
|
|
|
|
};
|
2023-05-20 13:05:58 -06:00
|
|
|
|
2023-07-11 09:12:50 -06:00
|
|
|
# TODO: TEMP FIX
|
|
|
|
systemd.services.NetworkManager-wait-online.serviceConfig.ExecStart =
|
|
|
|
lib.mkForce ["" "${pkgs.networkmanager}/bin/nm-online -q"];
|
|
|
|
fonts.fonts = with pkgs; [
|
|
|
|
go-font
|
|
|
|
(callPackage ../pkgs/kurinto.nix {})
|
|
|
|
];
|
|
|
|
sound.enable = true;
|
|
|
|
environment.systemPackages = with pkgs; (xinlib.filterList [
|
2023-06-16 06:22:18 -06:00
|
|
|
arcanPackages.all-wrapped
|
2023-06-02 13:53:27 -06:00
|
|
|
bc
|
|
|
|
black
|
|
|
|
brave
|
|
|
|
drawterm
|
|
|
|
go-font
|
2023-07-10 06:29:38 -06:00
|
|
|
govulncheck
|
2023-06-02 13:53:27 -06:00
|
|
|
hpi
|
|
|
|
pcsctools
|
|
|
|
promnesia
|
|
|
|
rage
|
|
|
|
rpr
|
|
|
|
vlc
|
|
|
|
zeal
|
2023-05-20 13:05:58 -06:00
|
|
|
|
2023-07-11 09:12:50 -06:00
|
|
|
(callPackage ../configs/helix.nix {})
|
2023-06-02 13:53:27 -06:00
|
|
|
]);
|
2023-05-20 13:05:58 -06:00
|
|
|
|
2023-07-11 09:12:50 -06:00
|
|
|
programs = {} // firefox.programs;
|
2023-05-20 18:31:25 -06:00
|
|
|
|
2023-07-11 09:12:50 -06:00
|
|
|
systemd.user.services =
|
|
|
|
(lib.listToAttrs (builtins.map xinlib.jobToUserService jobs))
|
|
|
|
// promnesiaService;
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
})
|
|
|
|
(mkIf config.pipewire.enable {
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
jack.enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|