mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
flake: remove flake-utils
Adding a dependency for trivial tasks like these is unnecessary overhead for a library project. Not using flake-utils also leads to easier composability.
This commit is contained in:
parent
fa250d1c54
commit
bb8ac7fe1f
2 changed files with 24 additions and 39 deletions
16
flake.lock
generated
16
flake.lock
generated
|
|
@ -1,20 +1,5 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-utils": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1659877975,
|
|
||||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|
@ -69,7 +54,6 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap"
|
"nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap"
|
||||||
|
|
|
||||||
45
flake.nix
45
flake.nix
|
|
@ -13,12 +13,12 @@
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-for-bootstrap, home-manager, flake-utils }:
|
outputs = { self, nixpkgs, nixpkgs-for-bootstrap, home-manager }:
|
||||||
let
|
let
|
||||||
|
forEachSystem = nixpkgs.lib.genAttrs [ "aarch64-linux" "x86_64-linux" ];
|
||||||
|
|
||||||
overlay = nixpkgs.lib.composeManyExtensions (import ./overlays);
|
overlay = nixpkgs.lib.composeManyExtensions (import ./overlays);
|
||||||
|
|
||||||
pkgs' = import nixpkgs {
|
pkgs' = import nixpkgs {
|
||||||
|
|
@ -26,8 +26,9 @@
|
||||||
overlays = [ overlay ];
|
overlays = [ overlay ];
|
||||||
};
|
};
|
||||||
|
|
||||||
app = flake-utils.lib.mkApp {
|
app = {
|
||||||
drv = pkgs'.callPackage ./nix-on-droid { };
|
type = "app";
|
||||||
|
program = "${pkgs'.callPackage ./nix-on-droid { }}/bin/nix-on-droid";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -36,6 +37,8 @@
|
||||||
nix-on-droid = app;
|
nix-on-droid = app;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt);
|
||||||
|
|
||||||
lib.nixOnDroidConfiguration =
|
lib.nixOnDroidConfiguration =
|
||||||
{ config
|
{ config
|
||||||
, system ? "aarch64-linux" # unused, only supported variant
|
, system ? "aarch64-linux" # unused, only supported variant
|
||||||
|
|
@ -54,6 +57,21 @@
|
||||||
|
|
||||||
overlays.default = overlay;
|
overlays.default = overlay;
|
||||||
|
|
||||||
|
packages = forEachSystem (system:
|
||||||
|
(import ./pkgs {
|
||||||
|
inherit system;
|
||||||
|
nixpkgs = nixpkgs-for-bootstrap;
|
||||||
|
}).customPkgs
|
||||||
|
// {
|
||||||
|
fakedroid = import ./tests {
|
||||||
|
inherit system;
|
||||||
|
nixpkgs = nixpkgs-for-bootstrap;
|
||||||
|
};
|
||||||
|
|
||||||
|
nix-on-droid = nixpkgs.legacyPackages.${system}.callPackage ./nix-on-droid { };
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
templates = {
|
templates = {
|
||||||
default = self.templates.minimal;
|
default = self.templates.minimal;
|
||||||
|
|
||||||
|
|
@ -72,22 +90,5 @@
|
||||||
description = "Advanced example of nix-on-droid system config with home-manager.";
|
description = "Advanced example of nix-on-droid system config with home-manager.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
|
||||||
// flake-utils.lib.eachSystem [ "aarch64-linux" "i686-linux" "x86_64-darwin" "x86_64-linux" ] (system: {
|
|
||||||
formatter = nixpkgs.legacyPackages.${system}.nixpkgs-fmt;
|
|
||||||
|
|
||||||
packages =
|
|
||||||
(import ./pkgs {
|
|
||||||
inherit system;
|
|
||||||
nixpkgs = nixpkgs-for-bootstrap;
|
|
||||||
}).customPkgs
|
|
||||||
// {
|
|
||||||
fakedroid = import ./tests {
|
|
||||||
inherit system;
|
|
||||||
nixpkgs = nixpkgs-for-bootstrap;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-on-droid = nixpkgs.legacyPackages.${system}.callPackage ./nix-on-droid { };
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue