mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 17:17:22 +01:00
refactor: split common/nixos.nix and -/home.nix
Split these big files into modular files that are easier to share and read on their own.
This commit is contained in:
parent
fc011501c0
commit
5acbfe0edd
77 changed files with 6763 additions and 6353 deletions
56
profiles/sandbox/disk-config.nix
Normal file
56
profiles/sandbox/disk-config.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# Example to create a bios compatible gpt partition
|
||||
{ lib, ... }:
|
||||
{
|
||||
disko.devices = {
|
||||
disk.disk1 = {
|
||||
device = lib.mkDefault "/dev/sda";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
esp = {
|
||||
name = "ESP";
|
||||
size = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
name = "root";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "pool";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = {
|
||||
pool = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "100%FREE";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -15,10 +15,10 @@
|
|||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/147e3682-eb15-4e96-9cac-4f2fb5888a69";
|
||||
fsType = "ext4";
|
||||
};
|
||||
# fileSystems."/" = {
|
||||
# device = "/dev/disk/by-uuid/147e3682-eb15-4e96-9cac-4f2fb5888a69";
|
||||
# fsType = "ext4";
|
||||
# };
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
|
|
|
|||
|
|
@ -8,18 +8,21 @@ in
|
|||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
useOSProber = true;
|
||||
supportedFilesystems = [ "zfs" ];
|
||||
boot = {
|
||||
zfs.forceImportRoot = false;
|
||||
supportedFilesystems = [ "zfs" ];
|
||||
kernelModules = [ "tun" ];
|
||||
kernel.sysctl = {
|
||||
"net.ipv4.conf.all.rp_filter" = 2;
|
||||
"net.ipv4.conf.default.rp_filter" = 2;
|
||||
"net.ipv4.conf.enp7s0.rp_filter" = 2;
|
||||
};
|
||||
|
||||
loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
useOSProber = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
|
|
@ -38,19 +41,19 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
hardware.enableAllFirmware = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
sound = {
|
||||
enable = true;
|
||||
hardware = {
|
||||
enableAllFirmware = true;
|
||||
graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
users = {
|
||||
|
|
@ -266,9 +269,9 @@ in
|
|||
};
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
xserver.xkb = {
|
||||
layout = "us";
|
||||
xkbVariant = "altgr-intl";
|
||||
variant = "altgr-intl";
|
||||
};
|
||||
|
||||
openssh = {
|
||||
|
|
@ -390,7 +393,7 @@ in
|
|||
kavita = {
|
||||
enable = true;
|
||||
user = "kavita";
|
||||
port = 8080;
|
||||
settings.port = 8080;
|
||||
tokenKeyFile = config.sops.secrets.kavita.path;
|
||||
};
|
||||
|
||||
|
|
@ -804,7 +807,7 @@ in
|
|||
publish.enable = true;
|
||||
publish.userServices = true;
|
||||
# ^^ Needed to allow samba to automatically register mDNS records without the need for an `extraServiceFile`
|
||||
nssmdns = true;
|
||||
nssmdns4 = true;
|
||||
# ^^ Not one hundred percent sure if this is needed- if it aint broke, don't fix it
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue