System/modules/linux/desktop.nix

89 lines
2.4 KiB
Nix
Raw Normal View History

2022-06-23 02:57:41 -04:00
{ config, lib, pkgs, ... }:
let nc = config.nathan.config;
in with lib; {
2022-06-23 02:57:41 -04:00
# Generic desktop configuration
2022-07-02 02:44:43 -04:00
config = mkMerge [
(mkIf nc.isDesktop {
# Ergodox
environment.systemPackages = with pkgs; [ wally-cli ];
hardware.keyboard.zsa.enable = true;
# Configure grub if configured
})
2022-07-02 02:44:43 -04:00
(mkIf nc.setupGrub {
2022-07-24 13:52:34 -04:00
# Boot, drivers, and host name
2022-07-02 02:44:43 -04:00
# Use grub
boot.loader = {
grub = {
enable = true;
version = 2;
efiSupport = true;
# Go efi only
devices = [ "nodev" ];
# Use os-prober
useOSProber = true;
};
efi = {
efiSysMountPoint = "/boot/";
canTouchEfiVariables = false;
};
2022-06-23 02:57:41 -04:00
};
2022-07-02 02:44:43 -04:00
})
2022-07-24 13:52:34 -04:00
# Configure audio
2022-07-02 02:44:43 -04:00
(mkIf nc.audio {
# Disable normal audio subsystem explicitly
sound.enable = false;
# Turn on rtkit, so that audio processes can be upgraded to real time
security.rtkit.enable = true;
# Turn on pipewire
services.pipewire = {
enable = true;
# Turn on all the emulation layers
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
jack.enable = true;
2022-06-23 02:57:41 -04:00
};
2022-07-02 02:44:43 -04:00
# Turn on bluetooth services
services.blueman.enable = true;
hardware.bluetooth = {
2022-06-23 02:57:41 -04:00
enable = true;
2022-07-02 02:44:43 -04:00
package = pkgs.bluezFull;
2022-06-23 02:57:41 -04:00
};
2022-07-02 02:44:43 -04:00
# Add pulse audio packages, but do not enable them
environment.systemPackages = with pkgs; [
2022-07-02 02:44:43 -04:00
pulseaudio
pavucontrol
noisetorch
];
# Add noisetorch for microphone noise canceling
programs.noisetorch = { enable = true; };
2022-07-02 02:44:43 -04:00
# Configure fonts
})
(mkIf nc.fonts {
fonts.fonts = with pkgs; [
## Monospace Fonts
# FiraCode with nerd-fonts patch, as well as fira-code symbols for emacs
2023-03-14 12:42:56 -04:00
(nerdfonts.override { fonts = [ "FiraCode" "Iosevka" ]; })
2022-07-02 02:44:43 -04:00
fira-code-symbols
fira
2023-03-14 12:42:56 -04:00
## Proportional
2022-07-02 02:44:43 -04:00
roboto
liberation_ttf
noto-fonts
2023-03-14 12:42:56 -04:00
(iosevka.override {
privateBuildPlan = ''
[buildPlans.iosevka-sans-quasi]
family = "Iosevka Sans Quasi"
spacing = "quasi-proportional"
serifs = "sans"
no-cv-ss = true
export-glyph-names = false'';
set = "sans-quasi";
})
2022-07-02 02:44:43 -04:00
];
})
];
2022-06-23 02:57:41 -04:00
}