From cccabdb91b54e6a367de76f2a03472f834fd6011 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Thu, 14 Sep 2023 11:53:32 +0200 Subject: [PATCH] refactor --- hosts/yodaTab/configuration.nix | 7 +++-- hosts/yodaTux/configuration.nix | 7 +++-- modules/base-gnome.nix | 38 ++++++++++++++++++++++++++ modules/base.nix | 35 ------------------------ modules/{fwupd.nix => fwupd-gnome.nix} | 0 5 files changed, 46 insertions(+), 41 deletions(-) create mode 100644 modules/base-gnome.nix rename modules/{fwupd.nix => fwupd-gnome.nix} (100%) diff --git a/hosts/yodaTab/configuration.nix b/hosts/yodaTab/configuration.nix index 5f4e204..5a00151 100644 --- a/hosts/yodaTab/configuration.nix +++ b/hosts/yodaTab/configuration.nix @@ -15,17 +15,18 @@ in [ # Include the results of the hardware scan. ./hardware-configuration.nix - + # Home Manager. (import "${home-manager}/nixos") ../../modules/home-manager.nix - + # NUR. ../../modules/nur.nix ../../modules/base.nix + ../../modules/base-gnome.nix ../../modules/programs.nix ../../modules/autostart.nix ../../modules/wallpaper.nix - ../../modules/fwupd.nix + ../../modules/fwupd-gnome.nix ../../modules/print-and-scan.nix #../../modules/fde-ssh-unlock.nix ../../modules/nextcloud-integration.nix diff --git a/hosts/yodaTux/configuration.nix b/hosts/yodaTux/configuration.nix index d294647..8e948a9 100644 --- a/hosts/yodaTux/configuration.nix +++ b/hosts/yodaTux/configuration.nix @@ -15,17 +15,18 @@ in [ # Include the results of the hardware scan. ./hardware-configuration.nix - + # Home Manager. (import "${home-manager}/nixos") ../../modules/home-manager.nix - + # NUR. ../../modules/nur.nix ../../modules/base.nix + ../../modules/base-gnome.nix ../../modules/programs.nix ../../modules/autostart.nix ../../modules/wallpaper.nix - ../../modules/fwupd.nix + ../../modules/fwupd-gnome.nix ../../modules/print-and-scan.nix #../../modules/fde-ssh-unlock.nix ../../modules/nextcloud-integration.nix diff --git a/modules/base-gnome.nix b/modules/base-gnome.nix new file mode 100644 index 0000000..826f126 --- /dev/null +++ b/modules/base-gnome.nix @@ -0,0 +1,38 @@ +{ config, pkgs, ... }: + +{ + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Enable the GNOME Desktop Environment. + services.xserver.displayManager.gdm.enable = true; + # Toggles, weather the Wayland or X11 GNOME session is started. + services.xserver.displayManager.gdm.wayland = false; + services.xserver.desktopManager.gnome.enable = true; + + # Configure keymap in X11. + services.xserver = { + layout = "de"; + xkbVariant = "nodeadkeys"; + }; + + # Enable sound with pipewire. + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this. + #jack.enable = true; + + # Use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.xserver.libinput.enable = true; +} diff --git a/modules/base.nix b/modules/base.nix index e158b26..cf4272d 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -38,44 +38,9 @@ LC_TIME = "de_DE.UTF-8"; }; - # Enable the X11 windowing system. - services.xserver.enable = true; - - # Enable the GNOME Desktop Environment. - services.xserver.displayManager.gdm.enable = true; - # Toggles, weather the Wayland or X11 GNOME session is started. - services.xserver.displayManager.gdm.wayland = false; - services.xserver.desktopManager.gnome.enable = true; - - # Configure keymap in X11. - services.xserver = { - layout = "de"; - xkbVariant = "nodeadkeys"; - }; - # Configure console keymap. console.keyMap = "de-latin1-nodeadkeys"; - # Enable sound with pipewire. - sound.enable = true; - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - # If you want to use JACK applications, uncomment this. - #jack.enable = true; - - # Use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; - }; - - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; - # Allow unfree packages. nixpkgs.config.allowUnfree = true; diff --git a/modules/fwupd.nix b/modules/fwupd-gnome.nix similarity index 100% rename from modules/fwupd.nix rename to modules/fwupd-gnome.nix