rename systemPackages as defaultProfile.packages

it doesn't work the same way as in nixos, so don't name it the same way
This commit is contained in:
Daniel Barlow
2022-09-27 16:17:55 +01:00
parent 4cbe669783
commit 696bbe6521
5 changed files with 21 additions and 19 deletions

View File

@@ -1,4 +1,4 @@
{ lib, pkgs, ...}:
{ lib, pkgs, config, ...}:
let
inherit (lib) mkEnableOption mkOption types isDerivation hasAttr ;
inherit (pkgs.pseudofile) dir symlink;
@@ -12,8 +12,12 @@ let
in {
options = {
systemPackages = mkOption {
type = types.listOf types.package;
# analogous to nixos systemPackages, but we don't symlink into
# /run/current-system, we just add the paths in /etc/profile
defaultProfile = {
packages = mkOption {
type = types.listOf types.package;
};
};
services = mkOption {
type = types.attrsOf type_service;
@@ -31,6 +35,8 @@ in {
};
};
config = {
defaultProfile.packages = with pkgs;
[ s6-init-bin busybox execline s6-linux-init s6-rc ];
environment = dir {
bin = dir {
sh = symlink "${busybox}/bin/sh";
@@ -48,7 +54,7 @@ in {
etc = dir {
profile = symlink
(pkgs.writeScript ".profile" ''
PATH=${lib.makeBinPath (with pkgs; [ s6-init-bin busybox execline s6-linux-init s6-rc])}
PATH=${lib.makeBinPath config.defaultProfile.packages}
export PATH
'');
passwd = { file = "root::0:0:root:/:/bin/sh\n"; };