diff options
| author | triethyl <triethylammonium@pm.me> | 2025-09-02 10:48:21 -0400 |
|---|---|---|
| committer | triethyl <triethylammonium@pm.me> | 2025-09-02 10:48:21 -0400 |
| commit | 31c316d19cd974bb81a5d6de62142ff24db1c78e (patch) | |
| tree | cb941422c76cb8953830a8d58c8e14dca1a10319 /nixos | |
| parent | 1c21018347aa277caba74e554cb8d1b1e7fc6bed (diff) | |
reorganized directory structure
Diffstat (limited to 'nixos')
37 files changed, 780 insertions, 0 deletions
diff --git a/nixos/features/cli/shells/nushell.nix b/nixos/features/cli/shells/nushell.nix new file mode 100644 index 0000000..0974e9a --- /dev/null +++ b/nixos/features/cli/shells/nushell.nix @@ -0,0 +1,10 @@ +{ config, pkgs, lib, ... }: let + cfg = config.features.cli.shells.nushell; +in { + options.features.cli.shells.nushell.enable = lib.mkEnableOption "nushell"; + config = lib.mkIf cfg.enable { + environment.shells = [ pkgs.nushell ]; + users.defaultUserShell = pkgs.nushell; + environment.systemPackages = [ pkgs.nushell ]; + }; +} diff --git a/nixos/features/cli/utils/nh.nix b/nixos/features/cli/utils/nh.nix new file mode 100644 index 0000000..e34157e --- /dev/null +++ b/nixos/features/cli/utils/nh.nix @@ -0,0 +1,17 @@ +{ config, lib, ... }: let + cfg = config.features.cli.utils.nh; +in { + options.features.cli.utils.nh = { + enable = lib.mkEnableOption "nh"; + flake = lib.mkOption { + type = lib.types.str; + description = "Absolute path to the flake."; + }; + }; + config = lib.mkIf cfg.enable { + programs.nh = { + enable = true; + flake = cfg.flake; + }; + }; +} diff --git a/nixos/features/global/agenix.nix b/nixos/features/global/agenix.nix new file mode 100644 index 0000000..f232886 --- /dev/null +++ b/nixos/features/global/agenix.nix @@ -0,0 +1,7 @@ +{ pkgs, inputs, ...}: { + imports = [ inputs.agenix.nixosModules.default ]; + environment.systemPackages = [ + inputs.agenix.packages.${pkgs.system}.default + ]; + age.identityPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; +} diff --git a/nixos/features/global/nix.nix b/nixos/features/global/nix.nix new file mode 100644 index 0000000..a0ece02 --- /dev/null +++ b/nixos/features/global/nix.nix @@ -0,0 +1,13 @@ +{ ... }: { + nix = { + settings = { + experimental-features = [ "nix-command" "flakes" ]; + auto-optimise-store = true; + }; + gc = { + automatic = true; + dates = "daily"; + options = "-d 5"; + }; + }; +} diff --git a/nixos/features/global/noxterm.nix b/nixos/features/global/noxterm.nix new file mode 100644 index 0000000..44c0917 --- /dev/null +++ b/nixos/features/global/noxterm.nix @@ -0,0 +1,3 @@ +{ pkgs, ... }: { + services.xserver.excludePackages = [ pkgs.xterm ]; +} diff --git a/nixos/features/gui/apps/steam.nix b/nixos/features/gui/apps/steam.nix new file mode 100644 index 0000000..046b814 --- /dev/null +++ b/nixos/features/gui/apps/steam.nix @@ -0,0 +1,31 @@ +{ + config, + pkgs, + lib, + ... +}: let + cfg = config.features.gui.apps.steam; +in { + options.features.gui.apps.steam.enable = lib.mkEnableOption "steam"; + config = lib.mkIf cfg.enable { + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + gamescopeSession.enable = true; + protontricks.enable = true; + extraCompatPackages = with pkgs; [ + proton-ge-bin + ]; + }; + hardware.steam-hardware.enable = true; + programs.gamemode.enable = true; + environment.systemPackages = [pkgs.mangohud]; + + # Steam Launch Options + # Add this to 3D games: + # LD_PRELOAD="" gamescope --force-grab-cursor --backend sdl -bf -W 1600 -H 900 -- %command% + # Add this to 2D games: + # LD_PRELOAD="" gamescope -bf -W 1600 -H 900 -- %command% + }; +} diff --git a/nixos/features/gui/apps/virtualbox.nix b/nixos/features/gui/apps/virtualbox.nix new file mode 100644 index 0000000..0b633c7 --- /dev/null +++ b/nixos/features/gui/apps/virtualbox.nix @@ -0,0 +1,8 @@ +{ config, lib, ... }: let + cfg = config.features.gui.apps.virtualbox; +in { + options.features.gui.apps.virtualbox.enable = lib.mkEnableOption "virtualbox"; + config = lib.mkIf cfg.enable { + virtualisation.virtualbox.host.enable = true; + }; +} diff --git a/nixos/features/gui/apps/vmware.nix b/nixos/features/gui/apps/vmware.nix new file mode 100644 index 0000000..4da3f09 --- /dev/null +++ b/nixos/features/gui/apps/vmware.nix @@ -0,0 +1,8 @@ +{ config, lib, ... }: let + cfg = config.features.gui.apps.vmware; +in { + options.features.gui.apps.vmware.enable = lib.mkEnableOption "vmware"; + config = lib.mkIf cfg.enable { + virtualisation.vmware.host.enable = true; + }; +} diff --git a/nixos/features/gui/desktops/niri.nix b/nixos/features/gui/desktops/niri.nix new file mode 100644 index 0000000..c68a4b6 --- /dev/null +++ b/nixos/features/gui/desktops/niri.nix @@ -0,0 +1,9 @@ +{ config, lib, inputs, ... }: let + cfg = config.features.gui.desktops.niri; +in { + imports = [ inputs.niri.nixosModules.niri ]; + options.features.gui.desktops.niri.enable = lib.mkEnableOption "niri"; + config = lib.mkIf cfg.enable { + programs.niri.enable = true; + }; +} diff --git a/nixos/features/server/cloud/syncthing.nix b/nixos/features/server/cloud/syncthing.nix new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/nixos/features/server/cloud/syncthing.nix @@ -0,0 +1 @@ +{} diff --git a/nixos/features/server/core/ssh.nix b/nixos/features/server/core/ssh.nix new file mode 100644 index 0000000..16fec48 --- /dev/null +++ b/nixos/features/server/core/ssh.nix @@ -0,0 +1,15 @@ +{ config, lib, ... }: let + cfg = config.features.server.ssh; +in { + options.features.server.ssh.enable = lib.mkEnableOption "sshd"; + config = lib.mkIf cfg.enable { + services.openssh = { + enable = true; + ports = [ 2200 ]; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + }; + }; + }; +} diff --git a/nixos/features/server/development/git-server.nix b/nixos/features/server/development/git-server.nix new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/nixos/features/server/development/git-server.nix @@ -0,0 +1 @@ +{} diff --git a/nixos/features/server/gaming/minecraft.nix b/nixos/features/server/gaming/minecraft.nix new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/nixos/features/server/gaming/minecraft.nix @@ -0,0 +1 @@ +{} diff --git a/nixos/features/server/media/calibre.nix b/nixos/features/server/media/calibre.nix new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/nixos/features/server/media/calibre.nix @@ -0,0 +1 @@ +{} diff --git a/nixos/features/server/media/invidious.nix b/nixos/features/server/media/invidious.nix new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/nixos/features/server/media/invidious.nix @@ -0,0 +1 @@ +{} diff --git a/nixos/features/services/bundles/printing.nix b/nixos/features/services/bundles/printing.nix new file mode 100644 index 0000000..ea255be --- /dev/null +++ b/nixos/features/services/bundles/printing.nix @@ -0,0 +1,13 @@ +{ config, lib, ... }: let + cfg = config.features.services.bundles.printing; +in { + options.features.services.bundles.printing.enable = lib.mkEnableOption "printing"; + config = lib.mkIf cfg.enable { + services.printing.enable = true; + services.avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + }; +} diff --git a/nixos/features/services/core/systemd-boot.nix b/nixos/features/services/core/systemd-boot.nix new file mode 100644 index 0000000..2826f1b --- /dev/null +++ b/nixos/features/services/core/systemd-boot.nix @@ -0,0 +1,11 @@ +{ config, lib, ... }: let + cfg = config.features.services.core.systemd-boot; +in { + options.features.services.core.systemd-boot.enable = lib.mkEnableOption "systemd-boot"; + config = lib.mkIf cfg.enable { + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + }; +} diff --git a/nixos/features/services/extra/plymouth.nix b/nixos/features/services/extra/plymouth.nix new file mode 100644 index 0000000..07f00cd --- /dev/null +++ b/nixos/features/services/extra/plymouth.nix @@ -0,0 +1,36 @@ +{ config, pkgs, lib, ... }: let + cfg = config.features.services.extra.plymouth; +in { + options.features.services.extra.plymouth.enable = lib.mkEnableOption "plymouth"; + config = lib.mkIf cfg.enable { + boot = { + plymouth = { + enable = true; + theme = "dark_planet"; + themePackages = with pkgs; [ + # By default we would install all themes + (adi1090x-plymouth-themes.override { + selected_themes = [ "dark_planet" ]; + }) + ]; + }; + + # Enable "Silent Boot" + consoleLogLevel = 0; + initrd.verbose = false; + kernelParams = [ + "quiet" + "splash" + "boot.shell_on_fail" + "loglevel=3" + "rd.systemd.show_status=false" + "rd.udev.log_level=3" + "udev.log_priority=3" + ]; + # Hide the OS choice for bootloaders. + # It's still possible to open the bootloader list by pressing any key + # It will just not appear on screen unless a key is pressed + loader.timeout = 0; + }; + }; +} diff --git a/nixos/features/services/extra/sddm.nix b/nixos/features/services/extra/sddm.nix new file mode 100644 index 0000000..f266575 --- /dev/null +++ b/nixos/features/services/extra/sddm.nix @@ -0,0 +1,23 @@ +{ config, pkgs, lib, ... }: let + cfg = config.features.services.extra.sddm; + sddm-astronaut = pkgs.sddm-astronaut.override { + themeConfig = { + # Background = ./background.png; + }; + }; +in { + options.features.services.extra.sddm.enable = lib.mkEnableOption "sddm"; + config = lib.mkIf cfg.enable { + services = { + displayManager.sddm = { + enable = true; + wayland.enable = true; + package = pkgs.kdePackages.sddm; + theme = "sddm-astronaut-theme"; + extraPackages = [ sddm-astronaut ]; + }; + # xserver.enable = true; + }; + environment.systemPackages = [ sddm-astronaut ]; + }; +} diff --git a/nixos/features/services/extra/ssh.nix b/nixos/features/services/extra/ssh.nix new file mode 100644 index 0000000..d1cee26 --- /dev/null +++ b/nixos/features/services/extra/ssh.nix @@ -0,0 +1,14 @@ +{ config, lib, ... }: let + cfg = config.features.services.extra.ssh; +in { + options.features.services.extra.ssh.enable = lib.mkEnableOption "ssh"; + config = lib.mkIf cfg.enable { + services.openssh = { + enable = true; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + }; + }; + }; +} diff --git a/nixos/features/services/extra/syncthing-client.nix b/nixos/features/services/extra/syncthing-client.nix new file mode 100644 index 0000000..6d3d3d3 --- /dev/null +++ b/nixos/features/services/extra/syncthing-client.nix @@ -0,0 +1,35 @@ +{ config, pkgs, lib, ... }: let + cfg = config.features.services.extra.syncthing-client; +in { + options.features.services.extra.syncthing-client = { + enable = lib.mkEnableOption "syncthing"; + username = lib.mkOption { + type = lib.types.str; + description = "The username of syncthing's user"; + }; + }; + config = lib.mkIf cfg.enable { + services.syncthing = { + enable = true; + user = cfg.username; + dataDir = "/home/${cfg.username}/Sync"; + configDir = "/home/${cfg.username}/.config/syncthing"; + overrideDevices = true; + overrideFolders = true; + settings = { + devices = { + "prodesk-server" = { + id = "SBH4S2T-B7KVAAI-BKBOQKZ-YSNQDSM-TKXPV6O-OSZUD3O-N6USL6L-DHL3BAK"; + }; + }; + folders = { + "Main" = { + path = "/home/${cfg.username}/Sync"; + devices = [ "prodesk-server" ]; + }; + }; + }; + }; + environment.systemPackages = [ pkgs.syncthing ]; + }; +} diff --git a/nixos/features/services/extra/udisks2.nix b/nixos/features/services/extra/udisks2.nix new file mode 100644 index 0000000..2ec2fa4 --- /dev/null +++ b/nixos/features/services/extra/udisks2.nix @@ -0,0 +1,12 @@ +{ + config, + lib, + ... +}: let + cfg = config.features.services.extra.udisks2; +in { + options.features.services.extra.udisks2.enable = lib.mkEnableOption "udisks2"; + config = lib.mkIf cfg.enable { + services.udisks2.enable = true; + }; +} diff --git a/nixos/features/services/hardware/bluetooth.nix b/nixos/features/services/hardware/bluetooth.nix new file mode 100644 index 0000000..a9829ac --- /dev/null +++ b/nixos/features/services/hardware/bluetooth.nix @@ -0,0 +1,23 @@ +{ config, pkgs, lib, ... }: let + cfg = config.features.services.hardware.bluetooth; +in { + options.features.services.hardware.bluetooth.enable = lib.mkEnableOption "bluetooth"; + config = lib.mkIf cfg.enable { + environment.systemPackages = [ pkgs.bluetui ]; + services.blueman = { + enable = true; + }; + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + }; + services.pulseaudio = { + package = pkgs.pulseaudioFull; + }; + hardware.bluetooth.settings = { + General = { + Enable = "Source,Sink,Media,Socket"; + }; + }; + }; +} diff --git a/nixos/features/services/hardware/iwd.nix b/nixos/features/services/hardware/iwd.nix new file mode 100644 index 0000000..c2394bc --- /dev/null +++ b/nixos/features/services/hardware/iwd.nix @@ -0,0 +1,19 @@ +{ config, pkgs, lib, ... }: let + cfg = config.features.services.hardware.iwd; +in { + options.features.services.hardware.iwd.enable = lib.mkEnableOption "iwd"; + config = lib.mkIf cfg.enable { + environment.systemPackages = [ pkgs.impala ]; + networking.wireless.iwd = { + enable = true; + settings = { + IPv6 = { + Enabled = true; + }; + Settings = { + AutoConnect = true; + }; + }; + }; + }; +} diff --git a/nixos/features/services/hardware/networkmanager.nix b/nixos/features/services/hardware/networkmanager.nix new file mode 100644 index 0000000..49cc7bc --- /dev/null +++ b/nixos/features/services/hardware/networkmanager.nix @@ -0,0 +1,11 @@ +{ config, lib, ... }: let + cfg = config.features.services.hardware.networkmanager; +in { + options.features.services.hardware.networkmanager.enable = lib.mkEnableOption "networkmanager"; + config = lib.mkIf cfg.enable { + networking.networkmanager = { + enable = true; + }; + systemd.services.NetworkManager-wait-online.enable = false; + }; +} diff --git a/nixos/features/services/hardware/pipewire.nix b/nixos/features/services/hardware/pipewire.nix new file mode 100644 index 0000000..f36a0e9 --- /dev/null +++ b/nixos/features/services/hardware/pipewire.nix @@ -0,0 +1,15 @@ +{ config, pkgs, lib, ... }: let + cfg = config.features.services.hardware.pipewire; +in { + options.features.services.hardware.pipewire.enable = lib.mkEnableOption "pipewire"; + config = lib.mkIf cfg.enable { + security.rtkit.enable = true; + environment.systemPackages = [ pkgs.git ]; # Fixes a weird error + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + }; +} diff --git a/nixos/modules/default.nix b/nixos/modules/default.nix new file mode 100644 index 0000000..cd7e8d6 --- /dev/null +++ b/nixos/modules/default.nix @@ -0,0 +1,5 @@ +{...}: { + imports = [ + ./general-settings + ]; +} diff --git a/nixos/modules/general-settings/default.nix b/nixos/modules/general-settings/default.nix new file mode 100644 index 0000000..0001f5f --- /dev/null +++ b/nixos/modules/general-settings/default.nix @@ -0,0 +1,45 @@ +{ config, pkgs, lib, ... }: let + cfg = config.general-settings; +in { + options.general-settings = { + hostname = lib.mkOption { + type = lib.types.str; + default = "nixos"; + description = "system hostname"; + }; + locale = lib.mkOption { + type = lib.types.str; + default = "en_US.UTF-8"; + description = "system locale"; + }; + timezone = lib.mkOption { + type = lib.types.str; + default = "America/New_York"; + description = "system timezone"; + }; + stateVersion = lib.mkOption { + type = lib.types.str; + default = "24.11"; + description = "nixos stateversion"; + }; + }; + config = { + environment.systemPackages = [ pkgs.home-manager ]; + system.stateVersion = cfg.stateVersion; + nixpkgs.config.allowUnfree = true; + networking.hostName = cfg.hostname; + time.timeZone = cfg.timezone; + i18n.defaultLocale = cfg.locale; + i18n.extraLocaleSettings = { + LC_ADDRESS = cfg.locale; + LC_IDENTIFICATION = cfg.locale; + LC_MEASUREMENT = cfg.locale; + LC_MONETARY = cfg.locale; + LC_NAME = cfg.locale; + LC_NUMERIC = cfg.locale; + LC_PAPER = cfg.locale; + LC_TELEPHONE = cfg.locale; + LC_TIME = cfg.locale; + }; + }; +} diff --git a/nixos/systems/ideapad-laptop/hardware.nix b/nixos/systems/ideapad-laptop/hardware.nix new file mode 100644 index 0000000..1065266 --- /dev/null +++ b/nixos/systems/ideapad-laptop/hardware.nix @@ -0,0 +1,39 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "vmd" "ahci" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/dd1662e3-37b4-440b-b3b0-35b625474fb6"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/F073-F061"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/9e96739b-9983-44fe-ab97-9b59e55aa942"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/nixos/systems/ideapad-laptop/system.nix b/nixos/systems/ideapad-laptop/system.nix new file mode 100644 index 0000000..9067924 --- /dev/null +++ b/nixos/systems/ideapad-laptop/system.nix @@ -0,0 +1,66 @@ +{config, ...}: { + imports = [./hardware.nix]; + + general-settings = { + hostname = "ideapad-laptop"; + locale = "en_US.UTF-8"; + timezone = "America/New_York"; + stateVersion = "23.11"; + }; + + age.secrets.lucas-user-password.file = ../../secrets/lucas-user-password.age; + + users.users."lucas" = { + hashedPasswordFile = config.age.secrets.lucas-user-password.path; + isNormalUser = true; + description = "lucas"; + extraGroups = [ + "networkmanager" + "wheel" + "audio" + "video" + "libvirtd" + ]; + }; + + features = { + gui = { + apps = { + steam.enable = true; + # vmware.enable = true; + }; + desktops = { + niri.enable = true; + }; + }; + cli = { + shells.nushell.enable = true; + utils = { + nh = { + enable = true; + flake = "/home/lucas/Sync/setup"; + }; + }; + }; + services = { + core.systemd-boot.enable = true; + hardware = { + bluetooth.enable = true; + iwd.enable = true; + pipewire.enable = true; + }; + extra = { + plymouth.enable = true; + sddm.enable = true; + syncthing-client = { + enable = true; + username = "lucas"; + }; + udisks2.enable = true; + }; + bundles = { + printing.enable = true; + }; + }; + }; +} diff --git a/nixos/systems/nzxt-desktop/hardware.nix b/nixos/systems/nzxt-desktop/hardware.nix new file mode 100644 index 0000000..cf6f399 --- /dev/null +++ b/nixos/systems/nzxt-desktop/hardware.nix @@ -0,0 +1,40 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/e9b15ba0-8bf2-4796-bfe8-abf90ffd51a0"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/1C6B-DB4F"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/b231a0d9-6bec-45ab-ac69-e14089e858c4"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp42s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/nixos/systems/nzxt-desktop/system.nix b/nixos/systems/nzxt-desktop/system.nix new file mode 100644 index 0000000..db42aa1 --- /dev/null +++ b/nixos/systems/nzxt-desktop/system.nix @@ -0,0 +1,66 @@ +{config, ...}: { + imports = [./hardware.nix]; + + general-settings = { + hostname = "nzxt-desktop"; + locale = "en_US.UTF-8"; + timezone = "America/New_York"; + stateVersion = "23.11"; + }; + + age.secrets.culsans-user-password.file = ../../secrets/user-passwords/nzxt-desktop/culsans.age; + + users.users."culsans" = { + hashedPasswordFile = config.age.secrets.culsans-user-password.path; + isNormalUser = true; + description = "Culsans"; + extraGroups = [ + "networkmanager" + "wheel" + "audio" + "video" + "libvirtd" # VmWare User + "vboxusers" # Virtualbox user + ]; + }; + + features = { + gui = { + apps = { + steam.enable = true; + }; + desktops = { + niri.enable = true; + }; + }; + cli = { + shells.nushell.enable = true; + utils = { + nh = { + enable = true; + flake = "/home/culsans/Sync/setup"; + }; + }; + }; + services = { + core.systemd-boot.enable = true; + hardware = { + bluetooth.enable = true; + iwd.enable = true; + pipewire.enable = true; + }; + extra = { + plymouth.enable = true; + sddm.enable = true; + syncthing-client = { + enable = true; + username = "culsans"; + }; + udisks2.enable = true; + }; + bundles = { + printing.enable = true; + }; + }; + }; +} diff --git a/nixos/systems/prodesk-server/hardware.nix b/nixos/systems/prodesk-server/hardware.nix new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/nixos/systems/prodesk-server/hardware.nix diff --git a/nixos/systems/prodesk-server/system.nix b/nixos/systems/prodesk-server/system.nix new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/nixos/systems/prodesk-server/system.nix diff --git a/nixos/systems/steam-deck/system.nix b/nixos/systems/steam-deck/system.nix new file mode 100644 index 0000000..515e0f2 --- /dev/null +++ b/nixos/systems/steam-deck/system.nix @@ -0,0 +1,71 @@ +{ + config, + inputs, + ... +}: { + imports = [./hardware.nix inputs.jovian.nixosModules.jovian]; + + general-settings = { + hostname = "steam-deck"; + locale = "en_US.UTF-8"; + timezone = "America/New_York"; + stateVersion = "25.05"; + }; + + # age.secrets.culsans-user-password.file = ../../secrets/culsans-user-password.age; + + users.users."culsans" = { + # hashedPasswordFile = config.age.secrets.culsans-user-password.path; + password = "hello"; + isNormalUser = true; + description = "Culsans"; + extraGroups = [ + "networkmanager" + "wheel" + "audio" + "video" + "libvirtd" + ]; + }; + + features = { + gui = { + apps = {}; + desktops = { + niri.enable = true; + }; + }; + cli = { + shells.nushell.enable = true; + utils = {}; + }; + services = { + core.systemd-boot.enable = true; + hardware = { + bluetooth.enable = true; + networkmanager.enable = true; + pipewire.enable = true; + }; + extra = { + syncthing-client = { + enable = true; + username = "culsans"; + }; + udisks2.enable = true; + }; + bundles = { + printing.enable = true; + }; + }; + }; + + jovian = { + devices.steamdeck.enable = true; + steam = { + enable = true; + autoStart = true; + defaultSession = "niri"; + user = "culsans"; + }; + }; +} diff --git a/nixos/systems/thinkpad-laptop/hardware.nix b/nixos/systems/thinkpad-laptop/hardware.nix new file mode 100644 index 0000000..b0470aa --- /dev/null +++ b/nixos/systems/thinkpad-laptop/hardware.nix @@ -0,0 +1,39 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/56d54c43-c0bd-4cdc-b2e7-2e1abd16b904"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/3016-9300"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/nixos/systems/thinkpad-laptop/system.nix b/nixos/systems/thinkpad-laptop/system.nix new file mode 100644 index 0000000..f1d227f --- /dev/null +++ b/nixos/systems/thinkpad-laptop/system.nix @@ -0,0 +1,71 @@ +{config, ...}: { + imports = [./hardware.nix]; + + general-settings = { + hostname = "thinkpad-laptop"; + locale = "en_US.UTF-8"; + timezone = "America/New_York"; + stateVersion = "24.11"; + }; + + age.secrets.user-passwords_thinkpad-laptop_lucas.file = ../../secrets/user-passwords/thinkpad-laptop/lucas.age; + + users.users."lucas" = { + hashedPasswordFile = config.age.secrets.user-passwords_thinkpad-laptop_lucas.path; + isNormalUser = true; + description = "lucas"; + extraGroups = [ + "networkmanager" + "wheel" + "audio" + "video" + "libvirtd" + ]; + }; + + features = { + gui = { + apps = { + steam.enable = true; + # vmware.enable = true; + }; + desktops = { + niri.enable = true; + }; + }; + cli = { + shells.nushell.enable = true; + utils = { + nh = { + enable = true; + flake = "/home/lucas/Sync/setup"; + }; + }; + }; + services = { + core.systemd-boot.enable = true; + hardware = { + bluetooth.enable = true; + iwd.enable = true; + pipewire.enable = true; + }; + extra = { + plymouth.enable = true; + sddm.enable = true; + syncthing-client = { + enable = true; + username = "lucas"; + }; + udisks2.enable = true; + }; + bundles = { + printing.enable = true; + }; + }; + }; + hardware.trackpoint = { + enable = true; + speed = 40; + sensitivity = 80; + }; +} |
