diff options
author | Franck Cuny <franck@fcuny.net> | 2022-02-12 13:53:12 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-02-12 13:54:53 -0800 |
commit | 8c7ce797eb2a1c5b8b3c602ecd3300cd23e8b46c (patch) | |
tree | 445cbdba282c01659a1e9a14583a1e7283106315 /hosts/common/desktop | |
parent | hosts: import common modules (diff) | |
download | world-8c7ce797eb2a1c5b8b3c602ecd3300cd23e8b46c.tar.gz |
hosts: rename commons to common
Diffstat (limited to 'hosts/common/desktop')
-rw-r--r-- | hosts/common/desktop/default.nix | 8 | ||||
-rw-r--r-- | hosts/common/desktop/fonts.nix | 18 | ||||
-rw-r--r-- | hosts/common/desktop/sound.nix | 20 | ||||
-rw-r--r-- | hosts/common/desktop/xserver.nix | 23 |
4 files changed, 69 insertions, 0 deletions
diff --git a/hosts/common/desktop/default.nix b/hosts/common/desktop/default.nix new file mode 100644 index 0000000..f150066 --- /dev/null +++ b/hosts/common/desktop/default.nix @@ -0,0 +1,8 @@ +{lib, config, pkgs, ...}: +{ + imports = [ + ./fonts.nix + ./sound.nix + ./xserver.nix + ]; +} diff --git a/hosts/common/desktop/fonts.nix b/hosts/common/desktop/fonts.nix new file mode 100644 index 0000000..a840582 --- /dev/null +++ b/hosts/common/desktop/fonts.nix @@ -0,0 +1,18 @@ +{ pkgs, config, lib, ... }: + +{ + fonts = { + fontconfig.enable = true; + fonts = with pkgs; [ + noto-fonts-emoji + dejavu_fonts + source-code-pro + source-sans-pro + source-serif-pro + ]; + + fontconfig.defaultFonts = { + monospace = [ "Source Code Pro" ]; + }; + }; +} diff --git a/hosts/common/desktop/sound.nix b/hosts/common/desktop/sound.nix new file mode 100644 index 0000000..95c7c75 --- /dev/null +++ b/hosts/common/desktop/sound.nix @@ -0,0 +1,20 @@ +{pkgs, config, lib, ...}: + +{ + sound.enable = true; + + environment.systemPackages = with pkgs; [ + # We install it to get access to pactl. It isn't enabled or run as a service. + pulseaudio + ]; + + services.pipewire = { + enable = true; + # Compatibility shims, adjust according to your needs + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + hardware.pulseaudio.enable = false; +} diff --git a/hosts/common/desktop/xserver.nix b/hosts/common/desktop/xserver.nix new file mode 100644 index 0000000..7537863 --- /dev/null +++ b/hosts/common/desktop/xserver.nix @@ -0,0 +1,23 @@ +{ config, pkgs, lib, ... }: + +{ + services.xserver = { + enable = true; + layout = "us"; + xkbOptions = "eurosign:e,ctrl:swapcaps"; + libinput.enable = true; + + desktopManager = { + xterm.enable = false; + }; + + displayManager = { + lightdm.enable = true; + defaultSession = "none+i3"; + }; + + windowManager = { + i3.enable = true; + }; + }; +} |