2021-09-04 11:49:33 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
mkHost = (import ../modules { lib = lib; pkgs = pkgs; }).mkHost;
|
|
|
|
in mkHost config {
|
|
|
|
userName = "alexander";
|
|
|
|
hostName = "mashu";
|
2021-10-23 15:08:32 +00:00
|
|
|
overlays = [ "nur" "unstable" "simple" "custom" ];
|
2021-09-04 11:49:33 +00:00
|
|
|
hardwareImports = [
|
|
|
|
"intel"
|
2021-09-04 18:16:58 +00:00
|
|
|
"wifi"
|
|
|
|
"mobile"
|
|
|
|
"surface-pro6"
|
2021-09-04 11:49:33 +00:00
|
|
|
];
|
2021-09-04 18:41:43 +00:00
|
|
|
wireless = true;
|
|
|
|
wifiInterface = "wlp1s0";
|
2021-09-04 11:49:33 +00:00
|
|
|
programImports = [
|
2021-10-31 22:49:39 +00:00
|
|
|
"zsh" "git" "mpv" "tmux" "firefox" "gnome-terminal" "gnome" "i18n" "nextcloud" # "xournalpp"
|
2021-09-04 18:16:58 +00:00
|
|
|
"distributed-build/offload.nix"
|
2021-09-04 11:49:33 +00:00
|
|
|
];
|
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
2021-09-04 18:16:58 +00:00
|
|
|
device = "/dev/disk/by-label/root";
|
2021-09-04 11:49:33 +00:00
|
|
|
fsType = "btrfs";
|
|
|
|
};
|
|
|
|
"/boot" = {
|
2021-09-04 18:16:58 +00:00
|
|
|
device = "/dev/disk/by-label/boot";
|
2021-09-04 11:49:33 +00:00
|
|
|
fsType = "vfat";
|
2021-09-04 18:16:58 +00:00
|
|
|
};
|
2021-09-04 11:49:33 +00:00
|
|
|
};
|
|
|
|
swapDevices = [
|
2021-09-04 18:16:58 +00:00
|
|
|
{
|
|
|
|
device = "/dev/disk/by-label/swap";
|
|
|
|
}
|
2021-09-04 11:49:33 +00:00
|
|
|
];
|
|
|
|
extraOptions = old: {
|
|
|
|
boot = {
|
2021-09-07 13:40:07 +00:00
|
|
|
kernelParams = [ "mem_sleep_default=deep" "kernel.nmi_watchdog=0" "vm.dirty_writeback_centisecs=1500" ];
|
2021-09-04 11:49:33 +00:00
|
|
|
extraModprobeConfig = ''
|
2021-09-06 20:51:29 +00:00
|
|
|
options i915 enable_fbc=1 enable_rc6=1 modeset=1
|
|
|
|
options snd_hda_intel power_save=1
|
|
|
|
options snd_ac97_codec power_save=1
|
|
|
|
options iwlwifi power_save=Y
|
|
|
|
options iwldvm force_cam=N
|
2021-09-04 11:49:33 +00:00
|
|
|
'';
|
|
|
|
initrd = {
|
|
|
|
availableKernelModules = [ "xhci_pci" "nvme" "usbhid" ];
|
|
|
|
kernelModules = [ "kvm-intel" ];
|
|
|
|
};
|
|
|
|
};
|
2021-10-23 20:46:45 +00:00
|
|
|
|
|
|
|
services.gnome.gnome-settings-daemon.enable = true;
|
2021-10-24 12:57:49 +00:00
|
|
|
# TODO: phosh 0.10.2 does not grab this. Just set it.
|
2021-10-24 11:38:45 +00:00
|
|
|
services.logind.extraConfig = ''
|
|
|
|
HandlePowerKey=suspend
|
|
|
|
'';
|
2021-10-26 17:12:58 +00:00
|
|
|
services.xserver.libinput.touchpad = {
|
|
|
|
tapping = true;
|
2021-10-31 22:49:39 +00:00
|
|
|
disableWhileTyping = true;
|
2021-10-26 17:12:58 +00:00
|
|
|
};
|
2021-10-24 12:57:49 +00:00
|
|
|
|
|
|
|
# TODO: phosh only allows numerical PINs...
|
|
|
|
users.users.alexander.hashedPassword = lib.mkForce "$5$AkihyU/rnc$MrGVtF2d.2CbURQo2oIWdBdDz1ZLAnKum7BOxhUjh88";
|
|
|
|
|
|
|
|
# TODO: It seems like 0.10.2 does not do this by default. So, as a workaround, start some of these
|
|
|
|
# myself.
|
2021-10-24 11:29:54 +00:00
|
|
|
systemd.user.services = {
|
|
|
|
gsd-media = {
|
|
|
|
description = "GSD media keys handling";
|
|
|
|
wantedBy = [ "default.target" ];
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "simple";
|
|
|
|
ExecStart = "${pkgs.gnome.gnome-settings-daemon}/libexec/gsd-media-keys";
|
|
|
|
Restart = "always";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
gsd-power = {
|
|
|
|
description = "GSD media keys handling";
|
|
|
|
wantedBy = [ "default.target" ];
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "simple";
|
|
|
|
ExecStart = "${pkgs.gnome.gnome-settings-daemon}/libexec/gsd-power";
|
|
|
|
Restart = "always";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-10-23 20:46:45 +00:00
|
|
|
programs.phosh = {
|
|
|
|
enable = true;
|
|
|
|
phocConfig = {
|
|
|
|
outputs = {
|
|
|
|
"eDP-1" = {
|
|
|
|
scale = 2;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-09-04 11:49:33 +00:00
|
|
|
};
|
|
|
|
}
|