Compare commits

...

3 Commits

8 changed files with 30 additions and 56 deletions

View File

@ -59,6 +59,7 @@
}; };
xournalpp.enable = true; xournalpp.enable = true;
zsh.enable = true; zsh.enable = true;
office.enable = true;
#plasma.enable = true; #plasma.enable = true;
}; };
services = { services = {

View File

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = with inputs.nixos-hardware.nixosModules; [
common-cpu-intel common-pc-ssd
];
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-uuid/d06b511d-1970-421d-b006-231a7af91942"; device = "/dev/disk/by-uuid/d06b511d-1970-421d-b006-231a7af91942";
@ -14,7 +18,9 @@
swapDevices = [ ]; # TODO swapDevices = [ ]; # TODO
boot = { boot = {
initrd = { initrd = {
availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci"
# NOTE: See https://github.com/NixOS/nixos-hardware/blob/master/common/pc/laptop/acpi_call.nix
"acpi_call" ];
kernelModules = [ "dm-snapshot" ]; kernelModules = [ "dm-snapshot" ];
luks.devices = { luks.devices = {
cryptroot = { cryptroot = {
@ -25,6 +31,8 @@
}; };
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ]; extraModulePackages = [ ];
# NOTE: See https://github.com/NixOS/nixos-hardware/blob/master/lenovo/thinkpad/e495/default.nix#L12
kernelParams = [ "acpi_backlight=native" ];
}; };
ptw = { ptw = {
@ -40,6 +48,7 @@
}; };
zsh.enable = true; zsh.enable = true;
git.enable = true; git.enable = true;
office.enable = true;
}; };
services = { services = {
kanshi = let kanshi = let
@ -97,9 +106,6 @@
primaryInterface = "wlp5s0"; primaryInterface = "wlp5s0";
}; };
virtualisation.enable = true; virtualisation.enable = true;
hardware = {
intel.enable = true;
};
}; };
services = { services = {

View File

@ -1,13 +0,0 @@
{ config, lib, ... }:
let
cfg = config.ptw.hardware.amdcpu;
in {
options.ptw.hardware.amdcpu = {
enable = lib.mkEnableOption "Enable support for AMD CPUs";
};
config = lib.mkIf cfg.enable {
hardware.cpu.amd.updateMicrocode = true;
};
}

View File

@ -1,19 +0,0 @@
{
config, lib, pkgs, ...
}:
let
cfg = config.ptw.hardware.amdgpu;
in {
options.ptw.hardware.amdgpu = {
enable = lib.mkEnableOption "Enable support for AMDGPU GPUs";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
unstable.mesa
unstable.firmwareLinuxNonfree
];
services.xserver.videoDrivers = [ "amdgpu" ];
};
}

View File

@ -1,19 +0,0 @@
{ config, lib, pkgs, ... }:
let
cfg = config.ptw.hardware.intel;
in {
options.ptw.hardware.intel = {
enable = lib.mkEnableOption "Enable support for Intel CPUs";
};
config = lib.mkIf cfg.enable {
hardware = {
cpu.intel.updateMicrocode = true;
# NOTE: Assuming each Intel CPU has integrated graphics
opengl.extraPackages = with pkgs; [ vaapiIntel intel-media-driver ];
};
# TODO: Remove?
services.xserver.videoDrivers = [ "modesetting" "fbdev" ];
};
}

View File

@ -2,6 +2,8 @@
let let
cfg = config.ptw.hardware.surface; cfg = config.ptw.hardware.surface;
fetchurl = pkgs.fetchurl;
commit = "69d1e5826e6380c8ff0cd532e244482097562c3d";
in { in {
options.ptw.hardware.surface = { options.ptw.hardware.surface = {
enable = lib.mkEnableOption "Enable support for the Microsoft Surface Pro 6"; enable = lib.mkEnableOption "Enable support for the Microsoft Surface Pro 6";
@ -25,7 +27,7 @@ in {
}; };
hardware.video.hidpi.enable = true; hardware.video.hidpi.enable = true;
systemd.services.iptsd = { systemd.services.iptsd = lib.mkForce {
description = "Userspace daemon for Intel Precise Touch & Stylus"; description = "Userspace daemon for Intel Precise Touch & Stylus";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
wants = [ "dev-ipts-15.device" ]; wants = [ "dev-ipts-15.device" ];

View File

@ -24,6 +24,7 @@ in {
gnomeExtensions.blur-my-shell gnomeExtensions.blur-my-shell
gnome.eog gnome.eog
gnome.nautilus gnome.nautilus
gnome.evince
unstable.gnome.gnome-shell unstable.gnome.gnome-shell
gnome.gnome-terminal gnome.gnome-terminal
pinentry-gnome pinentry-gnome

View File

@ -0,0 +1,15 @@
{ pkgs, config, lib, ... }:
let
cfg = config.ptw.programs;
in {
options.ptw.programs.office = {
enable = lib.mkEnableOption "Install Office software";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
libreoffice
];
};
}