diff --git a/hosts/comfy-station/configuration.nix b/hosts/comfy-station/configuration.nix index 58b74ff..8bc02dd 100644 --- a/hosts/comfy-station/configuration.nix +++ b/hosts/comfy-station/configuration.nix @@ -10,51 +10,18 @@ ./hardware-configuration.nix inputs.home-manager.nixosModules.home-manager ../../modules/system/boot.nix - ../../modules/system/network.nix + ../../modules/system/console.nix ../../modules/system/localization.nix + ../../modules/system/network.nix + ../../modules/hardware/bluetooth.nix + ../../modules/hardware/printing.nix + ../../modules/hardware/sound.nix + ../../modules/desktop/x11-plasma.nix + ../../modules/services/docker.nix ]; nix.settings.experimental-features = [ "nix-command" "flakes" ]; - # Enable the X11 windowing system. - services.xserver.enable = true; - - # Enable the KDE Plasma Desktop Environment. - services.xserver.displayManager.sddm.enable = true; - services.xserver.desktopManager.plasma5.enable = true; - - # Configure keymap in X11 - services.xserver = { - layout = "de"; - xkbVariant = ""; - }; - - # Configure console keymap - console.keyMap = "de"; - - # Enable CUPS to print documents. - services.printing.enable = true; - - # 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 Bluetooth - hardware.bluetooth.enable = true; - # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; @@ -69,16 +36,13 @@ programs.zsh.enable = true; - # Enable automatic login for the user. - services.xserver.displayManager.autoLogin.enable = true; - services.xserver.displayManager.autoLogin.user = "jonas"; - # Allow unfree packages nixpkgs.config.allowUnfree = true; # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ + docker git ranger vim diff --git a/modules/desktop/x11-plasma.nix b/modules/desktop/x11-plasma.nix new file mode 100644 index 0000000..cefb357 --- /dev/null +++ b/modules/desktop/x11-plasma.nix @@ -0,0 +1,21 @@ +{ config, ... }: + +{ + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Configure keymap in X11 + services.xserver = { + layout = "de"; + xkbVariant = ""; + }; + + # Enable the KDE Plasma Desktop Environment. + services.xserver.displayManager.sddm.enable = true; + services.xserver.desktopManager.plasma5.enable = true; + + # Enable automatic login for the user. + services.xserver.displayManager.autoLogin.enable = true; + services.xserver.displayManager.autoLogin.user = "jonas"; + +} \ No newline at end of file diff --git a/modules/hardware/bluetooth.nix b/modules/hardware/bluetooth.nix new file mode 100644 index 0000000..cfd6a72 --- /dev/null +++ b/modules/hardware/bluetooth.nix @@ -0,0 +1,6 @@ +{ config, ... }: + +{ + # Enable Bluetooth + hardware.bluetooth.enable = true; +} \ No newline at end of file diff --git a/modules/hardware/printing.nix b/modules/hardware/printing.nix new file mode 100644 index 0000000..92b7d1f --- /dev/null +++ b/modules/hardware/printing.nix @@ -0,0 +1,6 @@ +{ config, ... }: + +{ + # Enable CUPS to print documents. + services.printing.enable = true; +} \ No newline at end of file diff --git a/modules/hardware/sound.nix b/modules/hardware/sound.nix new file mode 100644 index 0000000..30ac6f4 --- /dev/null +++ b/modules/hardware/sound.nix @@ -0,0 +1,20 @@ +{ config, ... }: + +{ + # 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; + }; +} \ No newline at end of file diff --git a/modules/services/docker.nix b/modules/services/docker.nix new file mode 100644 index 0000000..e3d8fb1 --- /dev/null +++ b/modules/services/docker.nix @@ -0,0 +1,6 @@ +{ config, ... }: + +{ + virtualisation.docker.enable = true; + users.users.jonas.extraGroups = [ "docker" ]; +} \ No newline at end of file diff --git a/modules/system/console.nix b/modules/system/console.nix new file mode 100644 index 0000000..4f52fed --- /dev/null +++ b/modules/system/console.nix @@ -0,0 +1,6 @@ +{ config, ... }: + +{ + # Configure console keymap + console.keyMap = "de"; +} \ No newline at end of file