117 lines
2.8 KiB
Nix
117 lines
2.8 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
fileSystems = {
|
|
"/" = {
|
|
device = "/dev/disk/by-label/root";
|
|
fsType = "btrfs";
|
|
};
|
|
"/boot" = {
|
|
device = "/dev/disk/by-label/boot";
|
|
fsType = "vfat";
|
|
};
|
|
};
|
|
swapDevices = [
|
|
{
|
|
device = "/dev/disk/by-label/swap";
|
|
}
|
|
];
|
|
|
|
ptw = {
|
|
programs = {
|
|
mpv.enable = true;
|
|
tmux.enable = true;
|
|
zsh.enable = true;
|
|
git.enable = true;
|
|
gnome-terminal.enable = true;
|
|
firefox.enable = true;
|
|
# TODO: Nextcloud client
|
|
};
|
|
services = {
|
|
gnome.enable = true;
|
|
};
|
|
system = {
|
|
i18n.enable = true;
|
|
singleUser = "alexander";
|
|
hostName = "mashu";
|
|
#wireless = true;
|
|
offloading.offload.enable = true;
|
|
};
|
|
hardware = {
|
|
intel.enable = true;
|
|
wifi = {
|
|
enable = true;
|
|
wifiInterface = "wlp1s0";
|
|
};
|
|
mobile.enable = true;
|
|
surface.enable = true;
|
|
};
|
|
};
|
|
|
|
boot = {
|
|
kernelParams = [ "mem_sleep_default=deep" "kernel.nmi_watchdog=0" "vm.dirty_writeback_centisecs=1500" ];
|
|
extraModprobeConfig = ''
|
|
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
|
|
'';
|
|
initrd = {
|
|
availableKernelModules = [ "xhci_pci" "nvme" "usbhid" ];
|
|
kernelModules = [ "kvm-intel" ];
|
|
};
|
|
};
|
|
|
|
<<<<<<< HEAD
|
|
powerManagement = {
|
|
enable = true;
|
|
cpuFreqGovernor = "powersave";
|
|
=======
|
|
services.gnome.gnome-settings-daemon.enable = true;
|
|
# TODO: phosh 0.10.2 does not grab this. Just set it.
|
|
services.logind.extraConfig = ''
|
|
HandlePowerKey=suspend
|
|
'';
|
|
services.xserver.libinput.touchpad = {
|
|
tapping = true;
|
|
disableWhileTyping = true;
|
|
};
|
|
|
|
# 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.
|
|
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";
|
|
};
|
|
};
|
|
};
|
|
programs.phosh = {
|
|
enable = true;
|
|
phocConfig = {
|
|
outputs = {
|
|
"eDP-1" = {
|
|
scale = 2;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|