From e6cb5b2615e60b8a6dc92b54e94e2de392c3a224 Mon Sep 17 00:00:00 2001 From: Amneesh Singh Date: Thu, 8 Dec 2022 01:11:53 +0530 Subject: [PATCH] ran nixpkgs-fmt Signed-off-by: Amneesh Singh --- home/modules/secret.nix | 25 +++++++++++++------------ home/natto/stuff.nix | 12 +++++++----- hosts/marisa/boot.nix | 4 ++-- hosts/marisa/default.nix | 18 +++++++++--------- hosts/marisa/hardware.nix | 6 ++++-- hosts/marisa/networking.nix | 9 +++++++-- hosts/modules/nvim/default.nix | 2 +- hosts/modules/vault-agent.nix | 6 +++--- hosts/modules/x86builder.nix | 24 ++++++++++++------------ hosts/remilia/boot.nix | 2 +- hosts/remilia/default.nix | 20 ++++++++++---------- hosts/remilia/hardware.nix | 10 ++++++---- hosts/remilia/networking.nix | 2 +- hosts/satori/default.nix | 2 +- hosts/satori/xorg.nix | 11 +++++------ pkgs/customscripts/default.nix | 4 ++-- pkgs/packages.nix | 3 ++- pkgs/simp1e/default.nix | 2 +- 18 files changed, 87 insertions(+), 75 deletions(-) diff --git a/home/modules/secret.nix b/home/modules/secret.nix index 9d620b2..2e89810 100644 --- a/home/modules/secret.nix +++ b/home/modules/secret.nix @@ -37,12 +37,12 @@ let ''; }; path = mkOption { - type = types.str; - default = "${home_}/.secrets/${config.name}"; - description = '' - Path where the decrypted secret is installed. - ''; - }; + type = types.str; + default = "${home_}/.secrets/${config.name}"; + description = '' + Path where the decrypted secret is installed. + ''; + }; mode = mkOption { type = types.str; default = "0400"; @@ -59,12 +59,13 @@ let }; }; }); -in { - +in +{ + options.age = { secrets = mkOption { type = types.attrsOf secretType; - default = {}; + default = { }; description = '' Attrset of secrets. ''; @@ -72,15 +73,15 @@ in { sshKeyPaths = mkOption { type = types.listOf types.path; - default = [ ]; + default = [ ]; description = '' Path to SSH keys to be used as identities in age decryption. ''; }; }; - config = mkIf (cfg.secrets != {}) { + config = mkIf (cfg.secrets != { }) { assertions = [{ - assertion = cfg.sshKeyPaths != []; + assertion = cfg.sshKeyPaths != [ ]; message = "age.sshKeyPaths must be set."; }]; home.activation = { diff --git a/home/natto/stuff.nix b/home/natto/stuff.nix index 4fe6371..3697f38 100644 --- a/home/natto/stuff.nix +++ b/home/natto/stuff.nix @@ -24,11 +24,13 @@ target = "${xdg.configHome}/mpv/mpv.conf"; }; packages = { - text = let - packages = builtins.map (p: "${p.name}") config.home.packages; - sortedUnique = builtins.sort builtins.lessThan (lib.unique packages); - formatted = builtins.concatStringsSep "\n" sortedUnique; - in formatted; + text = + let + packages = builtins.map (p: "${p.name}") config.home.packages; + sortedUnique = builtins.sort builtins.lessThan (lib.unique packages); + formatted = builtins.concatStringsSep "\n" sortedUnique; + in + formatted; target = "${xdg.configHome}/${config.home.username}-packages"; }; }; diff --git a/hosts/marisa/boot.nix b/hosts/marisa/boot.nix index 06c96df..6477987 100644 --- a/hosts/marisa/boot.nix +++ b/hosts/marisa/boot.nix @@ -3,12 +3,12 @@ boot = { consoleLogLevel = 7; kernelParams = [ "console=ttyS0,115200n8" "console=ttyAMA0,115200n8" "console=tty0" ]; - kernelPackages = pkgs.linuxPackages_5_10; + kernelPackages = pkgs.linuxPackages_5_10; initrd.availableKernelModules = [ "xhci_pci" "usb_storage" "usbhid" "uas" "pcie-brcmstb" "vc4" ]; loader = { grub.enable = false; generic-extlinux-compatible.enable = true; - /* raspberryPi= { + /* raspberryPi= { version = 4; firmwareConfig = "dtparam=sd_poll_once=on"; enable = true; diff --git a/hosts/marisa/default.nix b/hosts/marisa/default.nix index 010484b..7e12e2b 100644 --- a/hosts/marisa/default.nix +++ b/hosts/marisa/default.nix @@ -1,12 +1,12 @@ -{config, pkgs, ...}: +{ config, pkgs, ... }: { - imports = - [ - ./networking.nix - ./hardware.nix - ./boot.nix - ./services.nix - ./stuff.nix - ]; + imports = + [ + ./networking.nix + ./hardware.nix + ./boot.nix + ./services.nix + ./stuff.nix + ]; system.stateVersion = "21.05"; } diff --git a/hosts/marisa/hardware.nix b/hosts/marisa/hardware.nix index baea1a3..ae92fe7 100644 --- a/hosts/marisa/hardware.nix +++ b/hosts/marisa/hardware.nix @@ -5,12 +5,14 @@ { fileSystems."/" = - { device = "/dev/disk/by-label/NIXOS_SD"; + { + device = "/dev/disk/by-label/NIXOS_SD"; fsType = "ext4"; }; fileSystems."/nix/store" = - { device = "/nix/store"; + { + device = "/nix/store"; fsType = "none"; options = [ "bind" ]; }; diff --git a/hosts/marisa/networking.nix b/hosts/marisa/networking.nix index 3e045f4..27b8bc2 100644 --- a/hosts/marisa/networking.nix +++ b/hosts/marisa/networking.nix @@ -6,9 +6,14 @@ allowedTCPPorts = [ 22 # ssh 80 # http - 6060 4444 5454 8080 #???? + 6060 + 4444 + 5454 + 8080 #???? 5001 #gitea - 8800 4646 8500 #vault nomad consul + 8800 + 4646 + 8500 #vault nomad consul 8888 #simpler-filehost1 6666 #concourse 202 #gitea-ssh diff --git a/hosts/modules/nvim/default.nix b/hosts/modules/nvim/default.nix index 699f3cd..5fc7c9f 100644 --- a/hosts/modules/nvim/default.nix +++ b/hosts/modules/nvim/default.nix @@ -1,4 +1,4 @@ -{inputs, config, pkgs, ... }: +{ inputs, config, pkgs, ... }: { programs.neovim = { diff --git a/hosts/modules/vault-agent.nix b/hosts/modules/vault-agent.nix index d27da43..148d5f5 100644 --- a/hosts/modules/vault-agent.nix +++ b/hosts/modules/vault-agent.nix @@ -3,7 +3,7 @@ with lib; let cfg = config.services.vault-agent; - json = pkgs.formats.json {}; + json = pkgs.formats.json { }; in { options = { @@ -17,10 +17,10 @@ in The package used for the vault agent ''; }; - + settings = mkOption { type = json.type; - default = {}; + default = { }; description = '' Settings for the agent ''; diff --git a/hosts/modules/x86builder.nix b/hosts/modules/x86builder.nix index c1d4b8f..b2ef2b0 100644 --- a/hosts/modules/x86builder.nix +++ b/hosts/modules/x86builder.nix @@ -1,14 +1,14 @@ -{config, ...}: +{ config, ... }: { - nix.buildMachines = [ { - hostName = "satori"; - systems = ["x86_64-linux" "aarch64-linux"]; - maxJobs = 4; - speedFactor = 2; - supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; - }] ; - nix.distributedBuilds = true; - nix.extraOptions = '' - builders-use-substitutes = true - ''; + nix.buildMachines = [{ + hostName = "satori"; + systems = [ "x86_64-linux" "aarch64-linux" ]; + maxJobs = 4; + speedFactor = 2; + supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; + }]; + nix.distributedBuilds = true; + nix.extraOptions = '' + builders-use-substitutes = true + ''; } diff --git a/hosts/remilia/boot.nix b/hosts/remilia/boot.nix index dd4eed5..6f50331 100644 --- a/hosts/remilia/boot.nix +++ b/hosts/remilia/boot.nix @@ -1,4 +1,4 @@ -{config, ...}: +{ config, ... }: { boot = { kernel.sysctl."net.ipv4.ip_forward" = 1; diff --git a/hosts/remilia/default.nix b/hosts/remilia/default.nix index 2cb3cd3..f3ff3af 100644 --- a/hosts/remilia/default.nix +++ b/hosts/remilia/default.nix @@ -1,14 +1,14 @@ -{lib, config, ...}: +{ lib, config, ... }: { - imports = - [ - ./networking.nix - ./hardware.nix - ./boot.nix - ./services.nix - ./mailserver.nix - ./stuff.nix - ]; + imports = + [ + ./networking.nix + ./hardware.nix + ./boot.nix + ./services.nix + ./mailserver.nix + ./stuff.nix + ]; system.stateVersion = "21.11"; } diff --git a/hosts/remilia/hardware.nix b/hosts/remilia/hardware.nix index 0db6e8f..6ae1292 100644 --- a/hosts/remilia/hardware.nix +++ b/hosts/remilia/hardware.nix @@ -2,17 +2,19 @@ { imports = - [ (modulesPath + "/profiles/qemu-guest.nix") + [ + (modulesPath + "/profiles/qemu-guest.nix") ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/d91adce2-9059-4a8a-86e7-dee6ecc85b2b"; + { + device = "/dev/disk/by-uuid/d91adce2-9059-4a8a-86e7-dee6ecc85b2b"; fsType = "ext4"; }; swapDevices = [ - { - device="/swapfile"; + { + device = "/swapfile"; size = 7168; priority = 0; } diff --git a/hosts/remilia/networking.nix b/hosts/remilia/networking.nix index 99c7de7..e913ad2 100644 --- a/hosts/remilia/networking.nix +++ b/hosts/remilia/networking.nix @@ -18,7 +18,7 @@ 25 22001 22002 - 9898 + 9898 8999 99 ] ++ (map (x: x.sourcePort) config.networking.nat.forwardPorts); diff --git a/hosts/satori/default.nix b/hosts/satori/default.nix index 3832965..68fcaf7 100644 --- a/hosts/satori/default.nix +++ b/hosts/satori/default.nix @@ -1,4 +1,4 @@ -{ lib, config, ...}: +{ lib, config, ... }: { imports = [ diff --git a/hosts/satori/xorg.nix b/hosts/satori/xorg.nix index ecf61ab..cae6e0d 100644 --- a/hosts/satori/xorg.nix +++ b/hosts/satori/xorg.nix @@ -1,4 +1,3 @@ - { config, lib, ... }: #let @@ -11,23 +10,23 @@ services = { xserver = { enable = true; - libinput= { + libinput = { enable = true; mouse = { accelSpeed = "0"; - # accelProfile = "flat"; + # accelProfile = "flat"; }; touchpad = { middleEmulation = false; clickMethod = "buttonareas"; tapping = true; - naturalScrolling =true; + naturalScrolling = true; }; }; displayManager = { startx = { - enable = true; - }; + enable = true; + }; }; extraLayouts = { us-colemak = { diff --git a/pkgs/customscripts/default.nix b/pkgs/customscripts/default.nix index 11cb0ad..2a4ca92 100644 --- a/pkgs/customscripts/default.nix +++ b/pkgs/customscripts/default.nix @@ -1,4 +1,4 @@ -{lib, stdenvNoCC, fetchFromGitHub}: +{ lib, stdenvNoCC, fetchFromGitHub }: stdenvNoCC.mkDerivation { name = "customscripts"; @@ -8,5 +8,5 @@ stdenvNoCC.mkDerivation { mkdir -p $out/bin cp -r $src/* $out/bin chmod -R +x $out/bin/* -''; + ''; } diff --git a/pkgs/packages.nix b/pkgs/packages.nix index c77896d..c7e4855 100644 --- a/pkgs/packages.nix +++ b/pkgs/packages.nix @@ -1,6 +1,7 @@ final: prev: let - call = prev.callPackage; in + call = prev.callPackage; +in { customscripts = call ./customscripts { }; tlauncher = call ./tlauncher { }; diff --git a/pkgs/simp1e/default.nix b/pkgs/simp1e/default.nix index b1bfdb4..575e0d3 100644 --- a/pkgs/simp1e/default.nix +++ b/pkgs/simp1e/default.nix @@ -12,7 +12,7 @@ stdenvNoCC.mkDerivation rec { fetchSubmodules = true; }; - nativeBuildInputs = [ + nativeBuildInputs = [ (python3.withPackages (ps: with ps; [ pillow ])) librsvg xcursorgen