fix(droid): set nix.package
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
e32bb16144
commit
c4a1822df0
2 changed files with 20 additions and 14 deletions
|
@ -1,9 +1,14 @@
|
||||||
|
# FIXME: remove unneeded params and reformat
|
||||||
self: {
|
self: {
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) hasAttr mkIf optionalString;
|
inherit (lib) optionalString;
|
||||||
|
inherit (lib) attrValues filter findFirst isAttrs hasAttr mkDefault mkIf mkOption types;
|
||||||
|
inherit (self.inputs) home-manager nh nixd;
|
||||||
|
|
||||||
|
|
||||||
inherit (self.inputs) nixpkgs;
|
inherit (self.inputs) nixpkgs;
|
||||||
inherit (config.sops.secrets) access-token;
|
inherit (config.sops.secrets) access-token;
|
||||||
|
@ -13,6 +18,19 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
# Minimize dowloads of indirect nixpkgs flakes
|
# Minimize dowloads of indirect nixpkgs flakes
|
||||||
nix = {
|
nix = {
|
||||||
|
package = let
|
||||||
|
nixdInput =
|
||||||
|
findFirst
|
||||||
|
(x: x.pname == "nix") {}
|
||||||
|
nixd.packages.x86_64-linux.nixd.buildInputs;
|
||||||
|
|
||||||
|
throws = x: !(builtins.tryEval x).success;
|
||||||
|
hasVersion = x: isAttrs x && hasAttr "version" x;
|
||||||
|
|
||||||
|
nixVersions = filter (x: ! throws x && hasVersion x) (attrValues pkgs.nixVersions);
|
||||||
|
in
|
||||||
|
findFirst (x: x.version == nixdInput.version) {} nixVersions;
|
||||||
|
|
||||||
registry.nixpkgs.flake = nixpkgs;
|
registry.nixpkgs.flake = nixpkgs;
|
||||||
nixPath = ["nixpkgs=${nixpkgs}"];
|
nixPath = ["nixpkgs=${nixpkgs}"];
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# FIXME: remove unneeded params and format
|
||||||
self: {
|
self: {
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
@ -48,19 +49,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
package = let
|
|
||||||
nixdInput =
|
|
||||||
findFirst
|
|
||||||
(x: x.pname == "nix") {}
|
|
||||||
nixd.packages.${pkgs.system}.nixd.buildInputs;
|
|
||||||
|
|
||||||
throws = x: !(builtins.tryEval x).success;
|
|
||||||
hasVersion = x: isAttrs x && hasAttr "version" x;
|
|
||||||
|
|
||||||
nixVersions = filter (x: ! throws x && hasVersion x) (attrValues pkgs.nixVersions);
|
|
||||||
in
|
|
||||||
findFirst (x: x.version == nixdInput.version) {} nixVersions;
|
|
||||||
|
|
||||||
# Edit nix.conf
|
# Edit nix.conf
|
||||||
settings = {
|
settings = {
|
||||||
# Store
|
# Store
|
||||||
|
|
Loading…
Reference in a new issue