add /etc/current-system-packages
to vms
This commit is contained in:
parent
0721f6edfa
commit
a8584b2f23
1 changed files with 10 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
@ -21,5 +21,14 @@
|
|||
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
# Add /etc/current-system-packages
|
||||
environment.etc."current-system-packages".text =
|
||||
let
|
||||
packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
|
||||
sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages);
|
||||
formatted = builtins.concatStringsSep "\n" sortedUnique;
|
||||
in
|
||||
formatted;
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue