feat: Added lvm volume for sata ssds
This commit is contained in:
3
Makefile
3
Makefile
@@ -5,6 +5,9 @@ default: just
|
|||||||
just:
|
just:
|
||||||
just
|
just
|
||||||
|
|
||||||
|
build:
|
||||||
|
sudo nixos-rebuild build --flake . --show-trace
|
||||||
|
|
||||||
local:
|
local:
|
||||||
just local
|
just local
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,10 @@
|
|||||||
extraGroups = ["wheel" "docker" "media"];
|
extraGroups = ["wheel" "docker" "media"];
|
||||||
openssh.authorizedKeys.keyFiles = [../../secrets/id_ed25519.pub];
|
openssh.authorizedKeys.keyFiles = [../../secrets/id_ed25519.pub];
|
||||||
};
|
};
|
||||||
|
users.users.remotebuilder = {
|
||||||
|
isNormalUser = true;
|
||||||
|
openssh.authorizedKeys.keyFiles = [../../secrets/remotebuilder.pub];
|
||||||
|
};
|
||||||
users.groups.media = {};
|
users.groups.media = {};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
libglvnd
|
libglvnd
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
gnome-disks.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.NetworkManager-wait-online.enable = lib.mkForce false;
|
systemd.services.NetworkManager-wait-online.enable = lib.mkForce false;
|
||||||
@@ -61,24 +62,25 @@
|
|||||||
options = "--delete-older-than +5";
|
options = "--delete-older-than +5";
|
||||||
};
|
};
|
||||||
package = pkgs.nixVersions.latest;
|
package = pkgs.nixVersions.latest;
|
||||||
buildMachines = [
|
# buildMachines = [
|
||||||
{
|
# {
|
||||||
hostName = "sh.darksailor.dev";
|
# hostName = "sh.darksailor.dev";
|
||||||
sshUser = "fs0c131y";
|
# sshUser = "nixbuilder";
|
||||||
system = "x86_64-linux";
|
# system = "x86_64-linux";
|
||||||
protocol = "ssh-ng";
|
# protocol = "ssh-ng";
|
||||||
supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
# supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
||||||
}
|
# }
|
||||||
];
|
# ];
|
||||||
distributedBuilds = true;
|
distributedBuilds = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.servius = {
|
users.users.servius = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["networkmanager" "wheel" "audio" "i2c"];
|
extraGroups = ["wheel" "audio" "i2c" "media"];
|
||||||
openssh.authorizedKeys.keyFiles = [../../secrets/id_ed25519.pub];
|
openssh.authorizedKeys.keyFiles = [../../secrets/id_ed25519.pub];
|
||||||
};
|
};
|
||||||
users.groups.i2c = {};
|
users.groups.i2c = {};
|
||||||
|
users.groups.media = {};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
tailscale = {
|
tailscale = {
|
||||||
@@ -109,7 +111,6 @@
|
|||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
xserver.xkb = {
|
xserver.xkb = {
|
||||||
@@ -193,6 +194,9 @@
|
|||||||
# proxy.default = "http://user:password@proxy:port/";
|
# proxy.default = "http://user:password@proxy:port/";
|
||||||
# proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
# proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# useDHCP = true;
|
||||||
|
|
||||||
|
hostId = "1349f9f0";
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
|
|
||||||
@@ -250,8 +254,7 @@
|
|||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
systemPackages = with pkgs; [
|
systemPackages = with pkgs; [
|
||||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
quickemu
|
||||||
# wget
|
|
||||||
(nixvim.makeNixvim (import ../../neovim))
|
(nixvim.makeNixvim (import ../../neovim))
|
||||||
qpwgraph
|
qpwgraph
|
||||||
hyprland
|
hyprland
|
||||||
|
|||||||
54
nixos/ryu/disk-config.nix
Normal file
54
nixos/ryu/disk-config.nix
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{...}: {
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
a = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/sda";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
primary = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "lvm_pv";
|
||||||
|
vg = "pool";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
b = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/sdb";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
primary = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "lvm_pv";
|
||||||
|
vg = "pool";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lvm_vg = {
|
||||||
|
pool = {
|
||||||
|
type = "lvm_vg";
|
||||||
|
lvs = {
|
||||||
|
media = {
|
||||||
|
size = "100%";
|
||||||
|
lvm_type = "raid0";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/media";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -8,7 +8,10 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
# ./disk-config.nix
|
||||||
|
];
|
||||||
|
|
||||||
hardware.graphics = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -71,8 +74,15 @@
|
|||||||
|
|
||||||
boot.initrd.availableKernelModules = ["vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
boot.initrd.availableKernelModules = ["vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||||
boot.initrd.kernelModules = ["nvidia" "nvidia_modeset" "nvidia_drm"];
|
boot.initrd.kernelModules = ["nvidia" "nvidia_modeset" "nvidia_drm"];
|
||||||
boot.kernelModules = ["kvm-intel" "i2c-dev"];
|
boot.kernelModules = [
|
||||||
|
# "vfio_pci"
|
||||||
|
# "vfio"
|
||||||
|
|
||||||
|
"kvm-intel"
|
||||||
|
"i2c-dev"
|
||||||
|
];
|
||||||
boot.extraModulePackages = [];
|
boot.extraModulePackages = [];
|
||||||
|
boot.kernelParams = ["intel_iommu=on"];
|
||||||
# services.udev.packages = [pkgs.yubikey-personalization pkgs.yubikey-personalization-gui pkgs.via];
|
# services.udev.packages = [pkgs.yubikey-personalization pkgs.yubikey-personalization-gui pkgs.via];
|
||||||
services.udev.packages = [pkgs.via];
|
services.udev.packages = [pkgs.via];
|
||||||
services.yubikey-agent.enable = true;
|
services.yubikey-agent.enable = true;
|
||||||
@@ -102,6 +112,18 @@
|
|||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/media" = {
|
||||||
|
device = "/dev/storage/media";
|
||||||
|
fsType = "ext4";
|
||||||
|
options = ["users" "nofail"];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/games" = {
|
||||||
|
device = "/dev/storage/games";
|
||||||
|
fsType = "ext4";
|
||||||
|
options = ["users" "nofail"];
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices = [];
|
swapDevices = [];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
|||||||
Reference in New Issue
Block a user