...
This commit is contained in:
124
hosts/acern-real.nix
Normal file
124
hosts/acern-real.nix
Normal file
@@ -0,0 +1,124 @@
|
||||
{ config, lib, pkgs, inputs, secretsDir, ...}:
|
||||
{
|
||||
imports = [
|
||||
../users/me/gui.nix
|
||||
|
||||
inputs.networkmanager.nixosModules.networkmanager
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
../common/all.nix
|
||||
../common/nixos-headless.nix
|
||||
];
|
||||
|
||||
services.xserver = {
|
||||
desktopManager.gnome.enable = true;
|
||||
|
||||
/*
|
||||
displayManager.lightdm = {
|
||||
enable = true;
|
||||
greeters.enso = {
|
||||
enable = true;
|
||||
blur = true;
|
||||
extraConfig = ''
|
||||
default-wallpaper=/usr/share/streets_of_gruvbox.png
|
||||
'';
|
||||
};
|
||||
};
|
||||
# */
|
||||
layout = "at";
|
||||
};
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
services.blueman.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
services.xserver.libinput.enable = true;
|
||||
|
||||
|
||||
|
||||
# Use the GRUB 2 boot loader.
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
version = 2;
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
extraConfig = ''
|
||||
set timeout=2
|
||||
menuentry "win-server" {
|
||||
insmod part_gpt
|
||||
insmod fat
|
||||
insmod search_fs_uuid
|
||||
insmod chain
|
||||
search --label --set=root EFI
|
||||
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
|
||||
}
|
||||
'';
|
||||
};
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "vmd" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos-root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=main" ];
|
||||
};
|
||||
|
||||
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ 2222 ];
|
||||
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
settings.X11Forwarding = true;
|
||||
extraConfig = ''
|
||||
X11UseLocalhost no
|
||||
'';
|
||||
};
|
||||
|
||||
# to build rpi images
|
||||
boot.binfmt.emulatedSystems = [
|
||||
"aarch64-linux"
|
||||
];
|
||||
|
||||
|
||||
######################### networking #####################################
|
||||
|
||||
networking.hostName = "acern";
|
||||
networking.firewall.allowPing = true;
|
||||
networking.firewall.enable = true;
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
3702 # wsdd
|
||||
51820 # wireguard
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
2222 # sshd
|
||||
];
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
networking.networkmanager.profiles = {
|
||||
main = {
|
||||
connection = {
|
||||
id = "main";
|
||||
uuid = "a02273d9-ad12-395e-8372-f61129635b6f";
|
||||
type = "ethernet";
|
||||
autoconnect-priority = "-999";
|
||||
interface-name = "enp1s0";
|
||||
};
|
||||
ipv4 = {
|
||||
address1 = "192.168.1.5/24,192.168.1.1";
|
||||
dns = "1.1.1.1;";
|
||||
method = "manual";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -18,6 +18,10 @@
|
||||
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
settings.X11Forwarding = true;
|
||||
extraConfig = ''
|
||||
X11UseLocalhost no
|
||||
'';
|
||||
};
|
||||
|
||||
programs.bash.loginShellInit = "";
|
||||
|
||||
@@ -49,9 +49,11 @@
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
settings.PermitRootLogin = "yes";
|
||||
|
||||
#settings.X11UseLocalhost = "no";
|
||||
settings.X11Forwarding = true;
|
||||
#settings.AddressFamily = "inet";
|
||||
|
||||
extraConfig = ''
|
||||
X11UseLocalhost no
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall.allowPing = true;
|
||||
|
||||
4
hosts/hpm.nix
Executable file → Normal file
4
hosts/hpm.nix
Executable file → Normal file
@@ -18,6 +18,10 @@
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
settings.PermitRootLogin = "yes";
|
||||
settings.X11Forwarding = true;
|
||||
extraConfig = ''
|
||||
X11UseLocalhost no
|
||||
'';
|
||||
};
|
||||
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
|
||||
4
hosts/lush.nix
Executable file → Normal file
4
hosts/lush.nix
Executable file → Normal file
@@ -82,6 +82,10 @@
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
settings.PermitRootLogin = "no";
|
||||
settings.X11Forwarding = true;
|
||||
extraConfig = ''
|
||||
X11UseLocalhost no
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -27,16 +27,15 @@
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
cifs-utils
|
||||
nfs-utils
|
||||
ntfs3g
|
||||
dhcpcd
|
||||
looking-glass-client
|
||||
];
|
||||
|
||||
|
||||
# enable ntp
|
||||
#services.ntp.enable = true;
|
||||
# if i hibernate and ren unhibernate in the school network ... the time will be off, because 0.nixos.pool.ntp.org can't be reached
|
||||
@@ -180,6 +179,7 @@
|
||||
security.polkit.enable = true;
|
||||
|
||||
services.avahi.enable = true;
|
||||
services.avahi.hostName = "c2vi";
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
#networking.networkmanager.extraConfig = ''
|
||||
@@ -421,7 +421,7 @@
|
||||
|
||||
virtualisation.kvmgt.enable = true;
|
||||
boot.extraModprobeConfig = "options i915 enable_guc=2";
|
||||
boot.kernelParams = [ "intel_iommu=on" ];
|
||||
boot.kernelParams = [ "intel_iommu=on" "pcie_aspm=force" ];
|
||||
|
||||
virtualisation.kvmgt.vgpus = {
|
||||
"i915-GVTg_V5_8" = {
|
||||
|
||||
@@ -116,6 +116,29 @@
|
||||
dns = "1.1.1.1;";
|
||||
method = "manual";
|
||||
};
|
||||
wifi-security = {
|
||||
key-mgmt = "wpa-psk";
|
||||
psk = builtins.readFile "${secretsDir}/wifi-rpi-password";
|
||||
};
|
||||
};
|
||||
|
||||
hot = {
|
||||
connection = {
|
||||
id = "hot";
|
||||
uuid = "ab51de8a-9742-465a-928b-be54a83ab6a3";
|
||||
type = "wifi";
|
||||
autoconnect = "false";
|
||||
interface-name = "wlan0";
|
||||
};
|
||||
wifi = {
|
||||
mac-address = "0C:96:E6:E3:64:03";
|
||||
mode = "ap";
|
||||
ssid = "c2vi-rpi";
|
||||
};
|
||||
|
||||
ipv4 = {
|
||||
method = "shared";
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -196,6 +219,10 @@
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
settings.PermitRootLogin = "no";
|
||||
settings.X11Forwarding = true;
|
||||
extraConfig = ''
|
||||
X11UseLocalhost no
|
||||
'';
|
||||
};
|
||||
|
||||
################################ samba ######################################
|
||||
@@ -283,7 +310,7 @@
|
||||
|
||||
services.borgbackup.jobs.files = {
|
||||
#user = "files";
|
||||
extraCreateArgs = "--verbose --list --filter=AMECbchfsx --stats --checkpoint-interval 600";
|
||||
extraCreateArgs = "--verbose --list --filter=AMECbchfs --stats --checkpoint-interval 600";
|
||||
extraArgs = "--progress";
|
||||
paths = "/home/files/storage";
|
||||
doInit = false;
|
||||
|
||||
Reference in New Issue
Block a user