From d776e064a9deb84f47046b00a498666828616ed3 Mon Sep 17 00:00:00 2001 From: Aria Nolan Date: Thu, 23 Nov 2023 12:34:23 -0500 Subject: [PATCH] reformatted JWST configuration.nix --- hosts/JWST/configuration.nix | 163 +++++++++++++++++++---------------- 1 file changed, 87 insertions(+), 76 deletions(-) diff --git a/hosts/JWST/configuration.nix b/hosts/JWST/configuration.nix index 9f740ad..8c6ed49 100644 --- a/hosts/JWST/configuration.nix +++ b/hosts/JWST/configuration.nix @@ -9,10 +9,14 @@ ./hardware-configuration.nix ]; - sops.defaultSopsFile = ./secrets/secrets.yaml; - sops.defaultSopsFormat = "yaml"; + # ------------ System ------------ - sops.age.keyFile = "/home/tacocat/.config/sops/age/keys.txt"; + users.users.tacocat = { + isNormalUser = true; + extraGroups = ["wheel" "networkmanager" "audio" "video" "bluetooth" "kvm"]; + home = "/home/tacocat"; + description = "Aria Nolan"; + }; boot.loader = { efi.canTouchEfiVariables = false; @@ -30,20 +34,6 @@ }; }; - nix.settings.experimental-features = ["nix-command" "flakes"]; - nix.settings.auto-optimise-store = true; - nix.settings.trusted-users = ["root" "tacocat"]; - - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 1w"; - }; - - networking.hostName = "JWST"; - networking.networkmanager.enable = true; - - # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; console = { font = "Lat2-Terminus16"; @@ -52,11 +42,10 @@ time.timeZone = "America/New_York"; - # Enable CUPS to print documents. - services.printing.enable = true; - services.geoclue2.enable = true; + networking.hostName = "JWST"; + networking.networkmanager.enable = true; - # Enable sound. + # Sound sound.enable = true; services.pipewire = { enable = true; @@ -65,6 +54,81 @@ jack.enable = true; }; + # Services/Hardware + hardware.opentabletdriver.enable = true; + hardware.bluetooth.enable = true; + services.blueman.enable = true; + services.printing.enable = true; + services.geoclue2.enable = 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 = "23.05"; # Did you read the comment? + + # ------------ Nix ------------ + + nix.settings = { + experimental-features = ["nix-command" "flakes"]; + auto-optimise-store = true; + trusted-users = ["root" "tacocat"]; + }; + + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 1w"; + }; + + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "steam" + "steam-original" + "steam-run" + "nvidia-x11" + "nvidia-settings" + ]; + + # ------------ Software ------------ + + environment = { + systemPackages = with pkgs; [ + vim + exfat + encfs + ntfs3g + ]; + # remove nano + defaultPackages = with pkgs; [ + perl + rsync + strace + ]; + }; + + sops = { + defaultSopsFile = ./secrets/secrets.yaml; + defaultSopsFormat = "yaml"; + age.keyFile = "/home/tacocat/.config/sops/age/keys.txt"; + }; + + programs.sway = { + enable = true; + wrapperFeatures.gtk = true; + extraPackages = with pkgs; [ + swaylock + swayidle + brightnessctl + wl-mirror + ]; + }; + + programs.waybar.enable = true; + programs.steam.enable = true; + xdg.portal = { enable = true; wlr.enable = true; @@ -73,6 +137,8 @@ ]; }; + # ------------ Graphics ------------ + hardware.opengl = { enable = true; driSupport = true; @@ -98,59 +164,4 @@ }; services.xserver.videoDrivers = ["nvidia"]; - - - hardware.opentabletdriver.enable = true; - hardware.bluetooth.enable = true; - services.blueman.enable = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.tacocat = { - isNormalUser = true; - extraGroups = ["wheel" "networkmanager" "audio" "video" "bluetooth" "kvm"]; - home = "/home/tacocat"; - description = "Aria Nolan"; - }; - - programs.sway.enable = true; - programs.sway.wrapperFeatures.gtk = true; - programs.sway.extraPackages = with pkgs; [ - swaylock - swayidle - brightnessctl - wl-mirror - ]; - - programs.waybar.enable = true; - programs.steam.enable = true; - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "steam" - "steam-original" - "steam-run" - "nvidia-x11" - "nvidia-settings" - ]; - - environment = { - systemPackages = with pkgs; [ - vim - exfat - encfs - ntfs3g - ]; - defaultPackages = with pkgs; [ - perl - rsync - strace - ]; - }; - - # 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 = "23.05"; # Did you read the comment? }