systems -> hosts

moved functions to /lib

inputs over imports

turned each module file into a nixosModule

moved registry and $NIX_PATH pinning to /modules/pinning.nix
This commit is contained in:
Gerg-L 2023-06-22 22:55:43 -04:00
parent ee2beea680
commit f43d0b741c
42 changed files with 224 additions and 240 deletions

93
flake.lock generated
View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1687028856,
"narHash": "sha256-vKV3I31tmXwaWHiUOgfDVd27cEHqaPBr1lt9+NKdIp8=",
"lastModified": 1687134796,
"narHash": "sha256-gjBAkEtNPMQzqK4IHjTQBUv3VhggszOHLJbhXZy0OVQ=",
"owner": "nix-community",
"repo": "disko",
"rev": "64c9c78c15fd4c899d857bf09dba88bda771b43a",
"rev": "4823509bb3b014dc85abefc13efcfa076d36338a",
"type": "github"
},
"original": {
@ -27,11 +27,11 @@
]
},
"locked": {
"lastModified": 1686447837,
"narHash": "sha256-7MUSWCGDceC5Z7zgt/FlJ1tO7veeY6On8HtYXT2BIlw=",
"lastModified": 1687390847,
"narHash": "sha256-T75KT5XFPMvmHOdxuoWotI+vCIM2cM5192QxLxenudU=",
"owner": "gerg-L",
"repo": "fetch-rs",
"rev": "38af76fe73118eb6317a34511d0a7d4f2f1af409",
"rev": "a571c0c6768db9c643cc81735a1a12799d09ed4e",
"type": "github"
},
"original": {
@ -56,24 +56,6 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"lowdown-src": {
"flake": false,
"locked": {
@ -92,11 +74,11 @@
},
"master": {
"locked": {
"lastModified": 1687093833,
"narHash": "sha256-B+cXcBTpc9bsmPd59rKIcFG6hYCGgxbeIxA+OIIFjlU=",
"lastModified": 1687388587,
"narHash": "sha256-TILQ4Ch+Y9Q6Hczm5vwgGWXD2ow29uxXPJuGzqS6jj0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8f83962b34fe83520c0edf6320ebd05b06d4f65b",
"rev": "563afe26c68c2323e817345687c367ab5ca06dfa",
"type": "github"
},
"original": {
@ -145,11 +127,11 @@
},
"nixlib": {
"locked": {
"lastModified": 1685840432,
"narHash": "sha256-VJIbiKsY7Xy4E4WcgwUt/UiwYDmN5BAk8tngAjcWsqY=",
"lastModified": 1687049841,
"narHash": "sha256-FBNZQfWtA7bb/rwk92mfiWc85x4hXta2OAouDqO5W8w=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "961e99baaaa57f5f7042fe7ce089a88786c839f4",
"rev": "908af6d1fa3643c5818ea45aa92b21d6385fbbe5",
"type": "github"
},
"original": {
@ -166,11 +148,11 @@
]
},
"locked": {
"lastModified": 1686924781,
"narHash": "sha256-6r3Hm2Fxf4F7LIWRYKU9bsS/xJwlG6L2+/I/pdffvOs=",
"lastModified": 1687183443,
"narHash": "sha256-foX4pkph2AwUdJL3JURa7IHog+YRIheZ54vwHwxqwhU=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "a54683aa7eff00ee5b33dec225525d0eb6ab02de",
"rev": "09140f23f5ffce828db4ef040070bdd9595b1f3a",
"type": "github"
},
"original": {
@ -288,11 +270,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1687058111,
"narHash": "sha256-xDSn/APfAdJinHV4reTfplX5XnLsJSGdVwHpmdgP9Mo=",
"lastModified": 1687267549,
"narHash": "sha256-jpg5zwhEQlovGH/xrml9X5ciPKpIZr/3Z04+Fh3VtQY=",
"owner": "mic92",
"repo": "sops-nix",
"rev": "1634d2da53f079e7f5924efa7a96511cd9596f81",
"rev": "d299d0538295e71e194aa0dfa896ad399f4508e3",
"type": "github"
},
"original": {
@ -303,37 +285,33 @@
},
"spicetify-nix": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"unstable"
]
},
"locked": {
"lastModified": 1686173678,
"narHash": "sha256-aYzl34xb3u9I57sqkvSldQKltCnxhjvvLABjgFRxOVE=",
"owner": "the-argus",
"repo": "spicetify-nix",
"rev": "f024752b691ac2dcb2ad378d72a2e3084ce83b79",
"type": "github"
"lastModified": 1687479458,
"narHash": "sha256-7ZeYakvK1Raz4oFwGrbcMbDe12nf9TXdXJvgp/e+N8Y=",
"path": "/home/gerg/Projects/spicetify-nix",
"type": "path"
},
"original": {
"owner": "the-argus",
"repo": "spicetify-nix",
"type": "github"
"path": "/home/gerg/Projects/spicetify-nix",
"type": "path"
}
},
"stable": {
"locked": {
"lastModified": 1686929285,
"narHash": "sha256-WGtVzn+vGMPTXDO0DMNKVFtf+zUSqeW+KKk4Y/Ae99I=",
"lastModified": 1687379288,
"narHash": "sha256-cSuwfiqYfeVyqzCRkU9AvLTysmEuSal8nh6CYr+xWog=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "93fddcf640ceca0be331210ba3101cee9d91c13d",
"rev": "ef0bc3976340dab9a4e087a0bcff661a8b2e87f3",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-22.11",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
@ -358,21 +336,6 @@
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"unstable": {
"locked": {
"lastModified": 1686960236,

View file

@ -3,9 +3,9 @@
#channels
master.url = "github:nixos/nixpkgs";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
stable.url = "github:nixos/nixpkgs/nixos-22.11";
stable.url = "github:nixos/nixpkgs/nixos-23.05";
pipewire_fix.url = "github:nixos/nixpkgs/45a55711fe12d0aada3aa04746082cf1b83dfbf3";
#nix 2.16
#nix 2.17
nix.url = "github:nixos/nix/03f9ff6ea59d21c6d7b29c64a03d5041bd621261";
nixos-generators = {
@ -20,9 +20,9 @@
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "unstable";
};
#the-argus is awesome
spicetify-nix = {
url = "github:the-argus/spicetify-nix";
#url = "github:the-argus/spicetify-nix";
url = "path:/home/gerg/Projects/spicetify-nix";
inputs.nixpkgs.follows = "unstable";
};
#my own packages
@ -40,51 +40,30 @@
};
};
outputs = inputs @ {
self,
unstable,
nixos-generators,
...
}: let
inherit (unstable) lib;
importAll = path:
builtins.filter (lib.hasSuffix ".nix")
(lib.filesystem.listFilesRecursive path);
mkSystems = system: names:
lib.genAttrs names (
name:
lib.nixosSystem {
inherit system;
specialArgs = {inherit inputs self;};
modules =
importAll ./modules
++ importAll (self + "/systems/" + name);
}
);
mkDisko = names:
lib.genAttrs names (
name: (import (self + "/systems/" + name + "/disko.nix") {inherit inputs;})
);
withSystem = f:
lib.fold lib.recursiveUpdate {}
(map (s: f s) ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]);
lib = import ./lib inputs;
in
withSystem (
lib.withSystem (
system: let
pkgs = unstable.legacyPackages.${system};
in {
inherit lib;
nixosConfigurations =
mkSystems
lib.mkSystems
"x86_64-linux"
[
"gerg-desktop"
"game-laptop"
"moms-laptop"
];
nixosModules = lib.mkModules ./modules;
diskoConfigurations =
mkDisko
lib.mkDisko
[
"gerg-desktop"
"game-laptop"
@ -108,16 +87,7 @@
];
};
}
// builtins.listToAttrs (
map (module: {
name = lib.removeSuffix ".nix" (builtins.baseNameOf module);
value = pkgs.callPackage module {};
})
(
builtins.filter (lib.hasSuffix ".nix")
(lib.filesystem.listFilesRecursive ./pkgs)
)
);
// lib.mkPkgs pkgs ./pkgs;
}
);
}

View file

@ -1,4 +1,4 @@
{
_: {
pkgs,
config,
...

View file

@ -1,10 +1,6 @@
{
inputs,
disks ? [],
...
}: {
{disko, ...}: {disks ? [], ...}: {
dummyvalue = {inherit disks;};
imports = [inputs.disko.nixosModules.disko];
imports = [disko.nixosModules.disko];
disko.devices = {
disk.nvme0n1 = {
device = "/dev/disk/by-id/nvme-WDC_PC_SN530_SDBPNPZ-512G-1006_21311N802456";

View file

@ -1,18 +1,11 @@
{config, ...}: {
_: {config, ...}: {
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.latest;
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
sync.enable = true;
amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";
};
powerManagement = {
enable = true;
finegrained = true;
};
nvidiaPersistenced = true;
nvidiaSettings = false;
modesetting.enable = true;

View file

@ -1,4 +1,4 @@
{
_:{
containers."minecraft" = {
ephemeral = true;
autoStart = true;

View file

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

View file

@ -1,5 +1,4 @@
{
inputs,
{nvim-flake, ...}: {
pkgs,
config,
...
@ -54,7 +53,7 @@
webcord
prismlauncher
;
inherit (inputs.nvim-flake.packages.${pkgs.system}) neovim;
inherit (nvim-flake.packages.${pkgs.system}) neovim;
};
etc = {
"jdks/17".source = pkgs.openjdk17 + /bin;

View file

@ -1,10 +1,6 @@
{
inputs,
disks ? [],
...
}: {
{disko, ...}: {disks ? [], ...}: {
dummyvalue = {inherit disks;};
imports = [inputs.disko.nixosModules.disko];
imports = [disko.nixosModules.disko];
disko.devices = {
disk = {
nvme0 = {

View file

@ -1,7 +1,6 @@
{
{self, ...}: {
pkgs,
config,
self,
lib,
...
}: {

View file

@ -1,15 +1,13 @@
{
inputs,
pkgs,
...
}: let
spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default;
{spicetify-nix, ...}: {pkgs, ...}: let
spicePkgs = spicetify-nix.legacyPackages.${pkgs.system};
ex = spicePkgs.extensions;
in {
imports = [spicetify-nix.nixosModule];
nixpkgs.allowedUnfree = ["spotify"];
imports = [inputs.spicetify-nix.nixosModule];
programs.spicetify = {
enable = true;
spotifyPackage = spicePkgs.spotify;
spicetifyPackage = spicePkgs.spicetify-cli;
enabledExtensions = [
ex.adblock
ex.hidePodcasts

View file

@ -1,9 +1,11 @@
{
pkgs,
self,
pipewire_fix,
...
}: {
pkgs,
config,
lib,
inputs,
...
}:
###TAKEN FROM HERE:https://github.com/NixOS/nixpkgs/blob/4787ebf7ae2ab071389be7ff86cf38edeee7e9f8/nixos/modules/services/x11/xserver.nix#L106-L136
@ -48,7 +50,7 @@ let
twoMonitor = pkgs.writeText "2-monitor.conf" (lib.concatStrings [(builtins.readFile xserverbase) (builtins.readFile (self + /misc/2-monitor.conf))]);
in {
####VM SOUND BORKED
services.pipewire.package = inputs.pipewire_fix.legacyPackages.${pkgs.system}.pipewire;
services.pipewire.package = pipewire_fix.legacyPackages.${pkgs.system}.pipewire;
boot = {
kernelParams = ["amd_iommu=on" "iommu=pt" "vfio_iommu_type1.allow_unsafe_interrupts=1" "kvm.ignore_msrs=1"];
};

View file

@ -1,4 +1,4 @@
{
_: {
config,
lib,
...

View file

@ -1,4 +1,4 @@
{
_: {
pkgs,
config,
...

View file

@ -1,10 +1,6 @@
{
inputs,
disks ? [],
...
}: {
{disko, ...}: {disks ? [], ...}: {
dummyvalue = {inherit disks;};
imports = [inputs.disko.nixosModules.disko];
imports = [disko.nixosModules.disko];
disko.devices = {
disk.sda = {
device = "/dev/disk/by-id/ata-WDC_WDS240G2G0A-00JH30_180936803144";

View file

@ -1,4 +1,4 @@
{pkgs, ...}: {
_: {pkgs, ...}: {
nixpkgs.allowedUnfree = ["hplip"];
environment.systemPackages = [
pkgs.gimp

61
lib/default.nix Normal file
View file

@ -0,0 +1,61 @@
inputs @ {
unstable,
self,
...
}: let
inherit (unstable) lib;
importAll = path:
map
(module: (import module inputs))
(
builtins.filter (lib.hasSuffix ".nix")
(lib.filesystem.listFilesRecursive path)
);
mkModules = path:
lib.listToAttrs (
map (
name: {
name = lib.removePrefix (toString path + "/") (lib.removeSuffix ".nix" (toString name));
value = import name inputs;
}
)
(
builtins.filter (lib.hasSuffix ".nix")
(lib.filesystem.listFilesRecursive path)
)
);
in {
inherit importAll mkModules;
withSystem = f:
lib.fold lib.recursiveUpdate {}
(map f ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]);
mkSystems = system: names:
lib.genAttrs names (
name:
lib.nixosSystem {
inherit system;
modules =
builtins.attrValues self.nixosModules ++ importAll (self + "/hosts/" + name);
}
);
mkDisko = names:
lib.genAttrs names (
name: (import (self + "/hosts/" + name + "/disko.nix") inputs)
);
mkPkgs = pkgs: path:
builtins.listToAttrs (
map (module: {
name = lib.removeSuffix ".nix" (builtins.baseNameOf module);
value = pkgs.callPackage module {};
})
(
builtins.filter (lib.hasSuffix ".nix")
(lib.filesystem.listFilesRecursive path)
)
);
}

View file

@ -1,9 +1,11 @@
{
inputs,
suckless,
self,
...
}: {
pkgs,
config,
lib,
self,
...
}: {
options.localModules.DE.dwm.enable = lib.mkEnableOption "";
@ -45,7 +47,7 @@
};
environment.systemPackages = builtins.attrValues {
inherit
(inputs.suckless.packages.${pkgs.system})
(suckless.packages.${pkgs.system})
dmenu
dwm
st

View file

@ -1,4 +1,4 @@
{
_: {
config,
lib,
pkgs,

View file

@ -1,4 +1,4 @@
{
_: {
config,
lib,
pkgs,

View file

@ -1,4 +1,4 @@
{
_: {
config,
lib,
...

View file

@ -1,7 +1,6 @@
{
{self, ...}: {
config,
lib,
self,
pkgs,
...
}: {

View file

@ -1,4 +1,4 @@
{
_: {
config,
pkgs,
lib,

View file

@ -1,5 +1,4 @@
{
self,
{self, ...}: {
lib,
pkgs,
...

View file

@ -1,15 +1,16 @@
{
inputs,
{unstable, ...}: {
lib,
config,
pkgs,
...
}: let
}:
#TAKEN FROM https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/stage-2.nix
let
useHostResolvConf = config.networking.resolvconf.enable && config.networking.useHostResolvConf;
bootStage2 = pkgs.substituteAll {
src = pkgs.runCommand "stage-2-init.sh" {} ''
sed '2i exec 1<>/dev/null' ${inputs.unstable}/nixos/modules/system/boot/stage-2-init.sh > $out
sed '2i exec 1<>/dev/null' ${unstable}/nixos/modules/system/boot/stage-2-init.sh > $out
'';
shellDebug = "${pkgs.bashInteractive}/bin/bash";
shell = "${pkgs.bash}/bin/bash";

View file

@ -1,4 +1,4 @@
{
_: {
config,
lib,
...

27
modules/direnv.nix Normal file
View file

@ -0,0 +1,27 @@
_: {pkgs, ...}: {
environment = {
systemPackages = builtins.attrValues {
inherit
(pkgs)
nix-direnv
direnv
;
};
variables = {
DIRENV_LOG_FORMAT = "";
DIRENV_CONFIG = "${pkgs.nix-direnv}/share/nix-direnv";
};
};
programs = {
zsh.interactiveShellInit = ''
eval "$(direnv hook zsh)"
'';
bash.interactiveShellInit = ''
eval "$(direnv hook bash)"
'';
fish.interactiveShellInit = ''
direnv hook fish | source
'';
};
}

View file

@ -1,4 +1,4 @@
{
_: {
pkgs,
config,
lib,

View file

@ -1,4 +1,4 @@
{
_: {
config,
lib,
...

View file

@ -1,4 +1,4 @@
{
_: {
lib,
config,
pkgs,

View file

@ -1,34 +1,4 @@
{
pkgs,
inputs,
lib,
self,
...
}: let
combined_flakes =
(
#filter non-flakes from inputs
lib.filterAttrs (
_: value: (
!(lib.hasAttrByPath ["flake"] value) || !value.flake
)
)
inputs
)
// {
#alias unstable
nixpkgs = inputs.unstable;
#add system flake
system = self;
};
in {
#create registry from input flakes
nix.registry = lib.mapAttrs (_: value: {flake = value;}) combined_flakes;
#add all inputs to etc
environment.etc = lib.mapAttrs' (name: value: lib.nameValuePair "/nixpath/${name}" {source = value;}) combined_flakes;
#source the etc paths to nixPath
nix.nixPath = lib.mapAttrsToList (name: _: name + "=/etc/nixpath/${name}") combined_flakes;
inputs: {pkgs, ...}: {
#other nix settings
nix = {
package = inputs.nix.packages.${pkgs.system}.default;

12
modules/pinning.nix Normal file
View file

@ -0,0 +1,12 @@
inputs: {lib, ...}: let
alias = inputs // {nixpkgs = inputs.unstable;};
in
lib.pipe alias [
(lib.filterAttrs (_: v: v._type == "flake"))
(lib.mapAttrsToList (n: input: {
environment.etc."nixpath/${n}".source = input.outPath;
nix.nixPath = ["${n}=/etc/nixpath/${n}"];
nix.registry.${n}.flake = input;
}))
lib.mkMerge
]

View file

@ -1,5 +1,4 @@
{
inputs,
{fetch-rs, ...}: {
pkgs,
config,
lib,
@ -11,11 +10,9 @@
(pkgs)
page
exa
direnv
nix-direnv
;
inherit
(inputs.fetch-rs.packages.${pkgs.system})
(fetch-rs.packages.${pkgs.system})
fetch-rs
;
};
@ -25,13 +22,13 @@
VISUAL = "nvim";
PAGER = "page";
SYSTEMD_PAGERSECURE = "true";
DIRENV_LOG_FORMAT = "";
};
shellAliases = {
#make sudo use aliases
sudo = "sudo ";
#paste link trick
pastebin = "curl -F 'clbin=<-' https://clbin.com";
termbin = "nc termbin.com 9999";
#nix stuff
gc-check = "nix-store --gc --print-roots | egrep -v \"^(/nix/var|/run/\w+-system|\{memory|/proc)\"";
#vim stuff
@ -49,9 +46,6 @@
lt = "exa --tree --level=2";
};
interactiveShellInit = "fetch-rs";
pathsToLink = [
"/share/nix-direnv"
];
};
security.sudo = {
enable = true;
@ -72,24 +66,29 @@
syntaxHighlighting.enable = true;
histSize = 10000;
histFile = "$HOME/.cache/zsh_history";
shellInit = ''
eval "$(direnv hook zsh)"
'';
};
#starship
starship = {
enable = true;
settings = {
add_newline = false;
format = "$sudo\${custom.direnv} $cmd_duration \n $directory$git_branch$character";
format = "$sudo$nix_shell\${custom.direnv}$cmd_duration\n$git_metrics$git_state$git_branch\n$directory$character";
character = {
success_symbol = "[ ](#9ece6a bold)";
error_symbol = "[ ](#db4b4b bold)";
success_symbol = "[\\$](#9ece6a bold)";
error_symbol = "[\\$](#db4b4b bold)";
};
nix_shell = {
format = "[󱄅 ](#74b2ff)";
heuristic = true;
};
directory = {
read_only = " ";
};
git_metrics = {
disabled = false;
};
git_branch = {
format = "[$symbol$branch(:$remote_branch)]($style)";
style = "bold red";
};
sudo = {
@ -103,7 +102,7 @@
custom.direnv = {
format = "[\\[direnv\\]]($style)";
style = "#36c692";
detect_folders = [".direnv"];
when = "printenv DIRENV_FILE";
};
};
};

View file

@ -1,18 +1,20 @@
{
inputs,
pkgs,
sops-nix,
self,
...
}: {
pkgs,
config,
...
}: {
imports = [
inputs.sops-nix.nixosModules.sops
sops-nix.nixosModules.sops
];
environment.systemPackages = [
pkgs.sops
];
sops = {
defaultSopsFile = self + "/systems/" + config.networking.hostName + "/secrets.yaml";
defaultSopsFile = self + "/hosts/" + config.networking.hostName + "/secrets.yaml";
age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
};
}

View file

@ -1,4 +1,4 @@
{
_: {
pkgs,
config,
lib,

View file

@ -49,5 +49,5 @@ in
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=";
cargoSha256 = "sha256-r20g5Tkj2ft1ho/fghg+qwiGOUay8HCIrBbg+y8kQXQ=";
}

View file

@ -8,7 +8,6 @@
imagemagick_light,
libglvnd,
libxcb,
makeWrapper,
ocl-icd,
opencl-headers,
pciutils,
@ -31,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-sSQaXXKH/ZELdhbUKuvAj0gZ0fSO/Xjxsv/TU0Xq47k=";
};
nativeBuildInputs = [cmake makeWrapper pkg-config];
nativeBuildInputs = [cmake pkg-config];
buildInputs = [
dbus

View file

@ -24,19 +24,21 @@ in
pname = "parrot";
version = "1.6.0";
inherit src;
buildInputs = [
libopus
openssl
];
nativeBuildInputs = [
pkg-config
cmake
makeWrapper
];
buildInputs = [
libopus
openssl
];
postInstall = ''
wrapProgram $out/bin/parrot \
--set PATH ${lib.makeBinPath [
--prefix PATH ${lib.makeBinPath [
yt-dlp
ffmpeg
]}'';

View file

@ -9,13 +9,12 @@
exec ${glibc}/lib64/ld-linux-x86-64.so.2 \
$out/t-rex --no-watchdog \$@
'';
version = "0.26.5";
in
stdenv.mkDerivation {
inherit version;
stdenv.mkDerivation (finalAttrs: {
version = "0.26.5";
pname = "t-rex-miner";
src = fetchzip {
url = "https://github.com/trexminer/T-Rex/releases/download/${version}/t-rex-${version}-linux.tar.gz";
url = "https://github.com/trexminer/T-Rex/releases/download/${finalAttrs.version}/t-rex-${finalAttrs.version}-linux.tar.gz";
sha256 = "sha256-eGOTfb03R2ck/6GMY6tPmTifYT9aVv3dNDQ5jRVlz58=";
stripRoot = false;
};
@ -26,4 +25,4 @@ in
echo "${wrapper}" > $out/bin/t-rex
chmod +x $out/bin/t-rex
'';
}
})