added stuff

This commit is contained in:
Charlie Root 2024-04-09 23:11:33 +02:00
commit 9d0ebdfbd0
907 changed files with 70990 additions and 0 deletions

View file

@ -0,0 +1,14 @@
{
imports = [
./dunst
./media
./kdeconnect.nix
./mail.nix
./nextcloud.nix
./polkit.nix
./transience.nix
./tray.nix
./udiskie.nix
];
}

View file

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#95AEC7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="4"></circle>
<path d="M12 2v2"></path>
<path d="M12 20v2"></path>
<path d="m4.93 4.93 1.41 1.41"></path>
<path d="m17.66 17.66 1.41 1.41"></path>
<path d="M2 12h2"></path>
<path d="M20 12h2"></path>
<path d="m6.34 17.66-1.41 1.41"></path>
<path d="m19.07 4.93-1.41 1.41"></path>
</svg>

After

Width:  |  Height:  |  Size: 508 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#95AEC7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-mic-off"><line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>

After

Width:  |  Height:  |  Size: 489 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#95AEC7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-mic"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>

After

Width:  |  Height:  |  Size: 413 B

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="192"
height="192"
fill="#616e88"
viewBox="0 0 256 256"
version="1.1"
id="svg891"
sodipodi:docname="notification.svg"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs895" />
<sodipodi:namedview
id="namedview893"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="1.4375"
inkscape:cx="95.652174"
inkscape:cy="75.826087"
inkscape:window-width="1366"
inkscape:window-height="728"
inkscape:window-x="0"
inkscape:window-y="40"
inkscape:window-maximized="1"
inkscape:current-layer="svg891" />
<g
id="g979"
transform="matrix(0.66642001,0,0,0.66847835,45.341226,50.623186)">
<path
d="m 208,128 v 80 a 8,8 0 0 1 -8,8 H 48 a 8,8 0 0 1 -8,-8 V 56 a 8,8 0 0 1 8,-8 h 80"
fill="none"
stroke="#616e88"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="16"
id="path887" />
<circle
cx="196"
cy="60"
r="28"
fill="none"
stroke="#616e88"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="16"
id="circle889" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#95AEC7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-volume-x"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><line x1="23" y1="9" x2="17" y2="15"></line><line x1="17" y1="9" x2="23" y2="15"></line></svg>

After

Width:  |  Height:  |  Size: 365 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#95AEC7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-volume-2"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>

After

Width:  |  Height:  |  Size: 354 B

View file

@ -0,0 +1,100 @@
{
osConfig,
config,
lib,
...
}: let
inherit (lib) mkIf;
inherit (osConfig) modules;
inherit (modules.style.colorScheme) colors;
dev = modules.device;
acceptedTypes = ["desktop" "laptop" "lite" "hybrid"];
in {
config = mkIf (builtins.elem dev.type acceptedTypes) {
services.dunst = {
enable = true;
iconTheme = {
package = config.gtk.iconTheme.package;
name = "Papirus-Dark";
};
settings = {
global = {
follow = "mouse";
width = 320;
height = 280;
origin = "top-center";
alignment = "left";
vertical_alignment = "center";
ellipsize = "middle";
offset = "17x17";
padding = 15;
horizontal_padding = 15;
text_icon_padding = 15;
icon_position = "left";
min_icon_size = 48;
max_icon_size = 64;
progress_bar = true;
progress_bar_height = 8;
progress_bar_frame_width = 1;
progress_bar_min_width = 150;
progress_bar_max_width = 300;
separator_height = 2;
frame_width = 2;
frame_color = "#${colors.base0E}";
separator_color = "frame";
corner_radius = 8;
transparency = 0;
gap_size = 8;
line_height = 0;
notification_limit = 3;
idle_threshold = 120;
history_length = 20;
show_age_threshold = 60;
markup = "full";
font = "Iosevka 16";
word_wrap = "yes";
sort = "yes";
shrink = "no";
indicate_hidden = "yes";
sticky_history = "yes";
ignore_newline = "no";
show_indicators = "no";
stack_duplicates = true;
always_run_script = true;
hide_duplicate_count = false;
ignore_dbusclose = false;
force_xwayland = false;
force_xinerama = false;
mouse_left_click = "do_action";
mouse_middle_click = "close_all";
mouse_right_click = "close_current";
};
fullscreen_delay_everything = {fullscreen = "delay";};
urgency_low = {
timeout = 3;
background = "#${colors.base02}";
foreground = "#${colors.base05}";
highlight = "#${colors.base0C}";
};
urgency_normal = {
timeout = 7;
background = "#${colors.base02}";
foreground = "#${colors.base05}";
highlight = "#${colors.base0C}";
};
urgency_critical = {
timeout = 0;
background = "#${colors.base02}";
foreground = "#${colors.base05}";
highlight = "#${colors.base08}";
};
};
};
};
}

View file

@ -0,0 +1,6 @@
{
services.kdeconnect = {
enable = false;
indicator = true;
};
}

View file

@ -0,0 +1,117 @@
{
osConfig,
config,
pkgs,
...
}: {
config = let
extraMailboxes = ["Archive" "Drafts" "Junk" "Sent" "Trash"];
in {
accounts.email = {
maildirBasePath = config.xdg.userDirs.extraConfig.XDG_MAIL_DIR;
accounts = {
notashelf = let
gpgKey = "0xBA46BCC36E912922";
name = "NotAShelf";
in {
primary = true;
address = "raf@notashelf.dev";
aliases = ["me@notashelf.dev"];
userName = "raf@notashelf.dev";
realName = name; # very real, I know
passwordCommand = ''
# this is a really bad way of getting the password
# but home-manager does not provide a passwordFile option
tail ${osConfig.age.secrets.client-email.path} -n 1
'';
signature = {
showSignature = "append";
text = ''
--
${name}
Want to use GPG encryption with me? Try my GPG key:
[${gpgKey}](https://github.com/notashelf.gpg)
'';
};
folders = {
inbox = "Inbox";
drafts = "Drafts";
sent = "Sent";
trash = "Trash";
};
imap = {
host = "notashelf.dev";
tls.enable = true;
};
smtp = {
host = "notashelf.dev";
tls.enable = true;
};
gpg = {
key = gpgKey;
signByDefault = true;
};
msmtp.enable = true;
mbsync = {
enable = true;
create = "maildir"; # funny as it is, this is not a path - it's an instruction
expunge = "both";
};
neomutt = {
enable = true;
inherit extraMailboxes;
};
};
};
};
systemd.user = {
timers."mbsync" = {
Unit.Description = "Automatic mbsync synchronization";
Timer = {
OnBootSec = "30";
OnUnitActiveSec = "5m";
};
Install.WantedBy = ["timers.target"];
};
services."genFolders" = {
Unit.Description = "Generate folders for email accounts";
Install.WantedBy = ["multi-user.target"];
Service = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = let
script = pkgs.writeShellApplication {
name = "genFolders";
text = ''
# move to the current user's home directory
# FIXME: pretty sure this can also be set as the service's runtime dir
cd "${config.home.homeDirectory}/Mail"
# iterate over dirs and create those that do not exist
for dir in ${toString extraMailboxes}; do
if [ ! -d "$dir" ]; then
echo -en "$dir does not exist, creating...\n";
mkdir "$dir"
echo "Done creating $dir"
fi
done
'';
};
in "${script}/bin/genFolders";
# set runtime dir to the current user's home directory
};
};
};
};
}

View file

@ -0,0 +1,9 @@
{
imports = [
./easyeffects
./mpd
./noisetorch.nix
./spotifyd.nix
];
}

View file

@ -0,0 +1,19 @@
{
osConfig,
lib,
...
}: let
inherit (lib.modules) mkIf;
dev = osConfig.modules.device;
acceptedTypes = ["desktop" "laptop" "lite" "hybrid"];
in {
config = mkIf (builtins.elem dev.type acceptedTypes) {
services.easyeffects = {
enable = true;
preset = "quiet";
};
xdg.configFile."easyeffects/output/quiet.json".source = ./quiet.json;
};
}

View file

@ -0,0 +1,258 @@
{
"output": {
"blocklist": ["mpd", "mpd.pipewire"],
"compressor#0": {
"attack": 19.969999999999995,
"boost-amount": 6.0,
"boost-threshold": -72.0,
"bypass": false,
"dry": -100.0,
"hpf-frequency": 10.0,
"hpf-mode": "off",
"input-gain": 14.9,
"knee": -6.499999999999998,
"lpf-frequency": 20000.0,
"lpf-mode": "off",
"makeup": 0.0,
"mode": "Upward",
"output-gain": -8.3,
"ratio": 3.9400000000000013,
"release": 100.0,
"release-threshold": -100.0,
"sidechain": {
"lookahead": 0.0,
"mode": "RMS",
"preamp": 0.0,
"reactivity": 10.0,
"source": "Middle",
"type": "Feed-forward"
},
"threshold": -12.0,
"wet": 0.0
},
"multiband_compressor#0": {
"band0": {
"attack-threshold": -12.0,
"attack-time": 20.0,
"boost-amount": 6.0,
"boost-threshold": -72.0,
"compression-mode": "Downward",
"compressor-enable": true,
"external-sidechain": false,
"knee": -6.0,
"makeup": 0.0,
"mute": false,
"ratio": 1.0,
"release-threshold": -100.0,
"release-time": 100.0,
"sidechain-custom-highcut-filter": false,
"sidechain-custom-lowcut-filter": false,
"sidechain-highcut-frequency": 500.0,
"sidechain-lookahead": 0.0,
"sidechain-lowcut-frequency": 10.0,
"sidechain-mode": "RMS",
"sidechain-preamp": 0.0,
"sidechain-reactivity": 10.0,
"sidechain-source": "Middle",
"solo": false
},
"band1": {
"attack-threshold": -12.0,
"attack-time": 20.0,
"boost-amount": 6.0,
"boost-threshold": -72.0,
"compression-mode": "Downward",
"compressor-enable": true,
"enable-band": true,
"external-sidechain": false,
"knee": -6.0,
"makeup": 0.0,
"mute": false,
"ratio": 1.0,
"release-threshold": -100.0,
"release-time": 100.0,
"sidechain-custom-highcut-filter": false,
"sidechain-custom-lowcut-filter": false,
"sidechain-highcut-frequency": 1000.0,
"sidechain-lookahead": 0.0,
"sidechain-lowcut-frequency": 500.0,
"sidechain-mode": "RMS",
"sidechain-preamp": 0.0,
"sidechain-reactivity": 10.0,
"sidechain-source": "Middle",
"solo": false,
"split-frequency": 500.0
},
"band2": {
"attack-threshold": -12.0,
"attack-time": 20.0,
"boost-amount": 6.0,
"boost-threshold": -72.0,
"compression-mode": "Downward",
"compressor-enable": true,
"enable-band": true,
"external-sidechain": false,
"knee": -6.0,
"makeup": 0.0,
"mute": false,
"ratio": 1.0,
"release-threshold": -100.0,
"release-time": 100.0,
"sidechain-custom-highcut-filter": false,
"sidechain-custom-lowcut-filter": false,
"sidechain-highcut-frequency": 2000.0,
"sidechain-lookahead": 0.0,
"sidechain-lowcut-frequency": 1000.0,
"sidechain-mode": "RMS",
"sidechain-preamp": 0.0,
"sidechain-reactivity": 10.0,
"sidechain-source": "Middle",
"solo": false,
"split-frequency": 1000.0
},
"band3": {
"attack-threshold": -12.0,
"attack-time": 20.0,
"boost-amount": 6.0,
"boost-threshold": -72.0,
"compression-mode": "Downward",
"compressor-enable": true,
"enable-band": true,
"external-sidechain": false,
"knee": -6.0,
"makeup": 0.0,
"mute": false,
"ratio": 1.0,
"release-threshold": -100.0,
"release-time": 100.0,
"sidechain-custom-highcut-filter": false,
"sidechain-custom-lowcut-filter": false,
"sidechain-highcut-frequency": 4000.0,
"sidechain-lookahead": 0.0,
"sidechain-lowcut-frequency": 2000.0,
"sidechain-mode": "RMS",
"sidechain-preamp": 0.0,
"sidechain-reactivity": 10.0,
"sidechain-source": "Middle",
"solo": false,
"split-frequency": 2000.0
},
"band4": {
"attack-threshold": -12.0,
"attack-time": 20.0,
"boost-amount": 6.0,
"boost-threshold": -72.0,
"compression-mode": "Downward",
"compressor-enable": true,
"enable-band": false,
"external-sidechain": false,
"knee": -6.0,
"makeup": 0.0,
"mute": false,
"ratio": 1.0,
"release-threshold": -100.0,
"release-time": 100.0,
"sidechain-custom-highcut-filter": false,
"sidechain-custom-lowcut-filter": false,
"sidechain-highcut-frequency": 8000.0,
"sidechain-lookahead": 0.0,
"sidechain-lowcut-frequency": 4000.0,
"sidechain-mode": "RMS",
"sidechain-preamp": 0.0,
"sidechain-reactivity": 10.0,
"sidechain-source": "Middle",
"solo": false,
"split-frequency": 4000.0
},
"band5": {
"attack-threshold": -12.0,
"attack-time": 20.0,
"boost-amount": 6.0,
"boost-threshold": -72.0,
"compression-mode": "Downward",
"compressor-enable": true,
"enable-band": false,
"external-sidechain": false,
"knee": -6.0,
"makeup": 0.0,
"mute": false,
"ratio": 1.0,
"release-threshold": -100.0,
"release-time": 100.0,
"sidechain-custom-highcut-filter": false,
"sidechain-custom-lowcut-filter": false,
"sidechain-highcut-frequency": 12000.0,
"sidechain-lookahead": 0.0,
"sidechain-lowcut-frequency": 8000.0,
"sidechain-mode": "RMS",
"sidechain-preamp": 0.0,
"sidechain-reactivity": 10.0,
"sidechain-source": "Middle",
"solo": false,
"split-frequency": 8000.0
},
"band6": {
"attack-threshold": -12.0,
"attack-time": 20.0,
"boost-amount": 6.0,
"boost-threshold": -72.0,
"compression-mode": "Downward",
"compressor-enable": true,
"enable-band": false,
"external-sidechain": false,
"knee": -6.0,
"makeup": 0.0,
"mute": false,
"ratio": 1.0,
"release-threshold": -100.0,
"release-time": 100.0,
"sidechain-custom-highcut-filter": false,
"sidechain-custom-lowcut-filter": false,
"sidechain-highcut-frequency": 16000.0,
"sidechain-lookahead": 0.0,
"sidechain-lowcut-frequency": 12000.0,
"sidechain-mode": "RMS",
"sidechain-preamp": 0.0,
"sidechain-reactivity": 10.0,
"sidechain-source": "Middle",
"solo": false,
"split-frequency": 12000.0
},
"band7": {
"attack-threshold": -12.0,
"attack-time": 20.0,
"boost-amount": 6.0,
"boost-threshold": -72.0,
"compression-mode": "Downward",
"compressor-enable": true,
"enable-band": false,
"external-sidechain": false,
"knee": -6.0,
"makeup": 0.0,
"mute": false,
"ratio": 1.0,
"release-threshold": -100.0,
"release-time": 100.0,
"sidechain-custom-highcut-filter": false,
"sidechain-custom-lowcut-filter": false,
"sidechain-highcut-frequency": 20000.0,
"sidechain-lookahead": 0.0,
"sidechain-lowcut-frequency": 16000.0,
"sidechain-mode": "RMS",
"sidechain-preamp": 0.0,
"sidechain-reactivity": 10.0,
"sidechain-source": "Middle",
"solo": false,
"split-frequency": 16000.0
},
"bypass": true,
"compressor-mode": "Modern",
"dry": -100.0,
"envelope-boost": "None",
"input-gain": 19.2,
"output-gain": -0.8,
"wet": 0.0
},
"plugins_order": ["multiband_compressor#0", "compressor#0"]
}
}

View file

@ -0,0 +1,111 @@
{
osConfig,
config,
pkgs,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (osConfig) modules;
env = modules.usrEnv;
srv = env.services;
in {
config = mkIf srv.media.mpd.enable {
home.packages = with pkgs; [
playerctl # CLI interface for playerctld
mpc_cli # CLI interface for mpd
cava # CLI music visualizer (cavalier is a gui alternative)
];
services = {
playerctld.enable = true;
mpris-proxy.enable = true;
mpd-mpris.enable = true;
# music player daemon service
mpd = {
enable = true;
musicDirectory = "${config.home.homeDirectory}/Media/Music";
network = {
startWhenNeeded = true;
listenAddress = "127.0.0.1";
port = 6600;
};
extraConfig = ''
auto_update "yes"
volume_normalization "yes"
restore_paused "yes"
filesystem_charset "UTF-8"
audio_output {
type "pipewire"
name "PipeWire"
}
audio_output {
type "fifo"
name "Visualiser"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
audio_output {
type "httpd"
name "lossless"
encoder "flac"
port "8000"
max_clients "8"
mixer_type "software"
format "44100:16:2"
}
'';
};
# MPRIS 2 support to mpd
mpdris2 = {
enable = true;
notifications = true;
multimediaKeys = true;
mpd = {
# for some reason config.xdg.userDirs.music is not a "path" - possibly because it has $HOME in its name?
inherit (config.services.mpd) musicDirectory;
};
};
# discord rich presence for mpd
mpd-discord-rpc = {
enable = true;
settings = {
format = {
details = "$title";
state = "On $album by $artist";
large_text = "$album";
small_image = "";
};
};
};
};
programs = {
/*
# yams service
# TODO: figure out a way to provide the lastfm authentication declaratively
systemd.user.services.yams = {
Unit = {
Description = "Last.FM scrobbler for MPD";
After = ["mpd.service"];
};
Service = {
ExecStart = "${pkgs.yams}/bin/yams -N";
Environment = "NON_INTERACTIVE=1";
Restart = "always";
};
Install.WantedBy = ["default.target"];
};
*/
};
};
}

View file

@ -0,0 +1,64 @@
{
osConfig,
config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption mkOption literalExpression types;
cfg = config.services.noisetorch;
dev = osConfig.modules.device;
acceptedTypes = ["desktop" "laptop" "lite" "hybrid"];
in {
options = {
services.noisetorch = {
enable = mkEnableOption "noisetorch service";
package = mkOption {
type = types.package;
default = pkgs.noisetorch;
defaultText = literalExpression "pkgs.noisetorch";
description = "Which package to use for noisetorch";
};
threshold = mkOption {
type = types.int;
default = -1;
description = "Voice activation threshold (default -1)";
};
device = mkOption {
type = types.str;
description = "Use the specified source/sink device ID";
};
deviceUnit = mkOption {
type = types.str;
description = "Systemd device unit which is providing the audio device";
};
};
};
config = mkIf (cfg.enable && builtins.elem dev.type acceptedTypes) {
home.packages = [cfg.package];
systemd.user.services.noisetorch = {
Unit = {
Description = "Noisetorch Noise Cancelling";
Requires = "${cfg.deviceUnit}";
After = "${cfg.deviceUnit}";
};
Install = {
WantedBy = ["default.target"];
};
Service = {
Type = "simple";
RemainAfterExit = "yes";
ExecStart = "${cfg.package}/bin/noisetorch -i -s ${cfg.device} -t ${builtins.toString cfg.threshold}";
ExecStop = "${cfg.package}/bin/noisetorch -u";
Restart = "on-failure";
RestartSec = 3;
Nice = -10;
};
};
};
}

View file

@ -0,0 +1,38 @@
{
osConfig,
config,
pkgs,
lib,
...
}: let
inherit (lib) mkIf;
dev = osConfig.modules.device;
credientals = {
password_cmd = "${pkgs.coreutils}/bin/tail -1 /run/agenix/spotify";
username_cmd = "${pkgs.coreutils}/bin/head -1 /run/agenix/spotify";
};
acceptedTypes = ["desktop" "laptop" "lite" "hybrid"];
in {
config = mkIf (builtins.elem dev.type acceptedTypes) {
services = {
spotifyd = {
enable = false;
package = pkgs.spotifyd.override {withMpris = true;};
settings.global = {
inherit (credientals) password_cmd username_cmd;
cache_path = "${config.xdg.cacheHome}/spotifyd";
device_type = "computer";
use_mpris = true;
autoplay = true;
# audio settings
volume_normalisation = true;
backend = "pulseaudio";
bitrate = 320;
};
};
};
};
}

View file

@ -0,0 +1,33 @@
{
lib,
osConfig,
pkgs,
...
}: let
inherit (lib) mkIf;
dev = osConfig.modules.device;
vid = osConfig.modules.system.video;
env = osConfig.modules.usrEnv;
acceptedTypes = ["desktop" "laptop" "lite" "hybrid"];
in {
config = mkIf ((builtins.elem dev.type acceptedTypes) && (vid.enable && env.isWayland)) {
/*
services = {
nextcloud-client.enable = true;
nextcloud-client.startInBackground = true;
};
*/
home.packages = [pkgs.nextcloud-client];
systemd.user.services.nextcloud = lib.mkGraphicalService {
Unit.Description = "Nextcloud client service";
Service = {
ExecStart = "${pkgs.nextcloud-client}/bin/nextcloud --background";
Restart = "always";
Slice = "background.slice";
};
};
};
}

View file

@ -0,0 +1,22 @@
{
lib,
osConfig,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (osConfig) modules;
dev = modules.device;
sys = modules.system;
acceptedTypes = ["desktop" "laptop" "lite" "hybrid"];
in {
config = mkIf ((builtins.elem dev.type acceptedTypes) && sys.video.enable) {
# gnome polkit agent
systemd.user.services.polkit-pantheon-authentication-agent-1 = lib.mkGraphicalService {
#Service.ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Service.ExecStart = "${pkgs.pantheon.pantheon-agent-polkit}/libexec/policykit-1-pantheon/io.elementary.desktop.agent-polkit";
};
};
}

View file

@ -0,0 +1,14 @@
{
osConfig,
self,
...
}: let
sys = osConfig.modules.system;
in {
imports = [self.homeManagerModules.transience];
services.transience = {
enable = false;
directories = [];
user = sys.mainUser;
};
}

View file

@ -0,0 +1,19 @@
{
osConfig,
lib,
...
}: let
env = osConfig.modules.usrEnv;
in {
# assume system is headless if desktop is not set
config = lib.mkIf (env.desktop != "") {
# fake a tray to let apps start
# https://github.com/nix-community/home-manager/issues/2064
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = ["graphical-session-pre.target"];
};
};
};
}

View file

@ -0,0 +1,3 @@
{
services.udiskie.enable = true;
}