From 2ca7dcc464bf4c50641e785fedd16ecec0f23516 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Wed, 25 Mar 2026 21:56:59 -0500 Subject: [PATCH] reformat --- modules/hosts/john-p14s/configuration.nix | 257 +++++++++++----------- 1 file changed, 130 insertions(+), 127 deletions(-) diff --git a/modules/hosts/john-p14s/configuration.nix b/modules/hosts/john-p14s/configuration.nix index 1ab2f30..2d8e4c8 100644 --- a/modules/hosts/john-p14s/configuration.nix +++ b/modules/hosts/john-p14s/configuration.nix @@ -1,132 +1,135 @@ { self, inputs, ... }: { - flake.modules.nixos.p14sConfiguration = { pkgs, lib, ... }: { - imports = [ - self.modules.nixos.p14sHardware - ]; - - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - nixpkgs.config.allowUnfree = true; - - networking = { - hostName = "john-p14s"; - networkmanager.enable = true; - }; - - # Enable automatic login for the user. - services.displayManager.autoLogin.enable = true; - services.displayManager.autoLogin.user = "john"; - - # Define a user account. Don't forget to set a password with 'passwd'. - users.users.john = { - isNormalUser = true; - description = "John Lancaster"; - extraGroups = [ - "networkmanager" - "wheel" + flake.modules.nixos.p14sConfiguration = { pkgs, lib, ... }: + let + hostname = "john-p14s"; + in + { + imports = [ + self.modules.nixos.p14sHardware ]; - shell = pkgs.zsh; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nixpkgs.config.allowUnfree = true; + + networking = { + hostName = hostname; + networkmanager.enable = true; + }; + + # Enable automatic login for the user. + services.displayManager.autoLogin.enable = true; + services.displayManager.autoLogin.user = "john"; + + # Define a user account. Don't forget to set a password with 'passwd'. + users.users.john = { + isNormalUser = true; + description = "John Lancaster"; + extraGroups = [ + "networkmanager" + "wheel" + ]; + shell = pkgs.zsh; + }; + + programs.zsh.enable = true; + + # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229 + systemd.services."getty@tty1".enable = false; + systemd.services."autovt@tty1".enable = false; + + services.openssh.enable = true; + services.tailscale.enable = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + wget + cacert + busybox + dig + samba + ]; + + # For gnome systray icons + services.udev.packages = with pkgs; [ gnome-settings-daemon ]; + + security.pam.services.swaylock = {}; + security.pam.services.swaylock.fprintAuth = true; + + programs._1password.enable = true; + programs._1password-gui = { + enable = true; + # Certain features, including CLI integration and system authentication support, + # require enabling PolKit integration on some desktop environments (e.g. Plasma). + polkitPolicyOwners = [ "john" ]; + # TODO this should not be a hardcoded username + }; + + # This is needed for VSCode remote support. Read: https://nixos.wiki/wiki/Visual_Studio_Code + programs.nix-ld.enable = true; + + programs.steam = { + enable = true; + gamescopeSession.enable = true; + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers + }; + + # progams.gamemode.enable = true; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It's perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "24.05"; # Did you read the comment? + + # Set your time zone. + time.timeZone = "America/Chicago"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + + # Enables fingerprint sensor + services.fprintd.enable = true; + + # Enable sound with pipewire. + services.pulseaudio.enable = false; + security.rtkit.enable = true; # PulseAudio server uses this to acquire realtime priority. + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + # media-session.enable = true; + }; }; - - programs.zsh.enable = true; - - # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229 - systemd.services."getty@tty1".enable = false; - systemd.services."autovt@tty1".enable = false; - - services.openssh.enable = true; - services.tailscale.enable = true; - - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - wget - cacert - busybox - dig - samba - ]; - - # For gnome systray icons - services.udev.packages = with pkgs; [ gnome-settings-daemon ]; - - security.pam.services.swaylock = {}; - security.pam.services.swaylock.fprintAuth = true; - - programs._1password.enable = true; - programs._1password-gui = { - enable = true; - # Certain features, including CLI integration and system authentication support, - # require enabling PolKit integration on some desktop environments (e.g. Plasma). - polkitPolicyOwners = [ "john" ]; - # TODO this should not be a hardcoded username - }; - - # This is needed for VSCode remote support. Read: https://nixos.wiki/wiki/Visual_Studio_Code - programs.nix-ld.enable = true; - - programs.steam = { - enable = true; - gamescopeSession.enable = true; - remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play - dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server - localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers - }; - - # progams.gamemode.enable = true; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It's perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "24.05"; # Did you read the comment? - - # Set your time zone. - time.timeZone = "America/Chicago"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "en_US.UTF-8"; - LC_IDENTIFICATION = "en_US.UTF-8"; - LC_MEASUREMENT = "en_US.UTF-8"; - LC_MONETARY = "en_US.UTF-8"; - LC_NAME = "en_US.UTF-8"; - LC_NUMERIC = "en_US.UTF-8"; - LC_PAPER = "en_US.UTF-8"; - LC_TELEPHONE = "en_US.UTF-8"; - LC_TIME = "en_US.UTF-8"; - }; - - # Enables fingerprint sensor - services.fprintd.enable = true; - - # Enable sound with pipewire. - services.pulseaudio.enable = false; - security.rtkit.enable = true; # PulseAudio server uses this to acquire realtime priority. - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - # media-session.enable = true; - }; - - }; }