dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit dbcdd870cf843d38c1ecdbe6fb99bde755fdbe13 parent cd3dbd5263e22045ed7285efe6b7542ee406fde0 Author: maydayv7 <maydayv7@gmail.com> Date: Sat, 16 Apr 2022 10:00:54 +0530 fix: Revamp `nixosModules` Also fix GNOME `installMedia`
Diffstat:
| M | configuration.nix | | | 5 | +++-- |
| M | files/default.nix | | | 1 | + |
| A | files/gnome/iso | | | 9 | +++++++++ |
| M | lib/build.nix | | | 2 | +- |
| M | modules/default.nix | | | 3 | ++- |
| M | modules/gui/gnome.nix | | | 13 | ++++++++++++- |
| M | modules/hardware/filesystem.nix | | | 4 | ++-- |
7 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/configuration.nix b/configuration.nix @@ -77,8 +77,9 @@ in lib = lib.util; ## Custom Configuration Modules ## - nixosModule = import ./modules {inherit version lib inputs files;}; - nixosModules = map.modules ./modules import; + nixosModules = + map.modules ./modules import + // {default = import ./modules {inherit version lib inputs files;};}; ## Configuration Templates ## templates = { diff --git a/files/default.nix b/files/default.nix @@ -43,6 +43,7 @@ in rec { gnome = { accounts = readFile ./gnome/accounts.conf; dconf = ./gnome/dconf.nix; + iso = readFile ./gnome/iso; shell = readFile ./gnome/gnome-shell.css; syntax = readFile ./gnome/nix.lang; theme = readFile ./gnome/tango-dark.xml; diff --git a/files/gnome/iso b/files/gnome/iso @@ -0,0 +1,9 @@ +[org.gnome.shell] +welcome-dialog-last-shown-version='9999999999' + +[org.gnome.desktop.session] +idle-delay=0 + +[org.gnome.settings-daemon.plugins.power] +sleep-inactive-ac-type='nothing' +sleep-inactive-battery-type='nothing' diff --git a/lib/build.nix b/lib/build.nix @@ -12,7 +12,7 @@ in rec { listToAttrs (map (name: nameValuePair name (func name)) attr); # Configuration Builders - device = self.nixosModule.config; + device = self.nixosModules.default.config; iso = config: self.nixosModule.config (config // { diff --git a/modules/default.nix b/modules/default.nix @@ -14,6 +14,7 @@ getAttr hashString map + removeAttrs replaceStrings substring ; @@ -89,7 +90,7 @@ in { # Modulated Configuration Imports imports = imports - ++ (attrValues self.nixosModules) + ++ (attrValues (removeAttrs self.nixosModules ["default"])) ++ map user' ( if (user != null) then [user] diff --git a/modules/gui/gnome.nix b/modules/gui/gnome.nix @@ -244,7 +244,18 @@ in { # Minimal GNOME Desktop Configuration (mkIf (desktop == "gnome-minimal") { # Disable Suspension - services.xserver.displayManager.gdm.autoSuspend = false; + services.xserver = { + displayManager.gdm.autoSuspend = false; + desktopManager.gnome = { + favoriteAppsOverride = '' + [org.gnome.shell] + favorite-apps=[ 'org.gnome.Epiphany.desktop', 'nixos-manual.desktop', 'org.gnome.Console.desktop', 'org.gnome.Nautilus.desktop', 'gparted.desktop' ] + ''; + + extraGSettingsOverrides = gnome.iso; + extraGSettingsOverridePackages = [pkgs.gnome.gnome-settings-daemon]; + }; + }; # Essential Utilities environment.systemPackages = with pkgs.gnome; [ diff --git a/modules/hardware/filesystem.nix b/modules/hardware/filesystem.nix @@ -7,7 +7,7 @@ ... }: let inherit (builtins) filter listToAttrs mapAttrs; - inherit (lib) hasPrefix mkAfter mkIf mkMerge mkOption nameValuePair optional types; + inherit (lib) hasPrefix mkAfter mkIf mkMerge mkOption nameValuePair optional remove types; inherit (config.hardware) filesystem; in { imports = [inputs.impermanence.nixosModule]; @@ -119,7 +119,7 @@ in { }; } // listToAttrs (map (dir: nameValuePair dir {neededForBoot = true;}) - (filter (hasPrefix "/etc") config.environment.persist.dirs)); + (filter (hasPrefix "/etc") (remove "/etc/nixos" config.environment.persist.dirs))); # Boot Settings boot = {