Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat serverz #87

Merged
merged 10 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions nix/homes/x86_64-linux/sab@serverz/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
lib,
config,
inputs,
pkgs,
...
}:
with lib.custom; let
wallpapers = inputs.wallpapers-nix.packages.${pkgs.system}.catppuccin;
in {
custom = {
user = {
enable = true;
name = config.snowfallorg.user.name;
};

cli-apps = {
argocd = disabled;
atuin = enabled;
bottom = enabled;
fastfetch = enabled;
home-manager = enabled;
yazi = enabled;
};
tools = {
gh = disabled;
git = enabled;
direnv = disabled;
};
security = {
rbw = disabled;
vault = disabled;
};
};
home.stateVersion = "24.05";
}
43 changes: 43 additions & 0 deletions nix/systems/x86_64-linux/serverz/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
pkgs,
inputs,
...
}: let
system = "x86_64-linux";
hostName = "serverz";
in {
imports = [
./hardware-configuration.nix
];

# Grub installed via Disko
boot.loader.grub.device = "nodev";

# environment.systemPackages = with pkgs; [
# # Any particular packages only for this host
# ];

# Suites managed by nix, see suites by home-manager in homes
suites.common.enable = true; # Enables the basics, like audio, networking, ssh, etc.
suites.desktop.enable = false;
suites.develop.enable = false;

services = {
openssh = {
enable = true;
};
};

users.users.sab.openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDH2vxB14+ZGFFgtQ6UQ6zw33r/4e/vkMIzNKeaTnDRHmmfnjDSU5oXWt7OSCZQw8zPSbzPV7QPKC9MwEdsl9ZXr4kVxAvN/d/oI/cBU/77tMDW/m1d+SEqhztNrBfpSIavuCT+K9l1vMr/R4qoRxSfLRVsBhr3Xfk3bxZ2vh9dsefZXbL4/ebzW74RUoh1GccPqvBQJxP/+wYsyspn3lsmEi2AbIJprR6fN2Vb3pTW/D0E7k2iIcuBOd1hsw3mn5e2OpXOG2R0XcssBjlquS23up3sIujbw46gITIe1+kCLnmCfGXRDOmcUfB4ySwUlFma8RjcZg7vTGUe47PNJmo3 [email protected]"
];
custom.virtualisation = {
virt-manager.enable = false;
kvm.enable = false;
podman.enable = false;
};

# ======================== DO NOT CHANGE THIS ========================
system.stateVersion = "24.05";
# ======================== DO NOT CHANGE THIS ========================
}
54 changes: 54 additions & 0 deletions nix/systems/x86_64-linux/serverz/disk-config.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{lib, ...}: {
disko.devices = {
disk.disk1 = {
device = lib.mkDefault "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
name = "root";
size = "100%";
content = {
type = "lvm_pv";
vg = "pool";
};
};
};
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
};
};
};
};
}
42 changes: 42 additions & 0 deletions nix/systems/x86_64-linux/serverz/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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 + "/installer/scan/not-detected.nix")
];

boot.initrd.availableKernelModules = ["ahci" "ohci_pci" "ehci_pci" "pata_atiixp" "usb_storage" "usbhid" "sd_mod"];
boot.initrd.kernelModules = ["dm-snapshot"];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];

fileSystems."/" = {
device = "/dev/disk/by-uuid/644e21d6-33e5-4003-b18a-a41f8dd5e299";
fsType = "ext4";
};

fileSystems."/boot" = {
device = "/dev/disk/by-uuid/19A6-B38B";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};

swapDevices = [];

# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;

nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
Loading