nixos-config/petalius.nix

182 lines
4.3 KiB
Nix
Raw Permalink Normal View History

2017-08-28 19:19:07 +02:00
{ config, pkgs, ... }:
{
imports =
[
2020-07-14 16:47:09 +02:00
./common-headless.nix
2022-05-18 20:38:47 +02:00
./sway.nix
# ./i3.nix
2017-08-28 19:19:07 +02:00
./large-sw.nix
./uefi.nix
./fstrim.nix
2019-04-04 10:34:49 +02:00
./atmega.nix
2020-11-12 14:19:09 +01:00
./v4l2loopback.nix
2020-11-21 11:28:14 +01:00
./huion.nix
./nvim05.nix
./nm-restart.nix
2022-11-24 02:28:44 +01:00
# ./nebula.nix
2022-11-24 02:01:25 +01:00
./tailscale.nix
2017-08-28 19:19:07 +02:00
];
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.kernelModules = [
"kvm-intel"
"rmi_smbus"
"i2c_hid"
"psmouse"
];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c87491ed-0dd6-4eb4-bef2-fe4c707e91f2";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/E526-BAB7";
fsType = "vfat";
};
swapDevices = [ ];
2022-01-30 15:22:26 +01:00
nix.settings.max-jobs = 4;
2017-08-28 19:19:07 +02:00
environment.etc."lvm/lvm.conf".text = ''
devices {
issue_discards = 1
}
'';
2020-05-23 18:58:07 +02:00
boot.initrd.luks.devices = {
nvme0n1p2 = {
2017-08-28 19:19:07 +02:00
device = "/dev/disk/by-uuid/5ca3d7ec-3f9e-4a08-8bc2-b26bfc3459c5";
preLVM = true;
allowDiscards = true;
2020-05-23 18:58:07 +02:00
};
};
2017-08-28 19:19:07 +02:00
2022-05-18 20:38:47 +02:00
# services.xserver = {
# dpi = 120;
#
# libinput.enable = true;
# config = ''
# Section "InputClass"
# Identifier "touchpad"
# Driver "libinput"
# MatchDevicePath "/dev/input/event*"
# MatchIsPointer "true"
# EndSection
# '';
#
# videoDrivers = [ "modesetting" ];
# useGlamor = true;
# };
2017-08-28 19:19:07 +02:00
programs.light.enable = true;
services.tlp.enable = true;
networking.hostName = "petalius";
networking.hostId = "cf58caa9";
2020-11-21 11:28:14 +01:00
hardware.cpu.intel.updateMicrocode = true;
2017-11-14 16:44:21 +01:00
# systemd.services.ModemManager = {
# enable = true;
# wantedBy = [ "multi-user.target" ];
# };
2017-08-28 19:19:07 +02:00
hardware.opengl.extraPackages = [ pkgs.vaapiIntel ];
nixpkgs.config.packageOverrides = pkgs: rec {
};
2020-11-21 11:20:58 +01:00
# environment.systemPackages = with pkgs; [
# unison
# ];
2017-08-28 19:19:07 +02:00
2020-07-24 21:23:06 +02:00
users.extraUsers.gebner.extraGroups = [ "libvirtd" ];
2018-11-04 15:37:01 +01:00
virtualisation.libvirtd.enable = true;
2017-08-28 19:19:07 +02:00
2022-05-18 20:38:47 +02:00
virtualisation.waydroid.enable = true;
2022-01-30 15:43:59 +01:00
2021-02-06 10:46:16 +01:00
# virtualisation.virtualbox.host.enable = true;
2017-08-28 19:19:07 +02:00
2020-11-21 11:20:58 +01:00
# boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages_5_4;
2020-05-23 18:58:07 +02:00
# boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages_5_5;
2019-07-17 18:11:18 +02:00
# boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages_4_19;
2017-08-28 23:31:53 +02:00
boot.kernelPatches = [
# { patch = ./len0073.patch; name = "len0073"; }
2017-08-28 23:31:53 +02:00
];
boot.kernelParams = [
# "psmouse.synaptics_intertouch=1"
"psmouse.proto=imps"
2017-08-28 23:31:53 +02:00
];
2017-08-28 19:19:07 +02:00
2019-08-06 12:30:21 +02:00
# time.timeZone = pkgs.lib.mkOverride 10 "Asia/Tokyo";
2019-09-09 19:17:26 +02:00
# time.timeZone = pkgs.lib.mkOverride 10 "Europe/London";
2019-11-21 09:28:11 +01:00
# time.timeZone = pkgs.lib.mkOverride 10 "Europe/Lisbon";
2020-01-16 14:45:33 +01:00
# time.timeZone = pkgs.lib.mkOverride 10 "US/Eastern";
2022-09-26 17:13:51 +02:00
time.timeZone = pkgs.lib.mkOverride 10 "US/Pacific";
2017-08-28 19:19:07 +02:00
#services.avahi.nssmdns = true;
2022-11-12 07:40:55 +01:00
system.stateVersion = "22.11";
2018-05-22 21:15:31 +02:00
2018-09-01 15:40:10 +02:00
networking.wireguard.interfaces.wg0 = {
ips = ["10.59.0.2/16"];
privateKeyFile = "/etc/wgkeys/petalius";
allowedIPsAsRoutes = true;
2018-09-03 15:43:01 +02:00
postSetup = ''
2019-10-14 11:03:14 +02:00
${pkgs.systemd}/bin/resolvectl domain wg0 '~htdf.gebner.org' '~mtlaa.gebner.org' '~ams.gebner.org'
2019-10-03 12:30:33 +02:00
${pkgs.systemd}/bin/resolvectl dns wg0 10.58.0.1
2018-09-03 15:43:01 +02:00
'';
2018-09-01 15:40:10 +02:00
peers = [{
publicKey = "ByLlJbevlTBooAo2RIZGGJvBHKqA9qiOpHBvR5yuJX4=";
allowedIPs = ["10.56.0.0/14" "10.60.1.1"];
2022-09-30 01:51:26 +02:00
endpoint = "htdf-gw.gebner.org:35869";
2022-09-18 18:06:41 +02:00
# endpoint = "80.109.29.104:35869";
2022-09-30 01:51:26 +02:00
# endpoint = "127.0.0.1:35869";
2018-09-01 15:40:10 +02:00
}];
};
systemd.services.wireguard-wg0.wantedBy = pkgs.lib.mkOverride 10 [];
2019-10-03 20:10:37 +02:00
systemd.services.wstunnel = {
2020-11-09 17:32:20 +01:00
path = [ pkgs.wstunnel ];
2019-10-03 20:10:37 +02:00
wantedBy = [ "wireguard-wg0.service" ];
after = [ "network.target" ];
script = ''
wstunnel -L 35869:htdf-gw.gebner.org:35869 -u wss://gebner.org
'';
};
2019-10-03 12:30:33 +02:00
services.resolved = {
domains = [];
enable = true;
};
2020-11-21 11:20:58 +01:00
# environment.systemPackages = [
# (pkgs.callPackage ./bluez-alsa.nix {})
# ];
2020-11-25 19:28:16 +01:00
services.fwupd.enable = true;
2022-11-01 01:14:55 +01:00
users.extraUsers.gebner2 = {
isNormalUser = true;
extraGroups = [
"wheel"
# "networkmanager"
"audio"
# "transmission"
# "lxd"
# "libvirtd"
# "vboxusers"
# "wireshark"
"input" "tty" "audio" "video" "uinput"
];
# shell = "${pkgs.zsh}/bin/zsh";
shell = "/run/current-system/sw/bin/fish";
};
2017-08-28 19:19:07 +02:00
}