more cleanup

This commit is contained in:
Grimmauld 2024-04-30 12:32:03 +02:00
parent 569b36c752
commit 624fd23f8b
Signed by: Grimmauld
GPG Key ID: C2946668769F91FB
15 changed files with 63 additions and 58 deletions

21
common/default.nix Normal file
View File

@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
with lib;
{
options.grimmShared = {
enable = mkEnableOption "grimm-shared-common";
};
imports = [
./localisation.nix
./printing.nix
./xdg
./network
./tooling
./sound
./graphics
./gaming.nix
./firefox.nix
./cloudsync.nix
./laptop_hardware.nix
];
}

View File

@ -3,5 +3,6 @@
./qt.nix
./opengl.nix
./sway.nix
./fonts.nix
];
}

20
common/graphics/fonts.nix Normal file
View File

@ -0,0 +1,20 @@
{ lib, pkgs, config, ... }:
{
config = with config.grimmShared; lib.mkIf (enable && graphical) {
fonts = {
packages = with pkgs; [
noto-fonts
noto-fonts-cjk
font-awesome
noto-fonts-emoji
roboto
liberation_ttf
];
fontDir.enable = true;
};
environment.sessionVariables = {
FREETYPE_PROPERTIES = "cff:no-stem-darkening=0 autofitter:no-stem-darkening=0";
};
};
}

View File

@ -123,6 +123,8 @@ in
programs.waybar.enable = true;
programs.dconf.enable = true;
programs.sway = {
enable = true;

View File

@ -11,6 +11,7 @@ in
pciutils
usbutils
powertop
opentabletdriver
ddcutil
] ++ lib.optionals graphical [
ddcui
@ -22,6 +23,7 @@ in
hardware.i2c.enable = true;
services.libinput.enable = true;
powerManagement.cpuFreqGovernor = lib.mkDefault "normal";
hardware.opentabletdriver.enable = true;
services.udev.extraRules = ''
SUBSYSTEM=="i2c-dev", ACTION=="add",\
@ -45,7 +47,6 @@ in
serviceConfig.Type = "oneshot";
};
boot = {
kernelParams = [
"splash"
@ -56,6 +57,15 @@ in
"mmio_stale_data=full,nosmt"
"pcie_aspm=off"
]; # "vfio-pci.ids=10de:1aeb,10de:2191,10de:1aed,10de:1aec" ];
initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
loader.systemd-boot.enable = true;
extraModulePackages = [
(config.boot.kernelPackages.ddcci-driver.overrideAttrs
(old: {

View File

@ -39,4 +39,6 @@ in
nix.package = pkgs.nixVersions.unstable;
nix.optimise.automatic = true;
nixpkgs.hostPlatform = system;
boot.tmp.cleanOnBoot = true;
}

View File

@ -29,14 +29,11 @@ in
environment.sessionVariables = {
XDG_CONFIG_HOME = "$HOME/.config";
FREETYPE_PROPERTIES = "cff:no-stem-darkening=0 autofitter:no-stem-darkening=0";
};
environment.systemPackages = with pkgs; [
xwaylandvideobridge
];
fonts.fontDir.enable = true;
};
options.grimmShared.portals = lib.mkEnableOption "Enables portals for wlr, gtk and kde as well as fixes fonts";

View File

@ -2,14 +2,11 @@
{
imports =
[
./modules/fonts.nix
./modules/tabletdriver.nix
./sway
];
# Bootloader.
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
kernelPackages = pkgs.linuxPackages_zen;
};
@ -55,12 +52,8 @@
spotify.enable = true;
};
age.identityPaths = [ "/home/grimmauld/.ssh/id_rsa" ];
age.secrets.nextcloud_pass = {
file = ./secrets/nextcloud_pass.age;
mode = "777";
};
boot.tmp.cleanOnBoot = true;
programs.dconf.enable = true;
}

View File

@ -67,7 +67,7 @@
agenix.nixosModules.default
chaotic.nixosModules.default
nix-gaming.nixosModules.pipewireLowLatency
./load_common.nix
./common
./specific/grimm-nixos-laptop/configuration.nix
./configuration.nix
./modules/users.nix

View File

@ -1,21 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
{
options.grimmShared = {
enable = mkEnableOption "grimm-shared-common";
};
imports = [
./common/localisation.nix
./common/printing.nix
./common/xdg
./common/network
./common/tooling
./common/sound
./common/graphics
./common/gaming.nix
./common/firefox.nix
./common/cloudsync.nix
./common/laptop_hardware.nix
];
}

View File

@ -1,11 +0,0 @@
{ pkgs, fonts, ... }:
{
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
font-awesome
noto-fonts-emoji
roboto
liberation_ttf
];
}

View File

@ -1,8 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
opentabletdriver
];
hardware.opentabletdriver.enable = true;
}

View File

@ -10,7 +10,6 @@
# ./modules/nvidia.nix
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.extraModulePackages = [ ];