2022-06-23 02:57:41 -04:00
|
|
|
{ config, lib, pkgs, ... }:
|
2022-10-13 22:13:43 -04:00
|
|
|
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 [
|
2022-10-13 22:13:43 -04:00
|
|
|
(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;
|
|
|
|
efiSupport = true;
|
|
|
|
# Go efi only
|
|
|
|
devices = [ "nodev" ];
|
|
|
|
# Use os-prober
|
|
|
|
useOSProber = true;
|
|
|
|
};
|
|
|
|
efi = {
|
|
|
|
efiSysMountPoint = "/boot/";
|
2023-07-02 21:36:02 -04:00
|
|
|
canTouchEfiVariables = true;
|
2022-07-02 02:44:43 -04:00
|
|
|
};
|
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
|
2022-10-13 22:13:43 -04:00
|
|
|
environment.systemPackages = with pkgs; [
|
2022-07-02 02:44:43 -04:00
|
|
|
pulseaudio
|
|
|
|
pavucontrol
|
|
|
|
noisetorch
|
2023-06-17 13:37:03 -04:00
|
|
|
alsa-utils
|
|
|
|
alsa-lib
|
2022-07-02 02:44:43 -04:00
|
|
|
];
|
|
|
|
# Add noisetorch for microphone noise canceling
|
2022-10-13 22:13:43 -04:00
|
|
|
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
|
|
|
}
|