more shanigans

This commit is contained in:
Gerg-L 2023-06-10 21:52:04 -04:00
parent 5102d87d20
commit b602fc4ee0
8 changed files with 204 additions and 154 deletions

128
flake.lock generated
View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1684783210, "lastModified": 1686222354,
"narHash": "sha256-hxRbwwBTu1G1u1EdI9nEo/n4HIsQIfNi+2BQ1nEoj/o=", "narHash": "sha256-dtqnAwzucKZv54dTrLetIXhOavUrCsdqOe+JtFH9riE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "f0b9f374bb42fdcd57baa7d4448ac5d4788226bd", "rev": "5d9f362aecd7a4c2e8a3bf2afddb49051988cab9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -27,15 +27,15 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1685301896, "lastModified": 1686447837,
"narHash": "sha256-7x8Vkt4V8DYQDbzGFtnlYR2dKtHRjipokFXnlcG/56Q=", "narHash": "sha256-7MUSWCGDceC5Z7zgt/FlJ1tO7veeY6On8HtYXT2BIlw=",
"owner": "Gerg-L", "owner": "gerg-L",
"repo": "fetch-rs", "repo": "fetch-rs",
"rev": "7c66089fe672b1f113b11f3282ed0ae95cfc3ed0", "rev": "38af76fe73118eb6317a34511d0a7d4f2f1af409",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "Gerg-L", "owner": "gerg-L",
"repo": "fetch-rs", "repo": "fetch-rs",
"type": "github" "type": "github"
} }
@ -61,11 +61,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1681202837, "lastModified": 1685518550,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401", "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -92,15 +92,15 @@
}, },
"master": { "master": {
"locked": { "locked": {
"lastModified": 1685300589, "lastModified": 1686446285,
"narHash": "sha256-JatoTsdRm9RcFAu3Ihtm0pQgEnkL4ax111GdhZmC0h4=", "narHash": "sha256-CbNaKpvp6GxU4yVf924uCnwQgsW22cTGLd9amc+9tFk=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c7dabbffaaa6bb54f480c8dcc0a9f7f23445eaa4", "rev": "325207e8b0b900e2a36731086fd84cb6f4be6855",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -108,11 +108,11 @@
"neovim-src": { "neovim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1685284487, "lastModified": 1686422003,
"narHash": "sha256-fAz/BWAbtP0b3Hko2q7eZdTCoBpicxxI4EZ/FJbW/IA=", "narHash": "sha256-Ekqqm2/FigfyhuCfx1BkePPsABdTwm7PJdiTaHPXems=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "c48f94d1f30056272ed030ad3f4529055ac07853", "rev": "302d3cfb96d7f0c856262e1a4252d058e3300c8b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -129,27 +129,27 @@
"nixpkgs-regression": "nixpkgs-regression" "nixpkgs-regression": "nixpkgs-regression"
}, },
"locked": { "locked": {
"lastModified": 1684340480, "lastModified": 1686310844,
"narHash": "sha256-Am5hyxd37D5WukGddmF2TqSAtBMYcQeOc4DVWpD34cI=", "narHash": "sha256-QS9/9v+bPTKb7HtB9a5zb4a6+IErwpfhHaqwi0PN0K8=",
"owner": "NixOS", "owner": "nixos",
"repo": "nix", "repo": "nix",
"rev": "684e9be8b9356f92b7882d74cba9d146fb71f850", "rev": "03f9ff6ea59d21c6d7b29c64a03d5041bd621261",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "nixos",
"repo": "nix", "repo": "nix",
"rev": "684e9be8b9356f92b7882d74cba9d146fb71f850", "rev": "03f9ff6ea59d21c6d7b29c64a03d5041bd621261",
"type": "github" "type": "github"
} }
}, },
"nixlib": { "nixlib": {
"locked": { "locked": {
"lastModified": 1681001314, "lastModified": 1685840432,
"narHash": "sha256-5sDnCLdrKZqxLPK4KA8+f4A3YKO/u6ElpMILvX0g72c=", "narHash": "sha256-VJIbiKsY7Xy4E4WcgwUt/UiwYDmN5BAk8tngAjcWsqY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "367c0e1086a4eb4502b24d872cea2c7acdd557f4", "rev": "961e99baaaa57f5f7042fe7ce089a88786c839f4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -166,11 +166,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1685000237, "lastModified": 1685943944,
"narHash": "sha256-pm+2xP9g9sh6wapk1ulg7/1DdENkTNDB7Kx+6lwGs/k=", "narHash": "sha256-GpaQwOkvwkmSWxvWaZqbMKyyOSaBAwgdEcHCqLW/240=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-generators", "repo": "nixos-generators",
"rev": "05bef004794f352ea12475a89f3f55b4102c0728", "rev": "122dcc32cadf14c5015aa021fae8882c5058263a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -213,11 +213,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1685215858, "lastModified": 1685758009,
"narHash": "sha256-IRMFoDXA6cYx3ifVw3B2JcC4JrjT5v7tRAx2vro2Ffs=", "narHash": "sha256-IT4Z5WGhafrq+xbDTyuKrRPRQ1f+kVOtE+4JU1CHFeo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ba6e4ddeb3e8ad3f3e3bec63dafbc9fe558729bb", "rev": "eaf03591711b46d21abc7082a8ebee4681f9dbeb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -235,15 +235,15 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1685301633, "lastModified": 1686447176,
"narHash": "sha256-aNN2ktKULLNAnfiMg9J+XaoF/gljeR4jiTLzW2mBvoQ=", "narHash": "sha256-d+chVhxA6k7uYyj9Ig+HL5TTiy62AUhp80n7r4b0CAI=",
"owner": "Gerg-L", "owner": "gerg-L",
"repo": "nvim-flake", "repo": "nvim-flake",
"rev": "22b495e0bb957b79aa06c8c0654641e002082b8b", "rev": "8327aa444b285b7e4d042c609c118e4eb38d8376",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "Gerg-L", "owner": "gerg-L",
"repo": "nvim-flake", "repo": "nvim-flake",
"type": "github" "type": "github"
} }
@ -252,13 +252,13 @@
"locked": { "locked": {
"lastModified": 1684322576, "lastModified": 1684322576,
"narHash": "sha256-p6KBRm9bZNlYjcrADYjMAlr6vFQXEh0qD/CryPAEwV4=", "narHash": "sha256-p6KBRm9bZNlYjcrADYjMAlr6vFQXEh0qD/CryPAEwV4=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "45a55711fe12d0aada3aa04746082cf1b83dfbf3", "rev": "45a55711fe12d0aada3aa04746082cf1b83dfbf3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "45a55711fe12d0aada3aa04746082cf1b83dfbf3", "rev": "45a55711fe12d0aada3aa04746082cf1b83dfbf3",
"type": "github" "type": "github"
@ -288,15 +288,15 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1685242617, "lastModified": 1685848844,
"narHash": "sha256-UBPXGfGwGMJm2Wj9kDj8+TMMK2PTouSM/TpiXYtaqtQ=", "narHash": "sha256-Iury+/SVbAwLES76QJSiKFiQDzmf/8Hsq8j54WF2qyw=",
"owner": "Mic92", "owner": "mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "3e016341d4dca6ce7c62316f90e66341841a30f9", "rev": "a522e12ee35e50fa7d902a164a9796e420e6e75b",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "Mic92", "owner": "mic92",
"repo": "sops-nix", "repo": "sops-nix",
"type": "github" "type": "github"
} }
@ -309,11 +309,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1684872357, "lastModified": 1686173678,
"narHash": "sha256-10NR2inbTZnD2XfAtZ55+T8nOZo5e0TWUg3667APHco=", "narHash": "sha256-aYzl34xb3u9I57sqkvSldQKltCnxhjvvLABjgFRxOVE=",
"owner": "the-argus", "owner": "the-argus",
"repo": "spicetify-nix", "repo": "spicetify-nix",
"rev": "16022e436ab3fe28ff8b5272a36fcadc0845b060", "rev": "f024752b691ac2dcb2ad378d72a2e3084ce83b79",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -324,15 +324,15 @@
}, },
"stable": { "stable": {
"locked": { "locked": {
"lastModified": 1685215858, "lastModified": 1686392259,
"narHash": "sha256-IRMFoDXA6cYx3ifVw3B2JcC4JrjT5v7tRAx2vro2Ffs=", "narHash": "sha256-hqSS9hKhWldIZr1bBp9xKhIznnGPICGKzuehd2LH0UA=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ba6e4ddeb3e8ad3f3e3bec63dafbc9fe558729bb", "rev": "ef24b2fa0c5f290a35064b847bc211f25cb85c88",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "nixos",
"ref": "nixos-22.11", "ref": "nixos-22.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
@ -345,15 +345,15 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1685302042, "lastModified": 1686447653,
"narHash": "sha256-PZKFFtw5VrBAsH3Jt9xpHDIUIW9/UdXekdNy4af89z8=", "narHash": "sha256-SjCdEjI6h3y5279VM6MV6Xhmtx9Rmms9MNZw9D/l4jY=",
"owner": "Gerg-L", "owner": "gerg-L",
"repo": "suckless", "repo": "suckless",
"rev": "0c7d008df239aca63ffd00ec9f9a345e6b977b2e", "rev": "3e7fb0d693fce7a1592abe692c315b213630222e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "Gerg-L", "owner": "gerg-L",
"repo": "suckless", "repo": "suckless",
"type": "github" "type": "github"
} }
@ -375,15 +375,15 @@
}, },
"unstable": { "unstable": {
"locked": { "locked": {
"lastModified": 1685168767, "lastModified": 1686412476,
"narHash": "sha256-wQgnxz0PdqbyKKpsWl/RU8T8QhJQcHfeC6lh1xRUTfk=", "narHash": "sha256-inl9SVk6o5h75XKC79qrDCAobTD1Jxh6kVYTZKHzewA=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e10802309bf9ae351eb27002c85cfdeb1be3b262", "rev": "21951114383770f96ae528d0ae68824557768e81",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "nixos",
"ref": "nixos-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"

View file

@ -1,19 +1,19 @@
{ {
inputs = { inputs = {
#channels #channels
master.url = "github:NixOS/nixpkgs"; master.url = "github:nixos/nixpkgs";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; unstable.url = "github:nixos/nixpkgs/nixos-unstable";
stable.url = "github:NixOS/nixpkgs/nixos-22.11"; stable.url = "github:nixos/nixpkgs/nixos-22.11";
pipewire_fix.url = "github:NixOS/nixpkgs/45a55711fe12d0aada3aa04746082cf1b83dfbf3"; pipewire_fix.url = "github:nixos/nixpkgs/45a55711fe12d0aada3aa04746082cf1b83dfbf3";
#nix 2.16 #nix 2.16
nix.url = "github:NixOS/nix/684e9be8b9356f92b7882d74cba9d146fb71f850"; nix.url = "github:nixos/nix/03f9ff6ea59d21c6d7b29c64a03d5041bd621261";
nixos-generators = { nixos-generators = {
url = "github:nix-community/nixos-generators"; url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "unstable"; inputs.nixpkgs.follows = "unstable";
}; };
sops-nix = { sops-nix = {
url = "github:Mic92/sops-nix"; url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "unstable"; inputs.nixpkgs.follows = "unstable";
}; };
disko = { disko = {
@ -27,15 +27,15 @@
}; };
#my own packages #my own packages
suckless = { suckless = {
url = "github:Gerg-L/suckless"; url = "github:gerg-L/suckless";
inputs.nixpkgs.follows = "unstable"; inputs.nixpkgs.follows = "unstable";
}; };
nvim-flake = { nvim-flake = {
url = "github:Gerg-L/nvim-flake"; url = "github:gerg-L/nvim-flake";
inputs.nixpkgs.follows = "unstable"; inputs.nixpkgs.follows = "unstable";
}; };
fetch-rs = { fetch-rs = {
url = "github:Gerg-L/fetch-rs"; url = "github:gerg-L/fetch-rs";
inputs.nixpkgs.follows = "unstable"; inputs.nixpkgs.follows = "unstable";
}; };
}; };
@ -64,15 +64,17 @@
); );
mkDisko = names: mkDisko = names:
lib.genAttrs names ( lib.genAttrs names (
name: (import (self + "/systems/" + name + "/disko.nix") inputs) name: (import (self + "/systems/" + name + "/disko.nix") {inherit inputs;})
); );
withSystem = f: withSystem = f:
lib.foldAttrs lib.mergeAttrs {} lib.fold lib.recursiveUpdate {}
(map (s: lib.mapAttrs (_: v: {${s} = v;}) (f s)) (map (s: f s) ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]);
["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]);
in in
{ withSystem (
system: let
pkgs = unstable.legacyPackages.${system};
in {
nixosConfigurations = nixosConfigurations =
mkSystems mkSystems
"x86_64-linux" "x86_64-linux"
@ -88,24 +90,15 @@
"game-laptop" "game-laptop"
"moms-laptop" "moms-laptop"
]; ];
} formatter.${system} = pkgs.alejandra;
// withSystem (
system: let
pkgs = unstable.legacyPackages.${system};
in {
formatter = pkgs.alejandra;
devShells.default = pkgs.mkShell { devShells.${system}.default = pkgs.mkShell {
packages = [ packages = [
pkgs.sops pkgs.sops
pkgs.nil
pkgs.alejandra
pkgs.deadnix
pkgs.statix
]; ];
}; };
packages = packages.${system} =
{ {
nixos-iso = nixos-generators.nixosGenerate { nixos-iso = nixos-generators.nixosGenerate {
inherit system; inherit system;

View file

@ -33,12 +33,7 @@
#paste link trick #paste link trick
pastebin = "curl -F 'clbin=<-' https://clbin.com"; pastebin = "curl -F 'clbin=<-' https://clbin.com";
#nix stuff #nix stuff
nix-update = "nix flake update /etc/nixos/"; gc-check = "nix-store --gc --print-roots | egrep -v \"^(/nix/var|/run/\w+-system|\{memory|/proc)\"";
nix-switch = "nixos-rebuild switch --use-remote-sudo";
nix-boot = "nixos-rebuild boot --use-remote-sudo";
nix-clean = "nix-collect-garbage -d";
nix-gc-force = "rm /nix/var/nix/gcroots/auto/*";
nix-gc-check = "nix-store --gc --print-roots | egrep -v \"^(/nix/var|/run/\w+-system|\{memory|/proc)\"";
#vim stuff #vim stuff
vi = "nvim"; vi = "nvim";
vim = "nvim"; vim = "nvim";
@ -75,7 +70,7 @@
enable = true; enable = true;
autosuggestions.enable = true; autosuggestions.enable = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
histSize = 1000; histSize = 10000;
histFile = "$HOME/.cache/zsh_history"; histFile = "$HOME/.cache/zsh_history";
shellInit = '' shellInit = ''
eval "$(direnv hook zsh)" eval "$(direnv hook zsh)"

View file

@ -13,17 +13,7 @@
libappindicator-gtk3, libappindicator-gtk3,
atk, atk,
fetchFromGitHub, fetchFromGitHub,
}: }: let
rustPlatform.buildRustPackage rec {
name = "afk-cmds";
src = fetchFromGitHub {
owner = "Gerg-L";
repo = "afk-cmds";
rev = "b345d5a038a86c6ca31d3bd8800ac759da912a22";
sha256 = "sha256-yleq8bg3ZnilbYTNXRteBALiJ/fIXOxXxqf966OokqQ=";
};
buildInputs = [ buildInputs = [
libX11 libX11
libXScrnSaver libXScrnSaver
@ -35,6 +25,18 @@ rustPlatform.buildRustPackage rec {
libappindicator-gtk3 libappindicator-gtk3
atk atk
]; ];
in
rustPlatform.buildRustPackage {
name = "afk-cmds";
src = fetchFromGitHub {
owner = "Gerg-L";
repo = "afk-cmds";
rev = "b345d5a038a86c6ca31d3bd8800ac759da912a22";
sha256 = "sha256-yleq8bg3ZnilbYTNXRteBALiJ/fIXOxXxqf966OokqQ=";
};
inherit buildInputs;
nativeBuildInputs = [ nativeBuildInputs = [
pkg-config pkg-config
@ -43,9 +45,9 @@ rustPlatform.buildRustPackage rec {
postFixup = '' postFixup = ''
wrapProgram $out/bin/afk-cmds \ wrapProgram $out/bin/afk-cmds \
--prefix LD_LIBRARY_PATH : ${(lib.makeLibraryPath buildInputs)} --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs}
mkdir -p $out/share/icons/hicolor/256x256/apps/ mkdir -p $out/share/icons/hicolor/256x256/apps/
cp $src/afk-icon.png $out/share/icons/hicolor/256x256/apps/afk-icon.png cp $src/afk-icon.png $out/share/icons/hicolor/256x256/apps/afk-icon.png
''; '';
cargoSha256 = "sha256-CPpFUdgb0zTZAVlv4uhJ0Y7eocCjuEZNgQJdNwV1FI4="; cargoSha256 = "sha256-CPpFUdgb0zTZAVlv4uhJ0Y7eocCjuEZNgQJdNwV1FI4=";
} }

56
pkgs/fastfetch.nix Normal file
View file

@ -0,0 +1,56 @@
{
chafa,
cmake,
dbus,
dconf,
fetchFromGitHub,
glib,
imagemagick_light,
libglvnd,
libxcb,
makeWrapper,
ocl-icd,
opencl-headers,
pciutils,
pkg-config,
stdenv,
vulkan-loader,
wayland,
xfce,
xorg,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "fastfetch";
version = "1.11.0";
src = fetchFromGitHub {
owner = "LinusDierheimer";
repo = finalAttrs.pname;
rev = finalAttrs.version;
hash = "sha256-sSQaXXKH/ZELdhbUKuvAj0gZ0fSO/Xjxsv/TU0Xq47k=";
};
nativeBuildInputs = [cmake makeWrapper pkg-config];
buildInputs = [
dbus
dconf
glib
pciutils
zlib
chafa
imagemagick_light
ocl-icd
libglvnd
vulkan-loader
wayland
libxcb
xfce.xfconf
opencl-headers
xorg.libX11
];
cmakeFlags = [
"-DTARGET_DIR_ETC=./etc"
];
})

View file

@ -11,16 +11,19 @@
makeWrapper, makeWrapper,
}: }:
# yt-dlp and ffmpeg required at runtime # yt-dlp and ffmpeg required at runtime
rustPlatform.buildRustPackage { let
pname = "parrot";
version = "1.5.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "aquelemiguel"; owner = "aquelemiguel";
repo = "parrot"; repo = "parrot";
rev = "6b1df01bd9cce1c0d8446dea720c4a32ff935514"; rev = "6b1df01bd9cce1c0d8446dea720c4a32ff935514";
hash = "sha256-f6YAdsq2ecsOCvk+A8wsUu+ywQnW//gCAkVLF0HTn8c="; hash = "sha256-f6YAdsq2ecsOCvk+A8wsUu+ywQnW//gCAkVLF0HTn8c=";
}; };
in
rustPlatform.buildRustPackage
{
pname = "parrot";
version = "1.6.0";
inherit src;
buildInputs = [ buildInputs = [
libopus libopus
openssl openssl
@ -37,7 +40,8 @@ rustPlatform.buildRustPackage {
yt-dlp yt-dlp
ffmpeg ffmpeg
]}''; ]}'';
cargoSha256 = "sha256-RueYf+SzDwhqEb40iR0hViEuMinH72T480fuqJWJ+uk=";
cargoLock.lockFile = src + "/Cargo.lock";
RUSTC_BOOTSTRAP = 1; RUSTC_BOOTSTRAP = 1;
} }

View file

@ -1,4 +1,4 @@
_: {...}: { {
sops.secrets = { sops.secrets = {
"website/sql_gitea" = { "website/sql_gitea" = {
mode = "0444"; mode = "0444";