summaryrefslogtreecommitdiff
path: root/modules/desktop.nix
diff options
context:
space:
mode:
authorKyren223 <contact@kyren.codes>2026-06-06 02:07:42 +0300
committerKyren223 <contact@kyren.codes>2026-06-06 02:07:42 +0300
commitf09032fddc30a21bd3eaab53c0ba713feaaf7e56 (patch)
tree364e9bb4db801defec63e5c455cb255a0c1a60a6 /modules/desktop.nix
parent1770ca5c711a348b373db3cc4a94759290672373 (diff)
srated wiping all the unncessary nixos configs
Diffstat (limited to 'modules/desktop.nix')
-rw-r--r--modules/desktop.nix107
1 files changed, 0 insertions, 107 deletions
diff --git a/modules/desktop.nix b/modules/desktop.nix
index 3b3bc21..899d5db 100644
--- a/modules/desktop.nix
+++ b/modules/desktop.nix
@@ -1,114 +1,11 @@
{ pkgs, ... }:
{
- imports = [
- # ./nvidia.nix
- ];
-
environment.systemPackages = with pkgs; [
openrgb-with-all-plugins
phoronix-test-suite
-
- libsodium # Needed for webzfs, seems to be a python crypto library
- libsodium.dev
- libsodium.out
- python313Packages.libnacl
];
- users.groups.webzfs = { };
- users.users.webzfs = {
- isNormalUser = true;
- password = "";
- };
-
- hardware.keyboard.qmk.enable = true;
- services.udev.extraRules = ''
- # Match ANY Keychron device via hidraw (covers Q1 HE in all modes)
- KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="3434", MODE="0666", TAG+="uaccess", TAG+="udev-acl"
-
- # STM bootloader for flashing firmware
- SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0666", TAG+="uaccess"
- '';
-
- security.sudo.extraRules = [
- {
- users = [ "webzfs" ];
- commands = [
- {
- command = "/nix/store/*-zfs-user-*/bin/zpool";
- options = [ "NOPASSWD" ];
- }
- {
- command = "/nix/store/*-zfs-user-*/bin/zfs";
- options = [ "NOPASSWD" ];
- }
- ];
- }
- ];
- security.sudo.extraConfig = ''
- Defaults env_reset,always_set_home,secure_path="/run/current-system/sw/bin:/run/wrappers/bin:/nix/store"
- Defaults secure_path="/run/current-system/sw/bin:/bin:/usr/bin"
- Defaults env_reset
- Defaults ignore_dot
- Defaults !requiretty
- '';
- environment.etc."sudoers.d/webzfs".text = ''
- # WebZFS sudo permissions
- # Allow webzfs user to execute ZFS and SMART commands
-
- # ZFS commands (multiple paths for different distributions)
- webzfs ALL=(ALL) NOPASSWD: zpool, zfs, zdb -l *, /run/current-system/sw/bin/zpool
-
- # SMART monitoring (multiple paths for different distributions)
- webzfs ALL=(ALL) NOPASSWD: smartctl
-
- # Disk utilities
- webzfs ALL=(ALL) NOPASSWD: blkid
-
- # Sanoid/Syncoid (optional)
- webzfs ALL=(ALL) NOPASSWD: sanoid, syncoid
-
- # Service management (systemctl for system services page)
- webzfs ALL=(ALL) NOPASSWD: systemctl
-
- # Crontab editing
- webzfs ALL=(ALL) NOPASSWD: crontab
-
- # File editing (for config files like smartd.conf, sanoid.conf)
- webzfs ALL=(ALL) NOPASSWD: mkdir
-
- # Read system journal and plain-text syslog files for the
- # Observability -> System Log page. journalctl needs sudo (or
- # systemd-journal group) on most distros. tail covers Debian/Ubuntu
- # (/var/log/syslog) and old RHEL (/var/log/messages).
- webzfs ALL=(ALL) NOPASSWD: tail
- '';
-
- systemd.units."webzfs.service".text = ''
- [Unit]
- Description=WebZFS Web Management Interface
- After=network.target zfs-mount.service
-
- [Service]
- Type=notify
- User=root
- Group=root
- WorkingDirectory=/opt/webzfs
- Environment="PATH=/opt/webzfs/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/run/current-system/sw/bin:/sbin:/bin"
- ExecStart=/opt/webzfs/.venv/bin/gunicorn -c config/gunicorn.conf.py
- Restart=always
- RestartSec=5
-
- # Runtime directory for unix socket support
- # Creates /run/webzfs/ on service start, removes on stop
- # To use: set BIND=unix:/run/webzfs/webzfs.sock in .env
- RuntimeDirectory=webzfs
- RuntimeDirectoryMode=0755
-
- [Install]
- WantedBy=multi-user.target
- '';
-
# Automaticaly mount C drive
fileSystems."/mnt/c" = {
device = "/dev/nvme1n1p4";
@@ -121,10 +18,6 @@
];
};
- boot.supportedFilesystems = [ "zfs" ];
- boot.zfs.forceImportRoot = false;
- networking.hostId = "7223ffff";
-
# Automatically mount E drive
# fileSystems."/mnt/e" = {
# device = "/dev/sda2";