refactor(treewide): statix

This commit is contained in:
ooks-io 2024-08-11 20:24:40 +12:00
parent 366fa0ce80
commit 7f2cd7a343
71 changed files with 84 additions and 84 deletions

View file

@ -17,7 +17,7 @@ in {
isNormalUser = true;
shell = pkgs.${cfg.shell};
initialPassword = "password";
openssh.authorizedKeys.keys = [(keys.users."${cfg.name}")];
openssh.authorizedKeys.keys = [keys.users."${cfg.name}"];
extraGroups =
[
"wheel"

View file

@ -4,7 +4,7 @@
...
}: let
inherit (lib) mkIf;
host = config.ooknet.host;
inherit (config.ooknet) host;
in {
config = mkIf (host.type != "phone") {
hardware = {

View file

@ -6,7 +6,7 @@
}: let
inherit (lib) mkMerge mkIf versionAtLeast versionOlder;
inherit (builtins) elem;
cpu = config.ooknet.host.hardware.cpu;
inherit (config.ooknet.host.hardware) cpu;
cfg = cpu.amd;
kernelVersion = config.boot.kernelPackages.kernel.version;
kernelVersionAtLeast = versionAtLeast kernelVersion;

View file

@ -6,7 +6,7 @@
}: let
inherit (lib) mkIf;
inherit (builtins) elem;
cpu = config.ooknet.host.hardware.cpu;
inherit (config.ooknet.host.hardware) cpu;
in {
# TODO: put kvm/gvt behind virtualization module flag

View file

@ -3,7 +3,7 @@
config,
...
}: let
features = config.ooknet.host.hardware.features;
inherit (config.ooknet.host.hardware) features;
inherit (lib) mkIf;
inherit (builtins) elem;
in {

View file

@ -4,7 +4,7 @@
pkgs,
...
}: let
features = config.ooknet.host.hardware.features;
inherit (config.ooknet.host.hardware) features;
cfg = config.ooknet.host.hardware.battery;
inherit (lib) mkIf mkDefault;
inherit (builtins) elem;

View file

@ -5,7 +5,7 @@
self,
...
}: let
features = config.ooknet.host.hardware.features;
inherit (config.ooknet.host.hardware) features;
inherit (lib) mkIf;
inherit (builtins) elem;
in {

View file

@ -3,7 +3,7 @@
config,
...
}: let
features = config.ooknet.host.hardware.features;
inherit (config.ooknet.host.hardware) features;
inherit (lib) mkIf;
inherit (builtins) elem;
in {

View file

@ -8,7 +8,7 @@
inherit (lib) mkIf;
inherit (builtins) elem;
isx86Linux = pkgs: with pkgs.stdenv; hostPlatform.isLinux && hostPlatform.isx86;
features = config.ooknet.host.hardware.features;
inherit (config.ooknet.host.hardware) features;
in {
config = mkIf (elem "video" features) {
hardware = {

View file

@ -4,7 +4,7 @@
pkgs,
...
}: let
gpu = config.ooknet.host.hardware.gpu;
inherit (config.ooknet.host.hardware) gpu;
inherit (lib) mkIf mkDefault;
inherit (builtins) elem;
in {

View file

@ -4,7 +4,7 @@
pkgs,
...
}: let
gpu = config.ooknet.host.hardware.gpu;
inherit (config.ooknet.host.hardware) gpu;
inherit (lib) mkIf;
inherit (builtins) elem;
# vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};

View file

@ -4,11 +4,11 @@
pkgs,
...
}: let
gpu = config.ooknet.host.hardware.gpu;
inherit (config.ooknet.host.hardware) gpu;
inherit (lib) mkIf mkDefault;
inherit (builtins) elem;
# production = config.boot.kernelPackages.nvidiaPackages.production;
beta = config.boot.kernelPackages.nvidiaPackages.beta;
inherit (config.boot.kernelPackages.nvidiaPackages) beta;
in {
# TODO: make option to choose nvidia package
config = mkIf (gpu.type == "nvidia") {