refactor: move customPkgs to self.packages
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
14081936af
commit
fe7b03dd4a
19 changed files with 39 additions and 37 deletions
|
@ -13,7 +13,6 @@
|
|||
./vars
|
||||
|
||||
./modules
|
||||
./pkgs
|
||||
|
||||
nur.nixosModules.nur
|
||||
home-manager.nixosModules.home-manager
|
||||
|
@ -100,7 +99,6 @@
|
|||
|
||||
./home
|
||||
./home/trash-d
|
||||
./pkgs
|
||||
];
|
||||
|
||||
home.packages =
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
home.packages =
|
||||
(with config.customPkgs; [
|
||||
(with self.packages.${pkgs.system}; [
|
||||
pokemon-colorscripts
|
||||
repl
|
||||
])
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (lib) concatMapAttrs filterAttrs mkOption pathExists types;
|
||||
|
||||
mkPackage = name: v: {
|
||||
${name} = pkgs.callPackage ./${name} inputs;
|
||||
};
|
||||
|
||||
rmNotPackage = name: value:
|
||||
value
|
||||
== "directory"
|
||||
&& pathExists ./${name}/default.nix;
|
||||
|
||||
packages = filterAttrs rmNotPackage (builtins.readDir ./.);
|
||||
|
||||
pkgSet = concatMapAttrs mkPackage packages;
|
||||
in {
|
||||
options.customPkgs = mkOption {
|
||||
type = types.attrs;
|
||||
};
|
||||
|
||||
config.customPkgs = pkgSet;
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
config,
|
||||
nms,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (config.vars) mainUser;
|
||||
|
@ -9,7 +10,7 @@ in {
|
|||
imports = [nms.nixosModules.default];
|
||||
|
||||
environment.systemPackages = [
|
||||
config.customPkgs.curseforge-server-downloader
|
||||
self.packages.${pkgs.system}.curseforge-server-downloader
|
||||
];
|
||||
|
||||
systemd.services.mc-steampunk.path = with pkgs; [curl];
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkDefault mkBefore;
|
||||
inherit (config.customPkgs) pam-fprint-grosshack;
|
||||
inherit (self.packages.${pkgs.system}) pam-fprint-grosshack;
|
||||
|
||||
pam_fprintd_grosshackSo = "${pam-fprint-grosshack}/lib/security/pam_fprintd_grosshack.so";
|
||||
|
||||
# https://wiki.archlinux.org/title/Fprint#Login_configuration
|
||||
grosshackConf = ''
|
||||
# pam-fprint-grosshack
|
||||
auth sufficient ${pam_fprintd_grosshackSo} timeout=99
|
||||
auth sufficient pam_unix.so try_first_pass nullok
|
||||
auth sufficient ${pam_fprintd_grosshackSo} timeout=99
|
||||
auth sufficient pam_unix.so try_first_pass nullok
|
||||
'';
|
||||
in {
|
||||
services.fprintd.enable = true;
|
||||
|
|
|
@ -95,6 +95,10 @@
|
|||
|
||||
nixOnDroidConfigurations.default = mkNixOnDroid [./devices/android];
|
||||
|
||||
packages =
|
||||
perSystem (system: pkgs:
|
||||
import ./pkgs ({inherit self system pkgs;} // inputs));
|
||||
|
||||
devShells = perSystem (_: pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
gtk-session-lock,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) boolToString;
|
||||
|
@ -101,7 +102,7 @@ in {
|
|||
// (import ./icons.nix {inherit pkgs agsConfigDir;});
|
||||
|
||||
packages =
|
||||
[config.customPkgs.coloryou]
|
||||
[self.packages.${pkgs.system}.coloryou]
|
||||
++ (with pkgs; [
|
||||
# ags
|
||||
dart-sass
|
||||
|
|
23
pkgs/default.nix
Normal file
23
pkgs/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
pkgs,
|
||||
curseforge-server-downloader-src,
|
||||
pam-fprint-grosshack-src,
|
||||
pokemon-colorscripts-src,
|
||||
...
|
||||
}: {
|
||||
coloryou = pkgs.callPackage ./coloryou {};
|
||||
|
||||
curseforge-server-downloader = pkgs.callPackage ./curseforge-server-downloader {
|
||||
inherit curseforge-server-downloader-src;
|
||||
};
|
||||
|
||||
pam-fprint-grosshack = pkgs.callPackage ./pam-fprint-grosshack {
|
||||
inherit pam-fprint-grosshack-src;
|
||||
};
|
||||
|
||||
pokemon-colorscripts = pkgs.callPackage ./pokemon-colorscripts {
|
||||
inherit pokemon-colorscripts-src;
|
||||
};
|
||||
|
||||
repl = pkgs.callPackage ./repl {};
|
||||
}
|
|
@ -17,7 +17,7 @@ in
|
|||
;;
|
||||
*)
|
||||
if [ -z "$1" ]; then
|
||||
nix repl --arg flakePath $(${coreutils}/bin/readlink -f "/etc/nixos") --file ${repl}
|
||||
nix repl --arg flakePath $(${coreutils}/bin/readlink -f "$FLAKE") --file ${repl}
|
||||
else
|
||||
nix repl --arg flakePath $(${coreutils}/bin/readlink -f $1 | ${gnused}/bin/sed 's|/flake.nix||') --file ${repl}
|
||||
fi
|
Loading…
Reference in a new issue