mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-27 01:31:55 -05:00
Aly Raffauf
deb36b44e1
Some checks are pending
flakehub / flakehub-publish (push) Waiting to run
git-mirror / gitlab-sync (push) Waiting to run
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
* remove unused variables and nesting issues * more code cleanups and build fixes * cleanup sway * base/plymouth: removed unnecessary font override * hosts/common: remove unnecessary host checks
95 lines
3.1 KiB
Nix
95 lines
3.1 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
gnomeCsAdjuster = pkgs.writeShellScriptBin "gnome-cs-adjuster" ''
|
|
# Get current color scheme
|
|
color_scheme=$(${lib.getExe' pkgs.glib "gsettings"} get org.gnome.desktop.interface color-scheme)
|
|
|
|
# Toggle between light and dark color schemes
|
|
if [ "$color_scheme" == "'default'" ] || [ "$color_scheme" == "'prefer-light'" ]; then
|
|
color_scheme="'prefer-dark'"
|
|
else
|
|
color_scheme="'prefer-light'"
|
|
fi
|
|
|
|
# Apply the updated color scheme
|
|
${lib.getExe' pkgs.glib "gsettings"} set org.gnome.desktop.interface color-scheme $color_scheme
|
|
'';
|
|
in {
|
|
config = lib.mkIf config.ar.desktop.gnome.enable {
|
|
environment.systemPackages =
|
|
[
|
|
pkgs.gnomeExtensions.appindicator
|
|
pkgs.gnomeExtensions.blur-my-shell
|
|
pkgs.gnomeExtensions.gsconnect
|
|
pkgs.gnomeExtensions.light-shell
|
|
pkgs.gnomeExtensions.night-theme-switcher
|
|
pkgs.gnomeExtensions.noannoyance-fork
|
|
pkgs.gnomeExtensions.tailscale-status
|
|
pkgs.gnomeExtensions.tiling-assistant
|
|
]
|
|
++ [gnomeCsAdjuster];
|
|
|
|
nixpkgs.overlays = [
|
|
# GNOME 46: triple-buffering-v4-46
|
|
(final: prev: {
|
|
gnome = prev.gnome.overrideScope (gnomeFinal: gnomePrev: {
|
|
mutter = gnomePrev.mutter.overrideAttrs (old: {
|
|
src = pkgs.fetchFromGitLab {
|
|
domain = "gitlab.gnome.org";
|
|
owner = "vanvugt";
|
|
repo = "mutter";
|
|
rev = "triple-buffering-v4-46";
|
|
hash = "sha256-fkPjB/5DPBX06t7yj0Rb3UEuu5b9mu3aS+jhH18+lpI=";
|
|
};
|
|
});
|
|
});
|
|
})
|
|
];
|
|
|
|
security.pam.services = {
|
|
login.fprintAuth = false;
|
|
|
|
gdm = {
|
|
enableGnomeKeyring = true;
|
|
gnupg.enable = true;
|
|
kwallet.enable = true;
|
|
};
|
|
|
|
gdm-fingerprint = lib.mkIf (config.services.fprintd.enable) {
|
|
text = ''
|
|
auth required pam_shells.so
|
|
auth requisite pam_nologin.so
|
|
auth requisite pam_faillock.so preauth
|
|
auth required ${pkgs.fprintd}/lib/security/pam_fprintd.so
|
|
auth optional pam_permit.so
|
|
auth required pam_env.so
|
|
auth [success=ok default=1] ${pkgs.gnome.gdm}/lib/security/pam_gdm.so
|
|
auth optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so
|
|
|
|
account include login
|
|
|
|
password required pam_deny.so
|
|
|
|
session include login
|
|
session optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start
|
|
'';
|
|
};
|
|
};
|
|
|
|
# Enable GNOME and GDM.
|
|
services = {
|
|
gnome.tracker-miners.enable = true;
|
|
udev.packages = with pkgs; [gnome.gnome-settings-daemon];
|
|
|
|
xserver = {
|
|
desktopManager.gnome.enable = true;
|
|
displayManager.gdm.enable = true;
|
|
};
|
|
};
|
|
};
|
|
}
|