stuff
This commit is contained in:
@@ -116,6 +116,18 @@ in
|
||||
done
|
||||
nix shell "''${new_args[@]}"
|
||||
'')
|
||||
(script "nixview" ''
|
||||
svl_min_args $# 1
|
||||
view_cmd="$1"
|
||||
shift
|
||||
d="$(mktemp -d --suffix=vacu-nixview)"
|
||||
l="$d/out"
|
||||
nix build --out-link "$l" "$@"
|
||||
"$view_cmd" $l
|
||||
rm -r "$d"
|
||||
'')
|
||||
(simple "nixcat" [ "nixview" "cat" ])
|
||||
(simple "nixless" [ "nixview" "less" ])
|
||||
(simple "sc" [ systemctl ])
|
||||
(simple "scs" [
|
||||
systemctl
|
||||
|
@@ -10,7 +10,6 @@ let
|
||||
g = m * 1000;
|
||||
t = g * 1000;
|
||||
ki = 1024;
|
||||
_8ki = 8 * ki;
|
||||
safe_size = size:
|
||||
lib.pipe size [
|
||||
(n: n * 0.99) # leave 1% unused
|
||||
@@ -38,29 +37,6 @@ let
|
||||
}
|
||||
) slabsMin;
|
||||
slapParts = lib.mapAttrs (_: v: v.partitionConfig) slabs;
|
||||
# slabs = {
|
||||
# _8 = rec {
|
||||
# idx = 0;
|
||||
# letter = "slabA";
|
||||
# size_bytes = safe_size (8 * t);
|
||||
# size_ki = size_bytes / ki;
|
||||
# };
|
||||
# _2 = rec {
|
||||
# idx = 1;
|
||||
# letter = "slabB";
|
||||
# size_bytes = safe_size (2 * t);
|
||||
# size_ki = size_bytes / ki;
|
||||
# };
|
||||
# _4 = rec {
|
||||
# idx = 2;
|
||||
# letter = "slabC";
|
||||
# size_bytes = safe_size (4 * t);
|
||||
# size_ki = size_bytes / ki;
|
||||
# };
|
||||
# };
|
||||
# slab_size_8t = safe_size (8 * t);
|
||||
# slab_size_2t = safe_size (2 * t);
|
||||
# slab_size_4t = safe_size (4 * t);
|
||||
path_prefix = "/dev/disk/by-id/";
|
||||
# 8TB
|
||||
seagate_1 = "ata-ST8000DM004-2U9188_ZR115511";
|
||||
@@ -120,29 +96,6 @@ let
|
||||
};
|
||||
}) drives)
|
||||
;
|
||||
|
||||
# each 14TB
|
||||
# easystore_14_configs = lib.pipe easystores_14 [
|
||||
# (map (name: {
|
||||
# name = "easystore14_${lib.last (lib.splitString "_" name)}";
|
||||
# value = {
|
||||
# type = "disk";
|
||||
# device = path_prefix + name;
|
||||
# content = {
|
||||
# type = "gpt";
|
||||
# partitions.main = {
|
||||
# size = "${builtins.toString vdev_size_ki}K";
|
||||
# type = fs_type_zfs;
|
||||
# content = {
|
||||
# type = "zfs";
|
||||
# pool = poolname;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# }))
|
||||
# builtins.listToAttrs
|
||||
# ];
|
||||
in
|
||||
{
|
||||
imports = [ inputs.disko.nixosModules.default ];
|
||||
@@ -201,7 +154,6 @@ in
|
||||
redundant_metadata = "most";
|
||||
xattr = "sa";
|
||||
};
|
||||
# mode = "raidz3";
|
||||
mode = {
|
||||
type = "topology";
|
||||
vdev = [
|
||||
|
Reference in New Issue
Block a user