Fix voyager; zfs, docker, metrics
This commit is contained in:
parent
b9ada673f4
commit
891b7311c0
10
base.nix
10
base.nix
|
@ -43,6 +43,15 @@
|
|||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
git
|
||||
tree
|
||||
rsync
|
||||
bottom
|
||||
ripgrep
|
||||
];
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
permitRootLogin = "no";
|
||||
|
@ -52,6 +61,7 @@
|
|||
users.users.felixalb = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
uid = 1000;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDKzPICGew7uN0cmvRmbwkwTCodTBUgEhkoftQnZuO4Q felixalbrigtsen@gmail.com"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHkLmJIkBM6AMbYM/hYm27Flgya81UiGqh9/owYWmrbZ home.feal.no"
|
||||
|
|
24
flake.lock
24
flake.lock
|
@ -2,11 +2,11 @@
|
|||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1674091526,
|
||||
"narHash": "sha256-eLhLKOpF1ix5xZeFF9g8uE1stdyxuBLJvWQ20gLbDto=",
|
||||
"lastModified": 1681570648,
|
||||
"narHash": "sha256-ATsDh8cEXqx+gGIIpEPf5twAStM9INIbwmVgS4WcjYQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "fc5b90fd72177d9bcf435b10c12bb943549748c6",
|
||||
"rev": "745a6200bf74c4dbec8f94dd731ab3769c0e9df3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -18,11 +18,11 @@
|
|||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1673740915,
|
||||
"narHash": "sha256-MMH8zONfqahgHly3K8/A++X34800rajA/XgZ2DzNL/M=",
|
||||
"lastModified": 1681613598,
|
||||
"narHash": "sha256-Ogkoma0ytYcDoMR2N7CZFABPo+i0NNo26dPngru9tPc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7c65528c3f8462b902e09d1ccca23bb9034665c2",
|
||||
"rev": "1040ce5f652b586da95dfd80d48a745e107b9eac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -47,11 +47,11 @@
|
|||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681209176,
|
||||
"narHash": "sha256-wyQokPpkNZnsl/bVf8m1428tfA0hJ0w/qexq4EizhTc=",
|
||||
"lastModified": 1681613729,
|
||||
"narHash": "sha256-9Qb0tHW8l1hgFkuB76n4VT9UNUaR7QL3CgmJ5hcVYEg=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "00d5fd73756d424de5263b92235563bc06f2c6e1",
|
||||
"rev": "b7a6670a28b01cd1f62879921e36be2c69c4137a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -62,11 +62,11 @@
|
|||
},
|
||||
"unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1674101896,
|
||||
"narHash": "sha256-xWLaexT6IHhOJru54wrOMeBbkKeJzOZ4Pqrxctf82q0=",
|
||||
"lastModified": 1681618194,
|
||||
"narHash": "sha256-UR4OobzFHFyIVHXmanJLfm5o2DVufbFeP1Dn7C5Xqn0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a841e262264e48722dccc8469f066068146e406b",
|
||||
"rev": "f2654e378dfc8153a141a8fcb854b423fe259a27",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -62,11 +62,6 @@
|
|||
'';
|
||||
}
|
||||
)
|
||||
wget
|
||||
git
|
||||
tree
|
||||
rsync
|
||||
bottom
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 22 3100 ];
|
||||
|
|
|
@ -8,34 +8,34 @@
|
|||
./hardware-configuration.nix
|
||||
./containers.nix
|
||||
|
||||
./services/nginx
|
||||
./services/metrics
|
||||
|
||||
# TODO:
|
||||
# - Boots
|
||||
# x Boot
|
||||
# x Mount ZFS
|
||||
# x Monitoring server
|
||||
# x Podman
|
||||
# x Flame
|
||||
# - Transmission
|
||||
# - Jellyfin
|
||||
# - NFS exports
|
||||
# x Monitoring server
|
||||
# - FreeBSD VM
|
||||
# - Kali VM
|
||||
# - Kerberos / IPA
|
||||
];
|
||||
|
||||
boot = {
|
||||
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
kernelParams = [ "nohibernate" ]; # No swap, no hibernate
|
||||
zfs.extraPools = [ "tank" ];
|
||||
supportedFilesystems = [ "zfs" ];
|
||||
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
};
|
||||
|
||||
# filesystems."/tank" = {
|
||||
# device = "tank";
|
||||
# fsType = "zfs";
|
||||
# };
|
||||
|
||||
networking = {
|
||||
hostName = "voyager";
|
||||
defaultGateway = "192.168.10.1";
|
||||
nameservers = [ "192.168.10.1" "1.1.1.1" ];
|
||||
interfaces.eth0.ipv4 = {
|
||||
interfaces.eno1.ipv4 = {
|
||||
addresses = [
|
||||
{ address = "192.168.10.165"; prefixLength = 24; }
|
||||
];
|
||||
|
@ -81,16 +81,11 @@
|
|||
'';
|
||||
}
|
||||
)
|
||||
wget
|
||||
git
|
||||
tree
|
||||
rsync
|
||||
bottom
|
||||
zfs
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,19 @@
|
|||
{ config, pkgs, values, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config.virtualisation.oci-containers.containers = {
|
||||
# Flame - Homelab dashboard/linktree
|
||||
virtualisation.oci-containers.containers = {
|
||||
flame = {
|
||||
image = "pawelmalak/flame";
|
||||
ports = [ "5005:5005" ];
|
||||
ports = [ "127.0.0.1:5005:5005" ];
|
||||
volumes = [
|
||||
"/var/lib/flame/data:/app/data/"
|
||||
];
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."flame.home.feal.no" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:5005";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -8,33 +8,18 @@
|
|||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "mpt3sas" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "mpt3sas" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "rpool/nixos/root";
|
||||
fsType = "zfs";
|
||||
{ device = "/dev/disk/by-uuid/5e292e89-d68c-4b45-9166-142de8b6ff5e";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "rpool/nixos/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/var/lib" =
|
||||
{ device = "rpool/nixos/var/lib";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot/efis/usb-USB_SanDisk_3.2Gen1_0101b10101c61e14737f7ba5d4debafb705fb5bb1082a0be6e8a84f5eb4ae02393df000000000000000000009940bff9ff01740081558107b5ad5d4a-0:0-part1" =
|
||||
{ device = "/dev/sdb1";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/boot/efis/usb-USB_SanDisk_3.2Gen1_0101aa2faa7599e5f2afc0dde60a5f61a62999cc479fbf61706afe2f115d19735f550000000000000000000026304b1f0094160081558107b5ac9a2a-0:0-part1" =
|
||||
{ device = "/dev/sdc1";
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/7EA9-3E3A";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
./prometheus.nix
|
||||
./grafana.nix
|
||||
./loki.nix
|
||||
./snmp-exporter.nix
|
||||
#./snmp-exporter.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
{ config, values, ... }:
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
enableReload = true;
|
||||
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
}
|
||||
|
Loading…
Reference in New Issue