Compare commits

..

No commits in common. "bc2d0a347d788859f45bf8d471968ee9e1ad715d" and "7d82e18c4ddbdd3c18661ff693afa5cf0c3424fd" have entirely different histories.

27 changed files with 219 additions and 292 deletions

View File

@ -43,7 +43,11 @@ configuration may be difficult to translate to a non-Nix system.
# Diagram # Diagram
![Diagram](https://github.com/nmasur/dotfiles/assets/7386960/4cc22285-cea1-4831-b387-a82241184381) ![Diagram](https://github.com/nmasur/dotfiles/assets/7386960/ed3e7202-09c4-4a9c-9b14-0272c01647f6)
- [flake.nix](./flake.nix)
- [hosts](./hosts/)
- [modules](./modules/)
--- ---

View File

@ -1,5 +1,4 @@
{ disk, ... }: { disk, ... }: {
{
disk = { disk = {
boot = { boot = {
type = "disk"; type = "disk";

View File

@ -1,5 +1,4 @@
{ pool, disks, ... }: { pool, disks, ... }: {
{
disk = lib.genAttrs disks (disk: { disk = lib.genAttrs disks (disk: {
"${disk}" = { "${disk}" = {
type = "disk"; type = "disk";
@ -7,8 +6,7 @@
content = { content = {
type = "table"; type = "table";
format = "gpt"; format = "gpt";
partitions = [ partitions = [{
{
type = "partition"; type = "partition";
name = "zfs"; name = "zfs";
start = "128MiB"; start = "128MiB";
@ -17,8 +15,7 @@
type = "zfs"; type = "zfs";
pool = pool; pool = pool;
}; };
} }];
];
}; };
}; };
}); });

View File

@ -52,17 +52,17 @@
"bypass-paywalls-clean": { "bypass-paywalls-clean": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1713012522, "lastModified": 1712562887,
"narHash": "sha256-35KuPa3k6j8//gKXD3JY3Y318DRBxXNo/JuzatFXG5M=", "narHash": "sha256-aX/h8cepKd9E+9ZtKnqRWLIdxTwl6q1a0v8+8fNK+/0=",
"ref": "refs/heads/master", "owner": "magnolia1234",
"rev": "724d4fcff64a433e988d9e54f7a08573523f2ca5", "repo": "bpc-uploads",
"revCount": 1, "rev": "e58e8597347a8e2a656e2c4f10e259e7fcc8b52c",
"type": "git", "type": "gitlab"
"url": "https://git.masu.rs/noah/bpc-uploads"
}, },
"original": { "original": {
"type": "git", "owner": "magnolia1234",
"url": "https://git.masu.rs/noah/bpc-uploads" "repo": "bpc-uploads",
"type": "gitlab"
} }
}, },
"cmp-nvim-lsp-src": { "cmp-nvim-lsp-src": {

View File

@ -187,8 +187,7 @@
# Firefox addon from outside the extension store # Firefox addon from outside the extension store
bypass-paywalls-clean = { bypass-paywalls-clean = {
# https://gitlab.com/magnolia1234/bpc-uploads/-/commits/master/?ref_type=HEADS # https://gitlab.com/magnolia1234/bpc-uploads/-/commits/master/?ref_type=HEADS
url = url = "gitlab:magnolia1234/bpc-uploads";
"git+https://git.masu.rs/noah/bpc-uploads"; # temporary, shouldn't rely on myself
flake = false; flake = false;
}; };

View File

@ -1,15 +1,9 @@
{ { inputs, globals, overlays, ... }:
inputs,
globals,
overlays,
...
}:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { }; specialArgs = { };
modules = import ./modules.nix { inherit inputs globals overlays; } ++ [ modules = import ./modules.nix { inherit inputs globals overlays; } ++ [{
{
# This is the root filesystem containing NixOS # This is the root filesystem containing NixOS
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-label/nixos"; device = "/dev/disk/by-label/nixos";
@ -21,6 +15,6 @@ inputs.nixpkgs.lib.nixosSystem {
device = "/dev/disk/by-label/boot"; device = "/dev/disk/by-label/boot";
fsType = "vfat"; fsType = "vfat";
}; };
}];
} }
];
}

View File

@ -1,8 +1,4 @@
{ { inputs, globals, overlays }:
inputs,
globals,
overlays,
}:
[ [
globals globals
@ -25,18 +21,18 @@
services.transmission.enable = true; services.transmission.enable = true;
# nix-index seems to each up too much memory for Vultr # 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.vmVariant = {
virtualisation.forwardPorts = [ virtualisation.forwardPorts = [{
{
from = "host"; from = "host";
host.port = 2222; host.port = 2222;
guest.port = 22; guest.port = 22;
} }];
];
}; };
} }
../../modules/common ../../modules/common
../../modules/nixos ../../modules/nixos
] ]

View File

@ -1,16 +1,9 @@
{ { inputs, system, globals, overlays, ... }:
inputs,
system,
globals,
overlays,
...
}:
inputs.nixos-generators.nixosGenerate { inputs.nixos-generators.nixosGenerate {
inherit system; inherit system;
format = "amazon"; format = "amazon";
modules = modules = [
[
globals globals
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
{ {
@ -28,14 +21,8 @@ inputs.nixos-generators.nixosGenerate {
../../modules/common ../../modules/common
../../modules/nixos ../../modules/nixos
../../modules/nixos/services/sshd.nix ../../modules/nixos/services/sshd.nix
] ] ++ [
++ [
# Required to fix diskSize errors during build # Required to fix diskSize errors during build
( ({ ... }: { amazonImage.sizeMB = 16 * 1024; })
{ ... }:
{
amazonImage.sizeMB = 16 * 1024;
}
)
]; ];
} }

View File

@ -7,12 +7,7 @@
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/ # https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
# These days, probably use nixos-anywhere instead. # These days, probably use nixos-anywhere instead.
{ { inputs, globals, overlays, ... }:
inputs,
globals,
overlays,
...
}:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
@ -31,11 +26,7 @@ inputs.nixpkgs.lib.nixosSystem {
# Not sure what's necessary but too afraid to remove anything # Not sure what's necessary but too afraid to remove anything
imports = [ (inputs.nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ]; imports = [ (inputs.nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" ];
"xhci_pci"
"virtio_pci"
"usbhid"
];
# File systems must be declared in order to boot # File systems must be declared in order to boot
@ -58,9 +49,7 @@ inputs.nixpkgs.lib.nixosSystem {
gui.enable = false; gui.enable = false;
# Still require colors for programs like Neovim, K9S # Still require colors for programs like Neovim, K9S
theme = { theme = { colors = (import ../../colorscheme/gruvbox).dark; };
colors = (import ../../colorscheme/gruvbox).dark;
};
# Programs and services # Programs and services
atuin.enable = true; atuin.enable = true;
@ -83,7 +72,8 @@ inputs.nixpkgs.lib.nixosSystem {
enable = true; enable = true;
id = "bd250ee1-ed2e-42d2-b627-039f1eb5a4d2"; id = "bd250ee1-ed2e-42d2-b627-039f1eb5a4d2";
credentialsFile = ../../private/cloudflared-flame.age; 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 # Nextcloud backup config
@ -126,6 +116,7 @@ inputs.nixpkgs.lib.nixosSystem {
# # VPN port forwarding # # VPN port forwarding
# services.transmission.settings.peer-port = 57599; # services.transmission.settings.peer-port = 57599;
} }
]; ];
} }

View File

@ -3,12 +3,7 @@
# See [readme](../README.md) to explain how this file works. # See [readme](../README.md) to explain how this file works.
{ { inputs, globals, overlays, ... }:
inputs,
globals,
overlays,
...
}:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
@ -37,7 +32,8 @@ inputs.nixpkgs.lib.nixosSystem {
startMenuLaunchers = true; startMenuLaunchers = true;
nativeSystemd = true; nativeSystemd = true;
wslConf.network.generateResolvConf = true; # Turn off if it breaks VPN 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; neovim.enable = true;

View File

@ -1,12 +1,7 @@
# The Looking Glass # The Looking Glass
# System configuration for my work Macbook # System configuration for my work Macbook
{ { inputs, globals, overlays, ... }:
inputs,
globals,
overlays,
...
}:
inputs.darwin.lib.darwinSystem { inputs.darwin.lib.darwinSystem {
system = "aarch64-darwin"; system = "aarch64-darwin";
@ -14,14 +9,11 @@ inputs.darwin.lib.darwinSystem {
modules = [ modules = [
../../modules/common ../../modules/common
../../modules/darwin ../../modules/darwin
( (globals // rec {
globals
// rec {
user = "Noah.Masur"; user = "Noah.Masur";
gitName = "Noah-Masur_1701"; gitName = "Noah-Masur_1701";
gitEmail = "${user}@take2games.com"; gitEmail = "${user}@take2games.com";
} })
)
inputs.home-manager.darwinModules.home-manager inputs.home-manager.darwinModules.home-manager
{ {
nixpkgs.overlays = [ inputs.firefox-darwin.overlay ] ++ overlays; nixpkgs.overlays = [ inputs.firefox-darwin.overlay ] ++ overlays;

View File

@ -1,18 +1,12 @@
# The Staff # The Staff
# ISO configuration for my USB drive # ISO configuration for my USB drive
{ { inputs, system, overlays, ... }:
inputs,
system,
overlays,
...
}:
inputs.nixos-generators.nixosGenerate { inputs.nixos-generators.nixosGenerate {
inherit system; inherit system;
format = "install-iso"; format = "install-iso";
modules = [ modules = [{
{
nixpkgs.overlays = overlays; nixpkgs.overlays = overlays;
networking.hostName = "staff"; networking.hostName = "staff";
users.extraUsers.root.openssh.authorizedKeys.keys = [ users.extraUsers.root.openssh.authorizedKeys.keys = [
@ -30,11 +24,8 @@ inputs.nixos-generators.nixosGenerate {
}; };
}; };
environment.systemPackages = environment.systemPackages =
let let pkgs = import inputs.nixpkgs { inherit system overlays; };
pkgs = import inputs.nixpkgs { inherit system overlays; }; in with pkgs; [
in
with pkgs;
[
git git
vim vim
wget wget
@ -48,6 +39,5 @@ inputs.nixos-generators.nixosGenerate {
experimental-features = nix-command flakes experimental-features = nix-command flakes
warn-dirty = false warn-dirty = false
''; '';
} }];
];
} }

View File

@ -3,12 +3,7 @@
# See [readme](../README.md) to explain how this file works. # See [readme](../README.md) to explain how this file works.
{ { inputs, globals, overlays, ... }:
inputs,
globals,
overlays,
...
}:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
@ -28,13 +23,8 @@ inputs.nixpkgs.lib.nixosSystem {
networking.hostName = "swan"; networking.hostName = "swan";
# Not sure what's necessary but too afraid to remove anything # Not sure what's necessary but too afraid to remove anything
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules =
"xhci_pci" [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
"ahci"
"nvme"
"usb_storage"
"sd_mod"
];
# Required for transcoding # Required for transcoding
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = [ "amdgpu" ];
@ -70,11 +60,8 @@ inputs.nixpkgs.lib.nixosSystem {
# Automatically load the ZFS pool on boot # Automatically load the ZFS pool on boot
extraPools = [ "tank" ]; extraPools = [ "tank" ];
# Only try to decrypt datasets with keyfiles # Only try to decrypt datasets with keyfiles
requestEncryptionCredentials = [ requestEncryptionCredentials =
"tank/archive" [ "tank/archive" "tank/generic" "tank/nextcloud" ];
"tank/generic"
"tank/nextcloud"
];
# If password is requested and fails, continue to boot eventually # If password is requested and fails, continue to boot eventually
passwordTimeout = 300; passwordTimeout = 300;
}; };
@ -85,9 +72,7 @@ inputs.nixpkgs.lib.nixosSystem {
gui.enable = false; gui.enable = false;
# Still require colors for programs like Neovim, K9S # Still require colors for programs like Neovim, K9S
theme = { theme = { colors = (import ../../colorscheme/gruvbox).dark; };
colors = (import ../../colorscheme/gruvbox).dark;
};
# Programs and services # Programs and services
atuin.enable = true; atuin.enable = true;
@ -112,7 +97,8 @@ inputs.nixpkgs.lib.nixosSystem {
enable = true; enable = true;
id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2"; id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2";
credentialsFile = ../../private/cloudflared-swan.age; 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 # Send regular backups and litestream for DBs to an S3-like bucket

View File

@ -3,12 +3,7 @@
# See [readme](../README.md) to explain how this file works. # See [readme](../README.md) to explain how this file works.
{ { inputs, globals, overlays, ... }:
inputs,
globals,
overlays,
...
}:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
@ -25,14 +20,8 @@ inputs.nixpkgs.lib.nixosSystem {
networking.hostName = "tempest"; networking.hostName = "tempest";
# Not sure what's necessary but too afraid to remove anything # Not sure what's necessary but too afraid to remove anything
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules =
"nvme" [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
# Graphics and VMs # Graphics and VMs
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = [ "amdgpu" ];
@ -125,20 +114,23 @@ inputs.nixpkgs.lib.nixosSystem {
ryujinx.enable = true; ryujinx.enable = true;
}; };
services.vmagent.enable = true; # Enables Prometheus metrics 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 # Allows private remote access over the internet
cloudflareTunnel = { cloudflareTunnel = {
enable = true; enable = true;
id = "ac133a82-31fb-480c-942a-cdbcd4c58173"; id = "ac133a82-31fb-480c-942a-cdbcd4c58173";
credentialsFile = ../../private/cloudflared-tempest.age; 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 # Allows requests to force machine to wake up
# This network interface might change, needs to be set specifically for each machine. # This network interface might change, needs to be set specifically for each machine.
# Or set usePredictableInterfaceNames = false # Or set usePredictableInterfaceNames = false
networking.interfaces.enp5s0.wakeOnLan.enable = true; networking.interfaces.enp5s0.wakeOnLan.enable = true;
} }
]; ];
} }

View File

@ -49,6 +49,7 @@ in {
extraConfig = null; extraConfig = null;
}; };
networking.firewall.allowedTCPPorts = [ 122 ];
users.users.${config.user}.extraGroups = [ "gitea" ]; users.users.${config.user}.extraGroups = [ "gitea" ];
caddy.routes = [ caddy.routes = [

View File

@ -1,2 +1,4 @@
# Disable dunst so that it's not attempting to reach a non-existent dunst service # 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; };
}

View File

@ -3,11 +3,8 @@ inputs: _final: prev: {
# Based on: # Based on:
# https://git.sr.ht/~rycee/nur-expressions/tree/master/item/pkgs/firefox-addons/default.nix#L34 # https://git.sr.ht/~rycee/nur-expressions/tree/master/item/pkgs/firefox-addons/default.nix#L34
bypass-paywalls-clean = bypass-paywalls-clean = let addonId = "magnolia@12.34";
let in prev.stdenv.mkDerivation rec {
addonId = "magnolia@12.34";
in
prev.stdenv.mkDerivation rec {
pname = "bypass-paywalls-clean"; pname = "bypass-paywalls-clean";
version = "3.4.9.0"; version = "3.4.9.0";
src = inputs.bypass-paywalls-clean + "/bypass_paywalls_clean-latest.xpi"; src = inputs.bypass-paywalls-clean + "/bypass_paywalls_clean-latest.xpi";
@ -19,4 +16,5 @@ inputs: _final: prev: {
install -v -m644 "${src}" "$dst/${addonId}.xpi" install -v -m644 "${src}" "$dst/${addonId}.xpi"
''; '';
}; };
} }

View File

@ -5,8 +5,10 @@ inputs: _final: prev:
let let
plugins = [ "github.com/caddy-dns/cloudflare" ]; plugins = [ "github.com/caddy-dns/cloudflare" ];
goImports = prev.lib.flip prev.lib.concatMapStrings plugins (pkg: " _ \"${pkg}\"\n"); goImports =
goGets = prev.lib.flip prev.lib.concatMapStrings plugins (pkg: "go get ${pkg}\n "); prev.lib.flip prev.lib.concatMapStrings plugins (pkg: " _ \"${pkg}\"\n");
goGets = prev.lib.flip prev.lib.concatMapStrings plugins
(pkg: "go get ${pkg}\n ");
main = '' main = ''
package main package main
import ( import (
@ -18,8 +20,8 @@ let
caddycmd.Main() caddycmd.Main()
} }
''; '';
in
{ in {
caddy-cloudflare = prev.buildGo122Module { caddy-cloudflare = prev.buildGo122Module {
pname = "caddy-cloudflare"; pname = "caddy-cloudflare";
version = prev.caddy.version; version = prev.caddy.version;
@ -31,15 +33,13 @@ in
vendorHash = "sha256-zeuvCk7kZa/W/roC12faCQDav4RB8RT1dR2Suh2yjD8="; vendorHash = "sha256-zeuvCk7kZa/W/roC12faCQDav4RB8RT1dR2Suh2yjD8=";
overrideModAttrs = ( overrideModAttrs = (_: {
_: {
preBuild = '' preBuild = ''
echo '${main}' > cmd/caddy/main.go echo '${main}' > cmd/caddy/main.go
${goGets} ${goGets}
''; '';
postInstall = "cp go.sum go.mod $out/ && ls $out/"; postInstall = "cp go.sum go.mod $out/ && ls $out/";
} });
);
postPatch = '' postPatch = ''
echo '${main}' > cmd/caddy/main.go echo '${main}' > cmd/caddy/main.go
@ -53,12 +53,10 @@ in
meta = with prev.lib; { meta = with prev.lib; {
homepage = "https://caddyserver.com"; 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; license = licenses.asl20;
maintainers = with maintainers; [ maintainers = with maintainers; [ Br1ght0ne techknowlogick ];
Br1ght0ne
techknowlogick
];
}; };
}; };
} }

View File

@ -1,3 +1,5 @@
# Add disko to nixpkgs from its input flake # 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;
}

View File

@ -19,5 +19,7 @@ _final: prev: {
"-X github.com/katiem0/gh-collaborators/cmd.Version=${version}" "-X github.com/katiem0/gh-collaborators/cmd.Version=${version}"
# "-X main.Version=${version}" # "-X main.Version=${version}"
]; ];
}; };
} }

View File

@ -8,8 +8,10 @@ inputs: _final: prev: {
src = inputs.zenyd-mpv-scripts + "/delete_file.lua"; src = inputs.zenyd-mpv-scripts + "/delete_file.lua";
dontBuild = true; dontBuild = true;
dontUnpack = 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"; passthru.scriptName = "delete_file.lua";
}; };
}; };
} }

View File

@ -5,33 +5,35 @@ inputs: _final: prev:
let let
# Use nixpkgs vimPlugin but with source directly from plugin author # Use nixpkgs vimPlugin but with source directly from plugin author
withSrc = withSrc = pkg: src: pkg.overrideAttrs (_: { inherit src; });
pkg: src:
pkg.overrideAttrs (_: {
inherit src;
});
# Package plugin - for plugins not found in nixpkgs at all # Package plugin - for plugins not found in nixpkgs at all
plugin = plugin = pname: src:
pname: src:
prev.vimUtils.buildVimPlugin { prev.vimUtils.buildVimPlugin {
inherit pname src; inherit pname src;
version = "master"; version = "master";
}; };
in
{ in {
vimPlugins = prev.vimPlugins // { 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; 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; comment-nvim = withSrc prev.vimPlugins.comment-nvim inputs.comment-nvim-src;
nvim-treesitter = withSrc prev.vimPlugins.nvim-treesitter inputs.nvim-treesitter-src; nvim-treesitter =
telescope-nvim = withSrc prev.vimPlugins.telescope-nvim inputs.telescope-nvim-src; withSrc prev.vimPlugins.nvim-treesitter inputs.nvim-treesitter-src;
telescope-project-nvim = withSrc prev.vimPlugins.telescope-project-nvim inputs.telescope-project-nvim-src; telescope-nvim =
toggleterm-nvim = withSrc prev.vimPlugins.toggleterm-nvim inputs.toggleterm-nvim-src; withSrc prev.vimPlugins.telescope-nvim inputs.telescope-nvim-src;
bufferline-nvim = withSrc prev.vimPlugins.bufferline-nvim inputs.bufferline-nvim-src; telescope-project-nvim = withSrc prev.vimPlugins.telescope-project-nvim
nvim-tree-lua = withSrc prev.vimPlugins.nvim-tree-lua inputs.nvim-tree-lua-src; 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; fidget-nvim = withSrc prev.vimPlugins.fidget-nvim inputs.fidget-nvim-src;
nvim-lint = withSrc prev.vimPlugins.nvim-lint inputs.nvim-lint-src; nvim-lint = withSrc prev.vimPlugins.nvim-lint inputs.nvim-lint-src;
@ -45,5 +47,7 @@ in
version = "master"; version = "master";
patches = [ ./kitty-scrollback-nvim.patch ]; patches = [ ./kitty-scrollback-nvim.patch ];
}; };
}; };
} }

View File

@ -22,4 +22,5 @@ inputs: _final: prev: {
license = "agpl3Plus"; license = "agpl3Plus";
}; };
}; };
} }

View File

@ -5,9 +5,9 @@
inputs: _final: prev: { inputs: _final: prev: {
proton-ge-custom = prev.stdenv.mkDerivation (finalAttrs: rec { proton-ge-custom = prev.stdenv.mkDerivation (finalAttrs: rec {
name = "proton-ge-custom"; name = "proton-ge-custom";
version = prev.lib.removeSuffix "\n" ( version = prev.lib.removeSuffix "\n" (builtins.head
builtins.head (builtins.match ".*GE-Proton(.*)" (builtins.readFile "${inputs.proton-ge}/version")) (builtins.match ".*GE-Proton(.*)"
); (builtins.readFile "${inputs.proton-ge}/version")));
src = inputs.proton-ge; src = inputs.proton-ge;
# Took from https://github.com/AtaraxiaSjel/nur/blob/cf83b14b102985a587a498ba2c56f9f2bd9b9eb6/pkgs/proton-ge/default.nix # Took from https://github.com/AtaraxiaSjel/nur/blob/cf83b14b102985a587a498ba2c56f9f2bd9b9eb6/pkgs/proton-ge/default.nix
installPhase = '' installPhase = ''

View File

@ -13,4 +13,5 @@ inputs: _final: prev: {
# src = inputs.rep; # src = inputs.rep;
# cargoHash = "sha256-GEr3VvQ0VTKHUbW/GFEgwLpQWP2ZhS/4KYjDvfFLgxo="; # cargoHash = "sha256-GEr3VvQ0VTKHUbW/GFEgwLpQWP2ZhS/4KYjDvfFLgxo=";
# }; # };
} }

View File

@ -3,20 +3,18 @@ inputs: _final: prev: {
# Fix: bash highlighting doesn't work as of this commit: # Fix: bash highlighting doesn't work as of this commit:
# https://github.com/NixOS/nixpkgs/commit/49cce41b7c5f6b88570a482355d9655ca19c1029 # https://github.com/NixOS/nixpkgs/commit/49cce41b7c5f6b88570a482355d9655ca19c1029
tree-sitter-bash = prev.tree-sitter-grammars.tree-sitter-bash.overrideAttrs (old: { tree-sitter-bash = prev.tree-sitter-grammars.tree-sitter-bash.overrideAttrs
src = inputs.tree-sitter-bash; (old: { src = inputs.tree-sitter-bash; });
});
# Fix: invalid node in position. Broken as of this commit (replaced with newer): # Fix: invalid node in position. Broken as of this commit (replaced with newer):
# https://github.com/NixOS/nixpkgs/commit/8ec3627796ecc899e6f47f5bf3c3220856ead9c5 # https://github.com/NixOS/nixpkgs/commit/8ec3627796ecc899e6f47f5bf3c3220856ead9c5
tree-sitter-python = prev.tree-sitter-grammars.tree-sitter-python.overrideAttrs (old: { tree-sitter-python =
src = inputs.tree-sitter-python; prev.tree-sitter-grammars.tree-sitter-python.overrideAttrs
}); (old: { src = inputs.tree-sitter-python; });
# Fix: invalid structure in position. # Fix: invalid structure in position.
tree-sitter-lua = prev.tree-sitter-grammars.tree-sitter-lua.overrideAttrs (old: { tree-sitter-lua = prev.tree-sitter-grammars.tree-sitter-lua.overrideAttrs
src = inputs.tree-sitter-lua; (old: { src = inputs.tree-sitter-lua; });
});
# Add grammars not in nixpks # Add grammars not in nixpks
tree-sitter-ini = prev.tree-sitter.buildGrammar { tree-sitter-ini = prev.tree-sitter.buildGrammar {
@ -40,4 +38,5 @@ inputs: _final: prev: {
src = inputs.tree-sitter-vimdoc; src = inputs.tree-sitter-vimdoc;
}; };
}; };
} }

View File

@ -1,8 +1,7 @@
{ {
description = "Basic Rust project"; description = "Basic Rust project";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs = outputs = { self, nixpkgs }:
{ self, nixpkgs }:
let let
forAllSystems = nixpkgs.lib.genAttrs [ forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-linux" "x86_64-linux"
@ -10,14 +9,10 @@
"aarch64-linux" "aarch64-linux"
"aarch64-darwin" "aarch64-darwin"
]; ];
in in {
{ devShells = forAllSystems (system:
devShells = forAllSystems ( let pkgs = import nixpkgs { inherit system; };
system: in {
let
pkgs = import nixpkgs { inherit system; };
in
{
default = pkgs.mkShell { default = pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
gcc gcc
@ -29,7 +24,6 @@
openssl openssl
]; ];
}; };
} });
);
}; };
} }