tsuki: move hardware config to configuration file
This commit is contained in:
parent
7a0fcf7805
commit
a82a3f95c0
|
@ -1,8 +1,7 @@
|
||||||
{ secrets, ... }:
|
{ config, lib, secrets, modulesPath, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
./extra-hardware-configuration.nix
|
|
||||||
|
|
||||||
# ./services/calibre.nix
|
# ./services/calibre.nix
|
||||||
./services/gitea
|
./services/gitea
|
||||||
|
@ -51,19 +50,6 @@
|
||||||
|
|
||||||
# security.pam.services.login.unixAuth = true;
|
# security.pam.services.login.unixAuth = true;
|
||||||
|
|
||||||
boot.loader = {
|
|
||||||
grub = {
|
|
||||||
enable = true;
|
|
||||||
version = 2;
|
|
||||||
efiSupport = true;
|
|
||||||
fsIdentifier = "label";
|
|
||||||
device = "nodev";
|
|
||||||
efiInstallAsRemovable = true;
|
|
||||||
};
|
|
||||||
# efi.efiSysMountPoint = "/boot/efi";
|
|
||||||
# efi.canTouchEfiVariables = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "Tsuki";
|
hostName = "Tsuki";
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
|
@ -98,11 +84,68 @@
|
||||||
};
|
};
|
||||||
groups = {
|
groups = {
|
||||||
media = {};
|
media = {};
|
||||||
nix-builder = {};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sops.secrets."drives/cirno/credentials" = {};
|
||||||
|
|
||||||
|
fileSystems = let
|
||||||
|
nfsDrive = drivename: {
|
||||||
|
device = "10.0.0.36:/mnt/PoolsClosed/${drivename}";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [ "vers=3" "local_lock=all" ];
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
"/" = {
|
||||||
|
device = "/dev/disk/by-uuid/54b9fd58-0df5-410c-ab87-766860967653";
|
||||||
|
fsType = "btrfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/0A60-2885";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/data2/backup" = nfsDrive "backup";
|
||||||
|
"/data2/momiji" = nfsDrive "momiji";
|
||||||
|
"/data2/media" = nfsDrive "media";
|
||||||
|
"/data2/postgres" = nfsDrive "postgres";
|
||||||
|
"/data2/home" = nfsDrive "home";
|
||||||
|
|
||||||
|
"/data2/cirno" = {
|
||||||
|
device = "//10.0.0.36/cirno";
|
||||||
|
fsType = "cifs";
|
||||||
|
options = [
|
||||||
|
"vers=3.0"
|
||||||
|
"cred=${config.sops.secrets."drives/cirno/credentials".path}"
|
||||||
|
"rw"
|
||||||
|
"uid=1000"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [{ device = "/dev/disk/by-uuid/92a1a33f-89a8-45de-a45e-6c303172cd7f"; }];
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
docker.enable = true;
|
docker.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||||
|
initrd.kernelModules = [ ];
|
||||||
|
kernelModules = [ ];
|
||||||
|
extraModulePackages = [ ];
|
||||||
|
loader = {
|
||||||
|
grub = {
|
||||||
|
enable = true;
|
||||||
|
version = 2;
|
||||||
|
efiSupport = true;
|
||||||
|
fsIdentifier = "label";
|
||||||
|
device = "nodev";
|
||||||
|
efiInstallAsRemovable = true;
|
||||||
|
};
|
||||||
|
# efi.efiSysMountPoint = "/boot/efi";
|
||||||
|
# efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
{ ... }: let
|
|
||||||
nfsDrive = drivename: {
|
|
||||||
device = "10.0.0.36:/mnt/PoolsClosed/${drivename}";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [ "nfsvers=3" ];
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
fileSystems."/data2/backup" = nfsDrive "backup";
|
|
||||||
fileSystems."/data2/momiji" = nfsDrive "momiji";
|
|
||||||
fileSystems."/data2/media" = nfsDrive "media";
|
|
||||||
fileSystems."/data2/postgres" = nfsDrive "postgres";
|
|
||||||
fileSystems."/data2/home" = nfsDrive "home";
|
|
||||||
}
|
|
|
@ -1,31 +0,0 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/54b9fd58-0df5-410c-ab87-766860967653";
|
|
||||||
fsType = "btrfs";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/0A60-2885";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-uuid/92a1a33f-89a8-45de-a45e-6c303172cd7f"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
|
@ -4,6 +4,9 @@ hedgedoc:
|
||||||
env: ENC[AES256_GCM,data:4i2I7S5hKp3mjROMwa3WQinbgmxXhKzSaWspzF12TIDm9g3Bgie0jfSxbDuPjJYq1mZ8oQ2Jzdi2N+Q4blOk9fZO3VREoU0qFrfqm8RqBw3a7hpisXzu9okYnzrW2JiVxNGWwZbuiCG1SzdMOMHq/ZqLEJdu7Pxm9cY9xBSZthap1DCFyr7dmjHt3AnEQemsDpxSaWKD2Dfs1gyA23rLAFBd,iv:lfB6uaXULUNme7cGyN+bKuXPsbgpjMrxrRy2L96HltY=,tag:uu37bZ4g/PA2mgzs3ioLCQ==,type:str]
|
env: ENC[AES256_GCM,data:4i2I7S5hKp3mjROMwa3WQinbgmxXhKzSaWspzF12TIDm9g3Bgie0jfSxbDuPjJYq1mZ8oQ2Jzdi2N+Q4blOk9fZO3VREoU0qFrfqm8RqBw3a7hpisXzu9okYnzrW2JiVxNGWwZbuiCG1SzdMOMHq/ZqLEJdu7Pxm9cY9xBSZthap1DCFyr7dmjHt3AnEQemsDpxSaWKD2Dfs1gyA23rLAFBd,iv:lfB6uaXULUNme7cGyN+bKuXPsbgpjMrxrRy2L96HltY=,tag:uu37bZ4g/PA2mgzs3ioLCQ==,type:str]
|
||||||
cloudflare:
|
cloudflare:
|
||||||
api-key: ENC[AES256_GCM,data:dqKGLnIlPAgBNTxcRo6Q55hKoe8Qg9UCmDvJioJdhBxmjTXQrf0LFL/iMC73K+Kj0ejuzBRJaqfN6548aZZTSDb8hPTygh7PEILqdxNrap9uDm229eJM/zrShOIRaNLH,iv:pUkuU3Es20ujDtOYfGZodxEUZSlfAe/45ewEkPG1GP4=,tag:sA7nMLldPRRo0jwcdF34ng==,type:str]
|
api-key: ENC[AES256_GCM,data:dqKGLnIlPAgBNTxcRo6Q55hKoe8Qg9UCmDvJioJdhBxmjTXQrf0LFL/iMC73K+Kj0ejuzBRJaqfN6548aZZTSDb8hPTygh7PEILqdxNrap9uDm229eJM/zrShOIRaNLH,iv:pUkuU3Es20ujDtOYfGZodxEUZSlfAe/45ewEkPG1GP4=,tag:sA7nMLldPRRo0jwcdF34ng==,type:str]
|
||||||
|
drives:
|
||||||
|
cirno:
|
||||||
|
credentials: ENC[AES256_GCM,data:ypMZhs7dQw/IlcLwHwFcIZw0N+kCzvFGLe3gEqZVe1hj0lzK8MCfxAR8GpA=,iv:by5ljMzOuuY4b6BDUQNLhp8/gcXDNe+rHkqhFzjNA6c=,tag:3C5iYsxEWwAKs9Blgr5o6g==,type:str]
|
||||||
sops:
|
sops:
|
||||||
kms: []
|
kms: []
|
||||||
gcp_kms: []
|
gcp_kms: []
|
||||||
|
@ -19,8 +22,8 @@ sops:
|
||||||
UE1YWkplaFBhV01CU0FDYTQ3NlkwVkUKMJyCfyh/vcj/VU7shtFF4YRRVaWdcMNh
|
UE1YWkplaFBhV01CU0FDYTQ3NlkwVkUKMJyCfyh/vcj/VU7shtFF4YRRVaWdcMNh
|
||||||
rp9lZmRZpc9mARXYAj9RlkI/uuSzxshtqb5AGXKmSV0hncazxu75kg==
|
rp9lZmRZpc9mARXYAj9RlkI/uuSzxshtqb5AGXKmSV0hncazxu75kg==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2023-03-08T13:37:44Z"
|
lastmodified: "2023-03-08T13:59:50Z"
|
||||||
mac: ENC[AES256_GCM,data:SrdyqQbOyFct6Hj+fBgAz4MBbHOKDvSKF4OsRgq4/byI7BTdtRaFD1tq0nndP84xfapiLhd8o6f2ZrncyrYkciNiZcFN2Dj7lAg8LOuIpYeh/TTOLsWXTyfjJ7rK2x845kEDoR9oTWUDM2yKFrvIZzZuxavDw71eEYzg2QxJCAI=,iv:quIGgipT59h8PwlYcDKd8K5pW0TPXM3T+lvdegLkwKk=,tag:Yv+Yg5tSOhuL3/iSbJMT1Q==,type:str]
|
mac: ENC[AES256_GCM,data:NQdwXLJAd7eRGZ7wM/nO7DJWaqf8wJWw2X3fcc2NViZbmKToJjezmizU+23k5wcqp5kdSM/wfiu2SQn9fRiZ7aYMjTxsmXncUy6jmh4xSf7L7pVSEKMuzOCDifrhaok0U7Lc0F+1Q5I1IPrWVtEGKRMWBYo8vLAD6z47BWXiQ10=,iv:MKu+k8wN0ywXwhzrG/WYAk/aQv0C3N/Er7IKvQeKEY4=,tag:l6Jk3HH1K5ZgKGzLnB34Xg==,type:str]
|
||||||
pgp:
|
pgp:
|
||||||
- created_at: "2023-03-07T12:32:53Z"
|
- created_at: "2023-03-07T12:32:53Z"
|
||||||
enc: |
|
enc: |
|
||||||
|
|
Loading…
Reference in New Issue