New machine.nix file for foxhut

This commit is contained in:
xenia 2024-11-17 15:55:55 +01:00
parent db536c0b50
commit c1fc4d12aa
4 changed files with 60 additions and 16 deletions

View File

@ -179,7 +179,7 @@
use-iwd = false;
};
graphical = mkNixOsGraphical {
inherit pkgs;
inherit pkgs pkgs-unstable;
background = "pan-wire-3.png";
use-display-manager = true;
};
@ -219,6 +219,7 @@
nixos-apple-silicon.nixosModules.apple-silicon-support
./nixos/machines/foxhut/hardware.nix
(import ./nixos/machines/foxhut/boot.nix { inherit pkgs pkgs-unstable asahi-firmware; })
(import ./nixos/machines/foxhut/machine.nix { inherit pkgs pkgs-unstable asahi-firmware; })
base
networking
graphical

View File

@ -1,5 +1,6 @@
{
pkgs,
pkgs-unstable,
background-image ? "pan-wire-3.png",
use-display-manager,
...
@ -53,15 +54,16 @@ in
uid = 1002;
};
environment.systemPackages = with pkgs; [
environment.systemPackages = (with pkgs; [
stilo-themes
firefox
thunderbird
glxinfo
start-plasma-shortcut
remmina
libreoffice
kicad-small
];
]) ++ (with pkgs-unstable; [
firefox
]);
}

View File

@ -1,8 +1,4 @@
# 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`).
{ pkgs, pkgs-unstable, asahi-firmware, ... }:
{ pkgs, asahi-firmware, ... }:
{ config, ... }:
{
@ -27,12 +23,5 @@
device = "/swap";
size = 16 * 1024; # 16GB
}];
environment.systemPackages = (with pkgs-unstable; [
renoise
signal-desktop
]) ++ (with pkgs; [
prismlauncher
]);
}

View File

@ -0,0 +1,52 @@
{ pkgs, pkgs-unstable, asahi-firmware, ... }:
{ config, ... }:
{
environment.systemPackages = (with pkgs-unstable; [
renoise
signal-desktop
wireguard-tools
cifs-utils
]) ++ (with pkgs; [
prismlauncher
]);
services.mysql = {
enable = true;
package = pkgs.mariadb;
dataDir = "/var/lib/mysql";
settings = {
mysqld = {
bind_address = "127.0.0.1";
# socket = "/tmp/mariadb.sock";
};
};
ensureDatabases = [
"bnuybase"
];
ensureUsers = [
{
name = "xenia";
ensurePermissions = {
"bnuybase.*" = "ALL PRIVILEGES";
};
}
];
};
networking.firewall.allowedUDPPorts = [ 51821 ];
networking.wireguard = {
enable = true;
interfaces.wg0 = {
ips = [ "192.168.69.254/32" ];
listenPort = 51821;
privateKeyFile = "/home/xenia/wireguard-keys/private";
peers = [ {
publicKey = "XfHU29ij76y4TB8P/QJyn1JnTl9tvxO77IGVmM6p+ic=";
allowedIPs = [ "10.30.0.0/16" "10.250.0.0/16" "10.254.0.0/16" "192.168.30.0/24" "192.168.40.0/24" "192.168.50.0/24" "192.168.51.0/24" "192.168.250.0/24" ];
endpoint = "129.16.13.37:13231";
persistentKeepalive = 25;
} ];
};
};
}