2018-10-31 00:42:58 +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’).
|
|
|
|
|
|
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
[
|
|
|
|
|
./hardware-configuration.nix
|
2019-10-04 22:01:49 +02:00
|
|
|
|
../common-cli.nix
|
|
|
|
|
../common-gui.nix
|
2018-10-31 00:42:58 +01:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
2019-10-15 21:38:23 +02:00
|
|
|
|
boot.loader.grub = {
|
|
|
|
|
efiSupport = true;
|
|
|
|
|
device = "nodev";
|
|
|
|
|
zfsSupport = true;
|
2020-10-06 00:19:43 +02:00
|
|
|
|
gfxmodeEfi = "1920x1080,auto";
|
2020-04-21 02:39:01 +02:00
|
|
|
|
memtest86.enable = true;
|
2020-10-06 00:19:43 +02:00
|
|
|
|
fontSize = 32;
|
2019-10-15 21:38:23 +02:00
|
|
|
|
};
|
2018-12-12 23:42:02 +01:00
|
|
|
|
boot.kernelParams = ["acpi_enforce_resources=lax"];
|
2018-10-31 00:42:58 +01:00
|
|
|
|
boot.tmpOnTmpfs = true;
|
2019-10-15 21:38:23 +02:00
|
|
|
|
boot.supportedFilesystems = [ "zfs" ];
|
2018-10-31 00:42:58 +01:00
|
|
|
|
|
2020-10-06 00:20:54 +02:00
|
|
|
|
virtualisation.virtualbox.host.enable = true;
|
|
|
|
|
# virtualisation.virtualbox.host.enableExtensionPack = true;
|
|
|
|
|
virtualisation.anbox.enable = true;
|
|
|
|
|
|
2019-11-21 02:13:25 +01:00
|
|
|
|
services.zfs = {
|
|
|
|
|
trim.enable = true;
|
|
|
|
|
autoSnapshot = {
|
|
|
|
|
enable = true;
|
|
|
|
|
monthly = 6;
|
|
|
|
|
};
|
|
|
|
|
autoScrub.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
2019-01-24 18:58:13 +01:00
|
|
|
|
hardware.bluetooth.enable = true;
|
|
|
|
|
|
2019-10-06 18:25:00 +02:00
|
|
|
|
# Logitech G920
|
|
|
|
|
hardware.usbWwan.enable = true;
|
|
|
|
|
|
2018-10-31 00:42:58 +01:00
|
|
|
|
services.udev.packages = with pkgs; [
|
2018-12-12 23:42:02 +01:00
|
|
|
|
usb-modeswitch-data # Logitech G920
|
2018-10-31 00:42:58 +01:00
|
|
|
|
];
|
|
|
|
|
|
2019-01-16 23:33:01 +01:00
|
|
|
|
services.udev.extraRules = ''
|
2019-10-06 18:25:00 +02:00
|
|
|
|
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="dialout"
|
2019-01-16 23:33:01 +01:00
|
|
|
|
'';
|
|
|
|
|
|
2019-10-06 18:25:00 +02:00
|
|
|
|
security.pki.certificateFiles = [ ./codemasters.pem ];
|
|
|
|
|
|
2019-10-04 22:01:49 +02:00
|
|
|
|
networking.hostName = "paul-fixe";
|
2019-10-15 21:38:23 +02:00
|
|
|
|
networking.hostId = "3a1f739e";
|
2018-10-31 00:42:58 +01:00
|
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2018-12-12 23:42:02 +01:00
|
|
|
|
usb_modeswitch
|
2018-10-31 00:42:58 +01:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
programs.wireshark.enable = true;
|
|
|
|
|
programs.wireshark.package = pkgs.wireshark;
|
|
|
|
|
|
|
|
|
|
networking.firewall.enable = false;
|
|
|
|
|
|
2020-10-06 00:20:54 +02:00
|
|
|
|
services.xserver.displayManager.autoLogin = {
|
2019-10-06 18:25:00 +02:00
|
|
|
|
enable = true;
|
|
|
|
|
user = "paul";
|
|
|
|
|
};
|
|
|
|
|
|
2018-10-31 00:42:58 +01:00
|
|
|
|
users.users.paul = {
|
|
|
|
|
isNormalUser = true;
|
2020-10-06 00:20:54 +02:00
|
|
|
|
extraGroups = [ "wheel" "networkmanager" "wireshark" "input" "dialout" "libvirtd" "vboxusers" ];
|
2018-10-31 00:42:58 +01:00
|
|
|
|
uid = 1000;
|
2019-10-06 18:25:00 +02:00
|
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDstFRwMoTEip5IBSYE4dUj3miO0LsKrnUKQJmp7d5QYo3VhXk43jU6VUU0tVAegkzWLlQ3ohoFns+8bZyf7hj7roftrDfoC9bbbx4ihhWrZTlF0gzoH4t52yetFO5eC/tV2sm/zFoa+3IWLokOEFmAoknAVag1MmVLXTQ6WPoTPD4UsX/D3lyE4dbSKxHpMOIjqIdqSEgO0BeTdnHe5afvGXXO1VYTvPsGDHT9w8EHwQV9JXIPn7KVOp3qin7OwvFFrrB3QbiEVTJvGiH2hrfxcARTN/+TxGtf+aOFeuQykURG9Wz/aBK60EWE0wGrzuIymxtNdOR1NhmnNrUZ976Tb9WdR7FC+yM6+/kdfICy+sGQmmn8TLsGvcJTT/pl4Pa9uRAKjRJuLIEgYY6W/ms9lCRyf484yRkDlq+V0BPuN9Jy6Eb7x+tmZNkpEtkqso7wfXD8sf5BIwv2K69SVMpfTswydHGmDwHZ0zaDKGlyCiyJ1QGqUhCTXqtYVq+kQ3AcjKcysMwVEmwx/ySu0XFuV8oUkl9XK/RUoc++sMEd0EbHcn8uwCmBARNX+GLQ03vxwyMW3HyneP8EAxoqtSepZXbTdVP/0i+l7EUUeA7zsaWfU2a82ktZWpVPFGfxkuo0l3zLF19EsXPKZNqlRfkOWjSgp+qWihAkQIQk3GoduQ== openpgp:0x75EE3375"
|
|
|
|
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3fEmkmrhccW8NegIk/Ubu6Yw80VCQ1ttG419e+1V1wkJPXFAqcIhffwrIlz81dJ47T+H+zeptpAX8U1Gbk1B5ZH4DW8OcqU6ymM+j6g/gICpvrjJUOpdgyA3GIOjuBJGijGQGggDw1k2SdopAVV1H38YUAJ33RGDvjLJO6VREYLDYLF4oaDp8ann7Wn8BpX2T7cRvhrzqcwbEGaw1f/xrLE5KklOb6pOHRWFJMxW83d8OKiLkQvM4vFGlvvG0/AKGZaZWHDXS7ldoyAv+vnN8DrIxmWEQjdNLfAwYDBHp6XqE0slde4dqBjVHji5+ajFr7eJnrzc4IXsHJ1jM9xGB paul@loutreos"
|
|
|
|
|
];
|
2018-10-31 00:42:58 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.syncthing.enable = true;
|
|
|
|
|
services.syncthing.user = "paul";
|
|
|
|
|
services.syncthing.group = "users";
|
|
|
|
|
|
2019-10-06 18:25:00 +02:00
|
|
|
|
services.netdata.enable = true;
|
|
|
|
|
|
|
|
|
|
services.openssh.enable = true;
|
|
|
|
|
services.openssh.passwordAuthentication = false;
|
2020-05-07 12:13:35 +02:00
|
|
|
|
services.openssh.forwardX11 = true;
|
2019-10-06 18:25:00 +02:00
|
|
|
|
|
2020-10-06 00:22:19 +02:00
|
|
|
|
systemd.services = {
|
|
|
|
|
"wol" = {
|
|
|
|
|
description = "Wake-on-LAN";
|
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
|
requires = [ "network.target" ];
|
|
|
|
|
after = [ "network.target" ];
|
|
|
|
|
script = ''
|
|
|
|
|
${pkgs.ethtool}/sbin/ethtool -s eno1 wol g
|
|
|
|
|
'';
|
|
|
|
|
serviceConfig.Type = "oneshot";
|
|
|
|
|
};
|
|
|
|
|
};
|
2019-11-21 02:12:58 +01:00
|
|
|
|
|
2019-10-15 21:38:23 +02:00
|
|
|
|
system.stateVersion = "20.03";
|
2018-10-31 00:42:58 +01:00
|
|
|
|
}
|