diff options
author | Ben Sima <ben@bsima.me> | 2024-04-01 13:30:45 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2024-04-01 13:30:45 -0400 |
commit | db373a8c727cad91d375b40a6c70b11ed73bdafb (patch) | |
tree | a7ed24e98242b6e38f44cb0c9884718d248cc613 /Biz/Dev | |
parent | 5c8ef1bf4dff4fc7c6e66a57673a81477bcc850a (diff) |
Add nixfmt to Lint.hs
nixfmt is the soon-to-be official formatter for Nix code, as per the NixOS
GitHub group. So I figure I should just adopt it without worrying too much about
the specifics of the formatting. I just formatted everything in one go, hence
the huge diff, oh well.
Diffstat (limited to 'Biz/Dev')
-rw-r--r-- | Biz/Dev/Beryllium.nix | 2 | ||||
-rw-r--r-- | Biz/Dev/Beryllium/Configuration.nix | 13 | ||||
-rw-r--r-- | Biz/Dev/Beryllium/Hardware.nix | 26 | ||||
-rw-r--r-- | Biz/Dev/Dns.nix | 15 | ||||
-rw-r--r-- | Biz/Dev/Guix.nix | 24 | ||||
-rw-r--r-- | Biz/Dev/Hoogle.nix | 6 | ||||
-rw-r--r-- | Biz/Dev/Lithium.nix | 2 | ||||
-rw-r--r-- | Biz/Dev/Lithium/Configuration.nix | 46 | ||||
-rw-r--r-- | Biz/Dev/Lithium/Hardware.nix | 28 | ||||
-rw-r--r-- | Biz/Dev/Networking.nix | 22 | ||||
-rw-r--r-- | Biz/Dev/Vpn.nix | 2 |
11 files changed, 85 insertions, 101 deletions
diff --git a/Biz/Dev/Beryllium.nix b/Biz/Dev/Beryllium.nix index b2dad1e..2cfe61a 100644 --- a/Biz/Dev/Beryllium.nix +++ b/Biz/Dev/Beryllium.nix @@ -1,4 +1,4 @@ -{ nixpkgs ? import ../Bild.nix {} }: +{ nixpkgs ? import ../Bild.nix { } }: with nixpkgs; bild.os { imports = [ diff --git a/Biz/Dev/Beryllium/Configuration.nix b/Biz/Dev/Beryllium/Configuration.nix index 106f78e..b1d7f11 100644 --- a/Biz/Dev/Beryllium/Configuration.nix +++ b/Biz/Dev/Beryllium/Configuration.nix @@ -5,10 +5,9 @@ { config, pkgs, ... }: { - imports = - [ # Include the results of the hardware scan. - ./Hardware.nix - ]; + imports = [ # Include the results of the hardware scan. + ./Hardware.nix + ]; # Bootloader. boot.loader.systemd-boot.enable = true; @@ -105,7 +104,7 @@ services.clight.temperature.night = 1800; services.clight.settings.sunrise = "7:00"; services.clight.settings.sunset = "17:00"; - location.latitude = 40.80; + location.latitude = 40.8; location.longitude = -81.52; services.eternal-terminal.enable = true; @@ -119,8 +118,8 @@ v4l-utils linuxPackages.v4l2loopback nvtop - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget ]; # Some programs need SUID wrappers, can be configured further or are diff --git a/Biz/Dev/Beryllium/Hardware.nix b/Biz/Dev/Beryllium/Hardware.nix index 8c74e10..ecf425c 100644 --- a/Biz/Dev/Beryllium/Hardware.nix +++ b/Biz/Dev/Beryllium/Hardware.nix @@ -4,24 +4,23 @@ { config, lib, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = + [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/f96eaa16-d0e2-4230-aece-131ce7b630da"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/f96eaa16-d0e2-4230-aece-131ce7b630da"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/A34A-6527"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/A34A-6527"; + fsType = "vfat"; + }; swapDevices = [ ]; @@ -34,5 +33,6 @@ # networking.interfaces.enp99s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/Biz/Dev/Dns.nix b/Biz/Dev/Dns.nix index 0490ead..baf79aa 100644 --- a/Biz/Dev/Dns.nix +++ b/Biz/Dev/Dns.nix @@ -1,20 +1,11 @@ { ... }: - - { services.bind = { enable = true; - forwarders = [ - "8.8.8.8" - "1.1.1.1" - ]; - cacheNetworks = [ - "127.0.0.0/8" - "192.168.0.0/24" - ]; - extraConfig = '' - ''; + forwarders = [ "8.8.8.8" "1.1.1.1" ]; + cacheNetworks = [ "127.0.0.0/8" "192.168.0.0/24" ]; + extraConfig = ""; extraOptions = '' dnssec-validation auto; ''; diff --git a/Biz/Dev/Guix.nix b/Biz/Dev/Guix.nix index 8ee55d4..0b261fb 100644 --- a/Biz/Dev/Guix.nix +++ b/Biz/Dev/Guix.nix @@ -6,7 +6,6 @@ let cfg = config.services.guix; - in { options.services.guix = { @@ -21,7 +20,8 @@ in { serviceConfig = { Restart = "always"; - ExecStart = "${pkgs.guix}/bin/guix-daemon --build-users-group=guixbuild"; + ExecStart = + "${pkgs.guix}/bin/guix-daemon --build-users-group=guixbuild"; Environment = null; RemainAfterExit = "yes"; StandardOutput = "syslog"; @@ -30,18 +30,14 @@ in { }; }; users = { - extraUsers = lib.attrs.genAttrs - (lib.lists.range 1 10) - (n: { - name = "guixbuilder${n}"; - isSystemUser = true; - extraGroups = ["guixbuild"]; - group = "guixbuild"; - description = "Guix build user ${n}"; - }); - extraGroups = { - "guixbuild" = {}; - }; + extraUsers = lib.attrs.genAttrs (lib.lists.range 1 10) (n: { + name = "guixbuilder${n}"; + isSystemUser = true; + extraGroups = [ "guixbuild" ]; + group = "guixbuild"; + description = "Guix build user ${n}"; + }); + extraGroups = { "guixbuild" = { }; }; }; }; } diff --git a/Biz/Dev/Hoogle.nix b/Biz/Dev/Hoogle.nix index 02330b5..213a31c 100644 --- a/Biz/Dev/Hoogle.nix +++ b/Biz/Dev/Hoogle.nix @@ -25,7 +25,7 @@ in { }; packages = mkOption { - default = _hp: []; + default = _hp: [ ]; defaultText = "hp: []"; example = "hp: with hp; [ text lens ]"; description = '' @@ -64,7 +64,9 @@ in { serviceConfig = { Restart = "always"; - ExecStart = ''${hoogleEnv}/bin/hoogle server --local --port ${toString cfg.port} --home ${cfg.home} --host ${cfg.host}''; + ExecStart = "${hoogleEnv}/bin/hoogle server --local --port ${ + toString cfg.port + } --home ${cfg.home} --host ${cfg.host}"; DynamicUser = true; diff --git a/Biz/Dev/Lithium.nix b/Biz/Dev/Lithium.nix index d3b17b7..d81b55c 100644 --- a/Biz/Dev/Lithium.nix +++ b/Biz/Dev/Lithium.nix @@ -1,4 +1,4 @@ -{ nixpkgs ? import ../Bild.nix {} }: +{ nixpkgs ? import ../Bild.nix { } }: with nixpkgs; # Dev machine for work and building stuff. diff --git a/Biz/Dev/Lithium/Configuration.nix b/Biz/Dev/Lithium/Configuration.nix index 7434b3f..e6cbdfe 100644 --- a/Biz/Dev/Lithium/Configuration.nix +++ b/Biz/Dev/Lithium/Configuration.nix @@ -14,17 +14,18 @@ in { time.timeZone = "America/New_York"; fonts.fonts = with pkgs; [ - google-fonts mononoki source-code-pro fantasque-sans-mono hack-font - fira fira-code fira-code-symbols + google-fonts + mononoki + source-code-pro + fantasque-sans-mono + hack-font + fira + fira-code + fira-code-symbols ]; - environment.systemPackages = [ - pkgs.nvtop # - pkgs.k3s - pkgs.wemux - pkgs.tmux - pkgs.wireguard-tools - ]; + environment.systemPackages = + [ pkgs.nvtop pkgs.k3s pkgs.wemux pkgs.tmux pkgs.wireguard-tools ]; nixpkgs = { config = { @@ -63,7 +64,8 @@ in { services.my-hoogle.enable = true; services.my-hoogle.port = ports.hoogle; services.my-hoogle.home = "//hoogle.simatime.com"; - services.my-hoogle.packages = pkgset: lib.attrsets.attrVals (import ../../Bild/Deps/Haskell.nix) pkgset; + services.my-hoogle.packages = pkgset: + lib.attrsets.attrVals (import ../../Bild/Deps/Haskell.nix) pkgset; services.my-hoogle.haskellPackages = pkgs.haskell.packages.${ghcCompiler}; services.my-hoogle.host = "0.0.0.0"; @@ -84,11 +86,13 @@ in { services.tor.settings.Nickname = "ydeee3q1cjo83tsuqcz"; services.tor.settings.AccountingMax = "10 GBytes"; services.tor.settings.AccountingStart = "month 1 1:00"; - services.tor.settings.ContactInfo = "ContactInfo pgp:66A6AD150399D970DCA4C4E6C8218B7D0BFDECCD ciissversion:2"; + services.tor.settings.ContactInfo = + "ContactInfo pgp:66A6AD150399D970DCA4C4E6C8218B7D0BFDECCD ciissversion:2"; services.bitcoind.mainnet.enable = true; services.bitcoind.mainnet.dataDir = "/mnt/campbell/bitcoind-mainnet/data"; - services.bitcoind.mainnet.configFile = "/mnt/campbell/bitcoind-mainnet/bitcoin.conf"; + services.bitcoind.mainnet.configFile = + "/mnt/campbell/bitcoind-mainnet/bitcoin.conf"; services.bitcoind.mainnet.prune = 10000; services.pcscd.enable = true; @@ -140,12 +144,20 @@ in { services.jupyter.port = ports.jupyter; services.jupyter.ip = "*"; users.users.jupyter.group = "jupyter"; - users.groups.jupyter = {}; - services.jupyter.password = "'argon2:$argon2id$v=19$m=10240,t=10,p=8$nvQhgk+htbIYi961YYAf1w$ekpwiTT5L4+OAods0K7EDw'"; + users.groups.jupyter = { }; + services.jupyter.password = + "'argon2:$argon2id$v=19$m=10240,t=10,p=8$nvQhgk+htbIYi961YYAf1w$ekpwiTT5L4+OAods0K7EDw'"; services.jupyter.kernels.python3 = let - env = (pkgs.python3.withPackages (p: with p; [ - ipykernel pandas scikitlearn numpy matplotlib sympy ipywidgets - ])); + env = (pkgs.python3.withPackages (p: + with p; [ + ipykernel + pandas + scikitlearn + numpy + matplotlib + sympy + ipywidgets + ])); in { displayName = "py3"; argv = [ diff --git a/Biz/Dev/Lithium/Hardware.nix b/Biz/Dev/Lithium/Hardware.nix index 4d835aa..54c07f5 100644 --- a/Biz/Dev/Lithium/Hardware.nix +++ b/Biz/Dev/Lithium/Hardware.nix @@ -4,26 +4,22 @@ { lib, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ - "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" - ]; + boot.initrd.availableKernelModules = + [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ - ]; + boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/f08dd8f9-787c-4e2a-a0cc-7019edc2ce2b"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/f08dd8f9-787c-4e2a-a0cc-7019edc2ce2b"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/C67C-D7B5"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/C67C-D7B5"; + fsType = "vfat"; + }; fileSystems."/mnt/campbell" = { device = "/dev/disk/by-uuid/037df3ae-4609-402c-ab1d-4593190d0ee7"; diff --git a/Biz/Dev/Networking.nix b/Biz/Dev/Networking.nix index 1a28b56..c89add7 100644 --- a/Biz/Dev/Networking.nix +++ b/Biz/Dev/Networking.nix @@ -1,14 +1,11 @@ { ... }: -let - ports = import ../Cloud/Ports.nix; +let ports = import ../Cloud/Ports.nix; in { networking = { nameservers = [ "1.1.1.1" ]; hostName = "lithium"; - hosts = { - "::1" = [ "localhost" "ipv6-localhost" "ipv6-loopback" ]; - }; + hosts = { "::1" = [ "localhost" "ipv6-localhost" "ipv6-loopback" ]; }; firewall = { allowedTCPPorts = [ @@ -32,18 +29,9 @@ in { ports.stableDiffusion ports.tor ]; - allowedTCPPortRanges = [ - ports.torrents - ports.httpdev - ]; - allowedUDPPorts = [ - ports.dns - ports.et - ports.murmur - ]; - allowedUDPPortRanges = [ - ports.torrents - ]; + allowedTCPPortRanges = [ ports.torrents ports.httpdev ]; + allowedUDPPorts = [ ports.dns ports.et ports.murmur ]; + allowedUDPPortRanges = [ ports.torrents ]; }; # The global useDHCP flag is deprecated, therefore explicitly set to false here. diff --git a/Biz/Dev/Vpn.nix b/Biz/Dev/Vpn.nix index 5a3c3e6..47f9c6e 100644 --- a/Biz/Dev/Vpn.nix +++ b/Biz/Dev/Vpn.nix @@ -8,7 +8,7 @@ in { enable = true; address = "0.0.0.0"; port = ports.headscale; - settings = {}; + settings = { }; }; services.nginx.virtualHosts.${domain} = { |