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

@ -5,7 +5,7 @@
... ...
}: let }: let
inherit (lib) mkDefault; inherit (lib) mkDefault;
admin = osConfig.ooknet.host.admin; inherit (osConfig.ooknet.host) admin;
in { in {
programs.home-manager.enable = true; programs.home-manager.enable = true;
systemd.user.startServices = "sd-switch"; systemd.user.startServices = "sd-switch";

View file

@ -6,7 +6,7 @@
}: let }: let
inherit (lib) mkIf getExe; inherit (lib) mkIf getExe;
cfg = config.ooknet.editor.helix; cfg = config.ooknet.editor.helix;
console = config.ooknet.console; inherit (config.ooknet) console;
in { in {
config = mkIf (cfg.enable || console.editor == "helix") { config = mkIf (cfg.enable || console.editor == "helix") {
programs.helix.languages = { programs.helix.languages = {

View file

@ -6,7 +6,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
cfg = config.ooknet.shell.bash; cfg = config.ooknet.shell.bash;
admin = osConfig.ooknet.host.admin; inherit (osConfig.ooknet.host) admin;
in { in {
config = mkIf (cfg.enable || admin.shell == "bash") { config = mkIf (cfg.enable || admin.shell == "bash") {
programs.bash.enable = true; programs.bash.enable = true;

View file

@ -9,7 +9,7 @@
inherit (pkgs) bat eza dust nh; inherit (pkgs) bat eza dust nh;
cfg = config.ooknet.shell.fish; cfg = config.ooknet.shell.fish;
admin = osConfig.ooknet.host.admin; inherit (osConfig.ooknet.host) admin;
in { in {
config = mkIf (cfg.enable || admin.shell == "fish") { config = mkIf (cfg.enable || admin.shell == "fish") {
programs.fish = { programs.fish = {

View file

@ -7,22 +7,22 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
cfg = config.ooknet.shell.fish; cfg = config.ooknet.shell.fish;
admin = osConfig.ooknet.host.admin; inherit (osConfig.ooknet.host) admin;
in { in {
config = mkIf (cfg.enable || admin.shell == "fish") { config = mkIf (cfg.enable || admin.shell == "fish") {
programs.fish = { programs.fish = {
plugins = [ plugins = [
{ {
name = "done"; name = "done";
src = pkgs.fishPlugins.done.src; inherit (pkgs.fishPlugins.done) src;
} }
{ {
name = "autopair"; name = "autopair";
src = pkgs.fishPlugins.autopair.src; inherit (pkgs.fishPlugins.autopair) src;
} }
{ {
name = "colored-man-pages"; name = "colored-man-pages";
src = pkgs.fishPlugins.colored-man-pages.src; inherit (pkgs.fishPlugins.colored-man-pages) src;
} }
]; ];
}; };

View file

@ -6,7 +6,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
cfg = config.ooknet.shell.zsh; cfg = config.ooknet.shell.zsh;
admin = osConfig.ooknet.host.admin; inherit (osConfig.ooknet.host) admin;
in { in {
imports = [ imports = [
./plugins.nix ./plugins.nix

View file

@ -7,7 +7,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
cfg = config.ooknet.shell.zsh; cfg = config.ooknet.shell.zsh;
admin = osConfig.ooknet.host.admin; inherit (osConfig.ooknet.host) admin;
in { in {
config = mkIf (cfg.enable || admin.shell == "zsh") { config = mkIf (cfg.enable || admin.shell == "zsh") {
programs.zsh.plugins = [ programs.zsh.plugins = [

View file

@ -5,7 +5,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
admin = osConfig.ooknet.host.admin; inherit (osConfig.ooknet.host) admin;
cfg = config.ooknet.tools.fzf; cfg = config.ooknet.tools.fzf;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {

View file

@ -7,7 +7,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
cfg = config.ooknet.tools.git; cfg = config.ooknet.tools.git;
admin = osConfig.ooknet.host.admin; inherit (osConfig.ooknet.host) admin;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.git = { programs.git = {

View file

@ -6,7 +6,7 @@
}: let }: let
inherit (lib) mkIf mkMerge; inherit (lib) mkIf mkMerge;
cfg = config.ooknet.fileManager.nemo; cfg = config.ooknet.fileManager.nemo;
fileManager = config.ooknet.desktop.fileManager; inherit (config.ooknet.desktop) fileManager;
nemoMime = { nemoMime = {
"inode/directory" = ["nemo.desktop"]; "inode/directory" = ["nemo.desktop"];
}; };

View file

@ -6,7 +6,7 @@
}: let }: let
inherit (lib) mkIf mkMerge hm; inherit (lib) mkIf mkMerge hm;
cfg = config.ooknet.productivity.notes.obsidian; cfg = config.ooknet.productivity.notes.obsidian;
notes = config.ooknet.desktop.notes; inherit (config.ooknet.desktop) notes;
# admin = osConfig.ooknet.host.admin; # admin = osConfig.ooknet.host.admin;
# TODO: use admin.githubUsername # TODO: use admin.githubUsername
notesRepo = "git@github.com:ooks-io/notes.git"; notesRepo = "git@github.com:ooks-io/notes.git";

View file

@ -5,7 +5,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
polkit = config.ooknet.security.polkit; inherit (config.ooknet.security) polkit;
in { in {
config = { config = {
systemd.user.services = { systemd.user.services = {

View file

@ -6,7 +6,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (builtins) elem; inherit (builtins) elem;
features = osConfig.ooknet.host.hardware.features; inherit (osConfig.ooknet.host.hardware) features;
ookbrightness = pkgs.writeShellApplication { ookbrightness = pkgs.writeShellApplication {
name = "ookbrightness"; name = "ookbrightness";
runtimeInputs = with pkgs; [brillo libnotify]; runtimeInputs = with pkgs; [brillo libnotify];

View file

@ -6,7 +6,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
launcher = config.ooknet.wayland.launcher; inherit (config.ooknet.wayland) launcher;
in { in {
config = mkIf (launcher == "rofi") { config = mkIf (launcher == "rofi") {
home.packages = [inputs.ooks-scripts.packages.${pkgs.system}.powermenu]; home.packages = [inputs.ooks-scripts.packages.${pkgs.system}.powermenu];

View file

@ -6,7 +6,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (builtins) elem; inherit (builtins) elem;
features = osConfig.ooknet.host.hardware.features; inherit (osConfig.ooknet.host.hardware) features;
ookvolume = pkgs.writeShellApplication { ookvolume = pkgs.writeShellApplication {
name = "ookvolume"; name = "ookvolume";
runtimeInputs = with pkgs; [pamixer libnotify]; runtimeInputs = with pkgs; [pamixer libnotify];

View file

@ -5,9 +5,9 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
multiplexer = config.ooknet.console.multiplexer; inherit (config.ooknet.console) multiplexer;
launcher = config.ooknet.wayland.launcher; inherit (config.ooknet.wayland) launcher;
binds = config.ooknet.binds; inherit (config.ooknet) binds;
zellijmenu = pkgs.writeShellApplication { zellijmenu = pkgs.writeShellApplication {
name = "zellijmenu"; name = "zellijmenu";
runtimeInputs = with pkgs; [coreutils rofi-wayland]; runtimeInputs = with pkgs; [coreutils rofi-wayland];

View file

@ -5,7 +5,7 @@
pkgs, pkgs,
... ...
}: let }: let
wayland = config.ooknet.wayland; inherit (config.ooknet) wayland;
inherit (lib) mkIf; inherit (lib) mkIf;
in { in {
imports = [ imports = [

View file

@ -6,7 +6,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
wayland = config.ooknet.wayland; inherit (config.ooknet) wayland;
in { in {
config = mkIf (wayland.compositor == "hyprland") { config = mkIf (wayland.compositor == "hyprland") {
home.packages = with inputs; [ home.packages = with inputs; [

View file

@ -5,7 +5,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
wayland = config.ooknet.wayland; inherit (config.ooknet) wayland;
in { in {
config = mkIf (wayland.compositor == "hyprland") { config = mkIf (wayland.compositor == "hyprland") {
home.packages = [pkgs.hyprshade]; home.packages = [pkgs.hyprshade];

View file

@ -4,8 +4,8 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
wayland = config.ooknet.wayland; inherit (config.ooknet) wayland;
binds = config.ooknet.binds; inherit (config.ooknet) binds;
in { in {
config = mkIf (wayland.compositor == "hyprland") { config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
wayland = config.ooknet.wayland; inherit (config.ooknet) wayland;
in { in {
config = mkIf (wayland.compositor == "hyprland") { config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings.env = [ wayland.windowManager.hyprland.settings.env = [

View file

@ -5,7 +5,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
wayland = config.ooknet.wayland; inherit (config.ooknet) wayland;
in { in {
config = mkIf (wayland.compositor == "hyprland") { config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
wayland = config.ooknet.wayland; inherit (config.ooknet) wayland;
in { in {
config = mkIf (wayland.compositor == "hyprland") { config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings.gestures = { wayland.windowManager.hyprland.settings.gestures = {

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
wayland = config.ooknet.wayland; inherit (config.ooknet) wayland;
in { in {
config = mkIf (wayland.compositor == "hyprland") { config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings.input = { wayland.windowManager.hyprland.settings.input = {

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
wayland = config.ooknet.wayland; inherit (config.ooknet) wayland;
in { in {
config = mkIf (wayland.compositor == "hyprland") { config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings.misc = { wayland.windowManager.hyprland.settings.misc = {

View file

@ -5,8 +5,8 @@
... ...
}: let }: let
inherit (lib) mkIf concatMap; inherit (lib) mkIf concatMap;
wayland = config.ooknet.wayland; inherit (config.ooknet) wayland;
monitors = osConfig.ooknet.host.hardware.monitors; inherit (osConfig.ooknet.host.hardware) monitors;
in { in {
config = mkIf (wayland.compositor == "hyprland") { config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
wayland = config.ooknet.wayland; inherit (config.ooknet) wayland;
in { in {
config = mkIf (wayland.compositor == "hyprland") { config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {

View file

@ -6,7 +6,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
cfg = config.ooknet.wayland; cfg = config.ooknet.wayland;
gpu = osConfig.ooknet.host.hardware.gpu; inherit (osConfig.ooknet.host.hardware) gpu;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.sessionVariables = home.sessionVariables =

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
desktop = config.ooknet.desktop; inherit (config.ooknet) desktop;
in { in {
config = mkIf (desktop.environment == "hyprland") { config = mkIf (desktop.environment == "hyprland") {
ooknet.wayland = { ooknet.wayland = {

View file

@ -5,7 +5,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (builtins) elem; inherit (builtins) elem;
profiles = osConfig.ooknet.host.profiles; inherit (osConfig.ooknet.host) profiles;
in { in {
config = mkIf (elem "console-tools" profiles) { config = mkIf (elem "console-tools" profiles) {
ooknet.tools = { ooknet.tools = {

View file

@ -5,7 +5,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (builtins) elem; inherit (builtins) elem;
profiles = osConfig.ooknet.host.profiles; inherit (osConfig.ooknet.host) profiles;
in { in {
config = mkIf (elem "creative" profiles) { config = mkIf (elem "creative" profiles) {
ooknet.creative = { ooknet.creative = {

View file

@ -5,7 +5,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (builtins) elem; inherit (builtins) elem;
profiles = osConfig.ooknet.host.profiles; inherit (osConfig.ooknet.host) profiles;
in { in {
config = mkIf (elem "gaming" profiles) { config = mkIf (elem "gaming" profiles) {
ooknet.gaming = { ooknet.gaming = {

View file

@ -5,7 +5,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (builtins) elem; inherit (builtins) elem;
profiles = osConfig.ooknet.host.profiles; inherit (osConfig.ooknet.host) profiles;
in { in {
config = mkIf (elem "media" profiles) { config = mkIf (elem "media" profiles) {
ooknet.media = { ooknet.media = {

View file

@ -5,7 +5,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (builtins) elem; inherit (builtins) elem;
profiles = osConfig.ooknet.host.profiles; inherit (osConfig.ooknet.host) profiles;
in { in {
config = mkIf (elem "productiviy" profiles) { config = mkIf (elem "productiviy" profiles) {
ooknet.productivity = { ooknet.productivity = {

View file

@ -6,7 +6,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
theme = config.ooknet.theme; inherit (config.ooknet) theme;
in { in {
imports = [inputs.nix-colors.homeManagerModule]; imports = [inputs.nix-colors.homeManagerModule];
config = mkIf (theme == "minimal") { config = mkIf (theme == "minimal") {

View file

@ -7,7 +7,7 @@
}: let }: let
inherit (inputs.nix-colors) colorSchemes; inherit (inputs.nix-colors) colorSchemes;
inherit (lib) mkIf; inherit (lib) mkIf;
theme = config.ooknet.theme; inherit (config.ooknet) theme;
in { in {
config = mkIf (theme == "phone") { config = mkIf (theme == "phone") {
colorscheme = colorSchemes.gruvbox-material-dark-soft; colorscheme = colorSchemes.gruvbox-material-dark-soft;

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
host = osConfig.ooknet.host; inherit (osConfig.ooknet) host;
in { in {
config = mkIf (host.admin.name == "ooks" && host.type == "desktop" && host.role == "workstation") { config = mkIf (host.admin.name == "ooks" && host.type == "desktop" && host.role == "workstation") {
ooknet = { ooknet = {

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
host = osConfig.ooknet.host; inherit (osConfig.ooknet) host;
in { in {
config = mkIf (host.admin.name == "ooks" && host.type == "laptop" && host.role == "workstation") { config = mkIf (host.admin.name == "ooks" && host.type == "laptop" && host.role == "workstation") {
ooknet = { ooknet = {

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
host = osConfig.ooknet.host; inherit (osConfig.ooknet) host;
in { in {
config = mkIf (host.admin.name == "ooks" && host.type == "micro" && host.role == "workstation") { config = mkIf (host.admin.name == "ooks" && host.type == "micro" && host.role == "workstation") {
ooknet = { ooknet = {

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
admin = config.ooknet.host.admin; inherit (config.ooknet.host) admin;
cfg = config.ooknet.services.nixarr; cfg = config.ooknet.services.nixarr;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {

View file

@ -1,4 +1,4 @@
{...}: { _: {
programs.ssh = { programs.ssh = {
enable = true; enable = true;
startAgent = true; startAgent = true;

View file

@ -6,7 +6,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet"; tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
host = config.ooknet.host; inherit (config.ooknet) host;
in { in {
config = mkIf (host.type != "phone") { config = mkIf (host.type != "phone") {
services.greetd = { services.greetd = {

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
host = config.ooknet.host; inherit (config.ooknet) host;
in { in {
imports = [ imports = [
./firewall.nix ./firewall.nix

View file

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

View file

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

View file

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

View file

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

View file

@ -6,7 +6,7 @@
... ...
}: let }: let
inherit (lib) mkIf mapAttrs mapAttrsToList; inherit (lib) mkIf mapAttrs mapAttrsToList;
host = config.ooknet.host; inherit (config.ooknet) host;
in { in {
imports = [ imports = [
./nh.nix ./nh.nix

View file

@ -5,8 +5,8 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
host = config.ooknet.host; inherit (config.ooknet) host;
admin = host.admin; inherit (host) admin;
in { in {
config = mkIf (host.type != "phone") { config = mkIf (host.type != "phone") {
environment.variables.FLAKE = mkIf admin.homeManager "/home/${admin.name}/.config/ooknet/"; environment.variables.FLAKE = mkIf admin.homeManager "/home/${admin.name}/.config/ooknet/";

View file

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

View file

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

View file

@ -6,9 +6,9 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
host = config.ooknet.host; inherit (config.ooknet) host;
admin = host.admin; inherit (host) admin;
tailscale = host.networking.tailscale; inherit (host.networking) tailscale;
in { in {
age.identityPaths = [ age.identityPaths = [
"/home/${admin.name}/.ssh/id_ed25519" "/home/${admin.name}/.ssh/id_ed25519"

View file

@ -5,7 +5,7 @@
}: let }: let
inherit (lib) optionals mkForce concatLists; inherit (lib) optionals mkForce concatLists;
inherit (builtins) elem; inherit (builtins) elem;
features = config.ooknet.host.hardware.features; inherit (config.ooknet.host.hardware) features;
in { in {
security = { security = {
# Protects the kernel from being tampered with at runtime. prevents the ability to hibernate. # Protects the kernel from being tampered with at runtime. prevents the ability to hibernate.

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
admin = config.ooknet.host.admin; inherit (config.ooknet.host) admin;
cfg = config.ooknet.programs._1password; cfg = config.ooknet.programs._1password;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {

View file

@ -7,9 +7,9 @@
inherit (lib.types) bool enum listOf int submodule nullOr str; inherit (lib.types) bool enum listOf int submodule nullOr str;
inherit (lib.lists) optionals concatLists; inherit (lib.lists) optionals concatLists;
admin = config.ooknet.host.admin; inherit (config.ooknet.host) admin;
hardware = config.ooknet.host.hardware; inherit (config.ooknet.host) hardware;
tailscale = config.ooknet.host.networking.tailscale; inherit (config.ooknet.host.networking) tailscale;
in { in {
options.ooknet.host = { options.ooknet.host = {
name = mkOption { name = mkOption {

View file

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

View file

@ -5,7 +5,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (builtins) elem; inherit (builtins) elem;
profiles = config.ooknet.host.profiles; inherit (config.ooknet.host) profiles;
in { in {
config = mkIf (elem "media-server" profiles) { config = mkIf (elem "media-server" profiles) {
ooknet.services.nixarr.enable = true; ooknet.services.nixarr.enable = true;

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
host = config.ooknet.host; inherit (config.ooknet) host;
in { in {
config = mkIf (host.type == "desktop" && host.role == "workstation") { config = mkIf (host.type == "desktop" && host.role == "workstation") {
ooknet = { ooknet = {

View file

@ -4,7 +4,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
host = config.ooknet.host; inherit (config.ooknet) host;
in { in {
config = mkIf (host.type == "laptop" && host.role == "workstation") { config = mkIf (host.type == "laptop" && host.role == "workstation") {
ooknet = { ooknet = {