WIP splitting up configuration.nix into modules

This commit is contained in:
Chris Kruining 2024-07-20 22:22:47 +02:00
parent 05a553251f
commit 835faf218d
8 changed files with 160 additions and 98 deletions

View file

@ -0,0 +1,24 @@
{ pkgs, ... }:
{
services = {
displayManager = {
sddm = {
enable = true;
wayland.enable = true;
};
autoLogin = {
enable = true;
user = "chris";
};
};
};
services.desktopManager.plasma6.enable = true;
environment.plasma6.excludePackages = with pkgs.kdePackages; [
konsole
];
# should enable theme integration with gtk apps (i.e. firefox, thunderbird)
programs.dconf.enable = true;
}

View file

@ -0,0 +1,30 @@
{ ... }:
{
home.file.".netrc".text = ''
login root
password KaasIsAwesome!
'';
systemd.user = {
services.nextcloud-autosync = {
Unit = {
Description = "Automatic nextcloud sync";
After = "network-online.target";
};
Service = {
Type = "simple";
ExecStart = "${pkgs.nextcloud-client}/bin/nextcloudcmd -h -n --path /var/music /home/chris/Music https://cloud.kruining.eu";
TimeoutStopSec = "180";
KillMode = "process";
KillSignal = "SIGINT";
};
Install.WantedBy = [ "multi-user.target" ];
};
timers.nextcloud-autosync = {
Unit.Description = "Automatic nextcloud sync";
Timer.OnBootSec = "5min";
Timer.OnUnitActiveSec = "60min";
Install.WantedBy = [ "multi-user.target" "timers.target" ];
};
};
}

View file

@ -1,6 +0,0 @@
{ config, pkgs, options, ... }:
{
environment.systemPackages = with pkgs; [
ladybird
];
}

19
modules/system/audio.nix Normal file
View file

@ -0,0 +1,19 @@
{ pkgs, ... }:
{
sound.enable = false;
hardware.pulseaudio.enable = false;
users.extraGroups.audio.members = [ "chris" ];
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
jack.enable = true;
};
}

15
modules/system/boot.nix Normal file
View file

@ -0,0 +1,15 @@
{}:
{
boot.loader.systemd-boot-enable = true;
fileSystems."/home/chris/new_games" = {
device = "/dev/disk/by-label/games";
fsType = "ext4";
};
fileSystems."/home/chris/data" = {
device = "/dev/disk/by-label/Data";
fsType = "ntfs-3g";
options = [ "rw" "uid=chris" ];
};
}

View file

@ -0,0 +1,35 @@
{ config, pkgs, options, ... }:
{
environment.systemPackages = with pkgs; [
keymapp
];
hardware.keyboard.zsa.enable = true;
services.udev.extraRules = ''
# Rules for Oryx web flashing and live training
KERNEL=="hidraw*", ATTRS{idVendor}=="16c0", MODE="0664", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev"
# Legacy rules for live training over webusb (Not needed for firmware v21+)
# Rule for all ZSA keyboards
SUBSYSTEM=="usb", ATTR{idVendor}=="3297", GROUP="plugdev"
# Rule for the Moonlander
SUBSYSTEM=="usb", ATTR{idVendor}=="3297", ATTR{idProduct}=="1969", GROUP="plugdev"
# Rule for the Ergodox EZ
SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="1307", GROUP="plugdev"
# Rule for the Planck EZ
SUBSYSTEM=="usb", ATTR{idVendor}=="feed", ATTR{idProduct}=="6060", GROUP="plugdev"
# Wally Flashing rules for the Ergodox EZ
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666"
# Keymapp / Wally Flashing rules for the Moonlander and Planck EZ
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666", SYMLINK+="stm32_dfu"
# Keymapp Flashing rules for the Voyager
SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu"
'';
}