move pika backup to gnome only

This commit is contained in:
Joseph Hanson 2024-10-28 20:33:38 -05:00
parent 0fa68032eb
commit d9bcb76ed1
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
2 changed files with 42 additions and 32 deletions

View file

@ -54,7 +54,6 @@
system = {
motd.networkInterfaces = [ "wlp1s0" ];
fingerprint-reader-on-laptop-lid.enable = true;
borg.pika-backup.enable = true;
};
framework_wifi_swap.enable = true;

View file

@ -1,18 +1,28 @@
{ lib, config, pkgs, ... }:
with lib;
{
lib,
config,
pkgs,
...
}:
let
cfg = config.mySystem.de.gnome;
in
{
options = {
mySystem.de.gnome = {
enable = mkEnableOption "GNOME" // { default = false; };
systrayicons = mkEnableOption "Enable systray icons" // { default = true; };
gsconnect = mkEnableOption "Enable gsconnect (KDEConnect for GNOME)" // { default = true; };
enable = lib.mkEnableOption "GNOME" // {
default = false;
};
systrayicons = lib.mkEnableOption "Enable systray icons" // {
default = true;
};
gsconnect = lib.mkEnableOption "Enable gsconnect (KDEConnect for GNOME)" // {
default = true;
};
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
# Ref: https://nixos.wiki/wiki/GNOME
# GNOME plz
@ -38,13 +48,15 @@ in
};
};
udev.packages = optionals cfg.systrayicons [ pkgs.gnome.gnome-settings-daemon ]; # support appindicator
udev.packages = lib.optionals cfg.systrayicons [ pkgs.gnome.gnome-settings-daemon ]; # support appindicator
};
# systyray icons
# extra pkgs and extensions
environment = {
systemPackages = with pkgs; [
systemPackages =
with pkgs;
[
wl-clipboard # ls ~/Downloads | wl-copy or wl-paste > clipboard.txt
playerctl # gsconnect play/pause command
pamixer # gcsconnect volume control
@ -60,19 +72,20 @@ in
++ optionals cfg.systrayicons [ pkgs.gnomeExtensions.appindicator ];
};
# enable pika backup
mySystem.borg.pika-backup.enable = true;
# enable gsconnect
# this method also opens the firewall ports required when enable = true
programs.kdeconnect = mkIf
cfg.gsconnect
{
programs.kdeconnect = lib.mkIf cfg.gsconnect {
enable = true;
package = pkgs.gnomeExtensions.gsconnect;
};
# GNOME connection to browsers - requires flag on browser as well
services.gnome.gnome-browser-connector.enable = lib.any
(user: user.programs.firefox.enable)
(lib.attrValues config.home-manager.users);
services.gnome.gnome-browser-connector.enable = lib.any (user: user.programs.firefox.enable) (
lib.attrValues config.home-manager.users
);
# And dconf
programs.dconf.enable = true;
@ -99,6 +112,4 @@ in
atomix # puzzle game
]);
};
}