From dfdd05a0c66fb993d0afb5bf5585195d51207e56 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Thu, 5 Sep 2024 16:11:32 +0200 Subject: [PATCH] add gnome as module, rollback nixvim --- flake.lock | 6 +++--- hosts/common/default.nix | 2 +- modules/default.nix | 5 ++++- {hosts/common => modules}/gnome.nix | 18 +++++++++++++----- 4 files changed, 21 insertions(+), 10 deletions(-) rename {hosts/common => modules}/gnome.nix (69%) diff --git a/flake.lock b/flake.lock index 5b5c057..173b319 100644 --- a/flake.lock +++ b/flake.lock @@ -524,11 +524,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1725499492, - "narHash": "sha256-IjpbYl4ljZ6gffzfH/n2qYbtu7PZ1KM2LW+cVL6w1bk=", + "lastModified": 1725478117, + "narHash": "sha256-Ly0DgmYniwBtQ+3aW4JO9ETJq9nbPemlISxC6MEDyB8=", "owner": "nix-community", "repo": "nixvim", - "rev": "e48da949cf41597d43f8e3880fc1389129ad7427", + "rev": "2ef974182ef62a6a6992118f0beb54dce812ae9b", "type": "github" }, "original": { diff --git a/hosts/common/default.nix b/hosts/common/default.nix index d03d4f0..e7a15b4 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -3,8 +3,8 @@ imports = [ ./system ./syncthing - ./gnome.nix ./sops.nix ./stylix.nix ]; + modules.gnome.enable = true; } diff --git a/modules/default.nix b/modules/default.nix index 0d871e4..b63881c 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,4 +1,7 @@ _: { - imports = [ ./nvidia.nix ]; + imports = [ + ./nvidia.nix + ./gnome.nix + ]; } diff --git a/hosts/common/gnome.nix b/modules/gnome.nix similarity index 69% rename from hosts/common/gnome.nix rename to modules/gnome.nix index 4484731..4c07d06 100644 --- a/hosts/common/gnome.nix +++ b/modules/gnome.nix @@ -1,13 +1,20 @@ -{ pkgs, ... }: - -{ - config = { +{ config, lib, pkgs, ... }: +let + cfg = config.modules.gnome; +in + { + options = { + modules.gnome = { + enable = lib.mkEnableOption "Enable Gnome"; + }; + }; + config = lib.mkIf cfg.enable { services.xserver = { enable = true; displayManager.gdm.enable = true; desktopManager.gnome = { enable = true; - extraGSettingsOverridePackages = [ pkgs.gnome.mutter ]; + extraGSettingsOverridePackages = [ pkgs.mutter ]; extraGSettingsOverrides = '' [org.gnome.mutter] experimental-features=['scale-monitor-framebuffer'] @@ -24,3 +31,4 @@ ]; }; } +