Skip to content

Commit

Permalink
chore: remove container + kolyma-4 to disko
Browse files Browse the repository at this point in the history
  • Loading branch information
orzklv committed Dec 1, 2024
1 parent 320ffa0 commit 12cdf37
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 31 deletions.
112 changes: 112 additions & 0 deletions nixos/kolyma-4/disk-configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
disko.devices = {
disk = {
nvme0n1 = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
BOOT = {
size = "1M";
type = "EF02";
priority = 1;
};
ESP = {
size = "500M";
type = "EF00";
priority = 2;
content = {
type = "mdraid";
name = "boot";
};
};
SWAP = {
size = "130G";
content = {
type = "mdraid";
name = "swap";
};
};
ROOT = {
size = "100%";
content = {
type = "mdraid";
name = "root";
};
};
};
};
};
nvme1n1 = {
type = "disk";
device = "/dev/nvme1n1";
content = {
type = "gpt";
partitions = {
BOOT = {
size = "1M";
type = "EF02";
};
ESP = {
size = "500M";
type = "EF00";
content = {
type = "mdraid";
name = "boot";
};
};
SWAP = {
size = "130G";
content = {
type = "mdraid";
name = "swap";
};
};
ROOT = {
size = "100%";
content = {
type = "mdraid";
name = "root";
};
};
};
};
};
};
mdadm = {
root = {
type = "mdadm";
level = 1;
content = {
type = "gpt";
partitions.primary = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
boot = {
type = "mdadm";
level = 1;
metadata = "1.0";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
swap = {
type = "mdadm";
level = 1;
content = {
type = "swap";
};
};
};
};
}
26 changes: 9 additions & 17 deletions nixos/kolyma-4/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
{
inputs,
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
imports = [
# Disko partitioning
inputs.disko.nixosModules.disko
./disk-configuration.nix

# Not available hardware modules
(modulesPath + "/installer/scan/not-detected.nix")
];

boot.initrd.availableKernelModules = [
"xhci_pci"
Expand All @@ -28,22 +36,6 @@
];
};

fileSystems."/" = {
device = "/dev/disk/by-uuid/76f237de-5eb6-4241-894e-d024a29685c8";
fsType = "ext4";
};

fileSystems."/boot" = {
device = "/dev/disk/by-uuid/852A-FFFC";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};

swapDevices = [ { device = "/dev/disk/by-uuid/82953896-b081-4cc7-ad7b-c82c12a076ef"; } ];

network = {
enable = true;

Expand Down
1 change: 1 addition & 0 deletions nixos/kolyma-5/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
inputs.disko.nixosModules.disko
./disk-configuration.nix

# Not available hardware modules
(modulesPath + "/installer/scan/not-detected.nix")
];

Expand Down
11 changes: 0 additions & 11 deletions nixos/kolyma-5/services/container.nix

This file was deleted.

3 changes: 0 additions & 3 deletions nixos/kolyma-5/services/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
# Bind nameserver service for hosting personal domains
./bind.nix

# List of docker instances hosted in this machine
./container.nix

# Web server & proxy virtual hosts via caddy
./www.nix
];
Expand Down

0 comments on commit 12cdf37

Please sign in to comment.