Optimized some specialArgs and module argument use

This commit is contained in:
Emmet 2024-01-18 15:36:52 -06:00
parent 2d75530b6d
commit 18c8365f40
76 changed files with 282 additions and 284 deletions

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, username, storageDriver ? null, ... }:
{ lib, userSettings, storageDriver ? null, ... }:
assert lib.asserts.assertOneOf "storageDriver" storageDriver [
null
@ -17,5 +17,5 @@ assert lib.asserts.assertOneOf "storageDriver" storageDriver [
storageDriver = storageDriver;
autoPrune.enable = true;
};
users.users.${username}.extraGroups = [ "docker" ];
users.users.${userSettings.username}.extraGroups = [ "docker" ];
}

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ ... }:
{
# Need some flatpaks

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ pkgs, ... }:
{
# Feral GameMode

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.prismlauncher ];

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ pkgs, ... }:
{
hardware.opengl.driSupport32Bit = true;

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [ virt-manager virtualbox distrobox ];

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ ... }:
{
# Bluetooth

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ ... }:
{
boot.kernelPackages = pkgs.linuxPackages_zen;

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ ... }:
{
# OpenGL

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.openrgb-with-all-plugins ];

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ ... }:
{
#services.auto-cpufreq.enable = true;

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ pkgs, ... }:
{
# Enable printing

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ ... }:
{
services.journald.extraConfig = "SystemMaxUse=50M\nSystemMaxFiles=5";

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ ... }:
{
services.timesyncd.enable = true;

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ ... }:
{
services.devmon.enable = true;

View file

@ -1,4 +1,4 @@
{ config, blocklist-hosts, pkgs, ... }:
{ blocklist-hosts, ... }:
let blocklist = builtins.readFile "${blocklist-hosts}/alternates/gambling-porn/hosts";
in

View file

@ -1,11 +1,11 @@
{ config, username, pkgs, ... }:
{ userSettings, pkgs, ... }:
{
# Doas instead of sudo
security.doas.enable = true;
security.sudo.enable = false;
security.doas.extraRules = [{
users = [ "${username}" ];
users = [ "${userSettings.username}" ];
keepEnv = true;
persist = true;
}];

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ firejail ];

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ ... }:
{
# Firewall

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ ... }:
{
# Some programs need SUID wrappers, can be configured further or are

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.openvpn ];

View file

@ -1,4 +1,4 @@
{ config, pkgs, username, ... }:
{ userSettings, ... }:
{
# Enable incoming ssh
@ -10,7 +10,7 @@
PermitRootLogin = "no";
};
};
users.users.${username}.openssh.authorizedKeys.keys = [
users.users.${userSettings.username}.openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDaeejVJwUVrIZSo1isbu+gkQ7+8ftCgCsczy3OclkEVWHyRTqlG6yp74hr3j8ZNsOhov7c2Q6RqC8oy669hlxi/y9BsvtlI7sBr94oAKFOmkCS4RiK72ngJjBvI0vbk89wQQjmAd3r8B7ZcedpNOC8CkHu8SebKdYPRIUvAbPc3fTEt7DsJkazAepZCB8LEhUp57FAqQ/Ezlt3X/1uwNq5S0EbE9Zm+nUpEfSqR9apY2neKWLyGiCxpK3dzyNOuulCxvtVz+ie2sTk/6SxM+qWEoVVxhdwyxPihEjgC0EvtG0S5mVh5JmcjRkJOzzBHJuw+6r8yWn/AxGdIsoJ4rKNxH1XH1iLHgCraOLOUjUNlmejTcQPu6o92a79fdz2gCHT/BuIjfCW7MErAC3YSmF45TSur/kiWCBaTqYo06pgbQ3w1vKg7fievQlQzsutmg47RvJp6fb74yxuOdVg39cShQu/l8r6zqm21JAeUaaIp4P/0MrAIMOOVUhbK0QgsNElO4yn0ZKH8wGIF8xORh7ikxUIAyq8C41gjJiO2sAFJc3M8DhduQU3X0lHB7U0Qyu+8ZXn05+zdFPXJ73LKc7DCcLkppRXJsdHLSDEFdWqFnV7o08B4qZkPMT4pmvhwhY0Pf1fwavOqxuTstzw18gUGyQzl0foQi0Qrmdazsp2Qw== emmet@snowfire"
];
}

View file

@ -1,11 +1,11 @@
{ config, lib, pkgs, stylix, theme, font, fontPkg, ... }:
{ lib, pkgs, stylix, userSettings, ... }:
let
themePath = "../../../themes/"+theme+"/"+theme+".yaml";
themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../themes"+("/"+theme)+"/polarity.txt"));
themePath = "../../../themes/"+userSettings.theme+"/"+userSettings.theme+".yaml";
themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../themes"+("/"+userSettings.theme)+"/polarity.txt"));
myLightDMTheme = if themePolarity == "light" then "Adwaita" else "Adwaita-dark";
backgroundUrl = builtins.readFile (./. + "../../../themes"+("/"+theme)+"/backgroundurl.txt");
backgroundSha256 = builtins.readFile (./. + "../../../themes/"+("/"+theme)+"/backgroundsha256.txt");
backgroundUrl = builtins.readFile (./. + "../../../themes"+("/"+userSettings.theme)+"/backgroundurl.txt");
backgroundSha256 = builtins.readFile (./. + "../../../themes/"+("/"+userSettings.theme)+"/backgroundsha256.txt");
in
{
imports = [ stylix.nixosModules.stylix ];
@ -19,16 +19,16 @@ in
stylix.base16Scheme = ./. + themePath;
stylix.fonts = {
monospace = {
name = font;
package = fontPkg;
name = userSettings.font;
package = userSettings.fontPkg;
};
serif = {
name = font;
package = fontPkg;
name = userSettings.font;
package = userSettings.fontPkg;
};
sansSerif = {
name = font;
package = fontPkg;
name = userSettings.font;
package = userSettings.fontPkg;
};
emoji = {
name = "Noto Color Emoji";

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ pkgs, ... }:
{
services.dbus = {

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ pkgs, ... }:
{
# Fonts are nice to have

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ ... }:
{
services.gnome = {

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ pkgs, ... }:
{
# Import wayland config

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ ... }:
{
# Pipewire

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ pkgs, ... }:
{
imports = [ ./pipewire.nix

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ pkgs, ... }:
{
imports = [ ./pipewire.nix

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ ... }:
{
# import X11 config