91 lines
2.4 KiB
Nix
91 lines
2.4 KiB
Nix
{ config, pkgs, ... }:
|
||
|
||
{
|
||
imports = [
|
||
./hardware-configuration.nix
|
||
../../home-manager/users/jalr.nix
|
||
];
|
||
|
||
networking = {
|
||
hostName = "jalr-t520";
|
||
networkmanager.enable = true;
|
||
useDHCP = false;
|
||
};
|
||
|
||
# List packages installed in system profile. To search, run:
|
||
# $ nix search wget
|
||
environment.systemPackages = with pkgs; [
|
||
gnome3.adwaita-icon-theme
|
||
];
|
||
|
||
environment.variables.EDITOR = "nvim";
|
||
|
||
programs.mtr.enable = true;
|
||
programs.wireshark.enable = true;
|
||
|
||
hardware.bluetooth.enable = true;
|
||
|
||
hardware.sane.enable = true;
|
||
|
||
services.blueman.enable = true;
|
||
|
||
services.udisks2.enable = true;
|
||
|
||
services.avahi.enable = true;
|
||
services.avahi.nssmdns = true;
|
||
|
||
services.udev.extraRules = ''
|
||
# 16C0:0442 - Axoloti Core
|
||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0442", MODE:="0666"
|
||
# 0483:df11 - Axoloti Core (STM32 microcontroller) in DFU mode
|
||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666"
|
||
|
||
# Samsung A5
|
||
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", GROUP="dialout", MODE="0660"
|
||
'';
|
||
|
||
jalr = {
|
||
bootloader = "grub2";
|
||
gui.enable = true;
|
||
workstation.enable = true;
|
||
sdr.enable = true;
|
||
libvirt.enable = true;
|
||
autologin.enable = true;
|
||
autologin.username = "jalr";
|
||
};
|
||
|
||
networking.wg-quick.interfaces.wgkalle = {
|
||
address = [
|
||
"172.16.254.5/24"
|
||
"fd00::604:0:0:ac10:fe05/96"
|
||
];
|
||
privateKeyFile = "/root/wireguard-keys/wgkalle";
|
||
listenPort = 51820;
|
||
mtu = 1296;
|
||
|
||
peers = [
|
||
{
|
||
publicKey = "52kAcBdnrFeSuVupHs0u4diUf6tpF8Esy4vzJAlT5Tc=";
|
||
endpoint = "78.47.224.233:1194";
|
||
#endpoint = "[2a01:4f8:190:6068::2]:1194";
|
||
persistentKeepalive = 60;
|
||
allowedIPs = [
|
||
"0.0.0.0/0"
|
||
"::/0"
|
||
];
|
||
}
|
||
];
|
||
};
|
||
networking.firewall.allowedUDPPorts = [
|
||
51820 # wireguard
|
||
];
|
||
|
||
# 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 = "22.05"; # Did you read the comment?
|
||
|
||
}
|