]> Untitled Git - monorepo.git/commitdiff
finish config for workstation
authorPreston Pan <ret2pop@gmail.com>
Thu, 30 Jan 2025 07:04:58 +0000 (23:04 -0800)
committerPreston Pan <ret2pop@gmail.com>
Thu, 30 Jan 2025 07:04:58 +0000 (23:04 -0800)
config/nix.org
nix/flake.nix
nix/modules/configuration.nix
nix/modules/cuda.nix
nix/modules/default.nix
nix/modules/home/default.nix
nix/modules/nginx.nix
nix/modules/nvidia.nix
nix/modules/vars.nix
nix/modules/xserver.nix
nix/systems/affinity/default.nix

index 4ff5a088ab8578c6344a0383117b3d9483013881..eb6672a1a50d2561472fe15b5e8961170368a3ba 100644 (file)
@@ -173,6 +173,7 @@ largely self-documenting.
           "eDP-1"
           "DP-2"
           "DP-3"
+          "DP-4"
           "LVDS-1"
         ];
         example = [];
@@ -955,171 +956,172 @@ I have many imports that we'll go through next.
 
     options = {
       monorepo.profiles = {
-       enable = lib.mkEnableOption "Enables home manager desktop configuration";
-       # Programs
-       lang-c.enable = lib.mkEnableOption "Enables C language support";
-       lang-sh.enable = lib.mkEnableOption "Enables sh language support";
-       lang-rust.enable = lib.mkEnableOption "Enables Rust language support";
-       lang-python.enable = lib.mkEnableOption "Enables python language support";
-       lang-sol.enable = lib.mkEnableOption "Enables solidity language support";
-       lang-openscad.enable = lib.mkEnableOption "Enables openscad language support";
-       lang-js.enable = lib.mkEnableOption "Enables javascript language support";
-       lang-nix.enable = lib.mkEnableOption "Enables nix language support";
-       lang-coq.enable = lib.mkEnableOption "Enables coq language support";
-
-       crypto.enable = lib.mkEnableOption "Enables various cryptocurrency wallets";
-       art.enable = lib.mkEnableOption "Enables various art programs";
-       music.enable = lib.mkEnableOption "Enables mpd";
-       workstation.enable = lib.mkEnableOption "Enables workstation packages (music production and others)";
-       cuda.enable = lib.mkEnableOption "Enables CUDA user package builds";
-
-       hyprland = {
-               enable = lib.mkEnableOption "Enables hyprland";
-               monitors = lib.mkOption {
-                       type = lib.types.listOf lib.types.str;
-                       default = [
-                         "HDMI-A-1"
-                         "eDP-1"
-                         "DP-2"
-                         "DP-3"
-                         "LVDS-1"
-                       ];
-                       example = [];
-                       description = "Hyprland monitors";
-               };
-       };
-       email = {
-               email = lib.mkOption {
-                       type = lib.types.str;
-                       default = "ret2pop@gmail.com";
-                       example = "john@example.com";
-                       description = "Email address and imaps/smtps account";
-               };
-               imapsServer = lib.mkOption {
-                       type = lib.types.str;
-                       default = "imap.gmail.com";
-                       example = "imap.example.com";
-                       description = "imaps server address";
-               };
-               smtpsServer = lib.mkOption {
-                       type = lib.types.str;
-                       default = "smtp.gmail.com";
-                       example = "smtp.example.com";
-                       description = "smtp server address";
-               };
-               enable = lib.mkEnableOption "Enables email";
-       };
+       enable = lib.mkEnableOption "Enables home manager desktop configuration";
+       # Programs
+       lang-c.enable = lib.mkEnableOption "Enables C language support";
+       lang-sh.enable = lib.mkEnableOption "Enables sh language support";
+       lang-rust.enable = lib.mkEnableOption "Enables Rust language support";
+       lang-python.enable = lib.mkEnableOption "Enables python language support";
+       lang-sol.enable = lib.mkEnableOption "Enables solidity language support";
+       lang-openscad.enable = lib.mkEnableOption "Enables openscad language support";
+       lang-js.enable = lib.mkEnableOption "Enables javascript language support";
+       lang-nix.enable = lib.mkEnableOption "Enables nix language support";
+       lang-coq.enable = lib.mkEnableOption "Enables coq language support";
+
+       crypto.enable = lib.mkEnableOption "Enables various cryptocurrency wallets";
+       art.enable = lib.mkEnableOption "Enables various art programs";
+       music.enable = lib.mkEnableOption "Enables mpd";
+       workstation.enable = lib.mkEnableOption "Enables workstation packages (music production and others)";
+       cuda.enable = lib.mkEnableOption "Enables CUDA user package builds";
+
+       hyprland = {
+               enable = lib.mkEnableOption "Enables hyprland";
+               monitors = lib.mkOption {
+                       type = lib.types.listOf lib.types.str;
+                       default = [
+                         "HDMI-A-1"
+                         "eDP-1"
+                         "DP-2"
+                         "DP-3"
+                         "LVDS-1"
+          "DP-4"
+                       ];
+                       example = [];
+                       description = "Hyprland monitors";
+               };
+       };
+       email = {
+               email = lib.mkOption {
+                       type = lib.types.str;
+                       default = "ret2pop@gmail.com";
+                       example = "john@example.com";
+                       description = "Email address and imaps/smtps account";
+               };
+               imapsServer = lib.mkOption {
+                       type = lib.types.str;
+                       default = "imap.gmail.com";
+                       example = "imap.example.com";
+                       description = "imaps server address";
+               };
+               smtpsServer = lib.mkOption {
+                       type = lib.types.str;
+                       default = "smtp.gmail.com";
+                       example = "smtp.example.com";
+                       description = "smtp server address";
+               };
+               enable = lib.mkEnableOption "Enables email";
+       };
       };
     };
 
     config = {
       home.packages = (if config.monorepo.profiles.email.enable then [ pkgs.mu ] else [])
-                                             ++
-                                             (if config.monorepo.profiles.lang-c.enable then (with pkgs; [
-                                               autobuild
-                                               clang
-                                               gdb
-                                               gnumake
-                                               bear
-                                               clang-tools
-                                             ]) else [])
-                                             ++
-                                             (if config.monorepo.profiles.lang-js.enable then (with pkgs; [
-                                               nodejs
-                                               bun
-                                               yarn
-                                               typescript
-                                               vscode-langservers-extracted
-                                             ]) else [])
-                                             ++
-                                             (if config.monorepo.profiles.lang-rust.enable then (with pkgs; [
-                                               cargo
-                                               rust-analyzer
-                                               rustfmt
-                                             ]) else [])
-                                             ++
-                                             (if config.monorepo.profiles.lang-python.enable then (with pkgs; [
-                                               poetry
-                                               python3
-                                               python312Packages.jedi
-                                             ]) else [])
-                                             ++
-                                             (if config.monorepo.profiles.lang-sol.enable then (with pkgs; [
-                                               solc
-                                             ]) else [])
-                                             ++
-                                             (if config.monorepo.profiles.lang-openscad.enable then (with pkgs; [
-                                               openscad
-                                               openscad-lsp
-                                             ]) else [])
-                                             ++
-                                             (if config.monorepo.profiles.lang-sh.enable then (with pkgs; [
-                                               bash-language-server
-                                             ]) else [])
-                                             ++
-                                             (if config.monorepo.profiles.lang-coq.enable then (with pkgs; [
-                                               coq
-                                             ]) else [])
-                                             ++
-                                             (if config.monorepo.profiles.lang-nix.enable then (with pkgs; [
-                                               nil
-                                               nixd
-                                               nixfmt-rfc-style
-                                             ]) else [])
-                                             ++
-                                             (if config.monorepo.profiles.crypto.enable then (with pkgs; [
-                                               bitcoin
-                                               electrum
-                                               monero-cli
-                                               monero-gui
-                                             ]) else [])
-                                             ++
-                                             (if config.monorepo.profiles.art.enable then (with pkgs; [
-                                               inkscape
-                                               krita
-                                             ]) else [])
-                                             ++
-                                             (if config.monorepo.profiles.music.enable then (with pkgs; [
-                                               mpc-cli
-                                               sox
-                                             ]) else [])
-                                             ++
-                                             (if config.monorepo.profiles.workstation.enable then (with pkgs; [
-                       alsa-utils
-                       alsa-scarlett-gui
-                                   ardour
-                                   audacity
-                                         blender
-                       fluidsynth
-                       qjackctl
-                       qsynth
-                       qpwgraph
-                       imagemagick
-                       inkscape
-                       kdenlive
-                       kicad
-                                             ]) else []);
+                                             ++
+                                             (if config.monorepo.profiles.lang-c.enable then (with pkgs; [
+                                               autobuild
+                                               clang
+                                               gdb
+                                               gnumake
+                                               bear
+                                               clang-tools
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-js.enable then (with pkgs; [
+                                               nodejs
+                                               bun
+                                               yarn
+                                               typescript
+                                               vscode-langservers-extracted
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-rust.enable then (with pkgs; [
+                                               cargo
+                                               rust-analyzer
+                                               rustfmt
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-python.enable then (with pkgs; [
+                                               poetry
+                                               python3
+                                               python312Packages.jedi
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-sol.enable then (with pkgs; [
+                                               solc
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-openscad.enable then (with pkgs; [
+                                               openscad
+                                               openscad-lsp
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-sh.enable then (with pkgs; [
+                                               bash-language-server
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-coq.enable then (with pkgs; [
+                                               coq
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-nix.enable then (with pkgs; [
+                                               nil
+                                               nixd
+                                               nixfmt-rfc-style
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.crypto.enable then (with pkgs; [
+                                               bitcoin
+                                               electrum
+                                               monero-cli
+                                               monero-gui
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.art.enable then (with pkgs; [
+                                               inkscape
+                                               krita
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.music.enable then (with pkgs; [
+                                               mpc-cli
+                                               sox
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.workstation.enable then (with pkgs; [
+                       alsa-utils
+                       alsa-scarlett-gui
+                                   ardour
+                                   audacity
+                                         blender
+                       fluidsynth
+                       qjackctl
+                       qsynth
+                       qpwgraph
+                       imagemagick
+                       inkscape
+                       kdenlive
+                       kicad
+                                             ]) else []);
 
       monorepo.profiles = {
-       enable = lib.mkDefault true;
-       music.enable = lib.mkDefault true;
-       hyprland.enable = lib.mkDefault true;
-       email.enable = lib.mkDefault true;
-
-       # Programming
-       lang-c.enable = lib.mkDefault true;
-       lang-rust.enable = lib.mkDefault true;
-       lang-python.enable = lib.mkDefault true;
-       lang-sol.enable = lib.mkDefault true;
-       lang-sh.enable = lib.mkDefault true;
-       lang-openscad.enable = lib.mkDefault true;
-       lang-js.enable = lib.mkDefault true;
-       lang-nix.enable = lib.mkDefault true;
-       lang-coq.enable = lib.mkDefault true;
-
-       crypto.enable = lib.mkDefault true;
-       art.enable = lib.mkDefault true;
-       workstation.enable = lib.mkDefault true;
+       enable = lib.mkDefault true;
+       music.enable = lib.mkDefault true;
+       hyprland.enable = lib.mkDefault true;
+       email.enable = lib.mkDefault true;
+
+       # Programming
+       lang-c.enable = lib.mkDefault true;
+       lang-rust.enable = lib.mkDefault true;
+       lang-python.enable = lib.mkDefault true;
+       lang-sol.enable = lib.mkDefault true;
+       lang-sh.enable = lib.mkDefault true;
+       lang-openscad.enable = lib.mkDefault true;
+       lang-js.enable = lib.mkDefault true;
+       lang-nix.enable = lib.mkDefault true;
+       lang-coq.enable = lib.mkDefault true;
+
+       crypto.enable = lib.mkDefault true;
+       art.enable = lib.mkDefault true;
+       workstation.enable = lib.mkDefault true;
       };
     };
   }
index 2420325fa25f3d5d35eb17abcf3917283439ed64..c09005ca1ad285b3f08f75024406f358a704c780 100644 (file)
@@ -5,18 +5,18 @@
     nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
 
     home-manager = {
-      url = "github:nix-community/home-manager/release-24.11";
-      inputs.nixpkgs.follows = "nixpkgs";
+       url = "github:nix-community/home-manager/release-24.11";
+       inputs.nixpkgs.follows = "nixpkgs";
     };
 
     disko = {
-      url = "github:nix-community/disko";
-      inputs.nixpkgs.follows = "nixpkgs";
+       url = "github:nix-community/disko";
+       inputs.nixpkgs.follows = "nixpkgs";
     };
 
     lanzaboote = {
-      url = "github:nix-community/lanzaboote/v0.4.1";
-      inputs.nixpkgs.follows = "nixpkgs";
+       url = "github:nix-community/lanzaboote/v0.4.1";
+       inputs.nixpkgs.follows = "nixpkgs";
     };
 
     nur.url = "github:nix-community/NUR";
 
   outputs = { nixpkgs, home-manager, nur, disko, lanzaboote, sops-nix, ... }@attrs: {
     nixosConfigurations = {
-      installer = nixpkgs.lib.nixosSystem {
-       system = "x86_64-linux";
-       modules = [
-         (
-           { pkgs, modulesPath, ... }:
-           {
-             imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];
-           }
-         )
-         ./systems/installer/default.nix
-       ];
-      };
+       installer = nixpkgs.lib.nixosSystem {
+         system = "x86_64-linux";
+         modules = [
+           (
+             { pkgs, modulesPath, ... }:
+             {
+               imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];
+             }
+           )
+           ./systems/installer/default.nix
+         ];
+       };
 
-      continuity = nixpkgs.lib.nixosSystem {
-       system = "x86_64-linux";
-       specialArgs = attrs;
-       modules = [
-         lanzaboote.nixosModules.lanzaboote
-         disko.nixosModules.disko
-         home-manager.nixosModules.home-manager
-         sops-nix.nixosModules.sops
-         { nixpkgs.overlays = [ nur.overlays.default ]; }
-         { home-manager.extraSpecialArgs = attrs; }
+       continuity = nixpkgs.lib.nixosSystem {
+         system = "x86_64-linux";
+         specialArgs = attrs;
+         modules = [
+           lanzaboote.nixosModules.lanzaboote
+           disko.nixosModules.disko
+           home-manager.nixosModules.home-manager
+           sops-nix.nixosModules.sops
+           { nixpkgs.overlays = [ nur.overlays.default ]; }
+           { home-manager.extraSpecialArgs = attrs; }
 
-         ./modules/sda-simple.nix
-         ./systems/continuity/default.nix
-       ];
-      };
+           ./modules/sda-simple.nix
+           ./systems/continuity/default.nix
+         ];
+       };
 
-      affinity = nixpkgs.lib.nixosSystem {
-       system = "x86_64-linux";
-       specialArgs = attrs;
-       modules = [
-         lanzaboote.nixosModules.lanzaboote
-         disko.nixosModules.disko
-         home-manager.nixosModules.home-manager
-         sops-nix.nixosModules.sops
-         { nixpkgs.overlays = [ nur.overlays.default ]; }
-         { home-manager.extraSpecialArgs = attrs; }
-         ./modules/nvme-simple.nix
-         ./systems/affinity/default.nix
-       ];
-      };
+       affinity = nixpkgs.lib.nixosSystem {
+         system = "x86_64-linux";
+         specialArgs = attrs;
+         modules = [
+           lanzaboote.nixosModules.lanzaboote
+           disko.nixosModules.disko
+           home-manager.nixosModules.home-manager
+           sops-nix.nixosModules.sops
+           { nixpkgs.overlays = [ nur.overlays.default ]; }
+           { home-manager.extraSpecialArgs = attrs; }
+           ./modules/nvme-simple.nix
+           ./systems/affinity/default.nix
+         ];
+       };
 
-      spontaneity = nixpkgs.lib.nixosSystem {
-       system = "x86_64-linux";
-       specialArgs = attrs;
-       modules = [];
-      };
+       spontaneity = nixpkgs.lib.nixosSystem {
+         system = "x86_64-linux";
+         specialArgs = attrs;
+         modules = [];
+       };
     };
   };
 }
index 4f821e2bbf0413aa8d337fa56641da51b5650e14..81277595d6a1e3675d8451cdd631af28528b6741 100644 (file)
 
   environment = {
     etc = {
-      securetty.text = ''
-         # /etc/securetty: list of terminals on which root is allowed to login.
-         # See securetty(5) and login(1).
-         '';
+       securetty.text = ''
+           # /etc/securetty: list of terminals on which root is allowed to login.
+           # See securetty(5) and login(1).
+           '';
     };
   };
 
     coredump.enable = false;
     network.config.networkConfig.IPv6PrivacyExtensions = "kernel";
     tmpfiles.settings = {
-      "restricthome"."/home/*".Z.mode = "~0700";
+       "restricthome"."/home/*".Z.mode = "~0700";
 
-      "restrictetcnixos"."/etc/nixos/*".Z = {
-       mode = "0000";
-       user = "root";
-       group = "root";
-      };
+       "restrictetcnixos"."/etc/nixos/*".Z = {
+         mode = "0000";
+         user = "root";
+         group = "root";
+       };
     };
   };
 
     extraModulePackages = [ ];
 
     initrd = {
-      availableKernelModules = [
-       "xhci_pci"
-       "ahci"
-       "usb_storage"
-       "sd_mod"
-       "nvme"
-       "sd_mod"
-       "ehci_pci"
-       "rtsx_pci_sdmmc"
-       "usbhid"
-      ];
-
-      kernelModules = [ ];
+       availableKernelModules = [
+         "xhci_pci"
+         "ahci"
+         "usb_storage"
+         "sd_mod"
+         "nvme"
+         "sd_mod"
+         "ehci_pci"
+         "rtsx_pci_sdmmc"
+         "usbhid"
+       ];
+
+       kernelModules = [ ];
     };
 
     lanzaboote = {
-      enable = config.monorepo.profiles.secureBoot.enable;
-      pkiBundle = "/etc/secureboot";
+       enable = config.monorepo.profiles.secureBoot.enable;
+       pkiBundle = "/etc/secureboot";
     };
 
     loader = {
-      systemd-boot.enable = lib.mkForce (! config.monorepo.profiles.secureBoot.enable);
-      efi.canTouchEfiVariables = true;
+       systemd-boot.enable = lib.mkForce (! config.monorepo.profiles.secureBoot.enable);
+       efi.canTouchEfiVariables = true;
     };
 
     kernelModules = [
-      "snd-seq"
-      "snd-rawmidi"
-      "xhci_hcd"
-      "kvm_intel"
+       "snd-seq"
+       "snd-rawmidi"
+       "xhci_hcd"
+       "kvm_intel"
     ];
 
     kernelParams = [
-      "debugfs=off"
-      "page_alloc.shuffle=1"
-      "slab_nomerge"
-      "page_poison=1"
-
-      # madaidan
-      "pti=on"
-      "randomize_kstack_offset=on"
-      "vsyscall=none"
-      "module.sig_enforce=1"
-      "lockdown=confidentiality"
-
-      # cpu
-      "spectre_v2=on"
-      "spec_store_bypass_disable=on"
-      "tsx=off"
-      "tsx_async_abort=full,nosmt"
-      "mds=full,nosmt"
-      "l1tf=full,force"
-      "nosmt=force"
-      "kvm.nx_huge_pages=force"
-
-      # hardened
-      "extra_latent_entropy"
-
-      # mineral
-      "init_on_alloc=1"
-      "random.trust_cpu=off"
-      "random.trust_bootloader=off"
-      "intel_iommu=on"
-      "amd_iommu=force_isolation"
-      "iommu=force"
-      "iommu.strict=1"
-      "init_on_free=1"
-      "quiet"
-      "loglevel=0"
+       "debugfs=off"
+       "page_alloc.shuffle=1"
+       "slab_nomerge"
+       "page_poison=1"
+
+       # madaidan
+       "pti=on"
+       "randomize_kstack_offset=on"
+       "vsyscall=none"
+       "module.sig_enforce=1"
+       "lockdown=confidentiality"
+
+       # cpu
+       "spectre_v2=on"
+       "spec_store_bypass_disable=on"
+       "tsx=off"
+       "tsx_async_abort=full,nosmt"
+       "mds=full,nosmt"
+       "l1tf=full,force"
+       "nosmt=force"
+       "kvm.nx_huge_pages=force"
+
+       # hardened
+       "extra_latent_entropy"
+
+       # mineral
+       "init_on_alloc=1"
+       "random.trust_cpu=off"
+       "random.trust_bootloader=off"
+       "intel_iommu=on"
+       "amd_iommu=force_isolation"
+       "iommu=force"
+       "iommu.strict=1"
+       "init_on_free=1"
+       "quiet"
+       "loglevel=0"
     ];
 
     blacklistedKernelModules = [
-      "netrom"
-      "rose"
-
-      "adfs"
-      "affs"
-      "bfs"
-      "befs"
-      "cramfs"
-      "efs"
-      "erofs"
-      "exofs"
-      "freevxfs"
-      "f2fs"
-      "hfs"
-      "hpfs"
-      "jfs"
-      "minix"
-      "nilfs2"
-      "ntfs"
-      "omfs"
-      "qnx4"
-      "qnx6"
-      "sysv"
-      "ufs"
+       "netrom"
+       "rose"
+
+       "adfs"
+       "affs"
+       "bfs"
+       "befs"
+       "cramfs"
+       "efs"
+       "erofs"
+       "exofs"
+       "freevxfs"
+       "f2fs"
+       "hfs"
+       "hpfs"
+       "jfs"
+       "minix"
+       "nilfs2"
+       "ntfs"
+       "omfs"
+       "qnx4"
+       "qnx6"
+       "sysv"
+       "ufs"
     ];
 
     kernel.sysctl = {
-      "kernel.ftrace_enabled" = false;
-      "net.core.bpf_jit_enable" = false;
-      "kernel.kptr_restrict" = 2;
-
-      # madaidan
-      "vm.swappiness" = 1;
-      "vm.unprivileged_userfaultfd" = 0;
-      "dev.tty.ldisc_autoload" = 0;
-      "kernel.kexec_load_disabled" = 1;
-      "kernel.sysrq" = 4;
-      "kernel.perf_event_paranoid" = 3;
-
-      # net
-      "net.ipv4.icmp_echo_ignore_broadcasts" = true;
-
-      "net.ipv4.conf.all.accept_redirects" = false;
-      "net.ipv4.conf.all.secure_redirects" = false;
-      "net.ipv4.conf.default.accept_redirects" = false;
-      "net.ipv4.conf.default.secure_redirects" = false;
-      "net.ipv6.conf.all.accept_redirects" = false;
-      "net.ipv6.conf.default.accept_redirects" = false;
+       "kernel.ftrace_enabled" = false;
+       "net.core.bpf_jit_enable" = false;
+       "kernel.kptr_restrict" = 2;
+
+       # madaidan
+       "vm.swappiness" = 1;
+       "vm.unprivileged_userfaultfd" = 0;
+       "dev.tty.ldisc_autoload" = 0;
+       "kernel.kexec_load_disabled" = 1;
+       "kernel.sysrq" = 4;
+       "kernel.perf_event_paranoid" = 3;
+
+       # net
+       "net.ipv4.icmp_echo_ignore_broadcasts" = true;
+
+       "net.ipv4.conf.all.accept_redirects" = false;
+       "net.ipv4.conf.all.secure_redirects" = false;
+       "net.ipv4.conf.default.accept_redirects" = false;
+       "net.ipv4.conf.default.secure_redirects" = false;
+       "net.ipv6.conf.all.accept_redirects" = false;
+       "net.ipv6.conf.default.accept_redirects" = false;
     };
   };
 
     useDHCP = lib.mkDefault true;
     hostName = config.monorepo.vars.hostName;
     networkmanager = {
-      enable = true;
-      # wifi.macAddress = "";
+       enable = true;
+       # wifi.macAddress = "";
     };
     firewall = {
-      allowedTCPPorts = [ ];
-      allowedUDPPorts = [ ];
+       allowedTCPPorts = [ ];
+       allowedUDPPorts = [ ];
     };
   };
 
     pulseaudio.enable = ! config.monorepo.profiles.pipewire.enable;
 
     bluetooth = {
-      enable = true;
-      powerOnBoot = true;
+       enable = true;
+       powerOnBoot = true;
     };
   };
 
   services = {
     chrony = {
-      enable = true;
-      enableNTS = true;
-      servers = [ "time.cloudflare.com" "ptbtime1.ptb.de" "ptbtime2.ptb.de" ];
+       enable = true;
+       enableNTS = true;
+       servers = [ "time.cloudflare.com" "ptbtime1.ptb.de" "ptbtime2.ptb.de" ];
     };
 
     jitterentropy-rngd.enable = true;
 
     # Misc.
     udev = {
-      extraRules = '''';
-      packages = with pkgs; [ 
-       platformio-core
-       platformio-core.udev
-       openocd
-      ];
+       extraRules = '''';
+       packages = with pkgs; [ 
+         platformio-core
+         platformio-core.udev
+         openocd
+       ];
     };
 
     printing.enable = true;
   nixpkgs = {
     hostPlatform = lib.mkDefault "x86_64-linux";
     config = {
-      allowUnfree = true;
-      cudaSupport = lib.mkDefault config.monorepo.profiles.cuda.enable;
+       allowUnfree = true;
+       cudaSupport = lib.mkDefault config.monorepo.profiles.cuda.enable;
     };
   };
 
   security = {
     apparmor = {
-      enable = true;
-      killUnconfinedConfinables = true;
+       enable = true;
+       killUnconfinedConfinables = true;
     };
 
     pam.loginLimits = [
-      { domain = "*"; item = "nofile"; type = "-"; value = "32768"; }
-      { domain = "*"; item = "memlock"; type = "-"; value = "32768"; }
+       { domain = "*"; item = "nofile"; type = "-"; value = "32768"; }
+       { domain = "*"; item = "memlock"; type = "-"; value = "32768"; }
     ];
     rtkit.enable = true;
 
     forcePageTableIsolation = true;
 
     tpm2 = {
-      enable = true;
-      pkcs11.enable = true;
-      tctiEnvironment.enable = true;
+       enable = true;
+       pkcs11.enable = true;
+       tctiEnvironment.enable = true;
     };
 
     auditd.enable = true;
     enable = true;
     wlr.enable = true;
     extraPortals = with pkgs; [
-      xdg-desktop-portal-gtk
-      xdg-desktop-portal
-      xdg-desktop-portal-hyprland
+       xdg-desktop-portal-gtk
+       xdg-desktop-portal
+       xdg-desktop-portal-hyprland
     ];
     config.common.default = "*";
   };
 
   users.users = {
     root.openssh.authorizedKeys.keys = [
-      "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINSshvS1N/42pH9Unp3Zj4gjqs9BXoin99oaFWYHXZDJ preston@preston-arch"
+       "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINSshvS1N/42pH9Unp3Zj4gjqs9BXoin99oaFWYHXZDJ preston@preston-arch"
     ];
 
     git = {
-      isSystemUser = true;
-      home = "/srv/git";
-      shell = "${pkgs.git}/bin/git-shell";
+       isSystemUser = true;
+       home = "/srv/git";
+       shell = "${pkgs.git}/bin/git-shell";
     };
     "${config.monorepo.vars.userName}" = {
-      initialPassword = "${config.monorepo.vars.userName}";
-      isNormalUser = true;
-      description = config.monorepo.vars.fullName;
-      extraGroups = [ "networkmanager" "wheel" "video" "docker" "jackaudio" "tss" "dialout" ];
-      shell = pkgs.zsh;
-      packages = [];
+       initialPassword = "${config.monorepo.vars.userName}";
+       isNormalUser = true;
+       description = config.monorepo.vars.fullName;
+       extraGroups = [ "networkmanager" "wheel" "video" "docker" "jackaudio" "tss" "dialout" ];
+       shell = pkgs.zsh;
+       packages = [];
     };
   };
 
index 0c9027812f3849b700e2a647186274e9376bd378..dd5846b060b5af774d2da50a028d7088c3b8348e 100644 (file)
@@ -1,9 +1,9 @@
 { config, lib, pkgs, ... }:
 {
   environment.systemPackages = with pkgs; [
-      cudatoolkit
-      cudaPackages.cudnn
-      cudaPackages.libcublas
-      linuxPackages.nvidia_x11
+       cudatoolkit
+       cudaPackages.cudnn
+       cudaPackages.libcublas
+       linuxPackages.nvidia_x11
   ];
 }
index 9cdd61616b03c8e868d063f811c439298a5ccb07..42843485ae7241e7f32ba9bfd9556b6bdb03da8c 100644 (file)
@@ -8,36 +8,36 @@
 
   options = {
     monorepo = {
-      profiles = {
-             cuda.enable = lib.mkEnableOption "Enables CUDA support";
-             documentation.enable = lib.mkEnableOption "Enables documentation on system.";
-             secureBoot.enable = lib.mkEnableOption "Enables secure boot. See sbctl.";
-             pipewire.enable = lib.mkEnableOption "Enables pipewire low latency audio setup";
-             tor.enable = lib.mkEnableOption "Enables tor along with torsocks";
-             home.enable = lib.mkEnableOption "Enables home user";
-             server.enable = lib.mkEnableOption "Enables server services";
-      };
+       profiles = {
+               cuda.enable = lib.mkEnableOption "Enables CUDA support";
+               documentation.enable = lib.mkEnableOption "Enables documentation on system.";
+               secureBoot.enable = lib.mkEnableOption "Enables secure boot. See sbctl.";
+               pipewire.enable = lib.mkEnableOption "Enables pipewire low latency audio setup";
+               tor.enable = lib.mkEnableOption "Enables tor along with torsocks";
+               home.enable = lib.mkEnableOption "Enables home user";
+               server.enable = lib.mkEnableOption "Enables server services";
+       };
     };
   };
 
   config = {
     home-manager.users."${config.monorepo.vars.userName}" = {
-      programs.home-manager.enable = config.monorepo.profiles.home.enable;
+       programs.home-manager.enable = config.monorepo.profiles.home.enable;
     };
 
     environment.systemPackages = lib.mkIf config.monorepo.profiles.documentation.enable (with pkgs; [
-      linux-manual
-      man-pages
-      man-pages-posix
+       linux-manual
+       man-pages
+       man-pages-posix
     ]);
 
     monorepo = {
-      profiles = {
-             documentation.enable = lib.mkDefault true;
-             pipewire.enable = lib.mkDefault true;
-             tor.enable = lib.mkDefault true;
-             home.enable = lib.mkDefault true;
-      };
+       profiles = {
+               documentation.enable = lib.mkDefault true;
+               pipewire.enable = lib.mkDefault true;
+               tor.enable = lib.mkDefault true;
+               home.enable = lib.mkDefault true;
+       };
     };
   };
 }
index a59a5362e132ef88096da425aa35fe86e1c6a847..edefc9ef45a562941e9e982d123bd9818dc774f7 100644 (file)
 
   options = {
     monorepo.profiles = {
-      enable = lib.mkEnableOption "Enables home manager desktop configuration";
-      # Programs
-      lang-c.enable = lib.mkEnableOption "Enables C language support";
-      lang-sh.enable = lib.mkEnableOption "Enables sh language support";
-      lang-rust.enable = lib.mkEnableOption "Enables Rust language support";
-      lang-python.enable = lib.mkEnableOption "Enables python language support";
-      lang-sol.enable = lib.mkEnableOption "Enables solidity language support";
-      lang-openscad.enable = lib.mkEnableOption "Enables openscad language support";
-      lang-js.enable = lib.mkEnableOption "Enables javascript language support";
-      lang-nix.enable = lib.mkEnableOption "Enables nix language support";
-      lang-coq.enable = lib.mkEnableOption "Enables coq language support";
+       enable = lib.mkEnableOption "Enables home manager desktop configuration";
+       # Programs
+       lang-c.enable = lib.mkEnableOption "Enables C language support";
+       lang-sh.enable = lib.mkEnableOption "Enables sh language support";
+       lang-rust.enable = lib.mkEnableOption "Enables Rust language support";
+       lang-python.enable = lib.mkEnableOption "Enables python language support";
+       lang-sol.enable = lib.mkEnableOption "Enables solidity language support";
+       lang-openscad.enable = lib.mkEnableOption "Enables openscad language support";
+       lang-js.enable = lib.mkEnableOption "Enables javascript language support";
+       lang-nix.enable = lib.mkEnableOption "Enables nix language support";
+       lang-coq.enable = lib.mkEnableOption "Enables coq language support";
 
-      crypto.enable = lib.mkEnableOption "Enables various cryptocurrency wallets";
-      art.enable = lib.mkEnableOption "Enables various art programs";
-      music.enable = lib.mkEnableOption "Enables mpd";
-      workstation.enable = lib.mkEnableOption "Enables workstation packages (music production and others)";
-      cuda.enable = lib.mkEnableOption "Enables CUDA user package builds";
+       crypto.enable = lib.mkEnableOption "Enables various cryptocurrency wallets";
+       art.enable = lib.mkEnableOption "Enables various art programs";
+       music.enable = lib.mkEnableOption "Enables mpd";
+       workstation.enable = lib.mkEnableOption "Enables workstation packages (music production and others)";
+       cuda.enable = lib.mkEnableOption "Enables CUDA user package builds";
 
-      hyprland = {
-             enable = lib.mkEnableOption "Enables hyprland";
-             monitors = lib.mkOption {
-                     type = lib.types.listOf lib.types.str;
-                     default = [
-                       "HDMI-A-1"
-                       "eDP-1"
-                       "DP-2"
-                       "DP-3"
-                       "LVDS-1"
-                     ];
-                     example = [];
-                     description = "Hyprland monitors";
-             };
-      };
-      email = {
-             email = lib.mkOption {
-                     type = lib.types.str;
-                     default = "ret2pop@gmail.com";
-                     example = "john@example.com";
-                     description = "Email address and imaps/smtps account";
-             };
-             imapsServer = lib.mkOption {
-                     type = lib.types.str;
-                     default = "imap.gmail.com";
-                     example = "imap.example.com";
-                     description = "imaps server address";
-             };
-             smtpsServer = lib.mkOption {
-                     type = lib.types.str;
-                     default = "smtp.gmail.com";
-                     example = "smtp.example.com";
-                     description = "smtp server address";
-             };
-             enable = lib.mkEnableOption "Enables email";
-      };
+       hyprland = {
+               enable = lib.mkEnableOption "Enables hyprland";
+               monitors = lib.mkOption {
+                       type = lib.types.listOf lib.types.str;
+                       default = [
+                         "HDMI-A-1"
+                         "eDP-1"
+                         "DP-2"
+                         "DP-3"
+                         "LVDS-1"
+        "DP-4"
+                       ];
+                       example = [];
+                       description = "Hyprland monitors";
+               };
+       };
+       email = {
+               email = lib.mkOption {
+                       type = lib.types.str;
+                       default = "ret2pop@gmail.com";
+                       example = "john@example.com";
+                       description = "Email address and imaps/smtps account";
+               };
+               imapsServer = lib.mkOption {
+                       type = lib.types.str;
+                       default = "imap.gmail.com";
+                       example = "imap.example.com";
+                       description = "imaps server address";
+               };
+               smtpsServer = lib.mkOption {
+                       type = lib.types.str;
+                       default = "smtp.gmail.com";
+                       example = "smtp.example.com";
+                       description = "smtp server address";
+               };
+               enable = lib.mkEnableOption "Enables email";
+       };
     };
   };
 
   config = {
     home.packages = (if config.monorepo.profiles.email.enable then [ pkgs.mu ] else [])
-                                           ++
-                                           (if config.monorepo.profiles.lang-c.enable then (with pkgs; [
-                                             autobuild
-                                             clang
-                                             gdb
-                                             gnumake
-                                             bear
-                                             clang-tools
-                                           ]) else [])
-                                           ++
-                                           (if config.monorepo.profiles.lang-js.enable then (with pkgs; [
-                                             nodejs
-                                             bun
-                                             yarn
-                                             typescript
-                                             vscode-langservers-extracted
-                                           ]) else [])
-                                           ++
-                                           (if config.monorepo.profiles.lang-rust.enable then (with pkgs; [
-                                             cargo
-                                             rust-analyzer
-                                             rustfmt
-                                           ]) else [])
-                                           ++
-                                           (if config.monorepo.profiles.lang-python.enable then (with pkgs; [
-                                             poetry
-                                             python3
-                                             python312Packages.jedi
-                                           ]) else [])
-                                           ++
-                                           (if config.monorepo.profiles.lang-sol.enable then (with pkgs; [
-                                             solc
-                                           ]) else [])
-                                           ++
-                                           (if config.monorepo.profiles.lang-openscad.enable then (with pkgs; [
-                                             openscad
-                                             openscad-lsp
-                                           ]) else [])
-                                           ++
-                                           (if config.monorepo.profiles.lang-sh.enable then (with pkgs; [
-                                             bash-language-server
-                                           ]) else [])
-                                           ++
-                                           (if config.monorepo.profiles.lang-coq.enable then (with pkgs; [
-                                             coq
-                                           ]) else [])
-                                           ++
-                                           (if config.monorepo.profiles.lang-nix.enable then (with pkgs; [
-                                             nil
-                                             nixd
-                                             nixfmt-rfc-style
-                                           ]) else [])
-                                           ++
-                                           (if config.monorepo.profiles.crypto.enable then (with pkgs; [
-                                             bitcoin
-                                             electrum
-                                             monero-cli
-                                             monero-gui
-                                           ]) else [])
-                                           ++
-                                           (if config.monorepo.profiles.art.enable then (with pkgs; [
-                                             inkscape
-                                             krita
-                                           ]) else [])
-                                           ++
-                                           (if config.monorepo.profiles.music.enable then (with pkgs; [
-                                             mpc-cli
-                                             sox
-                                           ]) else [])
-                                           ++
-                                           (if config.monorepo.profiles.workstation.enable then (with pkgs; [
-                     alsa-utils
-                     alsa-scarlett-gui
-                                 ardour
-                                 audacity
-                                       blender
-                     fluidsynth
-                     qjackctl
-                     qsynth
-                     qpwgraph
-                     imagemagick
-                     inkscape
-                     kdenlive
-                     kicad
-                                           ]) else []);
+                                             ++
+                                             (if config.monorepo.profiles.lang-c.enable then (with pkgs; [
+                                               autobuild
+                                               clang
+                                               gdb
+                                               gnumake
+                                               bear
+                                               clang-tools
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-js.enable then (with pkgs; [
+                                               nodejs
+                                               bun
+                                               yarn
+                                               typescript
+                                               vscode-langservers-extracted
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-rust.enable then (with pkgs; [
+                                               cargo
+                                               rust-analyzer
+                                               rustfmt
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-python.enable then (with pkgs; [
+                                               poetry
+                                               python3
+                                               python312Packages.jedi
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-sol.enable then (with pkgs; [
+                                               solc
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-openscad.enable then (with pkgs; [
+                                               openscad
+                                               openscad-lsp
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-sh.enable then (with pkgs; [
+                                               bash-language-server
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-coq.enable then (with pkgs; [
+                                               coq
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.lang-nix.enable then (with pkgs; [
+                                               nil
+                                               nixd
+                                               nixfmt-rfc-style
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.crypto.enable then (with pkgs; [
+                                               bitcoin
+                                               electrum
+                                               monero-cli
+                                               monero-gui
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.art.enable then (with pkgs; [
+                                               inkscape
+                                               krita
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.music.enable then (with pkgs; [
+                                               mpc-cli
+                                               sox
+                                             ]) else [])
+                                             ++
+                                             (if config.monorepo.profiles.workstation.enable then (with pkgs; [
+                       alsa-utils
+                       alsa-scarlett-gui
+                                   ardour
+                                   audacity
+                                         blender
+                       fluidsynth
+                       qjackctl
+                       qsynth
+                       qpwgraph
+                       imagemagick
+                       inkscape
+                       kdenlive
+                       kicad
+                                             ]) else []);
 
     monorepo.profiles = {
-      enable = lib.mkDefault true;
-      music.enable = lib.mkDefault true;
-      hyprland.enable = lib.mkDefault true;
-      email.enable = lib.mkDefault true;
+       enable = lib.mkDefault true;
+       music.enable = lib.mkDefault true;
+       hyprland.enable = lib.mkDefault true;
+       email.enable = lib.mkDefault true;
 
-      # Programming
-      lang-c.enable = lib.mkDefault true;
-      lang-rust.enable = lib.mkDefault true;
-      lang-python.enable = lib.mkDefault true;
-      lang-sol.enable = lib.mkDefault true;
-      lang-sh.enable = lib.mkDefault true;
-      lang-openscad.enable = lib.mkDefault true;
-      lang-js.enable = lib.mkDefault true;
-      lang-nix.enable = lib.mkDefault true;
-      lang-coq.enable = lib.mkDefault true;
+       # Programming
+       lang-c.enable = lib.mkDefault true;
+       lang-rust.enable = lib.mkDefault true;
+       lang-python.enable = lib.mkDefault true;
+       lang-sol.enable = lib.mkDefault true;
+       lang-sh.enable = lib.mkDefault true;
+       lang-openscad.enable = lib.mkDefault true;
+       lang-js.enable = lib.mkDefault true;
+       lang-nix.enable = lib.mkDefault true;
+       lang-coq.enable = lib.mkDefault true;
 
-      crypto.enable = lib.mkDefault true;
-      art.enable = lib.mkDefault true;
-      workstation.enable = lib.mkDefault true;
+       crypto.enable = lib.mkDefault true;
+       art.enable = lib.mkDefault true;
+       workstation.enable = lib.mkDefault true;
     };
   };
 }
index 7d8a24a3d016ac9e51232ac0c27dd5c83c98094f..e8c468287b83ee0438247f9382350c28d42699fe 100644 (file)
@@ -16,7 +16,7 @@
   # Add HSTS header with preloading to HTTPS requests.
   # Adding this header to HTTP requests is discouraged
   map $scheme $hsts_header {
-      https   "max-age=31536000; includeSubdomains; preload";
+       https   "max-age=31536000; includeSubdomains; preload";
   }
   add_header Strict-Transport-Security $hsts_header;
 
 '';
 
     virtualHosts = {
-      "ret2pop.net" = {
-       # addSSL = true;
-       # enableACME = true;
-       root = "/home/preston/ret2pop-website/";
-      };
+       "ret2pop.net" = {
+         # addSSL = true;
+         # enableACME = true;
+         root = "/home/preston/ret2pop-website/";
+       };
     };
   };
 }
index 04d5545bc5ed0b1b27fea353d91df068de86bccf..a1dc8405ff0202768a8468031e210eb0ce80e0c7 100644 (file)
@@ -2,20 +2,20 @@
 {
   hardware = {
     graphics.extraPackages = with pkgs; [
-      vaapiVdpau
-      libvdpau-va-gl
-      nvidia-vaapi-driver
+       vaapiVdpau
+       libvdpau-va-gl
+       nvidia-vaapi-driver
     ];
 
     nvidia = {
-      modesetting.enable = true;
-      powerManagement = {
-             enable = true;
-             finegrained = false;
-      };
-      nvidiaSettings = true;
-      open = false;
-      package = config.boot.kernelPackages.nvidiaPackages.stable;
+       modesetting.enable = true;
+       powerManagement = {
+               enable = true;
+               finegrained = false;
+       };
+       nvidiaSettings = true;
+       open = false;
+       package = config.boot.kernelPackages.nvidiaPackages.stable;
     };
   };
 }
index c2c10ea959a583de1c6a14a90eb2b5d695e9c375..5652a93a377adf4ee2498ab39b48fffc3e47a97e 100644 (file)
@@ -50,6 +50,7 @@
         "eDP-1"
         "DP-2"
         "DP-3"
+        "DP-4"
         "LVDS-1"
       ];
       example = [];
index eb251dea4a3eff7c7d015556aa9674539b27fdf1..c47cf65f5cde2a77997847fb1fe041744dd2c53d 100644 (file)
@@ -3,25 +3,32 @@
   services.xserver = {
     enable = lib.mkDefault true;
     displayManager = {
-      startx.enable = true;
+       startx.enable = true;
     };
 
     windowManager = {
+<<<<<<< Updated upstream
       # Backup in case wayland isn't sufficient
       i3 = {
        enable = true;
        package = pkgs.i3-gaps;
       };
+=======
+       i3 = {
+         enable = true;
+         package = pkgs.i3-gaps;
+       };
+>>>>>>> Stashed changes
     };
 
     desktopManager = {
-      runXdgAutostartIfNone = true;
+       runXdgAutostartIfNone = true;
     };
 
     xkb = {
-      layout = "us";
-      variant = "";
-      options = "caps:escape";
+       layout = "us";
+       variant = "";
+       options = "caps:escape";
     };
 
     videoDrivers = (if config.monorepo.profiles.cuda.enable then [ "nvidia" ] else []);
index a1871ccb5a2b83d87470c2dbe0d95b04f9931d7f..205fb11c77963118a90dfba9bcff5dc14b075193 100644 (file)
@@ -5,8 +5,8 @@
   ];
   config.monorepo = {
     profiles = {
-      server.enable = true;
-      cuda.enable = true;
+       server.enable = true;
+       cuda.enable = true;
     };
     vars.hostName = "affinity";
   };