Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8770e95bbe | ||
|
|
2ecc910de4 | ||
|
|
40f0dc0d45 | ||
|
|
7a276567c6 | ||
|
|
5a4b51112f | ||
|
|
e008288d52 | ||
|
|
1dcd29fd96 | ||
|
|
64b031ceba | ||
|
|
f3ddbb162c | ||
|
|
d0cb1b5090 | ||
|
|
7c2a09a360 |
No files matched your search
Generated
+21
-21
@@ -220,11 +220,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1786356609,
|
"lastModified": 1786999651,
|
||||||
"narHash": "sha256-ou8fYz5w9yhXC8YbvvExybFIa19MyW5G/8dEPqa90hM=",
|
"narHash": "sha256-MTGMFlLDTklsXhCp4r5GXB4VAVadPdalXLvUjd/K7h0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "c30c7955cec30d664a9baced6bc0112e263d4647",
|
"rev": "353742587cbaf079b3caee743115d037bc51fea6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -242,11 +242,11 @@
|
|||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1786389530,
|
"lastModified": 1787027504,
|
||||||
"narHash": "sha256-YTLO0pwBI3eAxT6tssly2MY1lhntcNOV3Xg1agIL5x4=",
|
"narHash": "sha256-8IqYrCfNgO+T4Sc2gM4AHSuqhSgwcrAq0uOTMq9ixKg=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "llm-agents.nix",
|
"repo": "llm-agents.nix",
|
||||||
"rev": "5b6721acbc198851658de3f93444d2be308ffe77",
|
"rev": "50e05f7a7cc039d39d53bc77c132d9457f990375",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -276,11 +276,11 @@
|
|||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1786328173,
|
"lastModified": 1787016972,
|
||||||
"narHash": "sha256-ghZYtP08BstfBD3keiUHM5KupIRY3+YS+naBsFPtGzc=",
|
"narHash": "sha256-6B98mtehXRht8nSiX+1tqm8WyeQvjCjhf8IjCKLh/dU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-vscode-extensions",
|
"repo": "nix-vscode-extensions",
|
||||||
"rev": "f5911382d78f7d739197702509b83d790d592cea",
|
"rev": "596319216632f6e6da839787295a350c027d39be",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -322,11 +322,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1785975029,
|
"lastModified": 1786963906,
|
||||||
"narHash": "sha256-X44cn5rzytELc3NNoQsh0aLkjWA/QzPfc6HPQmsG3sU=",
|
"narHash": "sha256-3tkeMWSvHPo3tYljfXbPC/TgknikU1GvdVr/DkdfvE0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "70ce234312134a463ba7728e94da2486a1d237ac",
|
"rev": "f4b6996c4e8b9ee06ce147ec344c885f51071b14",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -354,11 +354,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1786106723,
|
"lastModified": 1787001381,
|
||||||
"narHash": "sha256-zDSUbpoeo/9ZmD2+wXnzxoo1+uhL8vxc0b8yuYMKYq0=",
|
"narHash": "sha256-Ue1Yo8gfHdD4TMtNewhA4tkSYeFqXThju0nCyJc3ALo=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "f13ff45afd1bb73e640eaa08a7066dbed07e3238",
|
"rev": "ec2d622de0773551768cf98f3fc50cbcc003b9c5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -508,11 +508,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1785827118,
|
"lastModified": 1786706192,
|
||||||
"narHash": "sha256-tS2eSSpa1uLPUyIAJBpf00+A9KSHpC92gKMLavmHuio=",
|
"narHash": "sha256-NViIxuTn4VA6w5JPpzamwkCnFUmhFc4CFMemIKsC/B8=",
|
||||||
"owner": "wimpysworld",
|
"owner": "wimpysworld",
|
||||||
"repo": "sidra",
|
"repo": "sidra",
|
||||||
"rev": "0597e5438fe98fef935cb528c2c9aa5db60171c9",
|
"rev": "8ace425cda0f462acc7a00ada1e71f87aa30c2cf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -559,11 +559,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1785945821,
|
"lastModified": 1786901030,
|
||||||
"narHash": "sha256-NLSyTCW4K4ofhNBllt3omPasm6QpralXH1DBZOc91Dw=",
|
"narHash": "sha256-WSFCsDSE5ffgD2MqzkM2CYjeFiKhRF/dJUN8uedb6YE=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "ae7910970dddc408fe6ab1c8e4b277bb21d72dc0",
|
"rev": "27b3b12a8e6375f28ebe122f07d230ca5459bbfa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -54,7 +54,9 @@
|
|||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
plasma-manager.homeModules.plasma-manager
|
plasma-manager.homeModules.plasma-manager
|
||||||
];
|
];
|
||||||
home-manager.users.emmatherock = import ./home/emmatherock/home.nix;
|
home-manager.users.emmatherock = { osConfig, ... }: {
|
||||||
|
imports = [ ./home/emmatherock/core.nix ] ++ osConfig.myHomeProfile.extraPrograms;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -65,8 +67,17 @@
|
|||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/vps
|
./hosts/vps
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
vscode-server.nixosModules.default
|
vscode-server.nixosModules.default
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
|
home-manager.users.emmatherock = { osConfig, ... }: {
|
||||||
|
imports = [ ./home/emmatherock/core.nix ] ++ osConfig.myHomeProfile.extraPrograms;
|
||||||
|
};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./git.nix
|
||||||
|
./shell.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
programs.btop.enable = true;
|
||||||
|
|
||||||
|
home.stateVersion = "25.11";
|
||||||
|
}
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
imports = [
|
|
||||||
./agents.nix
|
|
||||||
./audio.nix
|
|
||||||
./desktop-apps.nix
|
|
||||||
./deskflow.nix
|
|
||||||
./gaming.nix
|
|
||||||
./git.nix
|
|
||||||
./media.nix
|
|
||||||
./packages.nix
|
|
||||||
./plasma.nix
|
|
||||||
./shell.nix
|
|
||||||
./vscode.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
home.stateVersion = "25.11";
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
programs.btop.package = pkgs.btop.override { cudaSupport = false; rocmSupport = true; };
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# --- Base y Terminal ---
|
# --- Base y Terminal ---
|
||||||
vim
|
vim
|
||||||
fastfetch
|
fastfetch
|
||||||
(btop.override { cudaSupport = false; rocmSupport = true; })
|
|
||||||
nvtopPackages.full
|
nvtopPackages.full
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -6,12 +6,32 @@
|
|||||||
../../modules/profiles/desktop.nix
|
../../modules/profiles/desktop.nix
|
||||||
../../modules/profiles/server.nix
|
../../modules/profiles/server.nix
|
||||||
../../modules/services/samba.nix
|
../../modules/services/samba.nix
|
||||||
|
../../modules/system/home-profile.nix
|
||||||
../../modules/system/nix-ld.nix
|
../../modules/system/nix-ld.nix
|
||||||
../../modules/system/packages.nix
|
../../modules/system/packages.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
age.secrets.miku-homelab-wg.file = ../../secrets/miku-homelab-wg.age;
|
age.secrets.miku-homelab-wg.file = ../../secrets/miku-homelab-wg.age;
|
||||||
|
|
||||||
|
myPackages.extra = with pkgs; [
|
||||||
|
rocmPackages.rocm-smi
|
||||||
|
btrfs-progs
|
||||||
|
distrobox
|
||||||
|
steam-run
|
||||||
|
];
|
||||||
|
|
||||||
|
myHomeProfile.extraPrograms = [
|
||||||
|
../../home/emmatherock/agents.nix
|
||||||
|
../../home/emmatherock/audio.nix
|
||||||
|
../../home/emmatherock/desktop-apps.nix
|
||||||
|
../../home/emmatherock/deskflow.nix
|
||||||
|
../../home/emmatherock/gaming.nix
|
||||||
|
../../home/emmatherock/media.nix
|
||||||
|
../../home/emmatherock/packages.nix
|
||||||
|
../../home/emmatherock/plasma.nix
|
||||||
|
../../home/emmatherock/vscode.nix
|
||||||
|
];
|
||||||
|
|
||||||
myNetworking = {
|
myNetworking = {
|
||||||
hostName = "miku-homelab";
|
hostName = "miku-homelab";
|
||||||
useNetworkManager = true;
|
useNetworkManager = true;
|
||||||
@@ -31,7 +51,7 @@
|
|||||||
privateKeyFile = config.age.secrets.miku-homelab-wg.path;
|
privateKeyFile = config.age.secrets.miku-homelab-wg.path;
|
||||||
peers = [
|
peers = [
|
||||||
{
|
{
|
||||||
publicKey = "zERcSEQhan+xtmPOIjuVSkQaBynTjH96SgZZF9CZNV8=";
|
publicKey = "BKs9VlsIEM1np6wHeVFL4NfbS1l69xnwins6Q12ByAM=";
|
||||||
allowedIPs = [ "10.20.0.1/32" ];
|
allowedIPs = [ "10.20.0.1/32" ];
|
||||||
endpoint = "vps.external.mikufanclub.lat:51822";
|
endpoint = "vps.external.mikufanclub.lat:51822";
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
|
|||||||
+15
-13
@@ -1,26 +1,29 @@
|
|||||||
{ config, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../modules/profiles/server.nix
|
../../modules/profiles/server.nix
|
||||||
|
../../modules/system/home-profile.nix
|
||||||
|
../../modules/system/nix-ld.nix
|
||||||
|
../../modules/system/packages.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# PLACEHOLDER: secrets/vps-wg.age does not exist yet. It has to be created
|
|
||||||
# (same way as secrets/miku-homelab-wg.age) once this host is installed and
|
|
||||||
# its own WireGuard private key has been generated.
|
|
||||||
age.secrets.vps-wg.file = ../../secrets/vps-wg.age;
|
age.secrets.vps-wg.file = ../../secrets/vps-wg.age;
|
||||||
|
|
||||||
myNetworking = {
|
myNetworking = {
|
||||||
hostName = "vps";
|
hostName = "vps";
|
||||||
useNetworkManager = false;
|
useNetworkManager = false;
|
||||||
|
useNetworkd = true;
|
||||||
staticIp = {
|
staticIp = {
|
||||||
interface = "eth0";
|
interface = "ens3";
|
||||||
address = "23.175.41.196";
|
address = "23.175.41.196";
|
||||||
prefixLength = 27;
|
prefixLength = 27;
|
||||||
gateway = "23.175.41.225";
|
gateway = "23.175.41.225";
|
||||||
nameservers = [ "1.1.1.1" "1.0.0.1" ];
|
nameservers = [ "1.1.1.1" "1.0.0.1" ];
|
||||||
|
onlinkGateway = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraTcpPorts = [ 80 443 ];
|
extraTcpPorts = [ 80 443 ];
|
||||||
extraUdpPorts = [ 51822 ];
|
extraUdpPorts = [ 51822 ];
|
||||||
sshAllowUsers = [ "emmatherock" ];
|
sshAllowUsers = [ "emmatherock" ];
|
||||||
@@ -41,10 +44,12 @@
|
|||||||
myUsers = {
|
myUsers = {
|
||||||
admins.emmatherock = {
|
admins.emmatherock = {
|
||||||
description = "EmmaTheRock";
|
description = "EmmaTheRock";
|
||||||
|
shell = pkgs.fish;
|
||||||
extraGroups = [ "wheel" ];
|
extraGroups = [ "wheel" ];
|
||||||
authorizedKeys = [
|
authorizedKeys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8vfwM5g9RJXqHtqTgNqsYg9SxSm+UMvFqTjBoAsLJ6 emmatherock@MAIN-PC"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8vfwM5g9RJXqHtqTgNqsYg9SxSm+UMvFqTjBoAsLJ6 emmatherock@MAIN-PC"
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIpTslcK0yQ6k+h8foNl17wVRyJUfEGzq7f1h3014WNB s21 plus"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIpTslcK0yQ6k+h8foNl17wVRyJUfEGzq7f1h3014WNB s21 plus"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEUCpjAuJobymPPAoPjLdL1eD6g4v6wrquu3cyHP22Wj emmatherock@NixOS"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -57,17 +62,14 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# PLACEHOLDER: adjust once the real VPS image/provider is known (BIOS vs
|
boot.loader.systemd-boot.enable = true;
|
||||||
# UEFI, actual boot device). Assumes a generic BIOS-booted image for now.
|
boot.loader.systemd-boot.configurationLimit = 10;
|
||||||
boot.loader.grub = {
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
enable = true;
|
|
||||||
device = "/dev/sda";
|
|
||||||
};
|
|
||||||
|
|
||||||
time.timeZone = "UTC";
|
time.timeZone = "America/Argentina/Buenos_Aires";
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "26.05";
|
||||||
}
|
}
|
||||||
@@ -1,19 +1,26 @@
|
|||||||
{ lib, ... }:
|
# 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, ... }:
|
||||||
|
|
||||||
# PLACEHOLDER: this host has not been installed yet. Replace this whole file
|
|
||||||
# with the real hardware-configuration.nix generated by `nixos-generate-config`
|
|
||||||
# during the actual installation (it will pick up the real disk UUIDs,
|
|
||||||
# filesystem types, and kernel modules for the VPS provider's image).
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports =
|
||||||
|
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "ahci" "sd_mod" "sr_mod" "virtio_blk" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ ];
|
boot.kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/boot" =
|
||||||
device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000";
|
{ device = "/dev/disk/by-uuid/9601-188F";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/2fe62056-55d1-4d2a-97a4-74451f7a63d0";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
options.myHomeProfile.extraPrograms = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.path;
|
||||||
|
default = [ ];
|
||||||
|
description = "Extra Home Manager modules to import for this user, on top of the core profile.";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -39,6 +39,12 @@ in
|
|||||||
description = "Whether to enable NetworkManager to manage network interfaces.";
|
description = "Whether to enable NetworkManager to manage network interfaces.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useNetworkd = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether to configure the static IP via systemd-networkd instead of the classic scripted networking backend. Needed for reliable onlink default routes.";
|
||||||
|
};
|
||||||
|
|
||||||
staticIp = lib.mkOption {
|
staticIp = lib.mkOption {
|
||||||
type = lib.types.nullOr (lib.types.submodule {
|
type = lib.types.nullOr (lib.types.submodule {
|
||||||
options = {
|
options = {
|
||||||
@@ -63,6 +69,11 @@ in
|
|||||||
default = [ "1.1.1.1" "8.8.8.8" ];
|
default = [ "1.1.1.1" "8.8.8.8" ];
|
||||||
description = "DNS nameservers to use.";
|
description = "DNS nameservers to use.";
|
||||||
};
|
};
|
||||||
|
onlinkGateway = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether the gateway lies outside the interface's subnet, requiring the onlink flag on the default route.";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
default = null;
|
default = null;
|
||||||
@@ -116,7 +127,8 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
networking = lib.mkMerge [
|
networking = lib.mkMerge [
|
||||||
{
|
{
|
||||||
hostName = cfg.hostName;
|
hostName = cfg.hostName;
|
||||||
@@ -127,15 +139,17 @@ in
|
|||||||
allowedTCPPorts = [ 22 ] ++ cfg.extraTcpPorts;
|
allowedTCPPorts = [ 22 ] ++ cfg.extraTcpPorts;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
(lib.mkIf (cfg.staticIp != null) {
|
(lib.mkIf (cfg.staticIp != null && !cfg.useNetworkd) {
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
interfaces.${cfg.staticIp.interface}.ipv4.addresses = [{
|
interfaces.${cfg.staticIp.interface}.ipv4.addresses = [{
|
||||||
address = cfg.staticIp.address;
|
address = cfg.staticIp.address;
|
||||||
prefixLength = cfg.staticIp.prefixLength;
|
prefixLength = cfg.staticIp.prefixLength;
|
||||||
}];
|
}];
|
||||||
defaultGateway = cfg.staticIp.gateway;
|
|
||||||
nameservers = cfg.staticIp.nameservers;
|
nameservers = cfg.staticIp.nameservers;
|
||||||
})
|
})
|
||||||
|
(lib.mkIf (cfg.staticIp != null && !cfg.useNetworkd && !cfg.staticIp.onlinkGateway) {
|
||||||
|
defaultGateway = cfg.staticIp.gateway;
|
||||||
|
})
|
||||||
(lib.mkIf cfg.wireguard.enable {
|
(lib.mkIf cfg.wireguard.enable {
|
||||||
wireguard.interfaces."wg-${cfg.hostName}" = {
|
wireguard.interfaces."wg-${cfg.hostName}" = {
|
||||||
ips = cfg.wireguard.ips;
|
ips = cfg.wireguard.ips;
|
||||||
@@ -163,5 +177,31 @@ in
|
|||||||
AllowUsers = cfg.sshAllowUsers;
|
AllowUsers = cfg.sshAllowUsers;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
(lib.mkIf (cfg.staticIp != null && cfg.useNetworkd) {
|
||||||
|
networking.useDHCP = false;
|
||||||
|
systemd.network.enable = true;
|
||||||
|
services.resolved.enable = true;
|
||||||
|
|
||||||
|
systemd.network.networks."10-${cfg.staticIp.interface}" = {
|
||||||
|
matchConfig.Name = cfg.staticIp.interface;
|
||||||
|
address = [ "${cfg.staticIp.address}/${toString cfg.staticIp.prefixLength}" ];
|
||||||
|
dns = cfg.staticIp.nameservers;
|
||||||
|
routes = [
|
||||||
|
({
|
||||||
|
routeConfig = {
|
||||||
|
Gateway = cfg.staticIp.gateway;
|
||||||
|
} // lib.optionalAttrs cfg.staticIp.onlinkGateway {
|
||||||
|
GatewayOnLink = true;
|
||||||
};
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
networkConfig = {
|
||||||
|
DHCP = "no";
|
||||||
|
};
|
||||||
|
linkConfig.RequiredForOnline = "routable";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,25 @@
|
|||||||
{pkgs, ... }:
|
{ lib, pkgs, config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.myPackages;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
|
options.myPackages = {
|
||||||
|
extra = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.package;
|
||||||
|
default = [ ];
|
||||||
|
description = "Extra packages to install on this host, beyond the core set.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
wget
|
wget
|
||||||
curl
|
curl
|
||||||
ethtool
|
ethtool
|
||||||
fish
|
fish
|
||||||
rocmPackages.rocm-smi
|
tmux
|
||||||
btrfs-progs
|
] ++ cfg.extra;
|
||||||
distrobox
|
};
|
||||||
steam-run
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
+5
-6
@@ -1,20 +1,19 @@
|
|||||||
let
|
let
|
||||||
# Emma's personal SSH keys (same ones authorized in modules/system/users.nix),
|
# Emma's personal SSH keys (same ones authorized in modules/system/users.nix),
|
||||||
# so secrets can be edited/re-keyed from her own workstations.
|
# so secrets can be edited/re-keyed from his own workstations.
|
||||||
emma-main-pc = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8vfwM5g9RJXqHtqTgNqsYg9SxSm+UMvFqTjBoAsLJ6 emmatherock@MAIN-PC";
|
emma-main-pc = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8vfwM5g9RJXqHtqTgNqsYg9SxSm+UMvFqTjBoAsLJ6 emmatherock@MAIN-PC";
|
||||||
emma-s21-plus = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIpTslcK0yQ6k+h8foNl17wVRyJUfEGzq7f1h3014WNB s21 plus";
|
emma-s21-plus = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIpTslcK0yQ6k+h8foNl17wVRyJUfEGzq7f1h3014WNB s21 plus";
|
||||||
|
emma-nixos = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEUCpjAuJobymPPAoPjLdL1eD6g4v6wrquu3cyHP22Wj emmatherock@NixOS";
|
||||||
|
|
||||||
# Host SSH host keys, used by agenix at runtime to decrypt (via the default
|
# Host SSH host keys, used by agenix at runtime to decrypt (via the default
|
||||||
# age.identityPaths, which points at services.openssh host keys).
|
# age.identityPaths, which points at services.openssh host keys).
|
||||||
miku-homelab = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH7zsQdzX7RHRd2plwrTKJR89uwR2YfzBm1n+HkcYEbb root@NixOS";
|
miku-homelab = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH7zsQdzX7RHRd2plwrTKJR89uwR2YfzBm1n+HkcYEbb root@NixOS";
|
||||||
|
|
||||||
# TODO: replace with the real vps SSH host key once the host is installed
|
vps = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDh8+hpWkGLRszFI4TC1/YHB8IiSdM0UUOsWbOwXPLn6 root@vps";
|
||||||
# (e.g. via `ssh-keyscan` or by reading /etc/ssh/ssh_host_ed25519_key.pub on
|
|
||||||
# the vps itself), then re-key any vps secrets that were encrypted without it.
|
|
||||||
vps = "ssh-ed25519 REPLACE_ME_AFTER_VPS_INSTALL";
|
|
||||||
|
|
||||||
admins = [ emma-main-pc emma-s21-plus ];
|
admins = [ emma-main-pc emma-s21-plus emma-nixos ];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"miku-homelab-wg.age".publicKeys = admins ++ [ miku-homelab ];
|
"miku-homelab-wg.age".publicKeys = admins ++ [ miku-homelab ];
|
||||||
|
"vps-wg.age".publicKeys = admins ++ [ vps ];
|
||||||
}
|
}
|
||||||
Binary file not shown.
Reference in new issue
Block a user