refactor!: massively overhaul configuration and bring it to the modern

age
This commit is contained in:
Youwen Wu 2024-09-17 23:21:29 -07:00
parent 1310dd7b7a
commit 9a081df74a
Signed by untrusted user: youwen
GPG key ID: 865658ED1FE61EC3
16 changed files with 492 additions and 251 deletions

11
modules/audio/default.nix Normal file
View file

@ -0,0 +1,11 @@
{
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
}

75
modules/core/default.nix Normal file
View file

@ -0,0 +1,75 @@
{ pkgs, inputs, ... }:
{
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
services.xserver.enable = false;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
nix = {
settings.experimental-features = [
"nix-command"
"flakes"
];
optimise.automatic = true;
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
# Free up to 1GiB when there is less than 100MiB left
extraOptions = ''
min-free = ${toString (100 * 1024 * 1024)}
max-free = ${toString (1024 * 1024 * 1024)}
'';
};
hardware.bluetooth.enable = true; # enables support for Bluetooth
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
fonts = {
enableDefaultPackages = true;
fontconfig = {
defaultFonts = {
serif = [ "Noto Serif" ];
sansSerif = [ "Noto Sans" ];
};
};
packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
(nerdfonts.override { fonts = [ "CascadiaCode" ]; })
];
};
environment.systemPackages = [
inputs.nixvim.packages.${pkgs.system}.default
];
# Define a user account. Don't forget to set a password with passwd.
users.users.kaitotlex = {
isNormalUser = true;
description = "KaitoTLex";
extraGroups = [
"networkmanager"
"wheel"
];
};
programs.fish.enable = true;
users.users.kaitotlex.shell = pkgs.fish;
}

View file

@ -0,0 +1,16 @@
{
security.rtkit.enable = true;
# Fingerprint Driver
services.fprintd.enable = true;
security.pam.services.login.fprintAuth = true;
# Enable the OpenSSH daemon.
services.openssh.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
services.gnome.gnome-keyring.enable = true;
}

11
modules/wm/default.nix Normal file
View file

@ -0,0 +1,11 @@
{
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
};
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
};
}