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

View file

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

View file

@ -33,12 +33,7 @@
#paste link trick
pastebin = "curl -F 'clbin=<-' https://clbin.com";
#nix stuff
nix-update = "nix flake update /etc/nixos/";
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)\"";
gc-check = "nix-store --gc --print-roots | egrep -v \"^(/nix/var|/run/\w+-system|\{memory|/proc)\"";
#vim stuff
vi = "nvim";
vim = "nvim";
@ -75,7 +70,7 @@
enable = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
histSize = 1000;
histSize = 10000;
histFile = "$HOME/.cache/zsh_history";
shellInit = ''
eval "$(direnv hook zsh)"

View file

@ -13,17 +13,7 @@
libappindicator-gtk3,
atk,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
name = "afk-cmds";
src = fetchFromGitHub {
owner = "Gerg-L";
repo = "afk-cmds";
rev = "b345d5a038a86c6ca31d3bd8800ac759da912a22";
sha256 = "sha256-yleq8bg3ZnilbYTNXRteBALiJ/fIXOxXxqf966OokqQ=";
};
}: let
buildInputs = [
libX11
libXScrnSaver
@ -35,17 +25,29 @@ rustPlatform.buildRustPackage rec {
libappindicator-gtk3
atk
];
in
rustPlatform.buildRustPackage {
name = "afk-cmds";
nativeBuildInputs = [
pkg-config
wrapGAppsHook
];
src = fetchFromGitHub {
owner = "Gerg-L";
repo = "afk-cmds";
rev = "b345d5a038a86c6ca31d3bd8800ac759da912a22";
sha256 = "sha256-yleq8bg3ZnilbYTNXRteBALiJ/fIXOxXxqf966OokqQ=";
};
postFixup = ''
wrapProgram $out/bin/afk-cmds \
--prefix LD_LIBRARY_PATH : ${(lib.makeLibraryPath buildInputs)}
mkdir -p $out/share/icons/hicolor/256x256/apps/
cp $src/afk-icon.png $out/share/icons/hicolor/256x256/apps/afk-icon.png
'';
cargoSha256 = "sha256-CPpFUdgb0zTZAVlv4uhJ0Y7eocCjuEZNgQJdNwV1FI4=";
}
inherit buildInputs;
nativeBuildInputs = [
pkg-config
wrapGAppsHook
];
postFixup = ''
wrapProgram $out/bin/afk-cmds \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs}
mkdir -p $out/share/icons/hicolor/256x256/apps/
cp $src/afk-icon.png $out/share/icons/hicolor/256x256/apps/afk-icon.png
'';
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,33 +11,37 @@
makeWrapper,
}:
# yt-dlp and ffmpeg required at runtime
rustPlatform.buildRustPackage {
pname = "parrot";
version = "1.5.1";
let
src = fetchFromGitHub {
owner = "aquelemiguel";
repo = "parrot";
rev = "6b1df01bd9cce1c0d8446dea720c4a32ff935514";
hash = "sha256-f6YAdsq2ecsOCvk+A8wsUu+ywQnW//gCAkVLF0HTn8c=";
};
in
rustPlatform.buildRustPackage
{
pname = "parrot";
version = "1.6.0";
inherit src;
buildInputs = [
libopus
openssl
];
buildInputs = [
libopus
openssl
];
nativeBuildInputs = [
pkg-config
cmake
makeWrapper
];
postInstall = ''
wrapProgram $out/bin/parrot \
--set PATH ${lib.makeBinPath [
yt-dlp
ffmpeg
]}'';
nativeBuildInputs = [
pkg-config
cmake
makeWrapper
];
postInstall = ''
wrapProgram $out/bin/parrot \
--set PATH ${lib.makeBinPath [
yt-dlp
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 = {
"website/sql_gitea" = {
mode = "0444";