Reformatted with nixfmt
This commit is contained in:
parent
f51256c3ae
commit
3f16537322
80 changed files with 1454 additions and 992 deletions
|
@ -4,7 +4,8 @@
|
|||
inputs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
|
||||
|
@ -15,8 +16,7 @@
|
|||
# See here: https://github.com/NixOS/nixpkgs/issues/109280#issuecomment-973636212
|
||||
nixpkgs.overlays = [
|
||||
(final: super: {
|
||||
makeModulesClosure = x:
|
||||
super.makeModulesClosure (x // {allowMissing = true;});
|
||||
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
|
||||
})
|
||||
];
|
||||
|
||||
|
@ -57,7 +57,10 @@
|
|||
hostName = "pi4";
|
||||
useDHCP = false;
|
||||
defaultGateway = "192.168.113.1";
|
||||
nameservers = ["192.168.113.13" "1.1.1.1"];
|
||||
nameservers = [
|
||||
"192.168.113.13"
|
||||
"1.1.1.1"
|
||||
];
|
||||
interfaces.end0.ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.113.42";
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
aa = {
|
||||
nix.enable = true;
|
||||
|
||||
|
|
|
@ -7,104 +7,151 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "rpool_/nixos/ROOT/default";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
options = [
|
||||
"zfsutil"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "bpool_/nixos/BOOT/default";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
options = [
|
||||
"zfsutil"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "rpool_/nixos/DATA/default/home";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
options = [
|
||||
"zfsutil"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/root" = {
|
||||
device = "rpool_/nixos/DATA/default/root";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
options = [
|
||||
"zfsutil"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/srv" = {
|
||||
device = "rpool_/nixos/DATA/default/srv";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
options = [
|
||||
"zfsutil"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/usr/local" = {
|
||||
device = "rpool_/nixos/DATA/default/usr/local";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
options = [
|
||||
"zfsutil"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/var/log" = {
|
||||
device = "rpool_/nixos/DATA/default/var/log";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
options = [
|
||||
"zfsutil"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/var/spool" = {
|
||||
device = "rpool_/nixos/DATA/default/var/spool";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
options = [
|
||||
"zfsutil"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "rpool_/nixos/DATA/local/nix";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
options = [
|
||||
"zfsutil"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/state" = {
|
||||
device = "rpool_/nixos/DATA/default/state";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
options = [
|
||||
"zfsutil"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/etc/nixos" = {
|
||||
device = "/state/etc/nixos";
|
||||
fsType = "none";
|
||||
options = ["bind"];
|
||||
options = [ "bind" ];
|
||||
};
|
||||
|
||||
fileSystems."/etc/cryptkey.d" = {
|
||||
device = "/state/etc/cryptkey.d";
|
||||
fsType = "none";
|
||||
options = ["bind"];
|
||||
options = [ "bind" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot/efis/nvme-SAMSUNG_MZVLW256HEHP-000L7_S35ENX1K539085-part1" = {
|
||||
device = "/dev/disk/by-uuid/F429-235F";
|
||||
fsType = "vfat";
|
||||
options = ["x-systemd.idle-timeout=1min" "x-systemd.automount" "noauto"];
|
||||
options = [
|
||||
"x-systemd.idle-timeout=1min"
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/boot/efis/nvme-WDC_PC_SN520_SDAPTUW-512G_182747800010-part1" = {
|
||||
device = "/dev/disk/by-uuid/F429-AB41";
|
||||
fsType = "vfat";
|
||||
options = ["x-systemd.idle-timeout=1min" "x-systemd.automount" "noauto"];
|
||||
options = [
|
||||
"x-systemd.idle-timeout=1min"
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/docker" = {
|
||||
device = "rpool_/nixos/DATA/default/var/lib/docker";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
options = [
|
||||
"zfsutil"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
boot.supportedFilesystems = ["zfs"];
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
networking.hostId = "b2d25606";
|
||||
boot.zfs.devNodes = "/dev/disk/by-id";
|
||||
swapDevices = [
|
||||
|
|
|
@ -2,11 +2,13 @@
|
|||
inputs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
domain = "git.alejandr0angul0.dev";
|
||||
secrets = config.age.secrets;
|
||||
in {
|
||||
imports = ["${inputs.nixpkgs}/nixos/modules/virtualisation/digital-ocean-config.nix"];
|
||||
in
|
||||
{
|
||||
imports = [ "${inputs.nixpkgs}/nixos/modules/virtualisation/digital-ocean-config.nix" ];
|
||||
|
||||
age.secrets.authKeyFile.file = ../../../secrets/tailscale_git_server.age;
|
||||
|
||||
|
@ -38,7 +40,7 @@ in {
|
|||
|
||||
services.tailscale = {
|
||||
authKeyFile = secrets.authKeyFile.path;
|
||||
extraUpFlags = ["--ssh"];
|
||||
extraUpFlags = [ "--ssh" ];
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
|
|
|
@ -6,37 +6,57 @@
|
|||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "rpool/nixos/root";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
options = [
|
||||
"zfsutil"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "rpool/nixos/home";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
options = [
|
||||
"zfsutil"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib" = {
|
||||
device = "rpool/nixos/var/lib";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
options = [
|
||||
"zfsutil"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/var/log" = {
|
||||
device = "rpool/nixos/var/log";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil" "X-mount.mkdir"];
|
||||
options = [
|
||||
"zfsutil"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
|
@ -44,7 +64,7 @@
|
|||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{...}: {
|
||||
boot.supportedFilesystems = ["zfs"];
|
||||
{ ... }:
|
||||
{
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
networking.hostId = "f8616592";
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
|
|
@ -7,15 +7,23 @@
|
|||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NIXROOT";
|
||||
|
@ -27,7 +35,7 @@
|
|||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
boot.supportedFilesystems = ["zfs"];
|
||||
boot.zfs.extraPools = ["tank"];
|
||||
}:
|
||||
{
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
boot.zfs.extraPools = [ "tank" ];
|
||||
networking.hostId = "db616c9e";
|
||||
}
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
virtualisation.qemu.options = ["-vga qxl"];
|
||||
with lib;
|
||||
{
|
||||
virtualisation.qemu.options = [ "-vga qxl" ];
|
||||
|
||||
# For sway to work with home manager
|
||||
security.polkit.enable = true;
|
||||
|
@ -23,7 +24,7 @@ with lib; {
|
|||
|
||||
users.users.virt = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel"];
|
||||
extraGroups = [ "wheel" ];
|
||||
hashedPassword = "$6$nOlwKVf1u0Wt//zU$43xhafbe2CAWTjOemAUm1J1Dpw7to0ZTbGhFk7CkVTRB3E80a1lhhQ175VnkcJ/X1HI6lsyV8fNMc3GF7JTAP0";
|
||||
};
|
||||
|
||||
|
@ -31,6 +32,8 @@ with lib; {
|
|||
systemPackages = with pkgs; [
|
||||
wayland-utils
|
||||
];
|
||||
variables = {"WLR_RENDERER_ALLOW_SOFTWARE" = "1";};
|
||||
variables = {
|
||||
"WLR_RENDERER_ALLOW_SOFTWARE" = "1";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue