feat(gnome): add gnome desktop
This commit is contained in:
parent
f054916ef0
commit
c9d769b874
15
home/gnome/impl.nix
Normal file
15
home/gnome/impl.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ pkgs
|
||||||
|
, lib
|
||||||
|
, config
|
||||||
|
, ... }: with lib; let
|
||||||
|
cfg = config.home.gnome;
|
||||||
|
in mkIf cfg.enable {
|
||||||
|
programs.regreet.enable = false;
|
||||||
|
services.xserver.enable = true;
|
||||||
|
services.xserver.displayManager.startx.enable = false;
|
||||||
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
|
services.xserver.desktopManager.gnome.enable = true;
|
||||||
|
|
||||||
|
users.home.persist.directories = [ ];
|
||||||
|
environment.persistence."/nix/persist/fhs".directories = [ ];
|
||||||
|
}
|
25
home/gnome/nixos.nix
Normal file
25
home/gnome/nixos.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ pkgs
|
||||||
|
, lib
|
||||||
|
, config
|
||||||
|
, ... }: with lib; let
|
||||||
|
cfg = config.home.gnome;
|
||||||
|
in {
|
||||||
|
imports = [ ./impl.nix ];
|
||||||
|
|
||||||
|
options.home.gnome = {
|
||||||
|
enable = mkEnableOption "GNOME desktop environment";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
users.homeModules = [
|
||||||
|
# this module passes gnome configuration to home-manager
|
||||||
|
{ passthrough.gnome= cfg; }
|
||||||
|
];
|
||||||
|
|
||||||
|
specialisation.nognome = with cfg; mkIf enable {
|
||||||
|
configuration = {
|
||||||
|
home.gnome.enable = mkForce false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue