Add scripts for installing btrfs

This commit is contained in:
Manuel Thalmann 2024-12-07 21:14:36 +01:00
parent cd83727d54
commit 4dfeb4f26a
5 changed files with 36 additions and 0 deletions

View file

@ -91,6 +91,7 @@ let
in in
{ {
imports = [ imports = [
./programs/btrfs.nix
./programs/docker.nix ./programs/docker.nix
./programs/git.nix ./programs/git.nix
./programs/nextcloud.nix ./programs/nextcloud.nix

View file

@ -0,0 +1,14 @@
{ lib, ... }:
let
inherit (lib) mkEnableOption;
in
{
options = {
valhalla = {
linux.programs.btrfs = {
enable = mkEnableOption "btrfs tools";
pools = mkEnableOption "btrfs pool support in bootloaders";
};
};
};
}

View file

@ -91,6 +91,7 @@ begin
and echo (getOSConfig hostname) | arch-chroot "$mountDir" tee /etc/hostname >/dev/null and echo (getOSConfig hostname) | arch-chroot "$mountDir" tee /etc/hostname >/dev/null
and runInOS fish "$tempDir/../Software/btrfs/main.fish"
and arch-chroot "$mountDir" mkinitcpio -P and arch-chroot "$mountDir" mkinitcpio -P
and runInOS fish "$tempDir/../Software/grub/main.fish" and runInOS fish "$tempDir/../Software/grub/main.fish"

View file

@ -0,0 +1,19 @@
#!/bin/env fish
begin
set -l dir (status dirname)
source "$dir/../../lib/software.fish"
function installSW
pacinst btrfs-progs
end
function configureSW -V dir
source "$dir/../../../lib/settings.fish"
if isOSEnabled "programs.btrfs.pools"
echo "HOOKS+=(btrfs)" | sudo tee /etc/mkinitcpio.conf.d/btrfs.conf >/dev/null
end
end
runInstaller $argv
end

View file

@ -71,6 +71,7 @@ function deploySoftware -d "Deploys a the specified software action" -a action
end end
and source "$dir/../../Common/Software/bash/main.fish" $argv and source "$dir/../../Common/Software/bash/main.fish" $argv
and source "$dir/../Software/btrfs/main.fish" $argv
and source "$dir/../../Common/Software/nuke-usb/main.fish" $argv and source "$dir/../../Common/Software/nuke-usb/main.fish" $argv
and source "$dir/../Software/sudo/main.fish" $argv and source "$dir/../Software/sudo/main.fish" $argv
and source "$dir/../Software/aliae/main.fish" $argv and source "$dir/../Software/aliae/main.fish" $argv