Add scripts for installing btrfs
This commit is contained in:
parent
cd83727d54
commit
4dfeb4f26a
5 changed files with 36 additions and 0 deletions
|
@ -91,6 +91,7 @@ let
|
|||
in
|
||||
{
|
||||
imports = [
|
||||
./programs/btrfs.nix
|
||||
./programs/docker.nix
|
||||
./programs/git.nix
|
||||
./programs/nextcloud.nix
|
||||
|
|
14
lib/modules/programs/btrfs.nix
Normal file
14
lib/modules/programs/btrfs.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -91,6 +91,7 @@ begin
|
|||
|
||||
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 runInOS fish "$tempDir/../Software/grub/main.fish"
|
||||
|
||||
|
|
19
scripts/Arch/Software/btrfs/main.fish
Executable file
19
scripts/Arch/Software/btrfs/main.fish
Executable 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
|
|
@ -71,6 +71,7 @@ function deploySoftware -d "Deploys a the specified software action" -a action
|
|||
end
|
||||
|
||||
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/../Software/sudo/main.fish" $argv
|
||||
and source "$dir/../Software/aliae/main.fish" $argv
|
||||
|
|
Loading…
Reference in a new issue