restructure
This commit is contained in:
111
systems/server/configuration.nix
Normal file
111
systems/server/configuration.nix
Normal file
@@ -0,0 +1,111 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
let
|
||||
shash = pkgs.writeShellScriptBin "shash" ''
|
||||
nix hash to-sri --type sha256 $(nix-prefetch-url ''$1)
|
||||
'';
|
||||
in{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
systemd.enableEmergencyMode = false;
|
||||
|
||||
networking.hostName = "server"; # Define your hostname.
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Vienna";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_AT.UTF-8";
|
||||
LC_IDENTIFICATION = "de_AT.UTF-8";
|
||||
LC_MEASUREMENT = "de_AT.UTF-8";
|
||||
LC_MONETARY = "de_AT.UTF-8";
|
||||
LC_NAME = "de_AT.UTF-8";
|
||||
LC_NUMERIC = "de_AT.UTF-8";
|
||||
LC_PAPER = "de_AT.UTF-8";
|
||||
LC_TELEPHONE = "de_AT.UTF-8";
|
||||
LC_TIME = "de_AT.UTF-8";
|
||||
};
|
||||
|
||||
#### Graphical environment ####
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "at";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
#### Sound and printing ####
|
||||
# Enable CUPS to print documents.
|
||||
#services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
#sound.enable = true;
|
||||
#hardware.pulseaudio.enable = false;
|
||||
#security.rtkit.enable = true;
|
||||
#services.pipewire = {
|
||||
# enable = true;
|
||||
# alsa.enable = true;
|
||||
# alsa.support32Bit = true;
|
||||
# pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
#};
|
||||
|
||||
#### Packages ####
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
kate
|
||||
nixos-option
|
||||
wget
|
||||
vim
|
||||
tcpdump
|
||||
dig
|
||||
vscodium
|
||||
inputs.agenix.packages."x86_64-linux".default
|
||||
btop
|
||||
shash
|
||||
gparted
|
||||
restic
|
||||
hdparm
|
||||
wireguard-tools
|
||||
openssl
|
||||
unstable.e2fsprogs
|
||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
# wget
|
||||
];
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
59
systems/server/hardware-configuration.nix
Normal file
59
systems/server/hardware-configuration.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
# 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 = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/1af836fb-ffef-4362-84af-bcb24d4db068";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/B9EB-F6A4";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/e4bf3959-4d3c-4980-82c1-c5ec2104ec93"; }
|
||||
];
|
||||
|
||||
fileSystems."/mnt/2tb" =
|
||||
{ device = "/dev/disk/by-uuid/99954059-3801-4abb-a536-0e7802a3e6b4";
|
||||
fsType = "ext4";
|
||||
options = ["defaults" "nofail"];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/1tb" =
|
||||
{ device = "/dev/disk/by-uuid/fb0a94c2-95df-4f62-904e-695d372363e9";
|
||||
fsType = "ext4";
|
||||
options = ["defaults" "nofail"];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/250ssd" =
|
||||
{ device = "/dev/disk/by-uuid/80163cf9-2030-4757-ada2-03db96184961";
|
||||
fsType = "ext4";
|
||||
options = ["defaults" "nofail"];
|
||||
};
|
||||
|
||||
# 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.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
1
systems/server/wg-publickey
Normal file
1
systems/server/wg-publickey
Normal file
@@ -0,0 +1 @@
|
||||
vyHNUy97R1cvqEvElznPpFQtoqm7WUHnT96UP6Dquwc=
|
||||
Reference in New Issue
Block a user