WIP splitting up configuration.nix into modules
This commit is contained in:
parent
05a553251f
commit
835faf218d
8 changed files with 160 additions and 98 deletions
40
flake.lock
generated
40
flake.lock
generated
|
@ -53,11 +53,11 @@
|
||||||
"base16-helix": {
|
"base16-helix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696727917,
|
"lastModified": 1720809814,
|
||||||
"narHash": "sha256-FVrbPk+NtMra0jtlC5oxyNchbm8FosmvXIatkRbYy1g=",
|
"narHash": "sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY=",
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "base16-helix",
|
"repo": "base16-helix",
|
||||||
"rev": "dbe1480d99fe80f08df7970e471fac24c05f2ddb",
|
"rev": "34f41987bec14c0f3f6b2155c19787b1f6489625",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -101,15 +101,15 @@
|
||||||
"base16-vim": {
|
"base16-vim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1663659192,
|
"lastModified": 1716150083,
|
||||||
"narHash": "sha256-uJvaYYDMXvoo0fhBZUhN8WBXeJ87SRgof6GEK2efFT0=",
|
"narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=",
|
||||||
"owner": "chriskempson",
|
"owner": "tinted-theming",
|
||||||
"repo": "base16-vim",
|
"repo": "base16-vim",
|
||||||
"rev": "3be3cd82cd31acfcab9a41bad853d9c68d30478d",
|
"rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "chriskempson",
|
"owner": "tinted-theming",
|
||||||
"repo": "base16-vim",
|
"repo": "base16-vim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -170,11 +170,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1714900398,
|
"lastModified": 1721135958,
|
||||||
"narHash": "sha256-H7XYHpjk1G6dkA3AnbYrKtaTFjcCE7ul6nUVlVQxtsA=",
|
"narHash": "sha256-H548rpPMsn25LDKn1PCFmPxmWlClJJGnvdzImHkqjuY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "fdaaf543bad047639ef0b356ea2e6caec2f1215c",
|
"rev": "afd2021bedff2de92dfce0e257a3d03ae65c603d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -191,11 +191,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1714981474,
|
"lastModified": 1715930644,
|
||||||
"narHash": "sha256-b3/U21CJjCjJKmA9WqUbZGZgCvospO3ArOUTgJugkOY=",
|
"narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "6ebe7be2e67be7b9b54d61ce5704f6fb466c536f",
|
"rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -206,11 +206,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1714763106,
|
"lastModified": 1721379653,
|
||||||
"narHash": "sha256-DrDHo74uTycfpAF+/qxZAMlP/Cpe04BVioJb6fdI0YY=",
|
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e9be42459999a253a9f92559b1f5b72e1b44c13d",
|
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -258,11 +258,11 @@
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716037261,
|
"lastModified": 1721478802,
|
||||||
"narHash": "sha256-eF0A36GdegKkEiwFArjCysGU/XEYvzj7x5jfkFMtmqM=",
|
"narHash": "sha256-+WMQs0fMAmpWPsKNgIFQoKLtvS4qtTj+mC++cD1May4=",
|
||||||
"owner": "danth",
|
"owner": "danth",
|
||||||
"repo": "stylix",
|
"repo": "stylix",
|
||||||
"rev": "76e7daf5a16d442ac98e844582f7dc1354610886",
|
"rev": "6f36b27afd7b7ac8664bb62b7b27728540972c82",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
|
||||||
# your system. Help is available in the configuration.nix(5) man page, on
|
|
||||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
|
||||||
|
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ # Include the results of the hardware scan.
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
../../modules/system/boot.nix
|
||||||
|
../../modules/system/audio.nix
|
||||||
|
../../modules/system/zsa_voyager.nix
|
||||||
|
|
||||||
|
../../modules/desktop/plasma.nix
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
../../modules/programs/security.nix
|
../../modules/programs/security.nix
|
||||||
../../modules/programs/theme.nix
|
../../modules/programs/theme.nix
|
||||||
../../modules/programs/shell.nix
|
../../modules/programs/shell.nix
|
||||||
|
@ -14,7 +18,6 @@
|
||||||
../../modules/programs/harden.nix
|
../../modules/programs/harden.nix
|
||||||
../../modules/programs/communication.nix
|
../../modules/programs/communication.nix
|
||||||
../../modules/programs/office.nix
|
../../modules/programs/office.nix
|
||||||
../../modules/programs/desktop.nix
|
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -22,33 +25,6 @@
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use the GRUB 2 boot loader.
|
|
||||||
# boot.loader.grub.enable = true;
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
# boot.loader.grub.efiSupport = true;
|
|
||||||
# boot.loader.grub.efiInstallAsRemovable = true;
|
|
||||||
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
||||||
# Define on which hard drive you want to install Grub.
|
|
||||||
# boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
|
|
||||||
|
|
||||||
# fileSystems."/home/chris/games" = {
|
|
||||||
# device = "/dev/disk/by-label/Games";
|
|
||||||
# fsType = "ntfs-3g";
|
|
||||||
# options = [ "rw" "uid=chris" ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
fileSystems."/home/chris/new_games" = {
|
|
||||||
device = "/dev/disk/by-label/games";
|
|
||||||
fsType = "ext4";
|
|
||||||
# options = [ "rw" "uid=chris" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/home/chris/data" = {
|
|
||||||
device = "/dev/disk/by-label/Data";
|
|
||||||
fsType = "ntfs-3g";
|
|
||||||
options = [ "rw" "uid=chris" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "chris-pc";
|
networking.hostName = "chris-pc";
|
||||||
# Pick only one of the below networking options.
|
# Pick only one of the below networking options.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
@ -59,52 +35,21 @@
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Amsterdam";
|
time.timeZone = "Europe/Amsterdam";
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
# i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
# console = {
|
|
||||||
# font = "Lat2-Terminus16";
|
|
||||||
# keyMap = "us";
|
|
||||||
# useXkbConfig = true; # use xkb.options in tty.
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
|
|
||||||
|
|
||||||
# Enable the Plasma 5 Desktop Environment.
|
|
||||||
services.displayManager = {
|
|
||||||
sddm = {
|
|
||||||
enable = true;
|
|
||||||
wayland.enable = true;
|
|
||||||
};
|
|
||||||
autoLogin = {
|
|
||||||
enable = true;
|
|
||||||
user = "chris";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# services.xserver.desktopManager.plasma5.enable = true;
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
# services.xserver.xkb.layout = "us";
|
|
||||||
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
# services.printing.enable = true;
|
|
||||||
|
|
||||||
# Enable sound.
|
# Enable sound.
|
||||||
sound.enable = true;
|
sound.enable = false;
|
||||||
# hardware.pulseaudio.enable = true;
|
hardware.pulseaudio.enable = false;
|
||||||
|
users.extraGroups.audio.members = [ "chris" ];
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true
|
||||||
|
alsa.support32Bit = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
@ -128,7 +73,7 @@
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim
|
neovim
|
||||||
wget
|
wget
|
||||||
chromium
|
# chromium
|
||||||
thunderbird
|
thunderbird
|
||||||
zoxide
|
zoxide
|
||||||
bottles
|
bottles
|
||||||
|
|
24
modules/desktop/plasma.nix
Normal file
24
modules/desktop/plasma.nix
Normal 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;
|
||||||
|
}
|
30
modules/home-manager/nextcloud.nix
Normal file
30
modules/home-manager/nextcloud.nix
Normal 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" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,6 +0,0 @@
|
||||||
{ config, pkgs, options, ... }:
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
ladybird
|
|
||||||
];
|
|
||||||
}
|
|
19
modules/system/audio.nix
Normal file
19
modules/system/audio.nix
Normal 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
15
modules/system/boot.nix
Normal 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" ];
|
||||||
|
};
|
||||||
|
}
|
35
modules/system/zsa_voyager.nix
Normal file
35
modules/system/zsa_voyager.nix
Normal 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"
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue