mirror of
https://github.com/kmein/niveum
synced 2026-03-18 19:11:08 +01:00
flake: do not use flake-utils
This commit is contained in:
62
flake.nix
62
flake.nix
@@ -78,7 +78,10 @@
|
|||||||
stylix,
|
stylix,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
let
|
||||||
|
lib = nixpkgs.lib;
|
||||||
|
eachSupportedSystem = lib.genAttrs lib.systems.flakeExposed;
|
||||||
|
in {
|
||||||
apps = {
|
apps = {
|
||||||
x86_64-darwin = let
|
x86_64-darwin = let
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-darwin;
|
pkgs = nixpkgs.legacyPackages.x86_64-darwin;
|
||||||
@@ -141,6 +144,9 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# TODO overlay for packages
|
||||||
|
# TODO remove flake-utils dependency from my own repos
|
||||||
|
|
||||||
nixosModules = {
|
nixosModules = {
|
||||||
htgen = import modules/htgen.nix;
|
htgen = import modules/htgen.nix;
|
||||||
moodle-dl = import modules/moodle-dl.nix;
|
moodle-dl = import modules/moodle-dl.nix;
|
||||||
@@ -318,30 +324,29 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
|
||||||
// flake-utils.lib.eachSystem [flake-utils.lib.system.x86_64-linux flake-utils.lib.system.x86_64-darwin flake-utils.lib.system.aarch64-linux] (system: let
|
packages = eachSupportedSystem (system: let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
overlays = [
|
overlays = [
|
||||||
nur.overlays.default
|
nur.overlays.default
|
||||||
(self: super: {
|
(self: super: {
|
||||||
mpv = super.mpv.override {scripts = [inputs.self.packages.${system}.mpv-visualizer super.mpvScripts.mpris];};
|
mpv = super.mpv.override {scripts = [inputs.self.packages.${system}.mpv-visualizer super.mpvScripts.mpris];};
|
||||||
dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
|
dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
unstablePackages = import nixpkgs-unstable {
|
unstablePackages = import nixpkgs-unstable {
|
||||||
inherit system;
|
inherit system;
|
||||||
};
|
};
|
||||||
wrapScript = {
|
wrapScript = {
|
||||||
packages ? [],
|
packages ? [],
|
||||||
name,
|
name,
|
||||||
script,
|
script,
|
||||||
}:
|
}:
|
||||||
pkgs.writers.writeDashBin name ''PATH=$PATH:${nixpkgs.lib.makeBinPath (packages ++ [pkgs.findutils pkgs.coreutils pkgs.gnused pkgs.gnugrep])} ${script} "$@"'';
|
pkgs.writers.writeDashBin name ''PATH=$PATH:${nixpkgs.lib.makeBinPath (packages ++ [pkgs.findutils pkgs.coreutils pkgs.gnused pkgs.gnugrep])} ${script} "$@"'';
|
||||||
in {
|
in {
|
||||||
packages = rec {
|
|
||||||
auc = pkgs.callPackage packages/auc.nix {};
|
auc = pkgs.callPackage packages/auc.nix {};
|
||||||
betacode = pkgs.callPackage packages/betacode.nix {};
|
betacode = pkgs.callPackage packages/betacode.nix {};
|
||||||
brainmelter = pkgs.callPackage packages/brainmelter.nix {};
|
brainmelter = pkgs.callPackage packages/brainmelter.nix {};
|
||||||
@@ -442,9 +447,6 @@
|
|||||||
weechatScripts-hotlist2extern = pkgs.callPackage packages/weechatScripts/hotlist2extern.nix {};
|
weechatScripts-hotlist2extern = pkgs.callPackage packages/weechatScripts/hotlist2extern.nix {};
|
||||||
wttr = pkgs.callPackage packages/wttr.nix {};
|
wttr = pkgs.callPackage packages/wttr.nix {};
|
||||||
|
|
||||||
itl = pkgs.callPackage packages/itl.nix {};
|
|
||||||
itools = pkgs.callPackage packages/itools.nix {itl = itl;};
|
|
||||||
|
|
||||||
booksplit = wrapScript {
|
booksplit = wrapScript {
|
||||||
script = inputs.voidrice.outPath + "/.local/bin/booksplit";
|
script = inputs.voidrice.outPath + "/.local/bin/booksplit";
|
||||||
name = "booksplit";
|
name = "booksplit";
|
||||||
@@ -456,6 +458,6 @@
|
|||||||
name = "tag";
|
name = "tag";
|
||||||
packages = [pkgs.ffmpeg];
|
packages = [pkgs.ffmpeg];
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
});
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user