2022-12-15 13:29:31 +00:00
|
|
|
{ pkgs, config, ... }:
|
2022-01-24 21:40:22 +00:00
|
|
|
{
|
2022-01-25 00:13:49 +00:00
|
|
|
imports = [
|
|
|
|
# Include the results of the hardware scan.
|
|
|
|
./hardware-configuration.nix
|
2022-02-06 23:00:41 +00:00
|
|
|
../../roles/all.nix
|
2022-06-05 00:12:55 +00:00
|
|
|
../../modules/luks.nix
|
|
|
|
../../modules/grub.nix
|
2022-01-25 00:13:49 +00:00
|
|
|
];
|
2022-01-24 21:40:22 +00:00
|
|
|
|
2022-02-16 19:45:12 +00:00
|
|
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
2022-01-26 19:46:10 +00:00
|
|
|
|
2022-06-05 00:12:55 +00:00
|
|
|
time.hardwareClockInLocalTime = true; #Be compatible with Windows Dualboot
|
2022-02-23 22:42:42 +00:00
|
|
|
|
2022-12-15 13:29:31 +00:00
|
|
|
networking.useNetworkd = true;
|
2022-01-24 21:40:22 +00:00
|
|
|
networking.useDHCP = false;
|
2022-01-25 00:31:56 +00:00
|
|
|
networking.hostName = "cray"; # Define your hostname.
|
2022-02-14 20:50:52 +00:00
|
|
|
networking.interfaces.enp4s0.useDHCP = true;
|
|
|
|
networking.interfaces.enp4s0.wakeOnLan.enable = true;
|
2022-01-24 21:40:22 +00:00
|
|
|
|
2022-12-15 13:29:31 +00:00
|
|
|
#boot.extraModulePackages = [ config.boot.kernelPackages.wireguard ];
|
|
|
|
systemd.network = {
|
|
|
|
enable = true;
|
|
|
|
netdevs = {
|
|
|
|
"10-wg-backbone" = {
|
|
|
|
netdevConfig = {
|
|
|
|
Kind = "wireguard";
|
|
|
|
MTUBytes = "1300";
|
|
|
|
Name = "wg-backbone";
|
|
|
|
};
|
|
|
|
extraConfig = ''
|
|
|
|
[WireGuard]
|
|
|
|
PrivateKeyFile=/etc/secrets/wireguard
|
|
|
|
ListenPort=9918
|
|
|
|
|
|
|
|
[WireGuardPeer]
|
|
|
|
PublicKey=JjJrLv6ocRIgPGPz6TUexPj0eUSKPDEQFye4397nbwM=
|
|
|
|
AllowedIPs=192.168.8.0/24
|
|
|
|
Endpoint=marge.fleaz.me:50200
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
networks = {
|
|
|
|
# See also man systemd.network
|
|
|
|
"40-wg0".extraConfig = ''
|
|
|
|
[Match]
|
|
|
|
Name=wg-backbone
|
|
|
|
|
|
|
|
[Network]
|
|
|
|
DHCP=no
|
|
|
|
IPv6AcceptRA=false
|
|
|
|
|
|
|
|
# IP addresses the client interface will have
|
|
|
|
[Address]
|
|
|
|
Address=192.168.8.13/24
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-01-25 00:31:56 +00:00
|
|
|
# Enable CUPS
|
2022-01-24 21:40:22 +00:00
|
|
|
services.printing.enable = true;
|
2022-01-26 19:45:40 +00:00
|
|
|
services.printing.drivers = with pkgs; [ splix ];
|
2022-01-24 21:40:22 +00:00
|
|
|
|
2022-08-25 21:47:46 +00:00
|
|
|
# AMD OpenGL Support
|
|
|
|
hardware.opengl.extraPackages = with pkgs; [
|
|
|
|
rocm-opencl-icd
|
|
|
|
rocm-opencl-runtime
|
|
|
|
];
|
|
|
|
|
2022-01-24 21:40:22 +00:00
|
|
|
system.stateVersion = "21.11"; # Did you read the comment?
|
|
|
|
|
|
|
|
}
|
|
|
|
|