diff --git a/nix/homes/x86_64-linux/sab@serverz/default.nix b/nix/homes/x86_64-linux/sab@serverz/default.nix new file mode 100644 index 0000000..9589552 --- /dev/null +++ b/nix/homes/x86_64-linux/sab@serverz/default.nix @@ -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"; +} diff --git a/nix/systems/x86_64-linux/serverz/default.nix b/nix/systems/x86_64-linux/serverz/default.nix new file mode 100644 index 0000000..09d5192 --- /dev/null +++ b/nix/systems/x86_64-linux/serverz/default.nix @@ -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 sab@fedoraz.sbulav.tk" + ]; + custom.virtualisation = { + virt-manager.enable = false; + kvm.enable = false; + podman.enable = false; + }; + + # ======================== DO NOT CHANGE THIS ======================== + system.stateVersion = "24.05"; + # ======================== DO NOT CHANGE THIS ======================== +} diff --git a/nix/systems/x86_64-linux/serverz/disk-config.nix b/nix/systems/x86_64-linux/serverz/disk-config.nix new file mode 100644 index 0000000..8f36ed4 --- /dev/null +++ b/nix/systems/x86_64-linux/serverz/disk-config.nix @@ -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" + ]; + }; + }; + }; + }; + }; + }; +} diff --git a/nix/systems/x86_64-linux/serverz/hardware-configuration.nix b/nix/systems/x86_64-linux/serverz/hardware-configuration.nix new file mode 100644 index 0000000..ce26ae2 --- /dev/null +++ b/nix/systems/x86_64-linux/serverz/hardware-configuration.nix @@ -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..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; +}