125 lines
3.1 KiB
Nix
125 lines
3.1 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; [
|
||
file
|
||
fzf
|
||
git
|
||
gnome3.adwaita-icon-theme
|
||
htop
|
||
jq
|
||
neovim
|
||
pavucontrol
|
||
ripgrep
|
||
spice-gtk
|
||
virt-manager
|
||
];
|
||
|
||
environment.variables.EDITOR = "nvim";
|
||
|
||
nixpkgs.overlays = [
|
||
(self: super: {
|
||
neovim = super.neovim.override {
|
||
viAlias = true;
|
||
vimAlias = true;
|
||
};
|
||
})
|
||
];
|
||
|
||
programs.mtr.enable = true;
|
||
programs.wireshark.enable = true;
|
||
|
||
programs.gnupg.agent = {
|
||
enable = true;
|
||
pinentryFlavor = "gnome3";
|
||
};
|
||
|
||
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"
|
||
|
||
# mute indicator
|
||
SUBSYSTEM=="tty", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="6d75", SYMLINK+="mute-indicator"
|
||
|
||
# DJI Goggles
|
||
SUBSYSTEM=="usb", ATTRS{idVendor}=="2ca3", ATTRS{idProduct}=="001f", GROUP="video", MODE="0660"
|
||
|
||
# Samsung A5
|
||
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", GROUP="dialout", MODE="0660"
|
||
'';
|
||
|
||
virtualisation = {
|
||
docker.enable = true;
|
||
libvirtd.enable = true;
|
||
};
|
||
|
||
# https://github.com/NixOS/nixpkgs/issues/60594
|
||
security.wrappers.spice-client-glib-usb-acl-helper.source = "${pkgs.spice-gtk}/bin/spice-client-glib-usb-acl-helper";
|
||
|
||
security.polkit.enable = true;
|
||
|
||
myConfig = {
|
||
gui.enable = true;
|
||
autologin.enable = true;
|
||
};
|
||
|
||
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;
|
||
|
||
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 = "20.03"; # Did you read the comment?
|
||
|
||
}
|