mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
workflows: remove conditional config
Now this is handled on the host-specific modules.
This commit is contained in:
parent
193a4796ed
commit
3afb2e4d56
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, _isfoodogsquaredcustom ? false, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.workflows.workflows.a-happy-gnome;
|
||||
@ -94,69 +94,62 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
# Enable GNOME and GDM.
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Enable GNOME and GDM.
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
};
|
||||
|
||||
# All GNOME-related additional options.
|
||||
services.gnome = {
|
||||
core-os-services.enable = true;
|
||||
core-shell.enable = true;
|
||||
core-utilities.enable = true;
|
||||
|
||||
# It doesn't need to since we're not first-timers, yeah?
|
||||
gnome-initial-setup.enable = false;
|
||||
};
|
||||
|
||||
# It makes Nix store directory read/write so no...
|
||||
services.packagekit.enable = false;
|
||||
|
||||
# Setting up split DNS with systemd-resolved. The domains should already
|
||||
# be configured somewhere else.
|
||||
services.resolved.enable = true;
|
||||
networking.networkmanager.dns = "systemd-resolved";
|
||||
|
||||
# Since we're using KDE Connect, we'll have to use gsconnect.
|
||||
programs.kdeconnect = {
|
||||
enable = true;
|
||||
package = pkgs.gnomeExtensions.gsconnect;
|
||||
};
|
||||
|
||||
# Bring all of the dconf keyfiles in there.
|
||||
programs.dconf = {
|
||||
enable = true;
|
||||
packages = [ dconfConfig ];
|
||||
};
|
||||
|
||||
xdg.mime = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
# Default application for web browser.
|
||||
"text/html" = "re.sonny.Junction.desktop";
|
||||
|
||||
# Default handler for all files. Not all applications will
|
||||
# respect it, though.
|
||||
"x-scheme-handler/file" = "re.sonny.Junction.desktop";
|
||||
|
||||
# Default handler for directories.
|
||||
"inode/directory" = "re.sonny.Junction.desktop";
|
||||
};
|
||||
};
|
||||
|
||||
# All GNOME-related additional options.
|
||||
services.gnome = {
|
||||
core-os-services.enable = true;
|
||||
core-shell.enable = true;
|
||||
core-utilities.enable = true;
|
||||
|
||||
# It doesn't need to since we're not first-timers, yeah?
|
||||
gnome-initial-setup.enable = false;
|
||||
};
|
||||
|
||||
# It makes Nix store directory read/write so no...
|
||||
services.packagekit.enable = false;
|
||||
|
||||
# Setting up split DNS with systemd-resolved. The domains should already
|
||||
# be configured somewhere else.
|
||||
services.resolved.enable = true;
|
||||
networking.networkmanager.dns = "systemd-resolved";
|
||||
|
||||
# Since we're using KDE Connect, we'll have to use gsconnect.
|
||||
programs.kdeconnect = {
|
||||
enable = true;
|
||||
package = pkgs.gnomeExtensions.gsconnect;
|
||||
};
|
||||
|
||||
# Bring all of the dconf keyfiles in there.
|
||||
programs.dconf = {
|
||||
enable = true;
|
||||
packages = [ dconfConfig ];
|
||||
};
|
||||
|
||||
xdg.mime = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
# Default application for web browser.
|
||||
"text/html" = "re.sonny.Junction.desktop";
|
||||
|
||||
# Default handler for all files. Not all applications will
|
||||
# respect it, though.
|
||||
"x-scheme-handler/file" = "re.sonny.Junction.desktop";
|
||||
|
||||
# Default handler for directories.
|
||||
"inode/directory" = "re.sonny.Junction.desktop";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# The application menu.
|
||||
junction
|
||||
] ++ cfg.shellExtensions ++ cfg.extraApps;
|
||||
}
|
||||
|
||||
# Check whether this is inside of my personal configuration or nah.
|
||||
(lib.mkIf _isfoodogsquaredcustom {
|
||||
profiles.i18n.setup = "ibus";
|
||||
})
|
||||
]);
|
||||
environment.systemPackages = with pkgs; [
|
||||
# The application menu.
|
||||
junction
|
||||
] ++ cfg.shellExtensions ++ cfg.extraApps;
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, _isfoodogsquaredcustom ? false, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.workflows.workflows.mosey-branch;
|
||||
@ -109,81 +109,71 @@ in
|
||||
debug = lib.mkEnableOption "gnome-session debug messages";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages = cfg.extraApps ++ requiredPackages;
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = cfg.extraApps ++ requiredPackages;
|
||||
|
||||
# Install all of the required systemd units.
|
||||
systemd.packages = with pkgs.gnome; [
|
||||
customDesktopSession
|
||||
gnome-session
|
||||
# Install all of the required systemd units.
|
||||
systemd.packages = with pkgs.gnome; [
|
||||
customDesktopSession
|
||||
gnome-session
|
||||
];
|
||||
|
||||
# We'll have to include them for gnome-session to recognize it in NixOS
|
||||
# systems.
|
||||
environment.pathsToLink = [ "/share/gnome-session" ];
|
||||
|
||||
environment.sessionVariables.GNOME_SESSION_DEBUG = lib.mkIf cfg.debug "1";
|
||||
|
||||
# Our preferred display manager.
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager = {
|
||||
gdm.enable = lib.mkDefault true;
|
||||
sessionPackages = [ customDesktopSession ];
|
||||
};
|
||||
updateDbusEnvironment = true;
|
||||
};
|
||||
|
||||
# Setting up some hardware settings.
|
||||
hardware.opengl.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
services.upower.enable = true;
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.colord.enable = true;
|
||||
services.system-config-printer.enable = config.services.printing.enable;
|
||||
|
||||
# Setting up some more core services.
|
||||
security.polkit.enable = true;
|
||||
services.accounts-daemon.enable = true;
|
||||
services.dleyna-renderer.enable = true;
|
||||
services.dleyna-server.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
programs.xwayland.enable = true;
|
||||
|
||||
fonts.enableDefaultPackages = true;
|
||||
|
||||
# The phone sync component which is handy.
|
||||
programs.kdeconnect = {
|
||||
enable = true;
|
||||
package = pkgs.valent;
|
||||
};
|
||||
|
||||
# Harmonious themes. Since we're making this very similar to GNOME
|
||||
# appearance-wise, layout-wise, and setup-wise, we may as well make it
|
||||
# similar.
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gnome";
|
||||
style = "adwaita";
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
|
||||
# We'll have to include them for gnome-session to recognize it in NixOS
|
||||
# systems.
|
||||
environment.pathsToLink = [ "/share/gnome-session" ];
|
||||
|
||||
environment.sessionVariables.GNOME_SESSION_DEBUG = lib.mkIf cfg.debug "1";
|
||||
|
||||
# Our preferred display manager.
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager = {
|
||||
gdm.enable = lib.mkDefault true;
|
||||
sessionPackages = [ customDesktopSession ];
|
||||
};
|
||||
updateDbusEnvironment = true;
|
||||
};
|
||||
|
||||
# Setting up some hardware settings.
|
||||
hardware.opengl.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
services.upower.enable = true;
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.colord.enable = true;
|
||||
services.system-config-printer.enable = config.services.printing.enable;
|
||||
|
||||
# Setting up some more core services.
|
||||
security.polkit.enable = true;
|
||||
services.accounts-daemon.enable = true;
|
||||
services.dleyna-renderer.enable = true;
|
||||
services.dleyna-server.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
programs.xwayland.enable = true;
|
||||
|
||||
fonts.enableDefaultPackages = true;
|
||||
|
||||
# The phone sync component which is handy.
|
||||
programs.kdeconnect = {
|
||||
enable = true;
|
||||
package = pkgs.valent;
|
||||
};
|
||||
|
||||
# Harmonious themes. Since we're making this very similar to GNOME
|
||||
# appearance-wise, layout-wise, and setup-wise, we may as well make it
|
||||
# similar.
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gnome";
|
||||
style = "adwaita";
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
# Setting up my project-specific profiles. This is only to be applied for
|
||||
# my setup. If you're not foodogsquared and you're using my project as one
|
||||
# of the flake input, this shouldn't be applied nor be used in the first
|
||||
# place.
|
||||
(lib.mkIf _isfoodogsquaredcustom {
|
||||
profiles.i18n.setup = "ibus";
|
||||
})
|
||||
]);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user