Added Cyper Node 1 configuration

This commit is contained in:
2026-04-10 20:09:19 +02:00
parent 4fb35ddb5e
commit 90c1396ea5
5 changed files with 111 additions and 8 deletions

View File

@@ -146,6 +146,11 @@
hostName = "cyper-desktop"; hostName = "cyper-desktop";
system = "x86_64-linux"; system = "x86_64-linux";
}; };
"cyper-node-1" = mkSystem {
hostName = "cyper-node-1";
system = "x86_64-linux";
isServer = true;
};
}; };
darwinConfigurations."cyper-mac" = mkSystem { darwinConfigurations."cyper-mac" = mkSystem {

View File

@@ -1,4 +1,9 @@
{ pkgs, lib, ... }: {
pkgs,
lib,
isServer,
...
}:
{ {
home = { home = {
packages = packages =
@@ -12,18 +17,14 @@
ripgrep ripgrep
jq jq
yq-go yq-go
# GUI # GUI
openscad openscad
fstl fstl
# PDF Tools # PDF Tools
pandoc pandoc
# misc # misc
yt-dlp yt-dlp
ffmpeg ffmpeg
# Archives # Archives
zip zip
unzip unzip
@@ -32,7 +33,6 @@
gnutar gnutar
unrar unrar
sops sops
# Nix tools # Nix tools
nix-index nix-index
] ]
@@ -47,11 +47,11 @@
file file
which which
libnotify libnotify
# encryption # encryption
age age
ssh-to-age ssh-to-age
]
++ lib.optionals (!pkgs.stdenv.isDarwin && !isServer) [
# GUI # GUI
element-desktop element-desktop
zapzap zapzap

View File

@@ -0,0 +1,33 @@
{
imports = [ ./hardware-configuration.nix ];
networking = {
useNetworkd = true;
useDHCP = false;
firewall.enable = true;
};
systemd.network = {
enable = true;
networks."10-ethernet" = {
matchConfig.Name = "enp1s0";
networkConfig = {
Address = "192.168.2.30/24";
Gateway = "192.168.2.1";
DNS = "192.168.2.2";
DHCP = "no";
};
};
};
boot.loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
editor = false;
};
efi.canTouchEfiVariables = true;
};
system.stateVersion = "26.05";
}

View File

@@ -0,0 +1,51 @@
{
config,
lib,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
};
swapDevices = [
{
device = "/swapfile";
size = 4096;
}
];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

14
nixos/server/default.nix Normal file
View File

@@ -0,0 +1,14 @@
{ ... }:
{
services.nginx = {
enable = true;
virtualHosts.localhost = {
locations."/" = {
return = "200 '<html><body>It works</body></html>'";
extraConfig = ''
default_type text/html;
'';
};
};
};
}