From f6553b9b0cfd1e90457f252a59b2a052e85d6a30 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Sun, 28 Nov 2021 17:20:10 -0500 Subject: [PATCH] Formatted everything using nixfmt. --- configuration.nix | 16 ++++--------- flake.nix | 2 +- home.nix | 10 +------- hosts/nil.nix | 42 +++++++++++++++------------------- modules/profiles/graphical.nix | 3 +-- modules/profiles/laptop.nix | 7 ++---- modules/zfs.nix | 4 +--- 7 files changed, 30 insertions(+), 54 deletions(-) diff --git a/configuration.nix b/configuration.nix index 15411dd..e97fd1a 100644 --- a/configuration.nix +++ b/configuration.nix @@ -5,8 +5,7 @@ let url = "https://github.com/jamesepatrick.keys"; sha256 = "sha256-6NGBLNPcvsvCTa7UC3H3r9n8dKAHobINK5pxxm94nTM="; }; -in -{ +in { # Allow Cleanup, nix, & flakes nix = { autoOptimiseStore = true; @@ -17,8 +16,8 @@ in }; package = pkgs.nixUnstable; extraOptions = '' - experimental-features = nix-command flakes - ''; + experimental-features = nix-command flakes + ''; }; # Enable bootloader & clear /tmp on boot. @@ -39,7 +38,7 @@ in }; # Define a user account. Don't forget to set a password with ‘passwd’. - users.users ={ + users.users = { root.initialPassword = "nixos"; james = { description = "James Patrick"; @@ -52,12 +51,7 @@ in }; # These are the most basic tools I need. - environment.systemPackages = with pkgs; [ - git - gnumake - vim - zsh - ]; + environment.systemPackages = with pkgs; [ nixfmt git gnumake vim zsh ]; networking = { firewall = { diff --git a/flake.nix b/flake.nix index 2ed2caa..069bf17 100644 --- a/flake.nix +++ b/flake.nix @@ -26,7 +26,7 @@ system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; - config = {allowUnfree = true;}; + config = { allowUnfree = true; }; }; lib = nixpkgs.lib; in { diff --git a/home.nix b/home.nix index 2b6fffb..4b5fe7d 100644 --- a/home.nix +++ b/home.nix @@ -11,15 +11,7 @@ wrapperFeatures.gtk = true; }; - home.packages = with pkgs; [ - emacs - firefox - wofi - i3 - zsh - kitty - tmux - ]; + home.packages = with pkgs; [ emacs wofi i3 zsh kitty tmux ]; # This value determines the Home Manager release that your # configuration is compatible with. This helps avoid breakage diff --git a/hosts/nil.nix b/hosts/nil.nix index 14110a0..43aa9f6 100644 --- a/hosts/nil.nix +++ b/hosts/nil.nix @@ -34,38 +34,34 @@ "cryptd" ]; - hardware.firmware = [ - pkgs.rtw89-firmware - ]; + hardware.firmware = [ pkgs.rtw89-firmware ]; boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ config.boot.kernelPackages.rtw89 ]; - boot.supportedFilesystems = ["zfs"]; + boot.supportedFilesystems = [ "zfs" ]; - boot.initrd.luks.devices."crypt" = - { device = "/dev/disk/by-partlabel/crypt"; - preLVM = true; - }; + boot.initrd.luks.devices."crypt" = { + device = "/dev/disk/by-partlabel/crypt"; + preLVM = true; + }; - fileSystems."/" = - { device = "rpool/root/nixos"; - fsType = "zfs"; - }; + fileSystems."/" = { + device = "rpool/root/nixos"; + fsType = "zfs"; + }; - fileSystems."/home" = - { device = "rpool/home"; - fsType = "zfs"; - }; + fileSystems."/home" = { + device = "rpool/home"; + fsType = "zfs"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-partlabel/boot"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-partlabel/boot"; + fsType = "vfat"; + }; - swapDevices = - [ { device = "/dev/partitions/swap"; } - ]; + swapDevices = [{ device = "/dev/partitions/swap"; }]; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions diff --git a/modules/profiles/graphical.nix b/modules/profiles/graphical.nix index 2afaa88..8e5e273 100644 --- a/modules/profiles/graphical.nix +++ b/modules/profiles/graphical.nix @@ -1,5 +1,4 @@ -{ config, pkgs, ... }: -{ +{ config, pkgs, ... }: { programs.sway = { enable = true; wrapperFeatures.gtk = true; # so that gtk works properly diff --git a/modules/profiles/laptop.nix b/modules/profiles/laptop.nix index 3b90b91..1c61f21 100644 --- a/modules/profiles/laptop.nix +++ b/modules/profiles/laptop.nix @@ -1,8 +1,5 @@ -{ config, lib, pkgs, modulesPath, ... }: -{ - imports = [ - ./graphical.nix - ]; +{ config, lib, pkgs, modulesPath, ... }: { + imports = [ ./graphical.nix ]; networking.networkmanager.enable = true; users.users.james.extraGroups = [ "networkmanager" ]; diff --git a/modules/zfs.nix b/modules/zfs.nix index 6682eed..3a0aeeb 100644 --- a/modules/zfs.nix +++ b/modules/zfs.nix @@ -1,6 +1,4 @@ -{ config, pkgs, ... }: -{ - +{ config, pkgs, ... }: { boot = { supportedFilesystems = [ "zfs" ]; zfs = {