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-05-17 08:13:45 -06:00
|
|
|
rpr = pkgs.writeScriptBin "rpr"
|
2023-05-19 06:14:41 -06:00
|
|
|
(import ../bins/rpr.nix { inherit (pkgs) hut gh tea; });
|
2023-02-08 13:39:41 -07:00
|
|
|
promnesia =
|
|
|
|
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-02-13 10:38:00 -07: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
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
jobs = [{
|
|
|
|
name = "promnesia-index";
|
|
|
|
script = "${promnesia}/bin/promnesia index";
|
2023-02-08 06:27:59 -07:00
|
|
|
startAt = "*:0/5";
|
2023-02-08 13:39:41 -07:00
|
|
|
path = [ promnesia hpi ];
|
2023-02-06 13:25:57 -07:00
|
|
|
}];
|
2023-05-20 12:11:35 -06:00
|
|
|
commonConfigs = {
|
|
|
|
fonts.fonts = with pkgs; [ go-font (callPackage ../pkgs/kurinto.nix { }) ];
|
|
|
|
sound.enable = true;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
bc
|
|
|
|
black
|
|
|
|
brave
|
|
|
|
drawterm
|
|
|
|
go-font
|
|
|
|
hpi
|
|
|
|
pcsctools
|
|
|
|
promnesia
|
|
|
|
rage
|
|
|
|
rpr
|
|
|
|
vlc
|
|
|
|
zeal
|
|
|
|
|
|
|
|
(callPackage ../pkgs/tailscale-systray.nix { })
|
|
|
|
(callPackage ../pkgs/govulncheck.nix { })
|
|
|
|
(callPackage ../configs/helix.nix { })
|
|
|
|
];
|
|
|
|
|
|
|
|
systemd.user.services =
|
|
|
|
(lib.listToAttrs (builtins.map xinlib.jobToUserService jobs))
|
|
|
|
// promnesiaService;
|
|
|
|
|
|
|
|
programs = {
|
|
|
|
firefox = {
|
|
|
|
enable = true;
|
|
|
|
preferences = {
|
|
|
|
# TODO: confirm no issues
|
|
|
|
"dom.allow_cut_copy" = false;
|
|
|
|
"dom.event.clipboardevents.enabled" = false;
|
|
|
|
"media.peerconnection.enabled" = false;
|
|
|
|
|
|
|
|
"beacon.enabled" = false;
|
|
|
|
"browser.aboutConfig.showWarning" = false;
|
|
|
|
"browser.contentblocking.category" = "strict";
|
|
|
|
"browser.newtabpage.activity-stream.feeds.recommendationprovider" =
|
|
|
|
false;
|
|
|
|
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
|
|
|
|
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" =
|
|
|
|
false;
|
|
|
|
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" =
|
|
|
|
false;
|
|
|
|
"browser.newtabpage.activity-stream.section.highlights.includePocket" =
|
|
|
|
false;
|
|
|
|
"browser.newtabpage.activity-stream.section.highlights.includeVisited" =
|
|
|
|
false;
|
|
|
|
"browser.newtabpage.activity-stream.showSearch" = false;
|
|
|
|
"browser.newtabpage.activity-stream.showSponsored" = false;
|
|
|
|
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
|
|
|
"browser.newtabpage.activity-stream.telemetry" = false;
|
|
|
|
"browser.newtabpage.activity-stream.telemetry.structuredIngestion.endpoint" =
|
|
|
|
"http://127.0.0.1/null";
|
|
|
|
"browser.newtabpage.enabled" = false;
|
|
|
|
"browser.newtabpage.pinned" = false;
|
|
|
|
"browser.search.suggest.enabled" = false;
|
|
|
|
"browser.search.update" = false;
|
|
|
|
"browser.topsites.contile.enabled" = false;
|
|
|
|
"browser.urlbar.suggest.quicksuggest.nonsponsored" = false;
|
|
|
|
"browser.urlbar.suggest.quicksuggest.sponsored" = false;
|
|
|
|
"browser.urlbar.suggest.searches" = false;
|
|
|
|
"browser.urlbar.trimURLs" = false;
|
|
|
|
"datareporting.healthreport.uploadEnabled" = false;
|
|
|
|
"devtools.cache.disabled" = true;
|
|
|
|
"extensions.pocket.enabled" = false;
|
|
|
|
"geo.enabled" = false;
|
|
|
|
"geo.provider.network.url" = "";
|
|
|
|
"geo.provider.use_geoclue" = false;
|
|
|
|
"network.dns.disablePrefetch" = true;
|
|
|
|
"network.http.speculative-parallel-limit" = 0;
|
|
|
|
"network.IDN_show_punycode" = true;
|
|
|
|
"network.predictor.enabled" = false;
|
|
|
|
"network.prefetch-next" = false;
|
|
|
|
"privacy.resistFingerprinting" = true;
|
|
|
|
"security.OCSP.enabled" = false;
|
|
|
|
"services.sync.prefs.sync-seen.browser.newtabpage.activity-stream.section.highlights.includePocket" =
|
|
|
|
false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services = { pcscd.enable = true; };
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
};
|
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 [
|
2023-05-20 12:11:35 -06:00
|
|
|
(mkIf config.arcan.enable { services = { xserver.enable = false; }; }
|
|
|
|
// commonConfigs)
|
2022-08-25 12:21:35 -06:00
|
|
|
(mkIf (config.kde.enable || config.gnome.enable || config.xfce.enable) {
|
2023-05-20 12:11:35 -06:00
|
|
|
services = { xserver.enable = true; };
|
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" ];
|
2023-05-20 12:11:35 -06:00
|
|
|
} // commonConfigs)
|
2022-08-25 12:21:35 -06:00
|
|
|
(mkIf config.pipewire.enable {
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
jack.enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|