Compare commits

...

2 Commits

Author SHA1 Message Date
624fd23f8b
more cleanup 2024-04-30 12:32:03 +02:00
569b36c752
tweak tooling 2024-04-30 12:08:28 +02:00
16 changed files with 84 additions and 59 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 ./qt.nix
./opengl.nix ./opengl.nix
./sway.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.waybar.enable = true;
programs.dconf.enable = true;
programs.sway = { programs.sway = {
enable = true; enable = true;

View File

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

View File

@ -11,6 +11,7 @@ in
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wireguard-tools wireguard-tools
openconnect
]; ];
}; };

View File

@ -21,6 +21,7 @@ in
pkg-config pkg-config
unzip unzip
p7zip p7zip
dos2unix
tea tea
eza eza
@ -63,9 +64,17 @@ in
user.name = cfg.tooling.git_user; user.name = cfg.tooling.git_user;
user.email = cfg.tooling.git_email; user.email = cfg.tooling.git_email;
push.autoSetupRemote = true; push.autoSetupRemote = true;
core.autocrlf = "input";
commit.gpgsign = true;
pull.rebase = true;
}; };
}; };
environment.shellAliases = {
":q" = "exit";
"ls" = "eza";
};
programs.tmux = { programs.tmux = {
enable = true; enable = true;
historyLimit = 42000; historyLimit = 42000;
@ -95,6 +104,7 @@ in
set fileencodings=utf-8 set fileencodings=utf-8
set nocompatible set nocompatible
set clipboard+=unnamedplus set clipboard+=unnamedplus
set ff=unix
luafile ${luarc} luafile ${luarc}

View File

@ -27,7 +27,18 @@ in
]; ];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
warn-dirty = false;
};
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
nix.package = pkgs.nixVersions.unstable; nix.package = pkgs.nixVersions.unstable;
nix.optimise.automatic = true;
nixpkgs.hostPlatform = system; nixpkgs.hostPlatform = system;
boot.tmp.cleanOnBoot = true;
} }

View File

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

View File

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

View File

@ -67,7 +67,7 @@
agenix.nixosModules.default agenix.nixosModules.default
chaotic.nixosModules.default chaotic.nixosModules.default
nix-gaming.nixosModules.pipewireLowLatency nix-gaming.nixosModules.pipewireLowLatency
./load_common.nix ./common
./specific/grimm-nixos-laptop/configuration.nix ./specific/grimm-nixos-laptop/configuration.nix
./configuration.nix ./configuration.nix
./modules/users.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 # ./modules/nvidia.nix
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];