dendrify: comfy-station
This commit is contained in:
177
old/hosts/comfy-station/configuration.nix
Normal file
177
old/hosts/comfy-station/configuration.nix
Normal file
@@ -0,0 +1,177 @@
|
||||
# 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,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Secret management
|
||||
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
|
||||
sops.secrets.wg-priv = {
|
||||
sopsFile = ../../secrets/comfy-station/wg.yaml;
|
||||
key = "privateKey";
|
||||
};
|
||||
|
||||
# Users
|
||||
users.users.jonas = {
|
||||
isNormalUser = true;
|
||||
description = "Jonas";
|
||||
extraGroups = ["networkmanager" "wheel" "docker" "dialout"];
|
||||
};
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
programs.zsh.enable = true;
|
||||
|
||||
# hive modules
|
||||
hive.nix-scripts.enable = true;
|
||||
hive.displayManager.name = "sddm";
|
||||
hive.hyprland.enable = true;
|
||||
hive.kwallet.enable = true;
|
||||
hive.kwallet.forUsers = ["jonas"];
|
||||
hive.virt-manager.enable = true;
|
||||
hive.virt-manager.forUsers = ["jonas"];
|
||||
hive.bluetooth.enable = true;
|
||||
hive.sound.enable = true;
|
||||
hive.yubikey.enable = true;
|
||||
hive.wg.client.enable = true;
|
||||
hive.wg.client.privateKeyFile = config.sops.secrets.wg-priv.path;
|
||||
hive.wg.client.peer = "comfy-station";
|
||||
hive.programs.games.enable = true;
|
||||
hive.programs.games.steam = true;
|
||||
hive.programs.creative = {
|
||||
enable = true;
|
||||
image-management = true;
|
||||
image-raw-processing = true;
|
||||
video-editing-light = true;
|
||||
};
|
||||
|
||||
# system packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
age
|
||||
alejandra
|
||||
arduino
|
||||
borgbackup
|
||||
borgmatic
|
||||
chromium
|
||||
digikam
|
||||
discord
|
||||
docker
|
||||
docker-compose
|
||||
drawio
|
||||
feh
|
||||
ffmpeg
|
||||
firefox
|
||||
gimp
|
||||
git
|
||||
(gnome-network-displays.overrideAttrs (final: prev: {buildInputs = prev.buildInputs ++ [glib-networking];}))
|
||||
insomnia
|
||||
krita
|
||||
libreoffice
|
||||
mosquitto
|
||||
mpv
|
||||
mupdf
|
||||
nh
|
||||
nix-index
|
||||
nix-output-monitor
|
||||
obsidian
|
||||
openhantek6022
|
||||
qalculate-qt
|
||||
qtpass
|
||||
ranger
|
||||
sops
|
||||
spotify
|
||||
vim
|
||||
vlc
|
||||
vscode
|
||||
wget
|
||||
zoom
|
||||
zotero
|
||||
];
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"electron-25.9.0" # required by obsidian
|
||||
];
|
||||
services.avahi.enable = true;
|
||||
services.udev.packages = [pkgs.openhantek6022];
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
# 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 = "24.11"; # Did you read the comment?
|
||||
|
||||
# gc settings and binary caches
|
||||
nix = {
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://aseipp-nix-cache.freetls.fastly.net"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
auto-optimise-store = true;
|
||||
trusted-users = [
|
||||
"@wheel"
|
||||
];
|
||||
max-jobs = 2;
|
||||
cores = 8;
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
};
|
||||
|
||||
# boot
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.plymouth.enable = true;
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.supportedFilesystems = ["ntfs"];
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
networking.hostName = "comfy-station"; # Define your hostname.
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# printing
|
||||
services.printing.enable = true;
|
||||
|
||||
# touchpad
|
||||
services.libinput.touchpad.naturalScrolling = true;
|
||||
|
||||
# ld-fix
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = [
|
||||
# Add any missing dynamic libraries for unpackaged programs
|
||||
# here, NOT in environment.systemPackages
|
||||
];
|
||||
}
|
||||
47
old/hosts/comfy-station/hardware-configuration.nix
Normal file
47
old/hosts/comfy-station/hardware-configuration.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
# 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 = ["nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
||||
boot.initrd.kernelModules = ["dm-snapshot"];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
boot.initrd.luks.devices."lvm-root".device = "/dev/disk/by-uuid/0b55681d-5c7b-4045-b895-d1eb7e306ffb";
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/88f53721-1c3f-43fd-8875-59e597aacb10";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/583D-114B";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/f81521e7-4c09-4e91-8914-3dcd9febdfff";}
|
||||
];
|
||||
|
||||
# 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.enp2s0f0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
151
old/hosts/harbor/configuration.nix
Normal file
151
old/hosts/harbor/configuration.nix
Normal file
@@ -0,0 +1,151 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./disko.nix
|
||||
];
|
||||
|
||||
# Secret management
|
||||
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
|
||||
sops.secrets."nextcloud-admin-pass" = {
|
||||
sopsFile = ../../secrets/harbor/nextcloud.yaml;
|
||||
owner = "nextcloud";
|
||||
key = "admin-pass";
|
||||
};
|
||||
sops.secrets."wg-priv" = {
|
||||
sopsFile = ../../secrets/harbor/wg.yaml;
|
||||
key = "privateKey";
|
||||
};
|
||||
sops.secrets."gitea-db-pass" = {
|
||||
sopsFile = ../../secrets/harbor/gitea.yaml;
|
||||
owner = config.services.gitea.user;
|
||||
key = "databasePassword";
|
||||
};
|
||||
sops.secrets."gotify-admin-pass" = {
|
||||
sopsFile = ../../secrets/harbor/gotify.yaml;
|
||||
owner = config.hive.gotify-instance.user;
|
||||
key = "adminPassword";
|
||||
};
|
||||
|
||||
# gc settings and binary caches
|
||||
nix = {
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://aseipp-nix-cache.freetls.fastly.net"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
};
|
||||
|
||||
# user with ssh access
|
||||
users.users.jonas = {
|
||||
isNormalUser = true;
|
||||
description = "Jonas";
|
||||
extraGroups = ["wheel"];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCyCyYsMSiy7shcehlzJEbCyRiHk+cicFB35Bc2uc4PjjkCjswLh01fRAV2QcplrNkH/5F4GBTbOoZHHc7/AVLyUxgwDC9ffD2i7fevuGpfBFy9D30uz6jDekxXkmRmIlidXLdG1Fh4zwVejGlwdhUu/Zb7PonO/dktx3EFdf1SpnW+y75anN85zoGsld7KQk42wEd0zXtCgx4CKI6Vvt6heWCEiJ9wyw1sLpTJr4H8In236CUj1/r1qY9Gfa8n9NA0J9XCpcwSCEWGRKQNicoQIpnp5txrgzaUq4r6qBKHmImYXmSTVnDZ9dJLRYNu2lDvBtTXP4ztlR6Lpxs873fPg51qgaX9rRVMMo/gGjq8fOFWsDVaJZab9VY3hZYNCKIbWFqo4GKyCQs9Xfzr2AUACm09HWiYMTefwEypOzvUb4z+LF2B/0c5XmghLF/TOzLVgDXzAgWMH4mCnPh9EDLHTtoJaGNURler9VRV8yQyLH6oK9UpHZovCFs7HpFN+WPv2QVFfkK8aHg7tnklFsT78z154bjuspiEI/fFGmTxoQUGufmHlRy/9GQDusgNfe24ZEB2hHBVjKv29XdIfvFAhoPVpA6+O/N3feSlmVISaU+8QraVQEf/TuQjopDUWpJTmqSxKvQSTPwcyWDy6NtcJ85bGAu6jSUGC3ouH4Rb2Q== cardno:000609618602"
|
||||
];
|
||||
};
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
programs.zsh.enable = true;
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
};
|
||||
|
||||
# hive modules
|
||||
hive.gitea-instance.enable = true;
|
||||
hive.gitea-instance.nativeRunner = true;
|
||||
hive.gitea-instance.instanceFQDN = "git.jroeger.de";
|
||||
hive.gitea-instance.databasePasswordFile = config.sops.secrets.gitea-db-pass.path;
|
||||
hive.gotify-instance.enable = true;
|
||||
hive.gotify-instance.instanceFQDN = "gotify.jroeger.de";
|
||||
hive.gotify-instance.adminPasswordSopsKey = config.sops.secrets.gotify-admin-pass.name;
|
||||
hive.nextcloud-instance.enable = true;
|
||||
hive.nextcloud-instance.ssl = true;
|
||||
hive.nextcloud-instance.adminPasswordFile = config.sops.secrets.nextcloud-admin-pass.path;
|
||||
hive.nextcloud-instance.instanceFQDN = "nextcloud.jroeger.de";
|
||||
hive.minecraft-server.enable = true;
|
||||
hive.nix-scripts.enable = true;
|
||||
hive.borg-server.enable = true;
|
||||
hive.borg-server.repositories.comfy-station.ssh_public_key = builtins.readFile (../../static/keys + "/borg-jonas@comfy-station.pub");
|
||||
hive.wg.server.enable = true;
|
||||
hive.wg.server.privateKeyFile = config.sops.secrets.wg-priv.path;
|
||||
|
||||
# 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 = "25.11"; # Did you read the comment?
|
||||
|
||||
# VPS compat
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
boot.loader.grub.version = 2;
|
||||
boot.kernelParams = [
|
||||
"net.ifnames=0" # ensure iface is called eth0
|
||||
"ip=173.249.42.252::173.249.42.1:255.255.255.0:harbor:eth0:none:8.8.8.8"
|
||||
];
|
||||
networking.networkmanager.enable = true;
|
||||
networking = {
|
||||
# Static network configuration
|
||||
hostName = "harbor";
|
||||
domain = "jroeger.de";
|
||||
defaultGateway = "173.249.42.1";
|
||||
nameservers = ["8.8.8.8"];
|
||||
interfaces.eth0.ipv4.addresses = [
|
||||
{
|
||||
address = "173.249.42.252";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
# Temporary ssh server for disk unlock
|
||||
boot.initrd = {
|
||||
availableKernelModules = ["virtio_pci"];
|
||||
network = {
|
||||
enable = true;
|
||||
ssh = {
|
||||
enable = true;
|
||||
port = 2222;
|
||||
authorizedKeys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCyCyYsMSiy7shcehlzJEbCyRiHk+cicFB35Bc2uc4PjjkCjswLh01fRAV2QcplrNkH/5F4GBTbOoZHHc7/AVLyUxgwDC9ffD2i7fevuGpfBFy9D30uz6jDekxXkmRmIlidXLdG1Fh4zwVejGlwdhUu/Zb7PonO/dktx3EFdf1SpnW+y75anN85zoGsld7KQk42wEd0zXtCgx4CKI6Vvt6heWCEiJ9wyw1sLpTJr4H8In236CUj1/r1qY9Gfa8n9NA0J9XCpcwSCEWGRKQNicoQIpnp5txrgzaUq4r6qBKHmImYXmSTVnDZ9dJLRYNu2lDvBtTXP4ztlR6Lpxs873fPg51qgaX9rRVMMo/gGjq8fOFWsDVaJZab9VY3hZYNCKIbWFqo4GKyCQs9Xfzr2AUACm09HWiYMTefwEypOzvUb4z+LF2B/0c5XmghLF/TOzLVgDXzAgWMH4mCnPh9EDLHTtoJaGNURler9VRV8yQyLH6oK9UpHZovCFs7HpFN+WPv2QVFfkK8aHg7tnklFsT78z154bjuspiEI/fFGmTxoQUGufmHlRy/9GQDusgNfe24ZEB2hHBVjKv29XdIfvFAhoPVpA6+O/N3feSlmVISaU+8QraVQEf/TuQjopDUWpJTmqSxKvQSTPwcyWDy6NtcJ85bGAu6jSUGC3ouH4Rb2Q== cardno:000609618602"
|
||||
];
|
||||
hostKeys = ["/etc/secrets/initrd/ssh_host_rsa_key"];
|
||||
shell = "/bin/cryptsetup-askpass";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
console.keyMap = "de";
|
||||
}
|
||||
71
old/hosts/harbor/disko.nix
Normal file
71
old/hosts/harbor/disko.nix
Normal file
@@ -0,0 +1,71 @@
|
||||
let
|
||||
btrfsopt = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
"ssd"
|
||||
"space_cache=v2"
|
||||
"user_subvol_rm_allowed"
|
||||
];
|
||||
in {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = "/dev/sda";
|
||||
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";
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "nixos";
|
||||
passwordFile = "/tmp/pass";
|
||||
additionalKeyFiles = ["/nixos-enc.key"];
|
||||
extraFormatArgs = [
|
||||
"--type luks1"
|
||||
"--iter-time 3000"
|
||||
];
|
||||
settings = {
|
||||
allowDiscards = true;
|
||||
};
|
||||
content = {
|
||||
type = "btrfs";
|
||||
subvolumes = {
|
||||
"@root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = btrfsopt;
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = btrfsopt;
|
||||
};
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = btrfsopt;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
21
old/hosts/harbor/hardware-configuration.nix
Normal file
21
old/hosts/harbor/hardware-configuration.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
# 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 + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
283
old/hosts/monolith/configuration.nix
Normal file
283
old/hosts/monolith/configuration.nix
Normal file
@@ -0,0 +1,283 @@
|
||||
# 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,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Secret management
|
||||
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
|
||||
sops.secrets.wg-priv = {
|
||||
sopsFile = ../../secrets/monolith/wg.yaml;
|
||||
key = "privateKey";
|
||||
};
|
||||
sops.secrets.spotifyShortcutsClientId = {
|
||||
sopsFile = ../../secrets/spotify-shortcuts.yaml;
|
||||
key = "clientId";
|
||||
};
|
||||
sops.secrets.spotifyShortcutsClientSecret = {
|
||||
sopsFile = ../../secrets/spotify-shortcuts.yaml;
|
||||
key = "clientSecret";
|
||||
};
|
||||
|
||||
# Users
|
||||
users.users.jonas = {
|
||||
isNormalUser = true;
|
||||
description = "Jonas";
|
||||
hashedPassword = ""; # passwordless login (sudo is now unusable without specifying NOPASSWD)
|
||||
extraGroups = ["networkmanager" "wheel" "docker" "dialout"];
|
||||
};
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
users.groups.data = {
|
||||
gid = 1001;
|
||||
members = ["jonas"];
|
||||
};
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
programs.zsh.enable = true;
|
||||
|
||||
# fonts
|
||||
fonts.packages = with pkgs; [
|
||||
fira
|
||||
fira-code-symbols
|
||||
nerd-fonts.fira-code
|
||||
];
|
||||
|
||||
# hive modules
|
||||
hive.nix-scripts.enable = true;
|
||||
hive.displayManager.name = "sddm";
|
||||
hive.themes.layan.enable = true;
|
||||
hive.plasma.enable = true;
|
||||
hive.kwallet.enable = true;
|
||||
hive.kwallet.forUsers = ["jonas"];
|
||||
hive.virt-manager.enable = true;
|
||||
hive.virt-manager.forUsers = ["jonas"];
|
||||
hive.bluetooth.enable = true;
|
||||
hive.sound.enable = true;
|
||||
hive.sound.noisetorch = true;
|
||||
hive.yubikey.enable = true;
|
||||
hive.services.kdeconnect.enable = true;
|
||||
hive.wg.client.enable = true;
|
||||
hive.wg.client.privateKeyFile = config.sops.secrets.wg-priv.path;
|
||||
hive.wg.client.peer = "monolith";
|
||||
hive.programs.games.enable = true;
|
||||
hive.programs.games.dayz = true;
|
||||
hive.programs.games.lutris = true;
|
||||
hive.programs.games.steam = true;
|
||||
hive.programs.games.wine = true;
|
||||
hive.programs.creative = {
|
||||
enable = true;
|
||||
image-management = true;
|
||||
image-editing = true;
|
||||
image-raw-processing = true;
|
||||
video-editing-light = true;
|
||||
video-editing-heavy = true;
|
||||
daws = true;
|
||||
};
|
||||
hive.programs.utils = {
|
||||
enable = true;
|
||||
camera = true;
|
||||
};
|
||||
hive.programs.spotify-shortcuts = {
|
||||
enable = true;
|
||||
clientIdSopsKey = config.sops.secrets.spotifyShortcutsClientId.name;
|
||||
clientSecretSopsKey = config.sops.secrets.spotifyShortcutsClientSecret.name;
|
||||
};
|
||||
|
||||
# system packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
age
|
||||
alejandra
|
||||
arduino
|
||||
borgbackup
|
||||
borgmatic
|
||||
chromium
|
||||
discord
|
||||
docker
|
||||
docker-compose
|
||||
feh
|
||||
firefox
|
||||
git
|
||||
gramps
|
||||
insomnia
|
||||
libreoffice
|
||||
mosquitto
|
||||
mpv
|
||||
mupdf
|
||||
nextcloud-client
|
||||
nh
|
||||
nix-index
|
||||
nix-output-monitor
|
||||
obsidian
|
||||
openhantek6022
|
||||
qalculate-qt
|
||||
qdirstat
|
||||
qtpass
|
||||
ranger
|
||||
sops
|
||||
spotify
|
||||
vim
|
||||
vlc
|
||||
vscode
|
||||
wget
|
||||
zoom
|
||||
zotero
|
||||
];
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"electron-25.9.0" # required by obsidian
|
||||
];
|
||||
services.udev.packages = [pkgs.openhantek6022];
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
# Corsair drivers
|
||||
hardware.ckb-next = {
|
||||
enable = true;
|
||||
# Workarount until https://github.com/NixOS/nixpkgs/issues/444209
|
||||
# is fixed
|
||||
package = pkgs.ckb-next.overrideAttrs (prev: {
|
||||
cmakeFlags =
|
||||
(prev.cmakeFlags or [])
|
||||
++ [
|
||||
"-DUSE_DBUS_MENU=0"
|
||||
];
|
||||
});
|
||||
};
|
||||
|
||||
# dpi correction
|
||||
services.xserver.dpi = 91;
|
||||
environment.variables = {
|
||||
## Used by GTK 3
|
||||
# `GDK_SCALE` is limited to integer values
|
||||
GDK_SCALE = "1";
|
||||
# Inverse of GDK_SCALE
|
||||
GDK_DPI_SCALE = "1";
|
||||
|
||||
# Used by Qt 5
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
|
||||
_JAVA_OPTIONS = "-Dsun.java2d.uiScale=1";
|
||||
};
|
||||
# Expose variables to graphical systemd user services
|
||||
services.xserver.displayManager.importedVariables = [
|
||||
"GDK_SCALE"
|
||||
"GDK_DPI_SCALE"
|
||||
"QT_AUTO_SCREEN_SCALE_FACTOR"
|
||||
];
|
||||
|
||||
# Enable OpenGL
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = [pkgs.rocmPackages.clr];
|
||||
};
|
||||
|
||||
# Load nvidia driver for Xorg and Wayland
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = false;
|
||||
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
open = false;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
# 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 = "24.11"; # Did you read the comment?
|
||||
|
||||
# gc settings and binary caches
|
||||
nix = {
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://aseipp-nix-cache.freetls.fastly.net"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
};
|
||||
|
||||
# boot
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.plymouth.enable = true;
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.supportedFilesystems = ["ntfs"];
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
networking.firewall.enable = true;
|
||||
networking.hostName = "monolith"; # Define your hostname.
|
||||
networking.extraHosts = ''
|
||||
127.0.0.1 monolith
|
||||
'';
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# printing
|
||||
services.printing.enable = true;
|
||||
|
||||
# ld-fix
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = [
|
||||
# Add any missing dynamic libraries for unpackaged programs
|
||||
# here, NOT in environment.systemPackages
|
||||
];
|
||||
}
|
||||
57
old/hosts/monolith/hardware-configuration.nix
Normal file
57
old/hosts/monolith/hardware-configuration.nix
Normal file
@@ -0,0 +1,57 @@
|
||||
# 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 = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/11d59216-2e76-499f-853f-9801486e330a";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/0892-649B";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0022" "dmask=0022"];
|
||||
};
|
||||
|
||||
fileSystems."/data1" = {
|
||||
device = "/dev/disk/by-uuid/8426515e-2be1-4c51-8b5f-d1850aa17270";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/data2" = {
|
||||
device = "/dev/disk/by-uuid/4f39ed6d-74ed-420b-b542-89d432459f79";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/.swapfile";
|
||||
size = 24 * 1024;
|
||||
}
|
||||
];
|
||||
|
||||
# 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.enp42s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
113
old/hosts/vm/configuration.nix
Normal file
113
old/hosts/vm/configuration.nix
Normal file
@@ -0,0 +1,113 @@
|
||||
# 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’).
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
../../modules/hardware/bluetooth.nix
|
||||
../../modules/hardware/printing.nix
|
||||
../../modules/hardware/sound.nix
|
||||
../../modules/services/docker.nix
|
||||
../../modules/desktop/dm
|
||||
../../modules/desktop/de
|
||||
];
|
||||
|
||||
desktop.dm.name = "sddm";
|
||||
desktop.dm.autologin = "jonas";
|
||||
desktop.de.plasma.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.jonas = {
|
||||
isNormalUser = true;
|
||||
description = "Jonas";
|
||||
extraGroups = ["networkmanager" "wheel" "docker"];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker
|
||||
git
|
||||
ranger
|
||||
vim
|
||||
wget
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# 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 = "24.11"; # Did you read the comment?
|
||||
|
||||
# boot
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
networking.hostName = "vm"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
}
|
||||
39
old/hosts/vm/hardware-configuration.nix
Normal file
39
old/hosts/vm/hardware-configuration.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
# 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 = [];
|
||||
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "ohci_pci" "ehci_pci" "ahci" "sd_mod" "sr_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/a28cd2c0-67f3-4492-9cd9-996fdbe2b8ef";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/0134-2DF5";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
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.enp0s3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
virtualisation.virtualbox.guest.enable = true;
|
||||
}
|
||||
1
old/hosts/wsl/configuration.nix
Normal file
1
old/hosts/wsl/configuration.nix
Normal file
@@ -0,0 +1 @@
|
||||
{}: {}
|
||||
Reference in New Issue
Block a user