flake: reorganise, remove flake-utils
This commit is contained in:
parent
311fb3ff98
commit
fe773352f5
16
flake.lock
generated
16
flake.lock
generated
@ -1,20 +1,5 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-utils": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1634851050,
|
|
||||||
"narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "c91f3de5adaf1de973b797ef7485e441a65b8935",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1636470166,
|
"lastModified": 1636470166,
|
||||||
@ -33,7 +18,6 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
62
flake.nix
62
flake.nix
@ -1,18 +1,27 @@
|
|||||||
{
|
{
|
||||||
description = "xeals's flake";
|
description = "xeals's Nix repository";
|
||||||
|
|
||||||
inputs = {
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = { self, nixpkgs }:
|
||||||
let
|
let
|
||||||
inherit (flake-utils.lib) eachDefaultSystem flattenTree;
|
|
||||||
inherit (nixpkgs.lib.attrsets) filterAttrs mapAttrs;
|
inherit (nixpkgs) lib;
|
||||||
|
|
||||||
|
supportedSystems = [
|
||||||
|
"aarch64-darwin"
|
||||||
|
"aarch64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-darwin"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
|
|
||||||
|
forAllSystems = f: lib.genAttrs supportedSystems (system: f system);
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosModules = mapAttrs (_: path: import path) (import ./modules);
|
|
||||||
|
nixosModules = lib.mapAttrs (_: path: import path) (import ./modules);
|
||||||
|
|
||||||
overlays = import ./overlays // {
|
overlays = import ./overlays // {
|
||||||
pkgs = final: prev: import ./pkgs/top-level/all-packages.nix { pkgs = prev; };
|
pkgs = final: prev: import ./pkgs/top-level/all-packages.nix { pkgs = prev; };
|
||||||
@ -21,27 +30,30 @@
|
|||||||
overlay = final: prev: {
|
overlay = final: prev: {
|
||||||
xeals = nixpkgs.lib.composeExtensions self.overlays.pkgs;
|
xeals = nixpkgs.lib.composeExtensions self.overlays.pkgs;
|
||||||
};
|
};
|
||||||
} // eachDefaultSystem (system:
|
|
||||||
|
packages = forAllSystems (system:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
xPkgs = import ./pkgs/top-level/all-packages.nix { inherit pkgs; };
|
xPkgs = import ./pkgs/top-level/all-packages.nix { inherit pkgs; };
|
||||||
mkApp = opts: { type = "app"; } // opts;
|
|
||||||
in
|
in
|
||||||
rec {
|
lib.filterAttrs
|
||||||
packages = filterAttrs
|
|
||||||
(attr: drv: builtins.elem system (drv.meta.platforms or [ ]))
|
(attr: drv: builtins.elem system (drv.meta.platforms or [ ]))
|
||||||
(flattenTree xPkgs);
|
xPkgs);
|
||||||
|
|
||||||
apps = flattenTree {
|
apps = forAllSystems (system:
|
||||||
alacritty = mkApp { program = "${packages.alacritty-ligatures}/bin/alacritty"; };
|
let
|
||||||
protonmail-bridge = mkApp { program = "${packages.protonmail-bridge}/bin/protonmail-bridge"; };
|
mkApp = opts: { type = "app"; } // opts;
|
||||||
protonmail-bridge-headless = mkApp { program = "${packages.protonmail-bridge}/bin/protonmail-bridge"; };
|
pkgs = self.packages.${system};
|
||||||
psst = {
|
in
|
||||||
cli = mkApp { program = "${packages.psst}/bin/psst-cli"; };
|
{
|
||||||
gui = mkApp { program = "${packages.psst}/bin/psst-gui"; };
|
alacritty = mkApp { program = "${pkgs.alacritty-ligatures}/bin/alacritty"; };
|
||||||
};
|
protonmail-bridge = mkApp { program = "${pkgs.protonmail-bridge}/bin/protonmail-bridge"; };
|
||||||
samrewritten = mkApp { program = "${packages.samrewritten}/bin/samrewritten"; };
|
protonmail-bridge-headless = mkApp { program = "${pkgs.protonmail-bridge}/bin/protonmail-bridge"; };
|
||||||
spotify-ripper = mkApp { program = "${packages.spotify-ripper}/bin/spotify-ripper"; };
|
psst-cli = mkApp { program = "${pkgs.psst}/bin/psst-cli"; };
|
||||||
};
|
psst-gui = mkApp { program = "${pkgs.psst}/bin/psst-gui"; };
|
||||||
|
samrewritten = mkApp { program = "${pkgs.samrewritten}/bin/samrewritten"; };
|
||||||
|
spotify-ripper = mkApp { program = "${pkgs.spotify-ripper}/bin/spotify-ripper"; };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user