some incomplete homelab config + scans
This commit is contained in:
parent
d6bd6e19ca
commit
db6045113d
7 changed files with 48 additions and 8 deletions
|
|
@ -34,7 +34,9 @@
|
||||||
|
|
||||||
nixosConfigWithHome = host: inputs.nixpkgs.lib.nixosSystem {
|
nixosConfigWithHome = host: inputs.nixpkgs.lib.nixosSystem {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
specialArgs = args;
|
specialArgs = {
|
||||||
|
hostname = host;
|
||||||
|
} // args;
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/${host}/config.nix
|
./hosts/${host}/config.nix
|
||||||
inputs.ctp.nixosModules.catppuccin
|
inputs.ctp.nixosModules.catppuccin
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
{
|
{
|
||||||
flake-path = "~/Projects/nix-flake"; # set this to the cloned repo path
|
flake-path = "~/Projects/nix-flake"; # set this to the cloned repo path
|
||||||
|
|
||||||
hostname = "thinkpad";
|
|
||||||
username = "satr14";
|
username = "satr14";
|
||||||
|
|
||||||
timezone = "Asia/Jakarta";
|
timezone = "Asia/Jakarta";
|
||||||
locale = "en_US.UTF-8";
|
locale = "en_US.UTF-8";
|
||||||
zsh-theme = "refined"; # good themes: refined, re5et, risto, amuse, afowler, pmcgee, itchy, example, strug, pygmalion, muse
|
zsh-theme = "refined"; # good themes: refined, re5et, risto, amuse, afowler, pmcgee, itchy, example, strug, pygmalion, muse
|
||||||
|
|
@ -16,7 +14,11 @@
|
||||||
resume-dev = "/dev/disk/by-uuid/1721721a-bb5a-4166-a077-9500d30be2ac"; # set to swap partition to enable hibernation, e.g. /dev/disk/by-uuid/1721721a-bb5a-4166-a077-9500d30be2ac
|
resume-dev = "/dev/disk/by-uuid/1721721a-bb5a-4166-a077-9500d30be2ac"; # set to swap partition to enable hibernation, e.g. /dev/disk/by-uuid/1721721a-bb5a-4166-a077-9500d30be2ac
|
||||||
|
|
||||||
homelab = {
|
homelab = {
|
||||||
domain = "satr14.my.id";
|
domain = "satr14.my.id"; # root domain for dns, ssl certs, reverse proxy, etc.
|
||||||
|
disks = {
|
||||||
|
share = "/dev/disk/by-uuid/1b9c8e5c-1d0a-4f2b-9c3e-7a0c8e5f6a2b"; # disk for nas share
|
||||||
|
data = "/dev/disk/by-uuid/2c3d4e5f-6a7b-8c9d-0e1f-2a3b4c5d6e7f"; # disk for app data
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
rice = {
|
rice = {
|
||||||
|
|
|
||||||
30
modules/scans/homelab.nix
Normal file
30
modules/scans/homelab.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
# 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 = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/e33ab472-e518-4b4d-89d1-d75cfecb9f06";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/880C-9F0A";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
||||||
3
modules/system/homelab/git.nix
Normal file
3
modules/system/homelab/git.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{ ... }: {
|
||||||
|
|
||||||
|
}
|
||||||
3
modules/system/homelab/idp.nix
Normal file
3
modules/system/homelab/idp.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{ ... }: {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
virtualHosts."cdn" = {
|
virtualHosts."cdn" = {
|
||||||
listen = [{ ip = "*"; port = 3000; }];
|
listen = [{ ip = "*"; port = 3000; }];
|
||||||
documentRoot = "/srv/dev-disk-by-uuid-f1ee1d17-e852-4e02-ae86-eaf6116a2aeb/NAS";
|
documentRoot = "/mnt/share";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
Options +Indexes +FollowSymLinks
|
Options +Indexes +FollowSymLinks
|
||||||
Require all granted
|
Require all granted
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
"server min protocol" = "SMB2_02";
|
"server min protocol" = "SMB2_02";
|
||||||
};
|
};
|
||||||
"NAS" = {
|
"NAS" = {
|
||||||
path = "/srv/dev-disk-by-uuid-f1ee1d17-e852-4e02-ae86-eaf6116a2aeb/NAS/";
|
path = "/mnt/share";
|
||||||
browseable = "yes";
|
browseable = "yes";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
"create mask" = "0664";
|
"create mask" = "0664";
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
imports = [
|
imports = [
|
||||||
./homelab/share.nix
|
./homelab/share.nix
|
||||||
./homelab/dns.nix
|
./homelab/dns.nix
|
||||||
|
./homelab/git.nix
|
||||||
|
./homelab/idp.nix
|
||||||
./base.nix
|
./base.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
services.openssh.enable = true;
|
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue