mirror of
https://github.com/kaesaecracker/nixos-configuration.git
synced 2025-01-18 10:30:14 +01:00
better split also for desktop envs
This commit is contained in:
parent
44bbfc2fa0
commit
adb51fd36e
|
@ -5,11 +5,11 @@ modulesCfg: {lib, ...}: {
|
|||
./nixpkgs.nix
|
||||
./globalinstalls.nix
|
||||
./server.nix
|
||||
./desktop
|
||||
]
|
||||
++ (map (path: (import path modulesCfg)) [
|
||||
./hardware
|
||||
./users
|
||||
./desktop
|
||||
]);
|
||||
|
||||
config = {
|
||||
|
|
|
@ -1,16 +1,22 @@
|
|||
{
|
||||
modulesCfg: {
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
isEnabled = config.my.desktop.enable;
|
||||
isHomeManager = modulesCfg.enableHomeManager;
|
||||
in {
|
||||
imports = [
|
||||
./gnome.nix
|
||||
./kde.nix
|
||||
./gaming.nix
|
||||
];
|
||||
imports =
|
||||
[
|
||||
./gnome.nix
|
||||
./kde.nix
|
||||
./gaming.nix
|
||||
]
|
||||
++ lib.optionals isHomeManager [
|
||||
./gnome-home.nix
|
||||
./kde-home.nix
|
||||
];
|
||||
|
||||
options.my.desktop.enable = lib.mkEnableOption "desktop";
|
||||
|
||||
|
|
23
modules/desktop/gnome-home.nix
Normal file
23
modules/desktop/gnome-home.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
isEnabled = config.my.desktop.enableGnome;
|
||||
in {
|
||||
config = lib.mkIf isEnabled {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
amberol
|
||||
];
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/peripherals/keyboard" = {
|
||||
numlock-state = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -5,62 +5,45 @@
|
|||
...
|
||||
}: let
|
||||
isEnabled = config.my.desktop.enableGnome;
|
||||
enableHomeManager = config.my.modulesCfg.enableHomeManager;
|
||||
in {
|
||||
options.my.desktop.enableGnome = lib.mkEnableOption "gnome desktop";
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf isEnabled {
|
||||
my.desktop.enable = true;
|
||||
config = lib.mkIf isEnabled {
|
||||
my.desktop.enable = true;
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
# Enable the GNOME Desktop Environment.
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
};
|
||||
|
||||
gnome = {
|
||||
tracker-miners.enable = false;
|
||||
tracker.enable = false;
|
||||
};
|
||||
services = {
|
||||
xserver = {
|
||||
# Enable the GNOME Desktop Environment.
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
};
|
||||
|
||||
programs.gpaste.enable = true;
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
gnomeExtensions.gsconnect
|
||||
];
|
||||
|
||||
# remove some gnome default apps
|
||||
gnome.excludePackages = with pkgs.gnome; [
|
||||
cheese # photo booth
|
||||
epiphany # web browser
|
||||
evince # document viewer
|
||||
geary # email client
|
||||
seahorse # password manager
|
||||
gnome-clocks
|
||||
gnome-maps
|
||||
gnome-weather
|
||||
gnome-music
|
||||
pkgs.gnome-connections
|
||||
];
|
||||
gnome = {
|
||||
tracker-miners.enable = false;
|
||||
tracker.enable = false;
|
||||
};
|
||||
})
|
||||
(lib.mkIf (isEnabled && enableHomeManager) {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
amberol
|
||||
];
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/peripherals/keyboard" = {
|
||||
numlock-state = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
programs.gpaste.enable = true;
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
gnomeExtensions.gsconnect
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
# remove some gnome default apps
|
||||
gnome.excludePackages = with pkgs.gnome; [
|
||||
cheese # photo booth
|
||||
epiphany # web browser
|
||||
evince # document viewer
|
||||
geary # email client
|
||||
seahorse # password manager
|
||||
gnome-clocks
|
||||
gnome-maps
|
||||
gnome-weather
|
||||
gnome-music
|
||||
pkgs.gnome-connections
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
18
modules/desktop/kde-home.nix
Normal file
18
modules/desktop/kde-home.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
isEnabled = config.my.desktop.enableKde;
|
||||
in {
|
||||
config = lib.mkIf isEnabled {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -5,57 +5,44 @@
|
|||
...
|
||||
}: let
|
||||
isEnabled = config.my.desktop.enableKde;
|
||||
enableHomeManager = config.my.modulesCfg.enableHomeManager;
|
||||
in {
|
||||
options.my.desktop.enableKde = lib.mkEnableOption "KDE desktop";
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf isEnabled {
|
||||
my.desktop.enable = true;
|
||||
config = lib.mkIf isEnabled {
|
||||
my.desktop.enable = true;
|
||||
|
||||
# flatpak xdg-portal-kde crashes, otherwise this would be global
|
||||
services.flatpak.enable = false;
|
||||
# flatpak xdg-portal-kde crashes, otherwise this would be global
|
||||
services.flatpak.enable = false;
|
||||
|
||||
services = {
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
xserver = {
|
||||
desktopManager.plasma5.enable = true;
|
||||
services = {
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
xserver = {
|
||||
desktopManager.plasma5.enable = true;
|
||||
|
||||
displayManager = {
|
||||
sddm.enable = true;
|
||||
defaultSession = "plasmawayland";
|
||||
};
|
||||
displayManager = {
|
||||
sddm.enable = true;
|
||||
defaultSession = "plasmawayland";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
libsForQt5.kate
|
||||
libsForQt5.kalk
|
||||
];
|
||||
|
||||
plasma5.excludePackages = with pkgs.libsForQt5; [
|
||||
elisa
|
||||
gwenview
|
||||
okular
|
||||
khelpcenter
|
||||
];
|
||||
};
|
||||
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
partition-manager.enable = true;
|
||||
};
|
||||
})
|
||||
(lib.mkIf (isEnabled && enableHomeManager) {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
};
|
||||
}
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
libsForQt5.kate
|
||||
libsForQt5.kalk
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
plasma5.excludePackages = with pkgs.libsForQt5; [
|
||||
elisa
|
||||
gwenview
|
||||
okular
|
||||
khelpcenter
|
||||
];
|
||||
};
|
||||
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
partition-manager.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue