From da18e8a3bb4c3f52765a272c22e246b59c9c71f6 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Sun, 1 Dec 2024 16:56:47 +0100 Subject: [PATCH] Create NixOS option for Cosmic specialisation --- home-manager/gnome/default.nix | 2 +- machines/sue/configuration.nix | 28 ++++++++++++++++++---------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/home-manager/gnome/default.nix b/home-manager/gnome/default.nix index 489dfe1..6ae60d4 100644 --- a/home-manager/gnome/default.nix +++ b/home-manager/gnome/default.nix @@ -88,7 +88,7 @@ in { }; "org/gnome/shell/extensions/space-iflow-randomwallpaper/sources/general/42".type = 4; - "org/gnome/shell/extensions/space-iflow-randomwallpaper/sources/localFolder/42".folder = ./wallpapers; + "org/gnome/shell/extensions/space-iflow-randomwallpaper/sources/localFolder/42".folder = builtins.toString ./wallpapers; }; }; } diff --git a/machines/sue/configuration.nix b/machines/sue/configuration.nix index c62f14e..4af3ffc 100644 --- a/machines/sue/configuration.nix +++ b/machines/sue/configuration.nix @@ -1,8 +1,15 @@ { self, pkgs, + lib, + inputs, + config, ... }: { + options = { + pim.cosmic.enable = lib.mkEnableOption "cosmic"; + }; + config = { pim = { lanzaboote.enable = true; @@ -75,16 +82,17 @@ boot.initrd.luks.devices."luks-8ffd3129-4908-4209-98c4-4eb68a35c494".device = "/dev/disk/by-uuid/8ffd3129-4908-4209-98c4-4eb68a35c494"; - # TODO: create option for this instead of commenting out - # specialisation.cosmic.configuration = { - # imports = [ - # inputs.nixos-cosmic.nixosModules.default - # ]; + specialisation.cosmic = lib.mkIf config.pim.cosmic.enable { + configuration = { + imports = [ + inputs.nixos-cosmic.nixosModules.default + ]; - # services = { - # desktopManager.cosmic.enable = true; - # displayManager.cosmic-greeter.enable = true; - # }; - # }; + services = { + desktopManager.cosmic.enable = true; + displayManager.cosmic-greeter.enable = true; + }; + }; + }; }; }