From ca413f407905c10d9b85fedc473c614f73e835bd Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Mon, 2 Oct 2023 17:23:23 +0530 Subject: [PATCH] refactor --- home/default.nix | 34 ++++++++++++++++++---------------- home/gtk.nix | 27 +++++++++++++-------------- hosts/skipper/secureboot.nix | 12 +++++++----- 3 files changed, 38 insertions(+), 35 deletions(-) diff --git a/home/default.nix b/home/default.nix index ac3075d..b62069a 100644 --- a/home/default.nix +++ b/home/default.nix @@ -3,23 +3,25 @@ _: { home.stateVersion = "23.11"; - xdg.enable = true; - xdg.mime.enable = true; - xdg.mimeApps = { + xdg = { enable = true; - defaultApplications = { - "application/pdf" = ["org.gnome.Evince.desktop"]; - "image/gif" = ["org.gnome.eog.desktop"]; - "image/jpeg" = ["org.gnome.eog.desktop"]; - "image/png" = ["org.gnome.eog.desktop"]; - "image/webp" = ["org.gnome.eog.desktop"]; + mime.enable = true; + mimeApps = { + enable = true; + defaultApplications = { + "application/pdf" = ["org.gnome.Evince.desktop"]; + "image/gif" = ["org.gnome.eog.desktop"]; + "image/jpeg" = ["org.gnome.eog.desktop"]; + "image/png" = ["org.gnome.eog.desktop"]; + "image/webp" = ["org.gnome.eog.desktop"]; + }; + }; + userDirs.enable = true; + + desktopEntries."nixos-manual" = { + name = "NixOS Manual"; + exec = "nixos-help"; + noDisplay = true; }; }; - xdg.userDirs.enable = true; - - xdg.desktopEntries."nixos-manual" = { - name = "NixOS Manual"; - exec = "nixos-help"; - noDisplay = true; - }; } diff --git a/home/gtk.nix b/home/gtk.nix index bbd1d21..2432e7e 100644 --- a/home/gtk.nix +++ b/home/gtk.nix @@ -21,8 +21,19 @@ package = pkgs.bibata-cursors; }; in { - gtk.enable = true; - gtk.theme = gtkTheme; + gtk = { + enable = true; + theme = gtkTheme; + inherit cursorTheme; + inherit iconTheme; + gtk3.extraConfig = { + gtk-application-prefer-dark-theme = true; + }; + gtk4.extraConfig = { + gtk-application-prefer-dark-theme = true; + }; + }; + home.sessionVariables.GTK_THEME = gtkTheme.name; xdg.configFile = { "gtk-4.0/assets".source = "${gtkTheme.package}/share/themes/${gtkTheme.name}/gtk-4.0/assets"; @@ -30,18 +41,6 @@ in { "gtk-4.0/gtk-dark.css".source = "${gtkTheme.package}/share/themes/${gtkTheme.name}/gtk-4.0/gtk-dark.css"; }; - gtk.cursorTheme = cursorTheme; - - gtk.iconTheme = iconTheme; - - gtk.gtk3.extraConfig = { - gtk-application-prefer-dark-theme = true; - }; - - gtk.gtk4.extraConfig = { - gtk-application-prefer-dark-theme = true; - }; - dconf.settings = { "org/gnome/desktop/interface" = { color-scheme = "prefer-dark"; diff --git a/hosts/skipper/secureboot.nix b/hosts/skipper/secureboot.nix index f2cc70e..1252769 100644 --- a/hosts/skipper/secureboot.nix +++ b/hosts/skipper/secureboot.nix @@ -3,11 +3,13 @@ pkgs, ... }: { - boot.bootspec.enable = true; - boot.loader.systemd-boot.enable = lib.mkForce false; - boot.lanzaboote = { - enable = true; - pkiBundle = "/etc/secureboot"; + boot = { + bootspec.enable = true; + loader.systemd-boot.enable = lib.mkForce false; + lanzaboote = { + enable = true; + pkiBundle = "/etc/secureboot"; + }; }; environment.systemPackages = with pkgs; [ sbctl