2017-08-28 17:19:07 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports =
|
|
|
|
[
|
|
|
|
./common.nix
|
|
|
|
./large-sw.nix
|
|
|
|
./uefi.nix
|
|
|
|
./fstrim.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
environment.etc."lvm/lvm.conf".text = ''
|
|
|
|
devices {
|
|
|
|
issue_discards = 1
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
boot.initrd.luks.devices = [
|
|
|
|
{
|
|
|
|
name = "nvme0n1p2";
|
|
|
|
device = "/dev/disk/by-uuid/5ca3d7ec-3f9e-4a08-8bc2-b26bfc3459c5";
|
|
|
|
preLVM = true;
|
|
|
|
allowDiscards = true;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
services.xserver = {
|
2017-09-02 07:41:48 +00:00
|
|
|
dpi = 120;
|
|
|
|
|
2017-08-28 17:19:07 +00:00
|
|
|
libinput.enable = true;
|
|
|
|
config = ''
|
|
|
|
Section "InputClass"
|
|
|
|
Identifier "touchpad"
|
|
|
|
Driver "libinput"
|
|
|
|
MatchDevicePath "/dev/input/event*"
|
|
|
|
MatchIsPointer "true"
|
|
|
|
EndSection
|
|
|
|
'';
|
|
|
|
|
|
|
|
videoDrivers = [ "modesetting" ];
|
|
|
|
useGlamor = true;
|
|
|
|
};
|
|
|
|
programs.light.enable = true;
|
|
|
|
|
|
|
|
services.tlp.enable = true;
|
|
|
|
|
|
|
|
networking.hostName = "petalius";
|
|
|
|
networking.hostId = "cf58caa9";
|
|
|
|
|
2017-11-14 15:44:21 +00:00
|
|
|
# systemd.services.ModemManager = {
|
|
|
|
# enable = true;
|
|
|
|
# wantedBy = [ "multi-user.target" ];
|
|
|
|
# };
|
2017-08-28 17:19:07 +00:00
|
|
|
|
|
|
|
hardware.opengl.extraPackages = [ pkgs.vaapiIntel ];
|
|
|
|
|
|
|
|
nixpkgs.config.packageOverrides = pkgs: rec {
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
unison
|
|
|
|
];
|
|
|
|
|
|
|
|
virtualisation.docker = {
|
|
|
|
enable = true;
|
|
|
|
storageDriver = "overlay2";
|
|
|
|
};
|
2018-11-04 14:37:01 +00:00
|
|
|
users.extraUsers.gebner.extraGroups = [ "docker" "libvirtd" ];
|
|
|
|
|
|
|
|
virtualisation.libvirtd.enable = true;
|
2017-08-28 17:19:07 +00:00
|
|
|
|
2018-11-07 16:52:03 +00:00
|
|
|
# virtualisation.virtualbox.host.enable = true;
|
2017-08-28 17:19:07 +00:00
|
|
|
|
|
|
|
# boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages;
|
2017-08-28 21:31:53 +00:00
|
|
|
boot.kernelPatches = [
|
2017-09-02 06:57:36 +00:00
|
|
|
# { patch = ./len0073.patch; name = "len0073"; }
|
2017-08-28 21:31:53 +00:00
|
|
|
];
|
|
|
|
boot.kernelParams = [
|
|
|
|
# "psmouse.synaptics_intertouch=1"
|
|
|
|
"psmouse.proto=imps"
|
|
|
|
];
|
|
|
|
boot.kernelModules = [
|
|
|
|
"rmi_smbus"
|
|
|
|
"i2c_hid"
|
|
|
|
"psmouse"
|
|
|
|
];
|
2017-08-28 17:19:07 +00:00
|
|
|
|
2018-10-04 06:42:22 +00:00
|
|
|
# time.timeZone = pkgs.lib.mkOverride 10 "Asia/Tokyo";
|
2018-07-21 18:39:42 +00:00
|
|
|
# time.timeZone = pkgs.lib.mkOverride 10 "Europe/London";
|
2017-08-28 17:19:07 +00:00
|
|
|
|
|
|
|
#services.avahi.nssmdns = true;
|
|
|
|
|
2018-08-07 12:48:28 +00:00
|
|
|
system.stateVersion = "18.03";
|
2018-05-22 19:15:31 +00:00
|
|
|
|
2018-09-01 13:40:10 +00:00
|
|
|
networking.wireguard.interfaces.wg0 = {
|
|
|
|
ips = ["10.59.0.2/16"];
|
|
|
|
privateKeyFile = "/etc/wgkeys/petalius";
|
|
|
|
allowedIPsAsRoutes = true;
|
2018-09-03 13:43:01 +00:00
|
|
|
postSetup = ''
|
|
|
|
printf "nameserver 10.57.0.1" | ${pkgs.openresolv}/bin/resolvconf -a wg0 -m 0
|
|
|
|
'';
|
|
|
|
postShutdown = ''
|
|
|
|
${pkgs.openresolv}/bin/resolvconf -d wg0
|
|
|
|
'';
|
2018-09-01 13:40:10 +00:00
|
|
|
peers = [{
|
|
|
|
publicKey = "ByLlJbevlTBooAo2RIZGGJvBHKqA9qiOpHBvR5yuJX4=";
|
|
|
|
allowedIPs = ["10.56.0.0/14" "10.60.1.1"];
|
|
|
|
endpoint = "mtlaa-gw.gebner.org:35869";
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
systemd.services.wireguard-wg0.wantedBy = pkgs.lib.mkOverride 10 [];
|
|
|
|
|
2017-08-28 17:19:07 +00:00
|
|
|
}
|