update install files

This commit is contained in:
Richard Mauer 2024-12-29 22:57:02 -05:00
parent 9063a288b2
commit ac56b53f15
2 changed files with 19 additions and 6 deletions

View File

@ -3,6 +3,12 @@
#disko = pkgs.callPackage ../pkgs/disko/package.nix {}; #disko = pkgs.callPackage ../pkgs/disko/package.nix {};
#disko = "github:nix-community/disko" #disko = "github:nix-community/disko"
#in #in
let
installFiles = pkgs.runCommand "install-files" {} ''
mkdir -p $out
cp -rv ${./config/initrd-include}/* $out/
'';
in
{ {
imports = [ imports = [
../quickly.nix ../quickly.nix
@ -20,6 +26,11 @@
htop htop
tree tree
]; ];
};
boot.initrd = {
extraFiles = {
"install".source = installFiles;
};
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
@ -28,6 +39,7 @@
coreutils-full coreutils-full
nixos-install nixos-install
nettools nettools
installFiles
]; ];
}; };

View File

@ -41,12 +41,13 @@ in
boot.initrd = { boot.initrd = {
# Alternatively, you can include entire directories # Alternatively, you can include entire directories
extraFiles = { # commenting out to test this inside the base config
"install".source = pkgs.runCommand "install-files" {} '' #extraFiles = {
mkdir -p $out # "install".source = pkgs.runCommand "install-files" {} ''
cp -r ${./config/initrd-include}/* $out/ # mkdir -p $out
''; # cp -r ${./config/initrd-include}/* $out/
}; #'';
#};
postMountCommands = '' postMountCommands = ''
echo "Mounting initial store" echo "Mounting initial store"