Skip to content

Commit

Permalink
agenix activation without perl is broken
Browse files Browse the repository at this point in the history
systemd.sysusers.enable = false;

ryantm/agenix#238
  • Loading branch information
tbaumann committed Oct 4, 2024
1 parent e4c3643 commit 7a7f377
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 7 deletions.
File renamed without changes.
32 changes: 32 additions & 0 deletions common/profiles/perlless.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# WARNING: If you enable this profile, you will NOT be able to switch to a new
# configuration and thus you will not be able to rebuild your system with
# nixos-rebuild!

{ lib, ... }:

{

# Disable switching to a new configuration. This is not a necessary
# limitation of a perlless system but just a current one. In the future,
# perlless switching might be possible.
system.switch.enable = lib.mkDefault false;

# Remove perl from activation
boot.initrd.systemd.enable = lib.mkDefault true;
system.etc.overlay.enable = lib.mkDefault true;
systemd.sysusers.enable = lib.mkDefault true;

# Random perl remnants
system.disableInstallerTools = lib.mkDefault true;
programs.less.lessopen = lib.mkDefault null;
programs.command-not-found.enable = lib.mkDefault false;
boot.enableContainers = lib.mkDefault false;
environment.defaultPackages = lib.mkDefault [ ];
documentation.info.enable = lib.mkDefault false;

# Check that the system does not contain a Nix store path that contains the
# string "perl".
#FIXME https://github.com/ryantm/agenix/issues/238
#system.forbiddenDependenciesRegexes = ["perl"];

}
10 changes: 4 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,8 @@
impermanence.nixosModules.impermanence
nixos-sbc.nixosModules.default
nixos-sbc.nixosModules.boards.bananapi.bpir4
(nixpkgs.outPath + "/nixos/modules/profiles/headless.nix")
(nixpkgs.outPath + "/nixos/modules/profiles/perlless.nix")
./common/minimal.nix
./common/profiles/minimal.nix
./common/profiles/perlless.nix
./hosts/router
];
system = "aarch64-linux";
Expand All @@ -205,9 +204,8 @@
impermanence.nixosModules.impermanence
nixos-sbc.nixosModules.default
nixos-sbc.nixosModules.boards.raspberrypi.rpi4
(nixpkgs.outPath + "/nixos/modules/profiles/headless.nix")
(nixpkgs.outPath + "/nixos/modules/profiles/perlless.nix")
./common/minimal.nix
./common/profiles/minimal.nix
./common/profiles/perlless.nix
./hosts/nas
];
system = "aarch64-linux";
Expand Down
3 changes: 3 additions & 0 deletions hosts/nas/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
};
};

systemd.sysusers.enable = false; #FIXME https://github.com/ryantm/agenix/issues/238


services.openssh.enable = true;

nixarr = {
Expand Down
3 changes: 2 additions & 1 deletion hosts/router/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
./hardware.nix
];

system.etc.overlay.enable = lib.mkForce false;
system.etc.overlay.enable = lib.mkForce false; #FIXME erofs not available on vendor kernel
systemd.sysusers.enable = false; #FIXME https://github.com/ryantm/agenix/issues/238
boot.initrd.systemd.enable = lib.mkForce false;

topology.self = {
Expand Down

0 comments on commit 7a7f377

Please sign in to comment.