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;
@ -145,8 +147,8 @@ in
"/etc/${conf_path}"
];
extraSessionCommands = ''
# source /etc/profile
# test -f $HOME/.profile && source $HOME/.profile
# source /etc/profile
# test -f $HOME/.profile && source $HOME/.profile
systemctl --user import-environment
export XDG_CURRENT_DESKTOP=sway

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 = [ ];