new server
This commit is contained in:
98
systems/amd-server/configuration.nix
Normal file
98
systems/amd-server/configuration.nix
Normal file
@@ -0,0 +1,98 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
||||
custom = {
|
||||
tmpfs.enable = true;
|
||||
nftables.enable = true;
|
||||
cli-tools.enable = true;
|
||||
nix = {
|
||||
index.enable = true;
|
||||
ld.enable = true;
|
||||
settings.enable = true;
|
||||
};
|
||||
static-ip = {
|
||||
enable = true;
|
||||
ip = "192.168.0.20";
|
||||
interface = "enp6s0";
|
||||
dns = "192.168.0.10";
|
||||
};
|
||||
# static-ip = {
|
||||
# enable = true;
|
||||
# interface = "enp42s0";
|
||||
# ip = "192.168.0.11";
|
||||
# #dns = "127.0.0.1";
|
||||
# dns = "192.168.10";
|
||||
# #gateway = "192.168.0.10";
|
||||
# };
|
||||
# It uses 1.1.1.1 for some reason? set in /etc/dnsmasq-resolv.conf. no idea why
|
||||
#services.dnsmasq = {
|
||||
# enable = true;
|
||||
# server = [ "192.168.0.10" ];
|
||||
#};
|
||||
misc = { docker.enable = true; };
|
||||
services = { syncthing = { enable = true; }; };
|
||||
hardware = {
|
||||
firmware.enable = true;
|
||||
ssd.enable = true;
|
||||
wooting.enable = true;
|
||||
};
|
||||
graphical = {
|
||||
audio.enable = true;
|
||||
sddm.enable = true;
|
||||
nightlight.enable = true;
|
||||
i3.enable = true;
|
||||
shared.enable = true;
|
||||
games = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
mainUser.layout = "de";
|
||||
mainUser.variant = "us";
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
services.xserver.enable = true;
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
|
||||
#zenpower for ryzen
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
|
||||
boot.kernelModules = ["zenpower"];
|
||||
boot.blacklistedKernelModules = [ "k10temp" ];
|
||||
|
||||
services.xserver.desktopManager = {
|
||||
xfce.enable = true;
|
||||
xterm.enable = false;
|
||||
};
|
||||
|
||||
networking.hostName = "amd-server"; # Define your hostname.
|
||||
nixpkgs.config.permittedInsecurePackages =
|
||||
[ "electron-28.3.3" "electron-27.3.11" ];
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
wget
|
||||
git
|
||||
];
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
38
systems/amd-server/hardware-configuration.nix
Normal file
38
systems/amd-server/hardware-configuration.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
# 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 = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/a3c34c9e-06be-49dc-a5d3-4156defa11e7";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/AE1C-16B9";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
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.enp6s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
Reference in New Issue
Block a user