diff --git a/flake.nix b/flake.nix index 99aef6f..8627cce 100644 --- a/flake.nix +++ b/flake.nix @@ -65,6 +65,7 @@ inherit inputs outputs; }; modules = [ + ./modules ./users/kopatz ./modules/collections/desktop.nix ./systems/pc/configuration.nix diff --git a/modules/collections/desktop.nix b/modules/collections/desktop.nix index bf57d5a..bd5e3d6 100644 --- a/modules/collections/desktop.nix +++ b/modules/collections/desktop.nix @@ -1,10 +1,9 @@ -{pkgs, ...}: +{pkgs, config, ...}: { imports = [ - #../graphical/lxqt.nix ../cli-tools.nix ../docker.nix - ../fh/scanning.nix + #../fh/scanning.nix ../flatpak.nix ../gpg.nix ../graphical/audio.nix @@ -20,7 +19,6 @@ ../hardware/firmware.nix ../hardware/nvidia.nix ../hardware/ssd.nix - ../hardware/wooting.nix ../kernel.nix # use latest kernel ../nftables.nix ../nix/index.nix @@ -33,8 +31,10 @@ ../tmpfs.nix ../virt-manager.nix ../wireshark.nix - #../fh/forensik.nix - #../graphical/hyprland.nix - #../hardware/vfio.nix too stupid for this ]; + + kop.wooting.enable = true; + #kop.tmpfs.enabled = true; + #kop.wireshark.enabled = true; + #kop.virt-manager.enabled = true; } diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..622b8f5 --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,12 @@ +{ pkgs, config, ...}: +{ + imports = [ + ./fh + ./games + ./graphical + ./hardware + ./nix + ./services + ./support + ]; +} diff --git a/modules/fh/default.nix b/modules/fh/default.nix new file mode 100644 index 0000000..59e291a --- /dev/null +++ b/modules/fh/default.nix @@ -0,0 +1,6 @@ +{ pkgs, config, ...}: +{ + imports = [ + + ]; +} diff --git a/modules/games/default.nix b/modules/games/default.nix new file mode 100644 index 0000000..59e291a --- /dev/null +++ b/modules/games/default.nix @@ -0,0 +1,6 @@ +{ pkgs, config, ...}: +{ + imports = [ + + ]; +} diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix new file mode 100644 index 0000000..59e291a --- /dev/null +++ b/modules/graphical/default.nix @@ -0,0 +1,6 @@ +{ pkgs, config, ...}: +{ + imports = [ + + ]; +} diff --git a/modules/graphical/games.nix b/modules/graphical/games.nix index b2f662f..59b63a2 100644 --- a/modules/graphical/games.nix +++ b/modules/graphical/games.nix @@ -8,10 +8,12 @@ }; environment.systemPackages = with pkgs; [ taisei + tetrio osu-lazer-bin wineWowPackages.unstableFull winetricks lutris + mangohud prismlauncher #libs ]; diff --git a/modules/graphical/shared.nix b/modules/graphical/shared.nix index db2b923..a246ebc 100644 --- a/modules/graphical/shared.nix +++ b/modules/graphical/shared.nix @@ -41,15 +41,12 @@ in keepassxc xfce.thunar remmina - #nextcloud-client thunderbird rofi localsend - element-desktop - tetrio + #element-desktop krita libreoffice-fresh - mangohud screenshot anki mpv diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix new file mode 100644 index 0000000..9c4b7cf --- /dev/null +++ b/modules/hardware/default.nix @@ -0,0 +1,6 @@ +{ pkgs, config, ...}: +{ + imports = [ + ./wooting.nix + ]; +} diff --git a/modules/hardware/wooting.nix b/modules/hardware/wooting.nix index 7dcfda9..0a9315d 100644 --- a/modules/hardware/wooting.nix +++ b/modules/hardware/wooting.nix @@ -1,31 +1,40 @@ -{ pkgs, lib, ...}: +{ config, pkgs, lib, ...}: +with lib; let - wooting-udev = pkgs.stdenv.mkDerivation rec { - pname = "wooting-udev-rules"; - version = "unstable-2023-03-31"; - - # Source: https://help.wooting.io/en/article/wootility-configuring-device-access-for-wootility-under-linux-udev-rules-r6lb2o/ - src = [ ./wooting.rules ]; - - dontUnpack = true; - - installPhase = '' - install -Dpm644 $src $out/lib/udev/rules.d/70-wooting.rules - ''; - - meta = with lib; { - homepage = "https://help.wooting.io/en/article/wootility-configuring-device-access-for-wootility-under-linux-udev-rules-r6lb2o/"; - description = "udev rules that give NixOS permission to communicate with Wooting keyboards"; - platforms = platforms.linux; - license = "unknown"; - maintainers = with maintainers; [ davidtwco ]; - }; -}; + cfg = config.kop.wooting; in { - services.udev.packages = [ wooting-udev ]; + options.kop.wooting = { + enable = mkEnableOption "Enable wooting hardware support"; + }; - environment.systemPackages = with pkgs; [ - wootility - ]; + config = let + wooting-udev = pkgs.stdenv.mkDerivation rec { + pname = "wooting-udev-rules"; + version = "unstable-2023-03-31"; + + # Source: https://help.wooting.io/en/article/wootility-configuring-device-access-for-wootility-under-linux-udev-rules-r6lb2o/ + src = [ ./wooting.rules ]; + + dontUnpack = true; + + installPhase = '' + install -Dpm644 $src $out/lib/udev/rules.d/70-wooting.rules + ''; + + meta = with lib; { + homepage = "https://help.wooting.io/en/article/wootility-configuring-device-access-for-wootility-under-linux-udev-rules-r6lb2o/"; + description = "udev rules that give NixOS permission to communicate with Wooting keyboards"; + platforms = platforms.linux; + license = "unknown"; + maintainers = with maintainers; [ davidtwco ]; + }; + }; + in mkIf cfg.enable { + services.udev.packages = [ wooting-udev ]; + + environment.systemPackages = with pkgs; [ + wootility + ]; + }; } diff --git a/modules/nix/default.nix b/modules/nix/default.nix new file mode 100644 index 0000000..59e291a --- /dev/null +++ b/modules/nix/default.nix @@ -0,0 +1,6 @@ +{ pkgs, config, ...}: +{ + imports = [ + + ]; +} diff --git a/modules/services/default.nix b/modules/services/default.nix new file mode 100644 index 0000000..59e291a --- /dev/null +++ b/modules/services/default.nix @@ -0,0 +1,6 @@ +{ pkgs, config, ...}: +{ + imports = [ + + ]; +} diff --git a/modules/support/default.nix b/modules/support/default.nix new file mode 100644 index 0000000..59e291a --- /dev/null +++ b/modules/support/default.nix @@ -0,0 +1,6 @@ +{ pkgs, config, ...}: +{ + imports = [ + + ]; +} diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index ef4eb32..e03b5af 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -26,9 +26,6 @@ networking.networkmanager.enable = true; boot.initrd.systemd.network.wait-online.enable = false; systemd.network.wait-online.enable = false; - - nix.settings.trusted-substituters = [ "https://ai.cachix.org" ]; - nix.settings.trusted-public-keys = [ "ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc=" ]; services.nscd.enableNsncd = false; #disable firewall when doing ipv6 vm stuff @@ -61,11 +58,6 @@ # Enable CUPS to print documents. services.printing.enable = true; - - - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; - # Enable automatic login for the user. #services.xserver.displayManager.autoLogin.enable = true; #services.xserver.displayManager.autoLogin.user = "kopatz"; @@ -73,13 +65,6 @@ # Allow unfree packages nixpkgs.config.allowUnfree = true; - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget - ]; - security.pki.certificates = [ '' -----BEGIN CERTIFICATE----- MIIBjTCCATKgAwIBAgIRAMVH2+JHZ3wm2fLUlKjTYDswCgYIKoZIzj0EAwIwJDEM