diff --git a/disks/root.nix b/disks/root.nix index ded97f1..3217e48 100644 --- a/disks/root.nix +++ b/disks/root.nix @@ -1,4 +1,5 @@ -{ disk, ... }: { +{ disk, ... }: +{ disk = { boot = { type = "disk"; diff --git a/disks/zfs.nix b/disks/zfs.nix index 7181f4d..3273a4e 100644 --- a/disks/zfs.nix +++ b/disks/zfs.nix @@ -1,4 +1,5 @@ -{ pool, disks, ... }: { +{ pool, disks, ... }: +{ disk = lib.genAttrs disks (disk: { "${disk}" = { type = "disk"; @@ -6,16 +7,18 @@ content = { type = "table"; format = "gpt"; - partitions = [{ - type = "partition"; - name = "zfs"; - start = "128MiB"; - end = "100%"; - content = { - type = "zfs"; - pool = pool; - }; - }]; + partitions = [ + { + type = "partition"; + name = "zfs"; + start = "128MiB"; + end = "100%"; + content = { + type = "zfs"; + pool = pool; + }; + } + ]; }; }; }); diff --git a/hosts/arrow/default.nix b/hosts/arrow/default.nix index 41852b4..ae46a51 100644 --- a/hosts/arrow/default.nix +++ b/hosts/arrow/default.nix @@ -1,20 +1,26 @@ -{ inputs, globals, overlays, ... }: +{ + inputs, + globals, + overlays, + ... +}: inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { }; - modules = import ./modules.nix { inherit inputs globals overlays; } ++ [{ - # This is the root filesystem containing NixOS - fileSystems."/" = { - device = "/dev/disk/by-label/nixos"; - fsType = "ext4"; - }; + modules = import ./modules.nix { inherit inputs globals overlays; } ++ [ + { + # This is the root filesystem containing NixOS + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; - # This is the boot filesystem for Grub - fileSystems."/boot" = { - device = "/dev/disk/by-label/boot"; - fsType = "vfat"; - }; - }]; + # This is the boot filesystem for Grub + fileSystems."/boot" = { + device = "/dev/disk/by-label/boot"; + fsType = "vfat"; + }; + } + ]; } - diff --git a/hosts/arrow/modules.nix b/hosts/arrow/modules.nix index c19ee65..ee27218 100644 --- a/hosts/arrow/modules.nix +++ b/hosts/arrow/modules.nix @@ -1,4 +1,8 @@ -{ inputs, globals, overlays }: +{ + inputs, + globals, + overlays, +}: [ globals @@ -21,18 +25,18 @@ services.transmission.enable = true; # nix-index seems to each up too much memory for Vultr - home-manager.users.${globals.user}.programs.nix-index.enable = - inputs.nixpkgs.lib.mkForce false; + home-manager.users.${globals.user}.programs.nix-index.enable = inputs.nixpkgs.lib.mkForce false; virtualisation.vmVariant = { - virtualisation.forwardPorts = [{ - from = "host"; - host.port = 2222; - guest.port = 22; - }]; + virtualisation.forwardPorts = [ + { + from = "host"; + host.port = 2222; + guest.port = 22; + } + ]; }; } ../../modules/common ../../modules/nixos ] - diff --git a/hosts/aws/default.nix b/hosts/aws/default.nix index 30b2ef9..44ff674 100644 --- a/hosts/aws/default.nix +++ b/hosts/aws/default.nix @@ -1,28 +1,41 @@ -{ inputs, system, globals, overlays, ... }: +{ + inputs, + system, + globals, + overlays, + ... +}: inputs.nixos-generators.nixosGenerate { inherit system; format = "amazon"; - modules = [ - globals - inputs.home-manager.nixosModules.home-manager - { - nixpkgs.overlays = overlays; - networking.hostName = "sheep"; - gui.enable = false; - theme.colors = (import ../../colorscheme/gruvbox).dark; - passwordHash = null; - publicKeys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s personal" - ]; - # AWS settings require this - permitRootLogin = "prohibit-password"; - } - ../../modules/common - ../../modules/nixos - ../../modules/nixos/services/sshd.nix - ] ++ [ - # Required to fix diskSize errors during build - ({ ... }: { amazonImage.sizeMB = 16 * 1024; }) - ]; + modules = + [ + globals + inputs.home-manager.nixosModules.home-manager + { + nixpkgs.overlays = overlays; + networking.hostName = "sheep"; + gui.enable = false; + theme.colors = (import ../../colorscheme/gruvbox).dark; + passwordHash = null; + publicKeys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s personal" + ]; + # AWS settings require this + permitRootLogin = "prohibit-password"; + } + ../../modules/common + ../../modules/nixos + ../../modules/nixos/services/sshd.nix + ] + ++ [ + # Required to fix diskSize errors during build + ( + { ... }: + { + amazonImage.sizeMB = 16 * 1024; + } + ) + ]; } diff --git a/hosts/flame/default.nix b/hosts/flame/default.nix index 777f66e..4c383f6 100644 --- a/hosts/flame/default.nix +++ b/hosts/flame/default.nix @@ -7,7 +7,12 @@ # https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/ # These days, probably use nixos-anywhere instead. -{ inputs, globals, overlays, ... }: +{ + inputs, + globals, + overlays, + ... +}: inputs.nixpkgs.lib.nixosSystem { system = "aarch64-linux"; @@ -26,7 +31,11 @@ inputs.nixpkgs.lib.nixosSystem { # Not sure what's necessary but too afraid to remove anything imports = [ (inputs.nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "virtio_pci" + "usbhid" + ]; # File systems must be declared in order to boot @@ -49,7 +58,9 @@ inputs.nixpkgs.lib.nixosSystem { gui.enable = false; # Still require colors for programs like Neovim, K9S - theme = { colors = (import ../../colorscheme/gruvbox).dark; }; + theme = { + colors = (import ../../colorscheme/gruvbox).dark; + }; # Programs and services atuin.enable = true; @@ -72,8 +83,7 @@ inputs.nixpkgs.lib.nixosSystem { enable = true; id = "bd250ee1-ed2e-42d2-b627-039f1eb5a4d2"; credentialsFile = ../../private/cloudflared-flame.age; - ca = - "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK/6oyVqjFGX3Uvrc3VS8J9sphxzAnRzKC85xgkHfYgR3TK6qBGXzHrknEj21xeZrr3G2y1UsGzphWJd9ZfIcdA= open-ssh-ca@cloudflareaccess.org"; + ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK/6oyVqjFGX3Uvrc3VS8J9sphxzAnRzKC85xgkHfYgR3TK6qBGXzHrknEj21xeZrr3G2y1UsGzphWJd9ZfIcdA= open-ssh-ca@cloudflareaccess.org"; }; # Nextcloud backup config @@ -116,7 +126,6 @@ inputs.nixpkgs.lib.nixosSystem { # # VPN port forwarding # services.transmission.settings.peer-port = 57599; - } ]; } diff --git a/hosts/hydra/default.nix b/hosts/hydra/default.nix index e55bc3e..fdfe979 100644 --- a/hosts/hydra/default.nix +++ b/hosts/hydra/default.nix @@ -3,7 +3,12 @@ # See [readme](../README.md) to explain how this file works. -{ inputs, globals, overlays, ... }: +{ + inputs, + globals, + overlays, + ... +}: inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -32,8 +37,7 @@ inputs.nixpkgs.lib.nixosSystem { startMenuLaunchers = true; nativeSystemd = true; wslConf.network.generateResolvConf = true; # Turn off if it breaks VPN - interop.includePath = - false; # Including Windows PATH will slow down Neovim command mode + interop.includePath = false; # Including Windows PATH will slow down Neovim command mode }; neovim.enable = true; diff --git a/hosts/lookingglass/default.nix b/hosts/lookingglass/default.nix index d260a03..92f7a63 100644 --- a/hosts/lookingglass/default.nix +++ b/hosts/lookingglass/default.nix @@ -1,7 +1,12 @@ # The Looking Glass # System configuration for my work Macbook -{ inputs, globals, overlays, ... }: +{ + inputs, + globals, + overlays, + ... +}: inputs.darwin.lib.darwinSystem { system = "aarch64-darwin"; @@ -9,11 +14,14 @@ inputs.darwin.lib.darwinSystem { modules = [ ../../modules/common ../../modules/darwin - (globals // rec { - user = "Noah.Masur"; - gitName = "Noah-Masur_1701"; - gitEmail = "${user}@take2games.com"; - }) + ( + globals + // rec { + user = "Noah.Masur"; + gitName = "Noah-Masur_1701"; + gitEmail = "${user}@take2games.com"; + } + ) inputs.home-manager.darwinModules.home-manager { nixpkgs.overlays = [ inputs.firefox-darwin.overlay ] ++ overlays; diff --git a/hosts/staff/default.nix b/hosts/staff/default.nix index 3888b28..d73fdb4 100644 --- a/hosts/staff/default.nix +++ b/hosts/staff/default.nix @@ -1,43 +1,53 @@ # The Staff # ISO configuration for my USB drive -{ inputs, system, overlays, ... }: +{ + inputs, + system, + overlays, + ... +}: inputs.nixos-generators.nixosGenerate { inherit system; format = "install-iso"; - modules = [{ - nixpkgs.overlays = overlays; - networking.hostName = "staff"; - users.extraUsers.root.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s" - ]; - services.openssh = { - enable = true; - ports = [ 22 ]; - allowSFTP = true; - settings = { - GatewayPorts = "no"; - X11Forwarding = false; - PasswordAuthentication = false; - PermitRootLogin = "yes"; - }; - }; - environment.systemPackages = - let pkgs = import inputs.nixpkgs { inherit system overlays; }; - in with pkgs; [ - git - vim - wget - curl - (import ../../modules/common/neovim/package { - inherit pkgs; - colors = (import ../../colorscheme/gruvbox).dark; - }) + modules = [ + { + nixpkgs.overlays = overlays; + networking.hostName = "staff"; + users.extraUsers.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s" ]; - nix.extraOptions = '' - experimental-features = nix-command flakes - warn-dirty = false - ''; - }]; + services.openssh = { + enable = true; + ports = [ 22 ]; + allowSFTP = true; + settings = { + GatewayPorts = "no"; + X11Forwarding = false; + PasswordAuthentication = false; + PermitRootLogin = "yes"; + }; + }; + environment.systemPackages = + let + pkgs = import inputs.nixpkgs { inherit system overlays; }; + in + with pkgs; + [ + git + vim + wget + curl + (import ../../modules/common/neovim/package { + inherit pkgs; + colors = (import ../../colorscheme/gruvbox).dark; + }) + ]; + nix.extraOptions = '' + experimental-features = nix-command flakes + warn-dirty = false + ''; + } + ]; } diff --git a/hosts/swan/default.nix b/hosts/swan/default.nix index 3055383..a3f16db 100644 --- a/hosts/swan/default.nix +++ b/hosts/swan/default.nix @@ -3,7 +3,12 @@ # See [readme](../README.md) to explain how this file works. -{ inputs, globals, overlays, ... }: +{ + inputs, + globals, + overlays, + ... +}: inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -23,8 +28,13 @@ inputs.nixpkgs.lib.nixosSystem { networking.hostName = "swan"; # Not sure what's necessary but too afraid to remove anything - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "usb_storage" + "sd_mod" + ]; # Required for transcoding boot.initrd.kernelModules = [ "amdgpu" ]; @@ -60,8 +70,11 @@ inputs.nixpkgs.lib.nixosSystem { # Automatically load the ZFS pool on boot extraPools = [ "tank" ]; # Only try to decrypt datasets with keyfiles - requestEncryptionCredentials = - [ "tank/archive" "tank/generic" "tank/nextcloud" ]; + requestEncryptionCredentials = [ + "tank/archive" + "tank/generic" + "tank/nextcloud" + ]; # If password is requested and fails, continue to boot eventually passwordTimeout = 300; }; @@ -72,7 +85,9 @@ inputs.nixpkgs.lib.nixosSystem { gui.enable = false; # Still require colors for programs like Neovim, K9S - theme = { colors = (import ../../colorscheme/gruvbox).dark; }; + theme = { + colors = (import ../../colorscheme/gruvbox).dark; + }; # Programs and services atuin.enable = true; @@ -97,8 +112,7 @@ inputs.nixpkgs.lib.nixosSystem { enable = true; id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2"; credentialsFile = ../../private/cloudflared-swan.age; - ca = - "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org"; + ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org"; }; # Send regular backups and litestream for DBs to an S3-like bucket diff --git a/hosts/tempest/default.nix b/hosts/tempest/default.nix index 1696189..ac666a0 100644 --- a/hosts/tempest/default.nix +++ b/hosts/tempest/default.nix @@ -3,7 +3,12 @@ # See [readme](../README.md) to explain how this file works. -{ inputs, globals, overlays, ... }: +{ + inputs, + globals, + overlays, + ... +}: inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -20,8 +25,14 @@ inputs.nixpkgs.lib.nixosSystem { networking.hostName = "tempest"; # Not sure what's necessary but too afraid to remove anything - boot.initrd.availableKernelModules = - [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usb_storage" + "usbhid" + "sd_mod" + ]; # Graphics and VMs boot.initrd.kernelModules = [ "amdgpu" ]; @@ -114,23 +125,20 @@ inputs.nixpkgs.lib.nixosSystem { ryujinx.enable = true; }; services.vmagent.enable = true; # Enables Prometheus metrics - services.openssh.enable = - true; # Required for Cloudflare tunnel and identity file + services.openssh.enable = true; # Required for Cloudflare tunnel and identity file # Allows private remote access over the internet cloudflareTunnel = { enable = true; id = "ac133a82-31fb-480c-942a-cdbcd4c58173"; credentialsFile = ../../private/cloudflared-tempest.age; - ca = - "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPY6C0HmdFCaxYtJxFr3qV4/1X4Q8KrYQ1hlme3u1hJXK+xW+lc9Y9glWHrhiTKilB7carYTB80US0O47gI5yU4= open-ssh-ca@cloudflareaccess.org"; + ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPY6C0HmdFCaxYtJxFr3qV4/1X4Q8KrYQ1hlme3u1hJXK+xW+lc9Y9glWHrhiTKilB7carYTB80US0O47gI5yU4= open-ssh-ca@cloudflareaccess.org"; }; # Allows requests to force machine to wake up # This network interface might change, needs to be set specifically for each machine. # Or set usePredictableInterfaceNames = false networking.interfaces.enp5s0.wakeOnLan.enable = true; - } ]; } diff --git a/overlays/betterlockscreen.nix b/overlays/betterlockscreen.nix index 78ba310..936f826 100644 --- a/overlays/betterlockscreen.nix +++ b/overlays/betterlockscreen.nix @@ -1,4 +1,2 @@ # Disable dunst so that it's not attempting to reach a non-existent dunst service -_final: prev: { - betterlockscreen = prev.betterlockscreen.override { withDunst = false; }; -} +_final: prev: { betterlockscreen = prev.betterlockscreen.override { withDunst = false; }; } diff --git a/overlays/bypass-paywalls-clean.nix b/overlays/bypass-paywalls-clean.nix index 2bcc7ab..648b7ce 100644 --- a/overlays/bypass-paywalls-clean.nix +++ b/overlays/bypass-paywalls-clean.nix @@ -3,18 +3,20 @@ inputs: _final: prev: { # Based on: # https://git.sr.ht/~rycee/nur-expressions/tree/master/item/pkgs/firefox-addons/default.nix#L34 - bypass-paywalls-clean = let addonId = "magnolia@12.34"; - in prev.stdenv.mkDerivation rec { - pname = "bypass-paywalls-clean"; - version = "3.4.9.0"; - src = inputs.bypass-paywalls-clean + "/bypass_paywalls_clean-latest.xpi"; - preferLocalBuild = true; - allowSubstitutes = true; - buildCommand = '' - dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" - mkdir -p "$dst" - install -v -m644 "${src}" "$dst/${addonId}.xpi" - ''; - }; - + bypass-paywalls-clean = + let + addonId = "magnolia@12.34"; + in + prev.stdenv.mkDerivation rec { + pname = "bypass-paywalls-clean"; + version = "3.4.9.0"; + src = inputs.bypass-paywalls-clean + "/bypass_paywalls_clean-latest.xpi"; + preferLocalBuild = true; + allowSubstitutes = true; + buildCommand = '' + dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" + mkdir -p "$dst" + install -v -m644 "${src}" "$dst/${addonId}.xpi" + ''; + }; } diff --git a/overlays/caddy.nix b/overlays/caddy.nix index 7dbb611..0a917c5 100644 --- a/overlays/caddy.nix +++ b/overlays/caddy.nix @@ -5,10 +5,8 @@ inputs: _final: prev: let plugins = [ "github.com/caddy-dns/cloudflare" ]; - goImports = - prev.lib.flip prev.lib.concatMapStrings plugins (pkg: " _ \"${pkg}\"\n"); - goGets = prev.lib.flip prev.lib.concatMapStrings plugins - (pkg: "go get ${pkg}\n "); + goImports = prev.lib.flip prev.lib.concatMapStrings plugins (pkg: " _ \"${pkg}\"\n"); + goGets = prev.lib.flip prev.lib.concatMapStrings plugins (pkg: "go get ${pkg}\n "); main = '' package main import ( @@ -20,8 +18,8 @@ let caddycmd.Main() } ''; - -in { +in +{ caddy-cloudflare = prev.buildGo122Module { pname = "caddy-cloudflare"; version = prev.caddy.version; @@ -33,13 +31,15 @@ in { vendorHash = "sha256-zeuvCk7kZa/W/roC12faCQDav4RB8RT1dR2Suh2yjD8="; - overrideModAttrs = (_: { - preBuild = '' - echo '${main}' > cmd/caddy/main.go - ${goGets} - ''; - postInstall = "cp go.sum go.mod $out/ && ls $out/"; - }); + overrideModAttrs = ( + _: { + preBuild = '' + echo '${main}' > cmd/caddy/main.go + ${goGets} + ''; + postInstall = "cp go.sum go.mod $out/ && ls $out/"; + } + ); postPatch = '' echo '${main}' > cmd/caddy/main.go @@ -53,10 +53,12 @@ in { meta = with prev.lib; { homepage = "https://caddyserver.com"; - description = - "Fast, cross-platform HTTP/2 web server with automatic HTTPS"; + description = "Fast, cross-platform HTTP/2 web server with automatic HTTPS"; license = licenses.asl20; - maintainers = with maintainers; [ Br1ght0ne techknowlogick ]; + maintainers = with maintainers; [ + Br1ght0ne + techknowlogick + ]; }; }; } diff --git a/overlays/disko.nix b/overlays/disko.nix index fe1d197..66edc48 100644 --- a/overlays/disko.nix +++ b/overlays/disko.nix @@ -1,5 +1,3 @@ # Add disko to nixpkgs from its input flake -inputs: _final: prev: { - disko = inputs.disko.packages.${prev.system}.disko; -} +inputs: _final: prev: { disko = inputs.disko.packages.${prev.system}.disko; } diff --git a/overlays/gh-collaborators.nix b/overlays/gh-collaborators.nix index cbad13e..9c7e50d 100644 --- a/overlays/gh-collaborators.nix +++ b/overlays/gh-collaborators.nix @@ -19,7 +19,5 @@ _final: prev: { "-X github.com/katiem0/gh-collaborators/cmd.Version=${version}" # "-X main.Version=${version}" ]; - }; - } diff --git a/overlays/mpv-scripts.nix b/overlays/mpv-scripts.nix index 77cf445..a6c8961 100644 --- a/overlays/mpv-scripts.nix +++ b/overlays/mpv-scripts.nix @@ -8,10 +8,8 @@ inputs: _final: prev: { src = inputs.zenyd-mpv-scripts + "/delete_file.lua"; dontBuild = true; dontUnpack = true; - installPhase = - "install -Dm644 ${src} $out/share/mpv/scripts/delete_file.lua"; + installPhase = "install -Dm644 ${src} $out/share/mpv/scripts/delete_file.lua"; passthru.scriptName = "delete_file.lua"; }; }; - } diff --git a/overlays/neovim-plugins.nix b/overlays/neovim-plugins.nix index 24cd881..ae4d568 100644 --- a/overlays/neovim-plugins.nix +++ b/overlays/neovim-plugins.nix @@ -5,35 +5,33 @@ inputs: _final: prev: let # Use nixpkgs vimPlugin but with source directly from plugin author - withSrc = pkg: src: pkg.overrideAttrs (_: { inherit src; }); + withSrc = + pkg: src: + pkg.overrideAttrs (_: { + inherit src; + }); # Package plugin - for plugins not found in nixpkgs at all - plugin = pname: src: + plugin = + pname: src: prev.vimUtils.buildVimPlugin { inherit pname src; version = "master"; }; - -in { +in +{ vimPlugins = prev.vimPlugins // { - nvim-lspconfig = - withSrc prev.vimPlugins.nvim-lspconfig inputs.nvim-lspconfig-src; + nvim-lspconfig = withSrc prev.vimPlugins.nvim-lspconfig inputs.nvim-lspconfig-src; cmp-nvim-lsp = withSrc prev.vimPlugins.cmp-nvim-lsp inputs.cmp-nvim-lsp-src; comment-nvim = withSrc prev.vimPlugins.comment-nvim inputs.comment-nvim-src; - nvim-treesitter = - withSrc prev.vimPlugins.nvim-treesitter inputs.nvim-treesitter-src; - telescope-nvim = - withSrc prev.vimPlugins.telescope-nvim inputs.telescope-nvim-src; - telescope-project-nvim = withSrc prev.vimPlugins.telescope-project-nvim - inputs.telescope-project-nvim-src; - toggleterm-nvim = - withSrc prev.vimPlugins.toggleterm-nvim inputs.toggleterm-nvim-src; - bufferline-nvim = - withSrc prev.vimPlugins.bufferline-nvim inputs.bufferline-nvim-src; - nvim-tree-lua = - withSrc prev.vimPlugins.nvim-tree-lua inputs.nvim-tree-lua-src; + nvim-treesitter = withSrc prev.vimPlugins.nvim-treesitter inputs.nvim-treesitter-src; + telescope-nvim = withSrc prev.vimPlugins.telescope-nvim inputs.telescope-nvim-src; + telescope-project-nvim = withSrc prev.vimPlugins.telescope-project-nvim inputs.telescope-project-nvim-src; + toggleterm-nvim = withSrc prev.vimPlugins.toggleterm-nvim inputs.toggleterm-nvim-src; + bufferline-nvim = withSrc prev.vimPlugins.bufferline-nvim inputs.bufferline-nvim-src; + nvim-tree-lua = withSrc prev.vimPlugins.nvim-tree-lua inputs.nvim-tree-lua-src; fidget-nvim = withSrc prev.vimPlugins.fidget-nvim inputs.fidget-nvim-src; nvim-lint = withSrc prev.vimPlugins.nvim-lint inputs.nvim-lint-src; @@ -47,7 +45,5 @@ in { version = "master"; patches = [ ./kitty-scrollback-nvim.patch ]; }; - }; - } diff --git a/overlays/nextcloud-apps.nix b/overlays/nextcloud-apps.nix index b9e3e3e..ab1e5b0 100644 --- a/overlays/nextcloud-apps.nix +++ b/overlays/nextcloud-apps.nix @@ -22,5 +22,4 @@ inputs: _final: prev: { license = "agpl3Plus"; }; }; - } diff --git a/overlays/proton-ge.nix b/overlays/proton-ge.nix index a3b1dd0..7471adc 100644 --- a/overlays/proton-ge.nix +++ b/overlays/proton-ge.nix @@ -5,9 +5,9 @@ inputs: _final: prev: { proton-ge-custom = prev.stdenv.mkDerivation (finalAttrs: rec { name = "proton-ge-custom"; - version = prev.lib.removeSuffix "\n" (builtins.head - (builtins.match ".*GE-Proton(.*)" - (builtins.readFile "${inputs.proton-ge}/version"))); + version = prev.lib.removeSuffix "\n" ( + builtins.head (builtins.match ".*GE-Proton(.*)" (builtins.readFile "${inputs.proton-ge}/version")) + ); src = inputs.proton-ge; # Took from https://github.com/AtaraxiaSjel/nur/blob/cf83b14b102985a587a498ba2c56f9f2bd9b9eb6/pkgs/proton-ge/default.nix installPhase = '' diff --git a/overlays/ren-rep.nix b/overlays/ren-rep.nix index c8c0d29..4c8b30f 100644 --- a/overlays/ren-rep.nix +++ b/overlays/ren-rep.nix @@ -13,5 +13,4 @@ inputs: _final: prev: { # src = inputs.rep; # cargoHash = "sha256-GEr3VvQ0VTKHUbW/GFEgwLpQWP2ZhS/4KYjDvfFLgxo="; # }; - } diff --git a/overlays/tree-sitter.nix b/overlays/tree-sitter.nix index d84e55d..148fb98 100644 --- a/overlays/tree-sitter.nix +++ b/overlays/tree-sitter.nix @@ -3,18 +3,20 @@ inputs: _final: prev: { # Fix: bash highlighting doesn't work as of this commit: # https://github.com/NixOS/nixpkgs/commit/49cce41b7c5f6b88570a482355d9655ca19c1029 - tree-sitter-bash = prev.tree-sitter-grammars.tree-sitter-bash.overrideAttrs - (old: { src = inputs.tree-sitter-bash; }); + tree-sitter-bash = prev.tree-sitter-grammars.tree-sitter-bash.overrideAttrs (old: { + src = inputs.tree-sitter-bash; + }); # Fix: invalid node in position. Broken as of this commit (replaced with newer): # https://github.com/NixOS/nixpkgs/commit/8ec3627796ecc899e6f47f5bf3c3220856ead9c5 - tree-sitter-python = - prev.tree-sitter-grammars.tree-sitter-python.overrideAttrs - (old: { src = inputs.tree-sitter-python; }); + tree-sitter-python = prev.tree-sitter-grammars.tree-sitter-python.overrideAttrs (old: { + src = inputs.tree-sitter-python; + }); # Fix: invalid structure in position. - tree-sitter-lua = prev.tree-sitter-grammars.tree-sitter-lua.overrideAttrs - (old: { src = inputs.tree-sitter-lua; }); + tree-sitter-lua = prev.tree-sitter-grammars.tree-sitter-lua.overrideAttrs (old: { + src = inputs.tree-sitter-lua; + }); # Add grammars not in nixpks tree-sitter-ini = prev.tree-sitter.buildGrammar { @@ -38,5 +40,4 @@ inputs: _final: prev: { src = inputs.tree-sitter-vimdoc; }; }; - } diff --git a/templates/rust/flake.nix b/templates/rust/flake.nix index e5693cf..5201e44 100644 --- a/templates/rust/flake.nix +++ b/templates/rust/flake.nix @@ -1,7 +1,8 @@ { description = "Basic Rust project"; inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - outputs = { self, nixpkgs }: + outputs = + { self, nixpkgs }: let forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" @@ -9,10 +10,14 @@ "aarch64-linux" "aarch64-darwin" ]; - in { - devShells = forAllSystems (system: - let pkgs = import nixpkgs { inherit system; }; - in { + in + { + devShells = forAllSystems ( + system: + let + pkgs = import nixpkgs { inherit system; }; + in + { default = pkgs.mkShell { buildInputs = with pkgs; [ gcc @@ -24,6 +29,7 @@ openssl ]; }; - }); + } + ); }; }