2023-02-06 13:25:57 -07:00
|
|
|
{ config, lib, pkgs, xinlib, ... }:
|
2022-10-13 21:32:47 -06:00
|
|
|
let
|
|
|
|
rage = pkgs.writeScriptBin "rage" (import ../bins/rage.nix { inherit pkgs; });
|
2023-01-11 10:08:57 -07:00
|
|
|
rpr = pkgs.writeScriptBin "rpr" (import ../bins/rpr.nix {
|
|
|
|
inherit (pkgs) _1password;
|
|
|
|
inherit (pkgs) gh;
|
|
|
|
inherit (pkgs) tea;
|
|
|
|
});
|
2023-02-06 13:25:57 -07:00
|
|
|
promnesia = pkgs.callPackage ../pkgs/promnesia.nix {
|
|
|
|
inherit pkgs;
|
2023-02-07 06:15:12 -07:00
|
|
|
inherit (pkgs) sqlcipher;
|
2023-02-06 13:25:57 -07:00
|
|
|
inherit (pkgs.python39Packages) buildPythonPackage fetchPypi;
|
|
|
|
inherit (pkgs.python39Packages) pdm-pep517 setuptools setuptools-scm;
|
|
|
|
inherit (pkgs.python39Packages)
|
|
|
|
appdirs tzlocal more-itertools pytz sqlalchemy urlextract fastapi uvicorn
|
2023-02-07 09:07:55 -07:00
|
|
|
websockets uvloop httptools watchfiles decorator beautifulsoup4 mypy
|
|
|
|
pandas orjson pytest;
|
2023-02-06 13:25:57 -07:00
|
|
|
inherit (pkgs.python39Packages) lxml mistletoe logzero;
|
|
|
|
};
|
|
|
|
promnesiaService = {
|
|
|
|
promnesia = {
|
|
|
|
description = "Service for promnesia.server";
|
2023-02-08 07:45:29 -07:00
|
|
|
after = [ "graphical-session.target" ];
|
2023-02-06 13:25:57 -07:00
|
|
|
script = ''
|
|
|
|
${promnesia}/bin/promnesia serve
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
jobs = [{
|
|
|
|
name = "promnesia-index";
|
|
|
|
script = "${promnesia}/bin/promnesia index";
|
2023-02-08 06:27:59 -07:00
|
|
|
startAt = "*:0/5";
|
2023-02-06 13:25:57 -07:00
|
|
|
path = [ promnesia ];
|
|
|
|
}];
|
2022-10-13 21:32:47 -06:00
|
|
|
in with lib; {
|
2022-08-25 12:21:35 -06:00
|
|
|
imports = [ ./gnome.nix ./kde.nix ./xfce.nix ./arcan.nix ];
|
|
|
|
|
|
|
|
options = {
|
|
|
|
pulse = {
|
|
|
|
enable = mkOption {
|
|
|
|
description = "Enable PulseAudio";
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
type = types.bool;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
pipewire = {
|
|
|
|
enable = mkOption {
|
|
|
|
description = "Enable PipeWire";
|
|
|
|
default = true;
|
|
|
|
example = true;
|
|
|
|
type = types.bool;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkMerge [
|
|
|
|
(mkIf config.arcan.enable {
|
|
|
|
sound.enable = true;
|
|
|
|
services = { xserver.enable = false; };
|
|
|
|
environment.systemPackages = with pkgs; [ brave go-font vlc pcsctools ];
|
|
|
|
})
|
|
|
|
(mkIf (config.kde.enable || config.gnome.enable || config.xfce.enable) {
|
|
|
|
|
|
|
|
services = {
|
|
|
|
xserver.enable = true;
|
|
|
|
pcscd.enable = true;
|
|
|
|
};
|
|
|
|
|
2023-01-05 16:27:19 -07:00
|
|
|
fonts.fonts = with pkgs; [
|
|
|
|
go-font
|
|
|
|
(callPackage ../pkgs/kurinto.nix { })
|
|
|
|
];
|
|
|
|
|
2022-08-25 12:21:35 -06:00
|
|
|
# TODO: TEMP FIX
|
|
|
|
systemd.services.NetworkManager-wait-online.serviceConfig.ExecStart =
|
|
|
|
lib.mkForce [ "" "${pkgs.networkmanager}/bin/nm-online -q" ];
|
|
|
|
|
|
|
|
sound.enable = true;
|
|
|
|
security.rtkit.enable = true;
|
2023-01-30 06:13:41 -07:00
|
|
|
|
2023-01-30 10:52:06 -07:00
|
|
|
# https://github.com/NixOS/nixpkgs/pull/213593
|
2023-01-30 06:13:41 -07:00
|
|
|
nixpkgs.config.permittedInsecurePackages = [
|
|
|
|
"electron-18.1.0" # obsidian
|
|
|
|
];
|
|
|
|
|
2023-02-06 13:25:57 -07:00
|
|
|
systemd.user.services =
|
|
|
|
(lib.listToAttrs (builtins.map xinlib.jobToService jobs))
|
|
|
|
// promnesiaService;
|
|
|
|
|
2023-01-20 12:38:24 -07:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
brave
|
|
|
|
vlc
|
|
|
|
pcsctools
|
|
|
|
rage
|
|
|
|
rpr
|
|
|
|
(callPackage ../pkgs/tailscale-systray.nix { })
|
2023-02-06 13:25:57 -07:00
|
|
|
promnesia
|
2023-02-07 09:07:55 -07:00
|
|
|
black
|
2023-01-20 12:38:24 -07:00
|
|
|
];
|
2022-08-25 12:21:35 -06:00
|
|
|
|
|
|
|
programs = {
|
|
|
|
firejail = {
|
|
|
|
enable = true;
|
|
|
|
wrappedBinaries = {
|
2022-09-09 07:03:56 -06:00
|
|
|
#firefox = {
|
|
|
|
# executable = "${lib.getBin pkgs.firefox}/bin/firefox";
|
|
|
|
# profile = "${pkgs.firejail}/etc/firejail/firefox.profile";
|
|
|
|
#};
|
2022-08-25 12:21:35 -06:00
|
|
|
#brave = {
|
|
|
|
# executable = "${lib.getBin pkgs.brave}/bin/brave";
|
|
|
|
# profile = "${pkgs.firejail}/etc/firejail/brave.profile";
|
|
|
|
#};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
})
|
|
|
|
(mkIf config.pulse.enable { hardware.pulseaudio = { enable = true; }; })
|
|
|
|
(mkIf config.pipewire.enable {
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
jack.enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|