update installation script

This commit is contained in:
Dmitriy Kholkin 2023-01-26 00:09:21 +03:00
parent c00991e348
commit 99fff40577
9 changed files with 14 additions and 11 deletions

View File

@ -19,6 +19,7 @@ ITER_TIME=2000
PERSIST_MODULE=true PERSIST_MODULE=true
PERSIST_ROOT=/persistent PERSIST_ROOT=/persistent
MAINUSER_NAME=alukard MAINUSER_NAME=alukard
ASHIFT=13
if [[ "$IS_VM" = true ]]; then if [[ "$IS_VM" = true ]]; then
DISK_DEV_NODES="/dev/disk/by-path" DISK_DEV_NODES="/dev/disk/by-path"
@ -128,7 +129,7 @@ fi
pprint "Create ZFS root pool on $ROOT_POOL" pprint "Create ZFS root pool on $ROOT_POOL"
zpool create \ zpool create \
-f \ -f \
-o ashift=12 \ -o ashift=$ASHIFT \
-o autotrim=on \ -o autotrim=on \
-O acltype=posixacl \ -O acltype=posixacl \
-O atime=on \ -O atime=on \
@ -167,6 +168,8 @@ zfs create -o canmount=on -o mountpoint=/nix rpool/persistent/nix
zfs create -o canmount=on -o mountpoint=/var/log rpool/persistent/log zfs create -o canmount=on -o mountpoint=/var/log rpool/persistent/log
zfs create -o canmount=noauto -o atime=off rpool/persistent/lxd zfs create -o canmount=noauto -o atime=off rpool/persistent/lxd
zfs create -o canmount=on -o mountpoint=/var/lib/docker -o atime=off rpool/persistent/docker zfs create -o canmount=on -o mountpoint=/var/lib/docker -o atime=off rpool/persistent/docker
zfs create -o canmount=on -o mountpoint=/var/lib/podman -o atime=off rpool/persistent/podman
zfs create -o canmount=on -o mountpoint=/var/lib/nixos-containers -o atime=off rpool/persistent/nixos-containers
zfs create -o canmount=on -o mountpoint=/media/bittorrent -o atime=off -o recordsize=256K rpool/persistent/bittorrent zfs create -o canmount=on -o mountpoint=/media/bittorrent -o atime=off -o recordsize=256K rpool/persistent/bittorrent
zfs create -o canmount=on -o mountpoint=/media/libvirt -o atime=off -o recordsize=64K rpool/persistent/libvirt zfs create -o canmount=on -o mountpoint=/media/libvirt -o atime=off -o recordsize=64K rpool/persistent/libvirt
@ -191,7 +194,7 @@ pprint "Create ZFS boot pool on $BOOT_POOL"
zpool create \ zpool create \
-f \ -f \
-o compatibility=grub2 \ -o compatibility=grub2 \
-o ashift=12 \ -o ashift=$ASHIFT \
-o autotrim=on \ -o autotrim=on \
-O acltype=posixacl \ -O acltype=posixacl \
-O atime=on \ -O atime=on \

View File

@ -7,7 +7,7 @@
nixosProfiles.a2ln-server nixosProfiles.a2ln-server
nixosProfiles.sunshine nixosProfiles.sunshine
# nixosModules.passthrough # customModules.passthrough
]; ];
deviceSpecific.devInfo = { deviceSpecific.devInfo = {

View File

@ -1,5 +1,5 @@
{ inputs, config, pkgs, ... }: { { inputs, config, pkgs, ... }: {
imports = with inputs.self.nixosModules; [ imports = with inputs.self.customModules; [
./hardware-configuration.nix ./hardware-configuration.nix
inputs.self.nixosRoles.desktop inputs.self.nixosRoles.desktop
]; ];

View File

@ -1,5 +1,5 @@
{ inputs, lib, ... }: { { inputs, lib, config, ... }: {
imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [ imports = with inputs.self.customModules; with inputs.self.nixosProfiles; [
./hardware-configuration.nix ./hardware-configuration.nix
inputs.self.nixosRoles.container inputs.self.nixosRoles.container

View File

@ -1,3 +1,3 @@
{ config, lib, pkgs, modulesPath, ... }: { { config, lib, pkgs, modulesPath, ... }: {
imports = [ (modulesPath + "/virtualisation/lxc-container.nix") ]; imports = [ "${toString modulesPath}/virtualisation/lxc-container.nix" ];
} }

View File

@ -1,5 +1,5 @@
{ inputs, ... }: { { inputs, ... }: {
imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [ imports = with inputs.self.customModules; with inputs.self.nixosProfiles; [
inputs.home-manager.nixosModules.home-manager { inputs.home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;

View File

@ -1,5 +1,5 @@
{ inputs, pkgs, ... }: { { inputs, pkgs, ... }: {
imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [ imports = with inputs.self.customModules; with inputs.self.nixosProfiles; [
inputs.home-manager.nixosModules.home-manager { inputs.home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;

View File

@ -1,5 +1,5 @@
{ inputs, ... }: { { inputs, ... }: {
imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [ imports = with inputs.self.customModules; with inputs.self.nixosProfiles; [
./base.nix ./base.nix
inputs.base16.hmModule inputs.base16.hmModule

View File

@ -1,5 +1,5 @@
{ inputs, pkgs, ... }: { { inputs, pkgs, ... }: {
imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [ imports = with inputs.self.customModules; with inputs.self.nixosProfiles; [
inputs.home-manager.nixosModules.home-manager { inputs.home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;