nixos-config/machines/mimir/configuration.nix

225 lines
4.5 KiB
Nix
Raw Normal View History

2022-11-11 11:54:21 +01:00
# 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).
2023-01-27 15:36:05 +01:00
{ nixos-hardware, nomachine, microvm, ... }:
2022-11-17 14:06:39 +01:00
{ pkgs, ... }:
2022-11-11 11:54:21 +01:00
{
imports =
[
# Include the results of the hardware scan.
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-cpu-amd-pstate
nixos-hardware.nixosModules.common-pc-ssd
2022-11-22 17:33:35 +01:00
"${nomachine}/nixos/modules/services/admin/nomachine.nix"
2022-11-11 11:54:21 +01:00
2023-01-27 15:36:05 +01:00
microvm.nixosModules.host
2022-11-11 11:54:21 +01:00
./hardware-configuration.nix
../../users/erwin
../../users/root
];
2022-11-11 17:07:24 +01:00
# nixpkgs.config.allowUnfree = true;
2022-11-11 12:51:48 +01:00
2022-11-11 11:54:21 +01:00
eboskma = {
2022-11-14 18:49:06 +01:00
var.workSystem = true;
2022-11-11 11:54:21 +01:00
users = {
erwin = {
enable = true;
work = true;
2022-11-11 12:51:48 +01:00
terminal = "Alacritty";
2022-11-11 11:54:21 +01:00
};
};
base = {
plymouth.enable = true;
work = true;
2023-03-10 12:57:16 +01:00
kernel = pkgs.linuxKernel.packages.linux_6_2;
2022-11-11 11:54:21 +01:00
};
desktop = {
enable = true;
home-manager = true;
};
docker = {
enable = true;
enableNvidia = true;
2023-03-10 12:57:16 +01:00
# enableTcpSocket = true;
};
2022-11-11 11:54:21 +01:00
fonts.enable = true;
gnome.enable = true;
2022-11-11 17:07:24 +01:00
# greetd.enable = true;
lightdm.enable = true;
2022-11-11 11:54:21 +01:00
networking.enable = true;
nix-common = {
enable = true;
cross-systems = [ "aarch64-linux" ];
};
2022-11-11 11:54:21 +01:00
sound.enable = true;
systemd.enable = true;
};
# Use the systemd-boot EFI boot loader.
boot.loader = {
systemd-boot = {
enable = true;
configurationLimit = 15;
};
efi.canTouchEfiVariables = true;
};
time.timeZone = "Europe/Amsterdam";
2022-11-11 17:07:24 +01:00
console.useXkbConfig = true;
2022-11-11 11:54:21 +01:00
networking = {
hostName = "mimir";
useDHCP = false;
2022-11-14 18:49:06 +01:00
networkmanager.enable = true;
2022-11-11 11:54:21 +01:00
useNetworkd = true;
firewall = {
trustedInterfaces = [ "lo" ];
allowedTCPPorts = [
# Horus System V2
12345
5555
5556
# sccache server
10501
# Celantur
7000
2022-11-11 11:54:21 +01:00
];
};
2023-01-27 15:36:05 +01:00
nat = {
enable = true;
internalInterfaces = [ "microvm" ];
externalInterface = "enp4s0";
};
2022-11-11 11:54:21 +01:00
};
2023-01-27 15:36:05 +01:00
microvm.autostart = [
"miniflux"
];
powerManagement = {
cpuFreqGovernor = "ondemand";
};
2022-11-11 11:54:21 +01:00
systemd.network = {
enable = true;
2022-11-17 14:06:39 +01:00
wait-online.extraArgs = [ "--interface=enp4s0" ];
2022-11-11 17:07:24 +01:00
2023-02-13 08:27:46 +01:00
links = {
"40-enp4s0" = {
matchConfig = {
Name = "enp4s0";
};
linkConfig = {
WakeOnLan = "magic";
};
};
};
2023-01-27 15:36:05 +01:00
netdevs = {
"10-microvm" = {
netdevConfig = {
Kind = "bridge";
Name = "microvm";
};
};
};
2022-11-11 11:54:21 +01:00
networks = {
"40-enp4s0" = {
2022-11-17 14:06:39 +01:00
enable = true;
2022-11-11 11:54:21 +01:00
DHCP = "yes";
matchConfig = {
Name = "enp4s0";
};
2022-11-11 11:54:21 +01:00
};
2022-11-11 17:07:24 +01:00
"40-enp5s0f1" = {
2022-11-17 14:06:39 +01:00
enable = true;
2022-11-11 17:07:24 +01:00
linkConfig = {
2022-11-17 14:06:39 +01:00
RequiredForOnline = "no";
2022-11-11 17:07:24 +01:00
};
matchConfig = {
Name = "enp5s0f1";
};
2022-11-11 17:07:24 +01:00
};
2023-01-27 15:36:05 +01:00
"10-microvm" = {
matchConfig = {
Name = "microvm";
};
addresses = [
{ addressConfig.Address = "172.16.0.1/24"; }
];
};
"11-microvm" = {
matchConfig = {
Name = "vm-*";
};
networkConfig = {
Bridge = "microvm";
};
};
2022-11-11 11:54:21 +01:00
};
};
services.openssh.enable = true;
programs.ssh.startAgent = true;
2023-01-26 11:36:08 +01:00
services.envfs.enable = true;
services.cpupower-gui.enable = true;
2023-04-07 10:10:14 +02:00
services.flatpak.enable = true;
2023-01-26 11:36:08 +01:00
2022-11-17 14:06:39 +01:00
services.xserver.libinput = {
enable = true;
mouse = {
accelSpeed = "1.0";
naturalScrolling = true;
};
};
2022-11-22 17:33:35 +01:00
services.nxserver = {
enable = true;
2022-11-22 17:48:09 +01:00
openFirewall = true;
2022-11-22 17:33:35 +01:00
};
2022-12-22 11:34:55 +01:00
services.icecream.daemon = {
enable = true;
schedulerHost = "icecream.internal.horus.nu";
2022-12-23 08:19:07 +01:00
noRemote = true;
openFirewall = false;
openBroadcast = true;
2022-12-22 11:34:55 +01:00
};
2022-11-11 11:54:21 +01:00
# sops = {
# defaultSopsFile = ./secrets.yaml;
# secrets = {};
# };
# 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. Its 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 = "22.11"; # Did you read the comment?
}