From 6a591ecbf78a84821f5a5c790d46bb6fe30c6430 Mon Sep 17 00:00:00 2001 From: ooks-io Date: Tue, 4 Jun 2024 21:19:35 +1200 Subject: [PATCH] wip(home): refactor home modules *WILL NOT BUILD* --- flake.nix | 5 + home/modules/appearance/cursor.nix | 19 +++ home/modules/appearance/default.nix | 9 ++ home/modules/appearance/fonts.nix | 21 +++ .../gtk/default.nix => appearance/gtk.nix} | 12 +- home/modules/appearance/qt.nix | 16 +++ .../default.nix => appearance/wallpaper.nix} | 18 +-- home/modules/base/home-manager.nix | 28 ++++ .../default.nix => base/mime-apps.nix} | 14 +- home/modules/base/user-dirs.nix | 22 +++ home/modules/config/default.nix | 18 --- home/modules/config/home/default.nix | 29 ---- home/modules/config/nix/default.nix | 26 ---- home/modules/config/userDirs/default.nix | 27 ---- home/modules/console/tools/bat.nix | 18 +++ home/modules/console/tools/btop.nix | 14 ++ home/modules/console/tools/default.nix | 14 ++ home/modules/console/tools/direnv.nix | 15 ++ home/modules/console/tools/eza.nix | 14 ++ home/modules/console/tools/fzf.nix | 25 ++++ .../git/default.nix => tools/git.nix} | 12 +- home/modules/console/tools/nixIndex.nix | 21 +++ .../ssh/default.nix => tools/ssh.nix} | 9 +- .../console/{prompt => tools}/starship.nix | 5 +- .../tools/default.nix => tools/utils.nix} | 29 ---- home/modules/console/utility/default.nix | 24 ---- .../console/utility/nixIndex/default.nix | 38 ----- home/modules/desktop/gaming/bottles.nix | 15 ++ .../desktop/gaming/bottles/default.nix | 17 --- home/modules/desktop/gaming/default.nix | 16 +-- .../{factorio/default.nix => factorio.nix} | 2 +- .../gaming/{lutris/default.nix => lutris.nix} | 6 +- .../desktop/productivity/notes/obsidian.nix | 15 ++ .../desktop/productivity/obsidian/default.nix | 11 -- .../{zathura/default.nix => pdf/zathura.nix} | 0 .../desktop/wayland/bar/ags/default.nix | 16 --- .../desktop/wayland/bar/waybar/default.nix | 12 +- .../wayland/compositor}/default.nix | 2 +- .../hyprland/default.nix | 5 +- .../compositor/hyprland/extras/default.nix | 6 + .../hyprland/extras/hyprcapture.nix} | 5 +- .../hyprland/extras/hyprshade.nix} | 5 +- .../hyprland/pkgs/default.nix | 0 .../hyprland/pkgs/hyprbrightness.nix | 0 .../hyprland/pkgs/hyprvolume.nix | 0 .../hyprland/settings/appearance.nix | 5 +- .../compositor/hyprland/settings/binds.nix | 131 ++++++++++++++++++ .../hyprland/settings/default.nix | 0 .../hyprland/settings/env.nix | 5 +- .../hyprland/settings/exec.nix | 5 +- .../hyprland/settings/gestures.nix | 5 +- .../hyprland/settings/hyprpaper.nix | 21 +++ .../hyprland/settings/inputs.nix | 5 +- .../hyprland/settings/misc.nix | 5 +- .../hyprland/settings/monitor.nix | 12 +- .../hyprland/settings/rules.nix | 9 +- home/modules/desktop/wayland/default.nix | 18 +-- .../wayland/launcher/anyrun/default.nix | 34 ----- .../desktop/wayland/launcher/default.nix | 19 +-- .../launcher/{rofi/default.nix => rofi.nix} | 7 +- .../launcher/{tofi/default.nix => tofi.nix} | 9 +- .../desktop/wayland/lockscreen/default.nix | 18 +-- .../{hyprlock/default.nix => hyprlock.nix} | 14 +- .../{swaylock/default.nix => swaylock.nix} | 11 +- .../desktop/wayland/notification/default.nix | 11 +- .../{mako/default.nix => mako.nix} | 12 +- .../desktop/wayland/utility/default.nix | 15 +- .../{gammastep/default.nix => gammastep.nix} | 5 +- .../utility/{tools/default.nix => tools.nix} | 3 +- .../desktop/wayland/windowManager/default.nix | 14 -- .../windowManager/hyprland/extras/default.nix | 17 --- .../windowManager/hyprland/settings/binds.nix | 128 ----------------- .../hyprland/settings/hyprpaper.nix | 20 --- home/modules/options/appearance/cursor.nix | 29 ++++ .../appearance/fonts.nix} | 17 +-- home/modules/options/appearance/gtk.nix | 9 ++ home/modules/options/appearance/qt.nix | 9 ++ home/modules/options/appearance/theme.nix | 13 ++ home/modules/options/appearance/wallpaper.nix | 16 +++ home/modules/options/console/editor.nix | 12 ++ home/modules/options/console/multiplexer.nix | 12 ++ home/modules/options/console/shell.nix | 13 ++ home/modules/options/console/tools.nix | 20 +++ home/modules/options/desktop/binds.nix | 56 ++++++++ home/modules/options/desktop/browser.nix | 12 ++ .../modules/options/desktop/communication.nix | 11 ++ home/modules/options/desktop/creative.nix | 12 ++ home/modules/options/desktop/gaming.nix | 13 ++ home/modules/options/desktop/media.nix | 21 +++ home/modules/options/desktop/productivity.nix | 19 +++ home/modules/options/desktop/terminal.nix | 11 ++ home/modules/options/desktop/tools.nix | 11 ++ home/modules/options/desktop/wayland.nix | 31 +++++ home/modules/options/profiles/console.nix | 27 ++++ home/modules/options/profiles/desktop.nix | 51 +++++++ home/modules/theme/cursor/default.nix | 38 ----- home/modules/theme/default.nix | 9 -- home/modules/theme/qt/default.nix | 15 -- home/profile/base/default.nix | 42 ------ home/profile/creative/default.nix | 0 home/{profile => profiles}/default.nix | 0 .../desktop-environments/hyprland.nix | 19 +++ .../default.nix => profiles/hyprland.nix} | 3 +- .../suites/create.nix} | 0 .../suites/gaming.nix} | 2 +- .../suites/productivity.nix} | 2 +- home/{profile => profiles}/themes/default.nix | 0 .../themes/minimal.nix} | 7 +- .../default.nix => profiles/themes/phone.nix} | 5 +- home/user/ooks/ooksdesk/default.nix | 9 -- home/user/ooks/ookst480s/default.nix | 21 ++- hosts/ooksdesk/default.nix | 8 ++ sys/modules/base/host/admin.nix | 10 ++ sys/modules/base/host/hardware/default.nix | 1 + .../modules/base/host/hardware/monitors.nix | 10 +- 115 files changed, 1028 insertions(+), 791 deletions(-) create mode 100644 home/modules/appearance/cursor.nix create mode 100644 home/modules/appearance/default.nix create mode 100644 home/modules/appearance/fonts.nix rename home/modules/{theme/gtk/default.nix => appearance/gtk.nix} (71%) create mode 100644 home/modules/appearance/qt.nix rename home/modules/{theme/wallpaper/default.nix => appearance/wallpaper.nix} (53%) create mode 100644 home/modules/base/home-manager.nix rename home/modules/{config/mimeApps/default.nix => base/mime-apps.nix} (78%) create mode 100644 home/modules/base/user-dirs.nix delete mode 100644 home/modules/config/default.nix delete mode 100644 home/modules/config/home/default.nix delete mode 100644 home/modules/config/nix/default.nix delete mode 100644 home/modules/config/userDirs/default.nix create mode 100644 home/modules/console/tools/bat.nix create mode 100644 home/modules/console/tools/btop.nix create mode 100644 home/modules/console/tools/default.nix create mode 100644 home/modules/console/tools/direnv.nix create mode 100644 home/modules/console/tools/eza.nix create mode 100644 home/modules/console/tools/fzf.nix rename home/modules/console/{utility/git/default.nix => tools/git.nix} (59%) create mode 100644 home/modules/console/tools/nixIndex.nix rename home/modules/console/{utility/ssh/default.nix => tools/ssh.nix} (60%) rename home/modules/console/{prompt => tools}/starship.nix (91%) rename home/modules/console/{utility/tools/default.nix => tools/utils.nix} (50%) delete mode 100644 home/modules/console/utility/default.nix delete mode 100644 home/modules/console/utility/nixIndex/default.nix create mode 100644 home/modules/desktop/gaming/bottles.nix delete mode 100644 home/modules/desktop/gaming/bottles/default.nix rename home/modules/desktop/gaming/{factorio/default.nix => factorio.nix} (73%) rename home/modules/desktop/gaming/{lutris/default.nix => lutris.nix} (61%) create mode 100644 home/modules/desktop/productivity/notes/obsidian.nix delete mode 100644 home/modules/desktop/productivity/obsidian/default.nix rename home/modules/desktop/productivity/{zathura/default.nix => pdf/zathura.nix} (100%) delete mode 100644 home/modules/desktop/wayland/bar/ags/default.nix rename home/modules/{console/prompt => desktop/wayland/compositor}/default.nix (54%) rename home/modules/desktop/wayland/{windowManager => compositor}/hyprland/default.nix (86%) create mode 100644 home/modules/desktop/wayland/compositor/hyprland/extras/default.nix rename home/modules/desktop/wayland/{windowManager/hyprland/extras/hyprcapture/default.nix => compositor/hyprland/extras/hyprcapture.nix} (90%) rename home/modules/desktop/wayland/{windowManager/hyprland/extras/hyprshade/default.nix => compositor/hyprland/extras/hyprshade.nix} (54%) rename home/modules/desktop/wayland/{windowManager => compositor}/hyprland/pkgs/default.nix (100%) rename home/modules/desktop/wayland/{windowManager => compositor}/hyprland/pkgs/hyprbrightness.nix (100%) rename home/modules/desktop/wayland/{windowManager => compositor}/hyprland/pkgs/hyprvolume.nix (100%) rename home/modules/desktop/wayland/{windowManager => compositor}/hyprland/settings/appearance.nix (90%) create mode 100644 home/modules/desktop/wayland/compositor/hyprland/settings/binds.nix rename home/modules/desktop/wayland/{windowManager => compositor}/hyprland/settings/default.nix (100%) rename home/modules/desktop/wayland/{windowManager => compositor}/hyprland/settings/env.nix (61%) rename home/modules/desktop/wayland/{windowManager => compositor}/hyprland/settings/exec.nix (76%) rename home/modules/desktop/wayland/{windowManager => compositor}/hyprland/settings/gestures.nix (60%) create mode 100644 home/modules/desktop/wayland/compositor/hyprland/settings/hyprpaper.nix rename home/modules/desktop/wayland/{windowManager => compositor}/hyprland/settings/inputs.nix (66%) rename home/modules/desktop/wayland/{windowManager => compositor}/hyprland/settings/misc.nix (76%) rename home/modules/desktop/wayland/{windowManager => compositor}/hyprland/settings/monitor.nix (62%) rename home/modules/desktop/wayland/{windowManager => compositor}/hyprland/settings/rules.nix (76%) delete mode 100644 home/modules/desktop/wayland/launcher/anyrun/default.nix rename home/modules/desktop/wayland/launcher/{rofi/default.nix => rofi.nix} (93%) rename home/modules/desktop/wayland/launcher/{tofi/default.nix => tofi.nix} (86%) rename home/modules/desktop/wayland/lockscreen/{hyprlock/default.nix => hyprlock.nix} (84%) rename home/modules/desktop/wayland/lockscreen/{swaylock/default.nix => swaylock.nix} (83%) rename home/modules/desktop/wayland/notification/{mako/default.nix => mako.nix} (86%) rename home/modules/desktop/wayland/utility/{gammastep/default.nix => gammastep.nix} (76%) rename home/modules/desktop/wayland/utility/{tools/default.nix => tools.nix} (88%) delete mode 100644 home/modules/desktop/wayland/windowManager/default.nix delete mode 100644 home/modules/desktop/wayland/windowManager/hyprland/extras/default.nix delete mode 100644 home/modules/desktop/wayland/windowManager/hyprland/settings/binds.nix delete mode 100644 home/modules/desktop/wayland/windowManager/hyprland/settings/hyprpaper.nix create mode 100644 home/modules/options/appearance/cursor.nix rename home/modules/{theme/fonts/default.nix => options/appearance/fonts.nix} (65%) create mode 100644 home/modules/options/appearance/gtk.nix create mode 100644 home/modules/options/appearance/qt.nix create mode 100644 home/modules/options/appearance/theme.nix create mode 100644 home/modules/options/appearance/wallpaper.nix create mode 100644 home/modules/options/console/editor.nix create mode 100644 home/modules/options/console/multiplexer.nix create mode 100644 home/modules/options/console/shell.nix create mode 100644 home/modules/options/console/tools.nix create mode 100644 home/modules/options/desktop/binds.nix create mode 100644 home/modules/options/desktop/browser.nix create mode 100644 home/modules/options/desktop/communication.nix create mode 100644 home/modules/options/desktop/creative.nix create mode 100644 home/modules/options/desktop/gaming.nix create mode 100644 home/modules/options/desktop/media.nix create mode 100644 home/modules/options/desktop/productivity.nix create mode 100644 home/modules/options/desktop/terminal.nix create mode 100644 home/modules/options/desktop/tools.nix create mode 100644 home/modules/options/desktop/wayland.nix create mode 100644 home/modules/options/profiles/console.nix create mode 100644 home/modules/options/profiles/desktop.nix delete mode 100644 home/modules/theme/cursor/default.nix delete mode 100644 home/modules/theme/default.nix delete mode 100644 home/modules/theme/qt/default.nix delete mode 100644 home/profile/base/default.nix delete mode 100644 home/profile/creative/default.nix rename home/{profile => profiles}/default.nix (100%) create mode 100644 home/profiles/desktop-environments/hyprland.nix rename home/{profile/hyprland/default.nix => profiles/hyprland.nix} (94%) rename home/{modules/desktop/wayland/bar/eww/default.nix => profiles/suites/create.nix} (100%) rename home/{profile/gaming/default.nix => profiles/suites/gaming.nix} (92%) rename home/{profile/productivity/default.nix => profiles/suites/productivity.nix} (90%) rename home/{profile => profiles}/themes/default.nix (100%) rename home/{profile/themes/minimal/default.nix => profiles/themes/minimal.nix} (89%) rename home/{profile/themes/phone/default.nix => profiles/themes/phone.nix} (87%) rename home/modules/config/monitors/default.nix => sys/modules/base/host/hardware/monitors.nix (85%) diff --git a/flake.nix b/flake.nix index 383d447..20fdd49 100644 --- a/flake.nix +++ b/flake.nix @@ -46,6 +46,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + nix-index-db = { + url = "github:nix-community/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + # nix shell environment on android nix-on-droid = { url = "github:nix-community/nix-on-droid/release-23.11"; diff --git a/home/modules/appearance/cursor.nix b/home/modules/appearance/cursor.nix new file mode 100644 index 0000000..df272c6 --- /dev/null +++ b/home/modules/appearance/cursor.nix @@ -0,0 +1,19 @@ +{ lib, config, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.cursor; +in + +{ + config = mkIf cfg.enable { + home.pointerCursor = { + package = cfg.package; + name = cfg.name; + size = cfg.size; + gtk.enable = true; + x11.enable = true; + }; + }; +} + diff --git a/home/modules/appearance/default.nix b/home/modules/appearance/default.nix new file mode 100644 index 0000000..f0f91b0 --- /dev/null +++ b/home/modules/appearance/default.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ./fonts.nix + ./cursor.nix + ./gtk.nix + ./qt.nix + ./wallpaper.nix + ]; +} diff --git a/home/modules/appearance/fonts.nix b/home/modules/appearance/fonts.nix new file mode 100644 index 0000000..53ebde2 --- /dev/null +++ b/home/modules/appearance/fonts.nix @@ -0,0 +1,21 @@ +{ lib, config, pkgs, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.fonts; +in + +{ + config = mkIf cfg.enable { + fonts.fontconfig.enable = true; + home.packages = [ + cfg.monospace.package + cfg.regular.package + + pkgs.noto-fonts + pkgs.noto-fonts-cjk + pkgs.noto-fonts-emoji + ]; + }; +} + diff --git a/home/modules/theme/gtk/default.nix b/home/modules/appearance/gtk.nix similarity index 71% rename from home/modules/theme/gtk/default.nix rename to home/modules/appearance/gtk.nix index 9972fe4..a03684f 100644 --- a/home/modules/theme/gtk/default.nix +++ b/home/modules/appearance/gtk.nix @@ -2,19 +2,15 @@ let inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) gtkThemeFromScheme; - cfg = config.ooknet.theme.gtk; + inherit (lib) mkIf; + cfg = config.ooknet.gtk; in { - options.ooknet.theme.gtk = { - enable = lib.mkEnableOption "Enable gtk theme module"; - # TODO: add theme option - }; - - config = lib.mkIf cfg.enable (rec { + config = mkIf cfg.enable (rec { gtk = { enable = true; font = { - name = config.ooknet.theme.fonts.regular.family; + name = config.ooknet.fonts.regular.family; size = 12; }; theme = { diff --git a/home/modules/appearance/qt.nix b/home/modules/appearance/qt.nix new file mode 100644 index 0000000..9165c17 --- /dev/null +++ b/home/modules/appearance/qt.nix @@ -0,0 +1,16 @@ +{ config, lib, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.qt; +in + +{ + config = mkIf cfg.enable { + qt = { + enable = true; + platformTheme.name = "gtk"; + }; + }; +} + diff --git a/home/modules/theme/wallpaper/default.nix b/home/modules/appearance/wallpaper.nix similarity index 53% rename from home/modules/theme/wallpaper/default.nix rename to home/modules/appearance/wallpaper.nix index d89bc42..9fd5649 100644 --- a/home/modules/theme/wallpaper/default.nix +++ b/home/modules/appearance/wallpaper.nix @@ -1,26 +1,18 @@ -{ lib, config, inputs, pkgs, ... }: +{ lib, config, inputs, pkgs, osConfig, ... }: let inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) nixWallpaperFromScheme; - inherit (lib) types mkDefault mkIf mkOption mkEnableOption; + inherit (lib) mkDefault mkIf; + monitors = osConfig.ooknet.host.hardware.monitors; cfg = config.ooknet.theme.wallpaper; in { - options.ooknet.theme.wallpaper = { - enable = mkEnableOption "Enable wallpaper module"; - path = mkOption { - type = types.path; - default = null; - description = "Wallpaper Path"; - }; - }; - config = mkIf cfg.enable { ooknet.theme.wallpaper.path = let largest = f: xs: builtins.head (builtins.sort (a: b: a > b) (map f xs)); - largestWidth = largest (x: x.width) config.monitors; - largestHeight = largest (x: x.height) config.monitors; + largestWidth = largest (x: x.width) monitors; + largestHeight = largest (x: x.height) monitors; in mkDefault (nixWallpaperFromScheme { diff --git a/home/modules/base/home-manager.nix b/home/modules/base/home-manager.nix new file mode 100644 index 0000000..32ad894 --- /dev/null +++ b/home/modules/base/home-manager.nix @@ -0,0 +1,28 @@ +{ lib, config, osConfig, ... }: + +let + inherit (lib) mkDefault; + admin = osConfig.ooknet.host.admin; +in + +{ + programs.home-manager.enable = true; + systemd.user.startServices = "sd-switch"; + + home = { + username = admin.name; + homeDirectory = "/home/${config.home.username}"; + stateVersion = mkDefault "22.05"; + sessionPath = [ "${config.home.homeDirectory}/.local/bin" ]; + sessionVariables = { + TZ = "Pacific/Auckland"; + }; + }; + + # to save space + manual = { + html.enable = false; + json.enable = false; + manpages.enable = false; + }; +} diff --git a/home/modules/config/mimeApps/default.nix b/home/modules/base/mime-apps.nix similarity index 78% rename from home/modules/config/mimeApps/default.nix rename to home/modules/base/mime-apps.nix index e9806ff..415c247 100644 --- a/home/modules/config/mimeApps/default.nix +++ b/home/modules/base/mime-apps.nix @@ -1,8 +1,6 @@ { lib, config, pkgs, ... }: let - cfg = config.ooknet.config.mimeApps; - browser = ["${config.home.sessionVariables.BROWSER}.desktop"]; zathura = ["org.pwmt.zethura.desktop.desktop"]; @@ -29,12 +27,10 @@ let }; in { - config = lib.mkIf cfg.enable { - home.packages = [ pkgs.xdg-utils ]; - xdg.mimeApps = { - enable = true; - associations.added = associations; - defaultApplications = associations; - }; + home.packages = [ pkgs.xdg-utils ]; + xdg.mimeApps = { + enable = true; + associations.added = associations; + defaultApplications = associations; }; } diff --git a/home/modules/base/user-dirs.nix b/home/modules/base/user-dirs.nix new file mode 100644 index 0000000..129b50d --- /dev/null +++ b/home/modules/base/user-dirs.nix @@ -0,0 +1,22 @@ +{ config, ... }: + +{ + xdg = { + enable = true; + configHome = "${config.home.homeDirectory}/.config"; + cacheHome = "${config.home.homeDirectory}/.cache"; + dataHome = "${config.home.homeDirectory}/.local/share"; + stateHome = "${config.home.homeDirectory}/.local/state"; + + userDirs = { + enable = true; + createDirectories = true; + desktop = "${config.home.homeDirectory}/Desktop"; + code = "${config.home.homeDirectory}/Code"; + documents = "${config.home.homeDirectory}/Documents"; + music = "${config.home.homeDirectory}/Media/Music"; + videos = "${config.home.homeDirectory}/Media/Videos"; + pictures = "${config.home.homeDirectory}/Media/Pictures"; + }; + }; +} diff --git a/home/modules/config/default.nix b/home/modules/config/default.nix deleted file mode 100644 index 9170a3a..0000000 --- a/home/modules/config/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, ... }: - -{ - imports = [ - ./monitors - ./nix - ./userDirs - ./home - ./mimeApps - ]; - - options.ooknet.config = { - nix.enable = lib.mkEnableOption "enable nix configuration module"; - home.enable = lib.mkEnableOption "enable home configuration module"; - userDirs.enable = lib.mkEnableOption "enable userDirs configuration module"; - mimeApps.enable = lib.mkEnableOption "enable mimeApps configuration module"; - }; -} diff --git a/home/modules/config/home/default.nix b/home/modules/config/home/default.nix deleted file mode 100644 index d5e254b..0000000 --- a/home/modules/config/home/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ lib, config, ... }: - -let - cfg = config.ooknet.config.home; -in - -{ - config = lib.mkIf cfg.enable { - - programs.home-manager.enable = true; - - home = { - username = lib.mkDefault "ooks"; - homeDirectory = lib.mkDefault "/home/${config.home.username}"; - stateVersion = lib.mkDefault "22.05"; - sessionPath = [ "${config.home.homeDirectory}/.local/bin" ]; - sessionVariables = { - TZ = "Pacific/Auckland"; - }; - }; - - # to save space - manual = { - html.enable = false; - json.enable = false; - manpages.enable = true; - }; - }; -} diff --git a/home/modules/config/nix/default.nix b/home/modules/config/nix/default.nix deleted file mode 100644 index 09294d5..0000000 --- a/home/modules/config/nix/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ lib, config, pkgs, outputs, ... }: - -let - cfg = config.ooknet.config.nix; -in - -{ - config = lib.mkIf cfg.enable { - - nixpkgs = { - overlays = builtins.attrValues outputs.overlays; - config = { - allowUnfree = true; - allowUnfreePredicate = (_: true); - }; - }; - - nix = { - package = lib.mkDefault pkgs.nix; - settings = { - experimental-features = [ "nix-command" "flakes" "repl-flake" ]; - warn-dirty = false; - }; - }; - }; -} diff --git a/home/modules/config/userDirs/default.nix b/home/modules/config/userDirs/default.nix deleted file mode 100644 index 477e582..0000000 --- a/home/modules/config/userDirs/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ lib, config, ... }: - -let - cfg = config.ooknet.config.userDirs; -in - -{ - config = lib.mkIf cfg.enable { - xdg = { - enable = true; - configHome = "${config.home.homeDirectory}/.config"; - cacheHome = "${config.home.homeDirectory}/.cache"; - dataHome = "${config.home.homeDirectory}/.local/share"; - stateHome = "${config.home.homeDirectory}/.local/state"; - - userDirs = { - enable = true; - createDirectories = true; - desktop = "${config.home.homeDirectory}/Desktop"; - documents = "${config.home.homeDirectory}/Documents"; - music = "${config.home.homeDirectory}/Media/Music"; - videos = "${config.home.homeDirectory}/Media/Videos"; - pictures = "${config.home.homeDirectory}/Media/Pictures"; - }; - }; - }; -} diff --git a/home/modules/console/tools/bat.nix b/home/modules/console/tools/bat.nix new file mode 100644 index 0000000..439601e --- /dev/null +++ b/home/modules/console/tools/bat.nix @@ -0,0 +1,18 @@ +{ lib, config, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.tools.bat; +in + +{ + config = mkIf cfg.enable { + programs.bat = { + enable = true; + config = { + theme = "base16"; + pager = "less -FR"; + }; + }; + }; +} diff --git a/home/modules/console/tools/btop.nix b/home/modules/console/tools/btop.nix new file mode 100644 index 0000000..5de1036 --- /dev/null +++ b/home/modules/console/tools/btop.nix @@ -0,0 +1,14 @@ +{ lib, config, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.tools.btop; +in + +{ + config = mkIf cfg.enable { + programs.btop = { + enable = true; + }; + }; +} diff --git a/home/modules/console/tools/default.nix b/home/modules/console/tools/default.nix new file mode 100644 index 0000000..10a08aa --- /dev/null +++ b/home/modules/console/tools/default.nix @@ -0,0 +1,14 @@ +{ + imports = [ + ./bat.nix + ./eza.nix + ./btop.nix + ./direnv.nix + ./fzf.nix + ./nixIndex.nix + ./git.nix + ./starship.nix + ./utils.nix + ./ssh.nix + ]; +} diff --git a/home/modules/console/tools/direnv.nix b/home/modules/console/tools/direnv.nix new file mode 100644 index 0000000..6b5eab9 --- /dev/null +++ b/home/modules/console/tools/direnv.nix @@ -0,0 +1,15 @@ +{ lib, config, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.tools.direnv; +in + +{ + config = mkIf cfg.enable { + programs.direnv = { + enable = true; + nix-direnv.enable = true; + }; + }; +} diff --git a/home/modules/console/tools/eza.nix b/home/modules/console/tools/eza.nix new file mode 100644 index 0000000..fbb392b --- /dev/null +++ b/home/modules/console/tools/eza.nix @@ -0,0 +1,14 @@ +{ lib, config, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.tools.eza; +in + +{ + config = mkIf cfg.enable { + programs.eza = { + enable = true; + }; + }; +} diff --git a/home/modules/console/tools/fzf.nix b/home/modules/console/tools/fzf.nix new file mode 100644 index 0000000..1ba347d --- /dev/null +++ b/home/modules/console/tools/fzf.nix @@ -0,0 +1,25 @@ +{ lib, config, osConfig, ... }: + +let + inherit (lib) mkIf; + admin = osConfig.ooknet.host.admin; + cfg = config.ooknet.tools.fzf; +in + +{ + config = mkIf cfg.enable { + fzf = { + enable = true; + enableFishIntegration = mkIf (admin.shell == "fish") true; + defaultCommand = "rg --files --hidden"; + changeDirWidgetOptions = [ + "--preview 'eza --icons -L 3 -T --color always {} | head -200'" + "--exact" + ]; + fileWidgetCommand = "rg --files"; + fileWidgetOptions = [ + "--preview 'bat --color=always {}'" + ]; + }; + }; +} diff --git a/home/modules/console/utility/git/default.nix b/home/modules/console/tools/git.nix similarity index 59% rename from home/modules/console/utility/git/default.nix rename to home/modules/console/tools/git.nix index 5fe77ca..27aa295 100644 --- a/home/modules/console/utility/git/default.nix +++ b/home/modules/console/tools/git.nix @@ -1,14 +1,16 @@ -{ pkgs, config, lib, ... }: +{ pkgs, config, lib, osConfig, ... }: let - cfg = config.ooknet.console.utility.git; + inherit (lib) mkIf; + cfg = config.ooknet.tools.git; + admin = osConfig.ooknet.host.admin; in { - config = lib.mkIf cfg.enable { + config = mkIf cfg.enable { programs.git = { enable = true; package = pkgs.gitAndTools.gitFull; - userName = "ooks-io"; - userEmail = "ooks@protonmail.com"; + userName = admin.gitName; + userEmail = admin.gitEmail; extraConfig = { gpg."ssh".program = "${pkgs._1password-gui}/bin/op-ssh-sign"; }; diff --git a/home/modules/console/tools/nixIndex.nix b/home/modules/console/tools/nixIndex.nix new file mode 100644 index 0000000..1c8a7d3 --- /dev/null +++ b/home/modules/console/tools/nixIndex.nix @@ -0,0 +1,21 @@ +{ lib, config, inputs, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.tools.nixIndex; +in + +{ + imports = [ inputs.nix-index-db.hmModules.nix-index ]; + config = mkIf cfg.enable { + programs = { + nix-index = { + enable = true; + symlinkToCacheHome = true; + }; + command-not-found.enable = false; + nix-index-database.comma.enable = true; + }; + home.sessionVariables.NIX_AUTO_RUN = "1"; + }; +} diff --git a/home/modules/console/utility/ssh/default.nix b/home/modules/console/tools/ssh.nix similarity index 60% rename from home/modules/console/utility/ssh/default.nix rename to home/modules/console/tools/ssh.nix index dcc3d82..9631942 100644 --- a/home/modules/console/utility/ssh/default.nix +++ b/home/modules/console/tools/ssh.nix @@ -1,13 +1,12 @@ -{ lib, config, ... }: +{ lib, config, osConfig, ... }: let - cfg = config.ooknet.console.utility.ssh; - hasFish = mkIf config.ooknet.console.shell.fish.enable; inherit (lib) mkIf; + cfg = config.ooknet.tools.ssh; + admin = osConfig.ooknet.host.admin; in { - config = mkIf cfg.enable { programs.ssh = { enable = true; @@ -16,7 +15,7 @@ in IdentityAgent "~/.1password/agent.sock" ''; }; - programs.fish.interactiveShellInit = hasFish /* fish */ '' + programs.fish.interactiveShellInit = mkIf (admin.shell == "fish") /* fish */ '' set -gx SSH_AUTH_SOCK ~/.1password/agent.sock ''; }; diff --git a/home/modules/console/prompt/starship.nix b/home/modules/console/tools/starship.nix similarity index 91% rename from home/modules/console/prompt/starship.nix rename to home/modules/console/tools/starship.nix index 9039db7..e3574c6 100644 --- a/home/modules/console/prompt/starship.nix +++ b/home/modules/console/tools/starship.nix @@ -1,12 +1,11 @@ { config, lib, ... }: let - cfg = config.ooknet.console.prompt.starship; - inherit (lib) concatStrings mkEnableOption mkIf; + cfg = config.ooknet.tools.starship; + inherit (lib) concatStrings mkIf; in { - options.ooknet.console.prompt.starship.enable = mkEnableOption ""; config = mkIf cfg.enable { programs.starship = { enable = true; diff --git a/home/modules/console/utility/tools/default.nix b/home/modules/console/tools/utils.nix similarity index 50% rename from home/modules/console/utility/tools/default.nix rename to home/modules/console/tools/utils.nix index 60bc2d1..e8d99b4 100644 --- a/home/modules/console/utility/tools/default.nix +++ b/home/modules/console/tools/utils.nix @@ -44,34 +44,5 @@ in # Nix tooling alejandra ]; - - programs = { - btop.enable = true; - eza.enable = true; - bat = { - enable = true; - config = { - theme = "base16"; - pager = "less -FR"; - }; - }; - direnv = { - enable = true; - nix-direnv.enable = true; - }; - fzf = { - enable = true; - enableFishIntegration = lib.mkIf config.ooknet.console.shell.fish.enable true; - defaultCommand = "rg --files --hidden"; - changeDirWidgetOptions = [ - "--preview 'eza --icons -L 3 -T --color always {} | head -200'" - "--exact" - ]; - fileWidgetCommand = "rg --files"; - fileWidgetOptions = [ - "--preview 'bat --color=always {}'" - ]; - }; - }; }; } diff --git a/home/modules/console/utility/default.nix b/home/modules/console/utility/default.nix deleted file mode 100644 index 0483aea..0000000 --- a/home/modules/console/utility/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ lib, ... }: -{ - imports = [ - ./nixIndex - ./git - ./tools - ./ssh - ]; - - options.ooknet.console.utility = { - nixIndex = { - enable = lib.mkEnableOption "Enable nixIndex configuration"; - }; - git = { - enable = lib.mkEnableOption "Enable git + tools"; - }; - ssh = { - enable = lib.mkEnableOption "Enable various console ssh"; - }; - tools = { - enable = lib.mkEnableOption "Enable various console tools"; - }; - }; -} diff --git a/home/modules/console/utility/nixIndex/default.nix b/home/modules/console/utility/nixIndex/default.nix deleted file mode 100644 index 09cd677..0000000 --- a/home/modules/console/utility/nixIndex/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ pkgs, config, lib, ... }: -let - cfg = config.ooknet.console.utility.nixIndex; - update-script = pkgs.writeShellApplication { - name = "fetch-nix-index-database"; - runtimeInputs = with pkgs; [ wget coreutils ]; - text = '' - filename="index-x86_64-linux" - mkdir -p ~/.cache/nix-index - cd ~/.cache/nix-index - wget -N "https://github.com/Mic92/nix-index-database/releases/latest/download/$filename" - ln -f "$filename" files - ''; - }; -in -{ - config = lib.mkIf cfg.enable { - programs.nix-index.enable = true; - - systemd.user.services.nix-index-database-sync = { - Unit = { Description = "fetch mic92/nix-index-database"; }; - Service = { - Type = "oneshot"; - ExecStart = "${update-script}/bin/fetch-nix-index-database"; - Restart = "on-failure"; - RestartSec = "5m"; - }; - }; - systemd.user.timers.nix-index-database-sync = { - Unit = { Description = "Automatic github:mic92/nix-index-database fetching"; }; - Timer = { - OnBootSec = "10m"; - OnUnitActiveSec = "24h"; - }; - Install = { WantedBy = [ "timers.target" ]; }; - }; - }; -} diff --git a/home/modules/desktop/gaming/bottles.nix b/home/modules/desktop/gaming/bottles.nix new file mode 100644 index 0000000..575ec5c --- /dev/null +++ b/home/modules/desktop/gaming/bottles.nix @@ -0,0 +1,15 @@ +{ lib, config, pkgs, ... }: + +let + inherit (lib) mkIf; + cfg = config.ooknet.gaming.bottles; +in + +{ + config = mkIf cfg.enable { + home.packages = with pkgs; [ + bottles + ]; + }; + +} diff --git a/home/modules/desktop/gaming/bottles/default.nix b/home/modules/desktop/gaming/bottles/default.nix deleted file mode 100644 index 0209447..0000000 --- a/home/modules/desktop/gaming/bottles/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ lib, config, pkgs, ... }: - -let - inherit (lib) mkEnableOption mkIf; - cfg = config.ooknet.desktop.gaming.bottles; -in - -{ - options.ooknet.desktop.gaming.bottles.enable = mkEnableOption "Enable bottles home-manager modules"; - - config = mkIf cfg.enable { - home.packages = with pkgs; [ - bottles - ]; - }; - -} diff --git a/home/modules/desktop/gaming/default.nix b/home/modules/desktop/gaming/default.nix index 7972160..ba2edb3 100644 --- a/home/modules/desktop/gaming/default.nix +++ b/home/modules/desktop/gaming/default.nix @@ -1,17 +1,7 @@ -{ lib, ... }: - { - imports = [ - ./factorio - ./lutris - ./bottles + ./factorio.nix + ./lutris.nix + ./bottles.nix ]; - - options.ooknet.desktop.gaming = { - factorio = { - enable = lib.mkEnableOption "Enable factorio home module"; - }; - }; - } diff --git a/home/modules/desktop/gaming/factorio/default.nix b/home/modules/desktop/gaming/factorio.nix similarity index 73% rename from home/modules/desktop/gaming/factorio/default.nix rename to home/modules/desktop/gaming/factorio.nix index db9d7da..62aed02 100644 --- a/home/modules/desktop/gaming/factorio/default.nix +++ b/home/modules/desktop/gaming/factorio.nix @@ -1,7 +1,7 @@ { lib, config, pkgs, ... }: let - cfg=config.ooknet.desktop.gaming.factorio; + cfg = config.ooknet.gaming.factorio; in { diff --git a/home/modules/desktop/gaming/lutris/default.nix b/home/modules/desktop/gaming/lutris.nix similarity index 61% rename from home/modules/desktop/gaming/lutris/default.nix rename to home/modules/desktop/gaming/lutris.nix index 67dacc9..9d82938 100644 --- a/home/modules/desktop/gaming/lutris/default.nix +++ b/home/modules/desktop/gaming/lutris.nix @@ -1,13 +1,11 @@ { lib, config, pkgs, ... }: let - inherit (lib) mkIf mkEnableOption; - cfg = config.ooknet.desktop.gaming.lutris; + inherit (lib) mkIf; + cfg = config.ooknet.gaming.lutris; in { - options.ooknet.desktop.gaming.lutris.enable = mkEnableOption "Enable lutris home-manager module"; - config = mkIf cfg.enable { home.packages = with pkgs; [ (lutris.override { diff --git a/home/modules/desktop/productivity/notes/obsidian.nix b/home/modules/desktop/productivity/notes/obsidian.nix new file mode 100644 index 0000000..e3018ff --- /dev/null +++ b/home/modules/desktop/productivity/notes/obsidian.nix @@ -0,0 +1,15 @@ +{ lib, config, pkgs, ... }: + +let + inherit (lib) mkIf mkEnableOption; + cfg = config.ooknet.productivity.notes.obsidian; + notes = config.ooknet.desktop.notes; +in + +{ + options.ooknet.productivity.notes.obsidian.enable = mkEnableOption ""; + config = mkIf (cfg.enable || notes == "obsidian") { + home.packages = [ pkgs.obsidian ]; + + }; +} diff --git a/home/modules/desktop/productivity/obsidian/default.nix b/home/modules/desktop/productivity/obsidian/default.nix deleted file mode 100644 index 2a4b9d0..0000000 --- a/home/modules/desktop/productivity/obsidian/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ lib, config, pkgs, ... }: - -let - cfg = config.ooknet.desktop.productivity.obsidian; -in - -{ - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ obsidian ]; - }; -} diff --git a/home/modules/desktop/productivity/zathura/default.nix b/home/modules/desktop/productivity/pdf/zathura.nix similarity index 100% rename from home/modules/desktop/productivity/zathura/default.nix rename to home/modules/desktop/productivity/pdf/zathura.nix diff --git a/home/modules/desktop/wayland/bar/ags/default.nix b/home/modules/desktop/wayland/bar/ags/default.nix deleted file mode 100644 index 3de027c..0000000 --- a/home/modules/desktop/wayland/bar/ags/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ lib, config, inputs, ... }: - -let - cfg = config.ooknet.desktop.wayland.bar.ags; -in - -{ - - imports = [ inputs.ags.homeManagerModules.default ]; - - config = lib.mkIf cfg.enable { - programs.ags = { - enable = true; - }; - }; -} diff --git a/home/modules/desktop/wayland/bar/waybar/default.nix b/home/modules/desktop/wayland/bar/waybar/default.nix index efc7c0d..06d2b04 100644 --- a/home/modules/desktop/wayland/bar/waybar/default.nix +++ b/home/modules/desktop/wayland/bar/waybar/default.nix @@ -1,14 +1,16 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, osConfig, ... }: let - fonts = config.ooknet.theme.fonts; - cfg = config.ooknet.desktop.wayland.bar.waybar; - monitorWidth = (lib.head config.monitors).width - 20; inherit (config.colorscheme) palette; + inherit (lib) mkIf head; + fonts = config.ooknet.fonts; + wayland = config.ooknet.wayland; + monitors = osConfig.ooknet.host.hardware.monitors; + monitorWidth = (head monitors).width - 20; in { - config = lib.mkIf cfg.enable { + config = mkIf (wayland.bar == "waybar") { programs.waybar = { enable = true; systemd.enable = true; diff --git a/home/modules/console/prompt/default.nix b/home/modules/desktop/wayland/compositor/default.nix similarity index 54% rename from home/modules/console/prompt/default.nix rename to home/modules/desktop/wayland/compositor/default.nix index fc29043..3fbd598 100644 --- a/home/modules/console/prompt/default.nix +++ b/home/modules/desktop/wayland/compositor/default.nix @@ -1,5 +1,5 @@ { imports = [ - ./starship.nix + ./hyprland ]; } diff --git a/home/modules/desktop/wayland/windowManager/hyprland/default.nix b/home/modules/desktop/wayland/compositor/hyprland/default.nix similarity index 86% rename from home/modules/desktop/wayland/windowManager/hyprland/default.nix rename to home/modules/desktop/wayland/compositor/hyprland/default.nix index c026044..acf46ee 100644 --- a/home/modules/desktop/wayland/windowManager/hyprland/default.nix +++ b/home/modules/desktop/wayland/compositor/hyprland/default.nix @@ -1,8 +1,9 @@ { lib, config, pkgs, inputs, ... }: let - cfg = config.ooknet.desktop.wayland.windowManager.hyprland; + wayland = config.ooknet.wayland; inherit (import ./pkgs {inherit pkgs;}) hyprbrightness hyprvolume; inherit (inputs.ooks-scripts.packages.${pkgs.system}) powermenu zellijmenu; + inherit (lib) mkIf; in { imports = [ @@ -11,7 +12,7 @@ in ./extras ]; - config = lib.mkIf cfg.enable { + config = mkIf (wayland.compositor == "hyprland") { home.packages = [ pkgs.hyprpicker hyprvolume diff --git a/home/modules/desktop/wayland/compositor/hyprland/extras/default.nix b/home/modules/desktop/wayland/compositor/hyprland/extras/default.nix new file mode 100644 index 0000000..37a3c04 --- /dev/null +++ b/home/modules/desktop/wayland/compositor/hyprland/extras/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./hyprcapture.nix + ./hyprshade.nix + ]; +} diff --git a/home/modules/desktop/wayland/windowManager/hyprland/extras/hyprcapture/default.nix b/home/modules/desktop/wayland/compositor/hyprland/extras/hyprcapture.nix similarity index 90% rename from home/modules/desktop/wayland/windowManager/hyprland/extras/hyprcapture/default.nix rename to home/modules/desktop/wayland/compositor/hyprland/extras/hyprcapture.nix index 9ff6b25..21ebd0f 100644 --- a/home/modules/desktop/wayland/windowManager/hyprland/extras/hyprcapture/default.nix +++ b/home/modules/desktop/wayland/compositor/hyprland/extras/hyprcapture.nix @@ -1,11 +1,12 @@ { lib, config, pkgs, inputs, ... }: let - cfg = config.ooknet.desktop.wayland.windowManager.hyprland.extras.hyprcapture; + inherit (lib) mkIf; + wayland = config.ooknet.wayland; in { - config = lib.mkIf cfg.enable { + config = mkIf (wayland.compositor == "hyprland") { home.packages = with inputs; [ # Screenshot tool diff --git a/home/modules/desktop/wayland/windowManager/hyprland/extras/hyprshade/default.nix b/home/modules/desktop/wayland/compositor/hyprland/extras/hyprshade.nix similarity index 54% rename from home/modules/desktop/wayland/windowManager/hyprland/extras/hyprshade/default.nix rename to home/modules/desktop/wayland/compositor/hyprland/extras/hyprshade.nix index 7fd2338..4be31c2 100644 --- a/home/modules/desktop/wayland/windowManager/hyprland/extras/hyprshade/default.nix +++ b/home/modules/desktop/wayland/compositor/hyprland/extras/hyprshade.nix @@ -1,11 +1,12 @@ { lib, config, pkgs, ... }: let - cfg = config.ooknet.desktop.wayland.windowManager.hyprland.extras.hyprshade; + inherit (lib) mkIf; + wayland = config.ooknet.wayland; in { - config = lib.mkIf cfg.enable { + config = mkIf (wayland.compositor == "hyprland") { home.packages = [ pkgs.hyprshade ]; # TODO: implement hyprshade configuration }; diff --git a/home/modules/desktop/wayland/windowManager/hyprland/pkgs/default.nix b/home/modules/desktop/wayland/compositor/hyprland/pkgs/default.nix similarity index 100% rename from home/modules/desktop/wayland/windowManager/hyprland/pkgs/default.nix rename to home/modules/desktop/wayland/compositor/hyprland/pkgs/default.nix diff --git a/home/modules/desktop/wayland/windowManager/hyprland/pkgs/hyprbrightness.nix b/home/modules/desktop/wayland/compositor/hyprland/pkgs/hyprbrightness.nix similarity index 100% rename from home/modules/desktop/wayland/windowManager/hyprland/pkgs/hyprbrightness.nix rename to home/modules/desktop/wayland/compositor/hyprland/pkgs/hyprbrightness.nix diff --git a/home/modules/desktop/wayland/windowManager/hyprland/pkgs/hyprvolume.nix b/home/modules/desktop/wayland/compositor/hyprland/pkgs/hyprvolume.nix similarity index 100% rename from home/modules/desktop/wayland/windowManager/hyprland/pkgs/hyprvolume.nix rename to home/modules/desktop/wayland/compositor/hyprland/pkgs/hyprvolume.nix diff --git a/home/modules/desktop/wayland/windowManager/hyprland/settings/appearance.nix b/home/modules/desktop/wayland/compositor/hyprland/settings/appearance.nix similarity index 90% rename from home/modules/desktop/wayland/windowManager/hyprland/settings/appearance.nix rename to home/modules/desktop/wayland/compositor/hyprland/settings/appearance.nix index 6dcd3d8..1cfd685 100644 --- a/home/modules/desktop/wayland/windowManager/hyprland/settings/appearance.nix +++ b/home/modules/desktop/wayland/compositor/hyprland/settings/appearance.nix @@ -1,13 +1,14 @@ { config, lib, ... }: let - cfg = config.ooknet.desktop.wayland.windowManager.hyprland; + wayland = config.ooknet.wayland; pointer = config.home.pointerCursor; inherit (config.colorscheme) palette; + inherit (lib) mkIf; in { - config = lib.mkIf cfg.enable { + config = mkIf (wayland.compositor == "hyprland") { wayland.windowManager.hyprland = { settings = { cursor = { diff --git a/home/modules/desktop/wayland/compositor/hyprland/settings/binds.nix b/home/modules/desktop/wayland/compositor/hyprland/settings/binds.nix new file mode 100644 index 0000000..701506c --- /dev/null +++ b/home/modules/desktop/wayland/compositor/hyprland/settings/binds.nix @@ -0,0 +1,131 @@ +{ lib, config, pkgs, ... }: + +let + inherit (lib) mkIf; + wayland = config.ooknet.wayland; +in + +{ + config = mkIf (wayland.compositor == "hyprland") { + wayland.windowManager.hyprland.settings = { + bind = let + terminal = config.home.sessionVariables.TERMINAL; + browser = config.home.sessionVariables.BROWSER; + editor = config.home.sessionVariables.EDITOR; + locker = config.home.sessionVariables.LOCKER; + + spotifyctl = "${pkgs.spotify-player}/bin/spotify_player"; + discord = "${pkgs.vesktop}/bin/vesktop"; + + explorer = "${pkgs.cinnamon.nemo-with-extensions}/bin/nemo"; + + password = "${pkgs._1password-gui}/bin/1password"; + in [ + + # Program Launch + "SUPER, b, exec, ${browser}" + "SUPER, return, exec, ${terminal}" + "SUPER, e, exec, ${terminal} ${editor}" + "SUPERSHIFT, P, exec, ${password}" + "SUPER, d, exec, ${discord}" + "SUPERSHIFT, e, exec, ${explorer}" + "SUPERSHIFT, S, exec, steam" + "SUPER, escape, exec, ${terminal} --title=BTOP btop" + "SUPER CTRL, return, exec, zellijmenu -n" + + "SUPER, delete, exec, powermenu -c dmenu" + + + + # Spotify PLayer Controls + + "SUPER, bracketright, exec, ${spotifyctl} playback next" + "SUPER, bracketleft, exec, ${spotifyctl} playback previous" + "SUPER, backslash, exec, ${spotifyctl} playback play-pause" + + # Brightness + + ",XF86MonBrightnessUp, exec, hyprbrightness up" + ",XF86MonBrightnessDown, exec, hyprbrightness down" + + # Volume + + ",XF86AudioRaiseVolume, exec, hyprvolume up" + ",XF86AudioLowerVolume, exec, hyprvolume down" + ",XF86AudioMute, exec, hyprvolume mute" + + # Window Management + + "SUPER, Q, killactive" + "SUPER CTRL, backspace, killactive" + "SUPERSHIFT ALT, delete, exec, hyprkillsession" + "SUPER, F, fullscreen" + "SUPER CTRL, F, fakefullscreen" + "SUPER, Space, togglefloating" + "SUPER, P, pseudo" # dwindle + "SUPER, S, togglesplit" # dwindle + + # Focus + + "SUPER, left, movefocus,l" + "SUPER, right, movefocus,r" + "SUPER, up, movefocus,u" + "SUPER, down, movefocus,d" + + # Move + + "SUPERSHIFT, left, movewindow,l" + "SUPERSHIFT, right, movewindow,r" + "SUPERSHIFT, up, movewindow,u" + "SUPERSHIFT, down, movewindow,d" + + #Resize + + "SUPER CTRL, left, resizeactive,-20 0" + "SUPERCTRL, right, resizeactive,20 0" + "SUPER CTRL, up, resizeactive,0 -20" + "SUPERCTRL, down, resizeactive,0 20" + + # Switch workspace + + "SUPER, 1, workspace,1" + "SUPER, 2, workspace,2" + "SUPER, 3, workspace,3" + "SUPER, 4, workspace,4" + "SUPER, 5, workspace,5" + "SUPER, 6, workspace,6" + "SUPER, 7, workspace,7" + "SUPER, 8, workspace,8" + "SUPER, 9, workspace,9" + "SUPER, 0, workspace,10" + "SUPER, comma, workspace,e+1" + "SUPER, period, workspace,e-1" + "SUPER, tab, focusCurrentOrLast" + + # Move workspace + + "SUPERSHIFT, 1, movetoworkspace,1" + "SUPERSHIFT, 2, movetoworkspace,2" + "SUPERSHIFT, 3, movetoworkspace,3" + "SUPERSHIFT, 4, movetoworkspace,4" + "SUPERSHIFT, 5, movetoworkspace,5" + "SUPERSHIFT, 6, movetoworkspace,6" + "SUPERSHIFT, 7, movetoworkspace,7" + "SUPERSHIFT, 8, movetoworkspace,8" + "SUPERSHIFT, 9, movetoworkspace,9" + "SUPERSHIFT, 0, movetoworkspace,10" + + # Lock Screen + "SUPER, Backspace, exec, ${locker}" + ]; + # Mouse + bindm = [ + "SUPER, mouse:272, movewindow" + "SUPER, mouse:273, resizewindow" + ]; + # bindr = [ + # "SUPER, SUPER_L, exec, killall rofi || rofi -show drun" + # ]; + }; + }; +} diff --git a/home/modules/desktop/wayland/windowManager/hyprland/settings/default.nix b/home/modules/desktop/wayland/compositor/hyprland/settings/default.nix similarity index 100% rename from home/modules/desktop/wayland/windowManager/hyprland/settings/default.nix rename to home/modules/desktop/wayland/compositor/hyprland/settings/default.nix diff --git a/home/modules/desktop/wayland/windowManager/hyprland/settings/env.nix b/home/modules/desktop/wayland/compositor/hyprland/settings/env.nix similarity index 61% rename from home/modules/desktop/wayland/windowManager/hyprland/settings/env.nix rename to home/modules/desktop/wayland/compositor/hyprland/settings/env.nix index 45765f5..bb7ca2c 100644 --- a/home/modules/desktop/wayland/windowManager/hyprland/settings/env.nix +++ b/home/modules/desktop/wayland/compositor/hyprland/settings/env.nix @@ -1,11 +1,12 @@ { lib, config, ... }: let - cfg = config.ooknet.desktop.wayland.windowManager.hyprland; + inherit (lib) mkIf; + wayland = config.ooknet.wayland; in { - config = lib.mkIf cfg.enable { + config = mkIf (wayland.compositor == "hyprland") { wayland.windowManager.hyprland.settings.env = [ "XDG_SESSION_DESKTOP,hyprland" "XDG_CURRENT_DESKTOP,hyprland" diff --git a/home/modules/desktop/wayland/windowManager/hyprland/settings/exec.nix b/home/modules/desktop/wayland/compositor/hyprland/settings/exec.nix similarity index 76% rename from home/modules/desktop/wayland/windowManager/hyprland/settings/exec.nix rename to home/modules/desktop/wayland/compositor/hyprland/settings/exec.nix index 128e5fa..982522f 100644 --- a/home/modules/desktop/wayland/windowManager/hyprland/settings/exec.nix +++ b/home/modules/desktop/wayland/compositor/hyprland/settings/exec.nix @@ -1,11 +1,12 @@ { config, lib, pkgs, ... }: let - cfg = config.ooknet.desktop.wayland.windowManager.hyprland; + inherit (lib) mkIf; + wayland = config.ooknet.wayland; in { - config = lib.mkIf cfg.enable { + config = mkIf (wayland.compositor == "hyprland") { wayland.windowManager.hyprland.settings = { exec = [ "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" diff --git a/home/modules/desktop/wayland/windowManager/hyprland/settings/gestures.nix b/home/modules/desktop/wayland/compositor/hyprland/settings/gestures.nix similarity index 60% rename from home/modules/desktop/wayland/windowManager/hyprland/settings/gestures.nix rename to home/modules/desktop/wayland/compositor/hyprland/settings/gestures.nix index 8ecd6fa..e8d5064 100644 --- a/home/modules/desktop/wayland/windowManager/hyprland/settings/gestures.nix +++ b/home/modules/desktop/wayland/compositor/hyprland/settings/gestures.nix @@ -1,11 +1,12 @@ { lib, config, ... }: let - cfg = config.ooknet.desktop.wayland.windowManager.hyprland; + inherit (lib) mkIf; + wayland = config.ooknet.wayland; in { - config = lib.mkIf cfg.enable { + config = mkIf (wayland.compositor == "hyprland") { wayland.windowManager.hyprland.settings.gestures = { workspace_swipe = true; workspace_swipe_forever = true; diff --git a/home/modules/desktop/wayland/compositor/hyprland/settings/hyprpaper.nix b/home/modules/desktop/wayland/compositor/hyprland/settings/hyprpaper.nix new file mode 100644 index 0000000..91b92a0 --- /dev/null +++ b/home/modules/desktop/wayland/compositor/hyprland/settings/hyprpaper.nix @@ -0,0 +1,21 @@ +{ lib, config, inputs, ... }: + +let + inherit (lib) mkIf; + wayland = config.ooknet.wayland; + wallpaperPath = config.ooknet.wallpaper.path; +in + +{ + config = mkIf (wayland.compositor == "hyprland") { + services.hyprpaper = { + enable = true; + }; + xdg.configFile."hypr/hyprpaper.conf".text = '' + preload = ${wallpaperPath} + wallpaper = , ${wallpaperPath} + splash = false + ipc = off + ''; + }; +} diff --git a/home/modules/desktop/wayland/windowManager/hyprland/settings/inputs.nix b/home/modules/desktop/wayland/compositor/hyprland/settings/inputs.nix similarity index 66% rename from home/modules/desktop/wayland/windowManager/hyprland/settings/inputs.nix rename to home/modules/desktop/wayland/compositor/hyprland/settings/inputs.nix index 0cf8126..001adbf 100644 --- a/home/modules/desktop/wayland/windowManager/hyprland/settings/inputs.nix +++ b/home/modules/desktop/wayland/compositor/hyprland/settings/inputs.nix @@ -1,11 +1,12 @@ { lib, config, ... }: let - cfg = config.ooknet.desktop.wayland.windowManager.hyprland; + inherit (lib) mkIf; + wayland = config.ooknet.wayland; in { - config = lib.mkIf cfg.enable { + config = mkIf (wayland.compositor == "hyprland") { wayland.windowManager.hyprland.settings.input = { kb_layout = "us"; follow_mouse = 1; diff --git a/home/modules/desktop/wayland/windowManager/hyprland/settings/misc.nix b/home/modules/desktop/wayland/compositor/hyprland/settings/misc.nix similarity index 76% rename from home/modules/desktop/wayland/windowManager/hyprland/settings/misc.nix rename to home/modules/desktop/wayland/compositor/hyprland/settings/misc.nix index 7dac1fe..217cf2a 100644 --- a/home/modules/desktop/wayland/windowManager/hyprland/settings/misc.nix +++ b/home/modules/desktop/wayland/compositor/hyprland/settings/misc.nix @@ -1,11 +1,12 @@ { lib, config, ... }: let - cfg = config.ooknet.desktop.wayland.windowManager.hyprland; + inherit (lib) mkIf; + wayland = config.ooknet.wayland; in { - config = lib.mkIf cfg.enable { + config = mkIf (wayland.compositor == "hyprland") { wayland.windowManager.hyprland.settings.misc = { mouse_move_enables_dpms = true; key_press_enables_dpms = true; diff --git a/home/modules/desktop/wayland/windowManager/hyprland/settings/monitor.nix b/home/modules/desktop/wayland/compositor/hyprland/settings/monitor.nix similarity index 62% rename from home/modules/desktop/wayland/windowManager/hyprland/settings/monitor.nix rename to home/modules/desktop/wayland/compositor/hyprland/settings/monitor.nix index 5036411..34572d3 100644 --- a/home/modules/desktop/wayland/windowManager/hyprland/settings/monitor.nix +++ b/home/modules/desktop/wayland/compositor/hyprland/settings/monitor.nix @@ -1,19 +1,21 @@ -{ lib, config, ... }: +{ lib, config, osConfig, ... }: let - cfg = config.ooknet.desktop.wayland.windowManager.hyprland; + inherit (lib) mkIf concatMap; + wayland = config.ooknet.wayland; + monitors = osConfig.ooknet.host.hardware.monitors; in { - config = lib.mkIf cfg.enable { + config = mkIf (wayland.compositor == "hyprland") { wayland.windowManager.hyprland.settings = { - monitor = lib.concatMap (m: let + monitor = concatMap (m: let resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}"; position = "${toString m.x}x${toString m.y}"; basicConfig = "${m.name},${if m.enabled then "${resolution},${position},1" else "disable"}"; in [ basicConfig ] ++ (if m.transform != 0 then ["${m.name},transform,${toString m.transform}"] else []) - ) (config.monitors); + ) (monitors); }; }; } diff --git a/home/modules/desktop/wayland/windowManager/hyprland/settings/rules.nix b/home/modules/desktop/wayland/compositor/hyprland/settings/rules.nix similarity index 76% rename from home/modules/desktop/wayland/windowManager/hyprland/settings/rules.nix rename to home/modules/desktop/wayland/compositor/hyprland/settings/rules.nix index 40250da..888aed3 100644 --- a/home/modules/desktop/wayland/windowManager/hyprland/settings/rules.nix +++ b/home/modules/desktop/wayland/compositor/hyprland/settings/rules.nix @@ -1,10 +1,13 @@ { lib, config, ... }: + let - cfg = config.ooknet.desktop.wayland.windowManager.hyprland; + inherit (lib) mkIf; + wayland = config.ooknet.wayland; in + { - config = { - wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { + config = mkIf (wayland.compositor == "hyprland") { + wayland.windowManager.hyprland.settings = { windowrulev2 = [ "float,move 191 15,size 924 396,class:^(1Password)$" diff --git a/home/modules/desktop/wayland/default.nix b/home/modules/desktop/wayland/default.nix index 744ce77..c731570 100644 --- a/home/modules/desktop/wayland/default.nix +++ b/home/modules/desktop/wayland/default.nix @@ -1,8 +1,11 @@ -{ lib, config, ... }: +{ lib, config, osConfig, ... }: let + inherit (lib) mkIf; cfg = config.ooknet.desktop.wayland; + gpu = osConfig.ooknet.host.hardware.gpu; in + { imports = [ ./bar @@ -13,16 +16,7 @@ in ./launcher ]; - options.ooknet.desktop.wayland = { - enable = lib.mkEnableOption "Enable wayland specific confurations"; - nvidia = lib.mkOption { - type = lib.types.bool; - default = false; - description = "Enable nvidia wayland configuration"; - }; - }; - - config = lib.mkIf cfg.enable { + config = mkIf cfg.enable { home.sessionVariables = { CLUTTER_BACKEND = "wayland"; NIXOS_OZONE_WL = "1"; @@ -33,7 +27,7 @@ in MOZ_DBUS_REMOTE = "1"; XDG_SESSION_TYPE = "wayland"; SDL_VIDEODRIVER = "wayland"; - } // lib.mkIf cfg.nvidia { + } // mkIf (gpu == "nvidia") { LIBVA_DRIVER_NAME = "nvidia"; GBM_BACKEND = "nvidia-drm"; __GLX_VENDOR_LIBRARY_NAME = "nvidia"; diff --git a/home/modules/desktop/wayland/launcher/anyrun/default.nix b/home/modules/desktop/wayland/launcher/anyrun/default.nix deleted file mode 100644 index 0e8baa3..0000000 --- a/home/modules/desktop/wayland/launcher/anyrun/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: - -let - cfg = config.ooknet.desktop.wayland.launcher.anyrun; -in - -{ - imports = [ - inputs.anyrun.homeManagerModules.default - ]; - - config = lib.mkIf cfg.enable { - programs.anyrun = { - enable = true; - config = { - plugins = with inputs.anyrun.packages.${pkgs.system}; [ - applications - randr - shell - rink - symbols - ]; - }; - extraCss = /* css */ '' - - * { - font-family: JetBrains Mono Nerd Font; - } - - ''; - }; - }; - -} diff --git a/home/modules/desktop/wayland/launcher/default.nix b/home/modules/desktop/wayland/launcher/default.nix index c375122..a887b6e 100644 --- a/home/modules/desktop/wayland/launcher/default.nix +++ b/home/modules/desktop/wayland/launcher/default.nix @@ -1,21 +1,6 @@ -{ lib, ... }: - { imports = [ - # ./anyrun - ./rofi - ./tofi + ./rofi.nix + ./tofi.nix ]; - - options.ooknet.desktop.wayland.launcher = { - anyrun = { - enable = lib.mkEnableOption "enable anyrun launcher module"; - }; - rofi = { - enable = lib.mkEnableOption "enable rofi launcher module"; - }; - tofi = { - enable = lib.mkEnableOption "enable tofi launcher module"; - }; - }; } diff --git a/home/modules/desktop/wayland/launcher/rofi/default.nix b/home/modules/desktop/wayland/launcher/rofi.nix similarity index 93% rename from home/modules/desktop/wayland/launcher/rofi/default.nix rename to home/modules/desktop/wayland/launcher/rofi.nix index 60b7a4c..649c277 100644 --- a/home/modules/desktop/wayland/launcher/rofi/default.nix +++ b/home/modules/desktop/wayland/launcher/rofi.nix @@ -1,12 +1,13 @@ { lib, config, pkgs, ... }: let - fonts = config.ooknet.theme.fonts; - cfg = config.ooknet.desktop.wayland.launcher.rofi; + inherit (lib) mkIf; + fonts = config.ooknet.fonts; + wayland = config.ooknet.wayland; in { - config = lib.mkIf cfg.enable { + config = mkIf (wayland.launcher == "rofi") { programs.rofi = { enable = true; font = "${fonts.monospace.family}"; diff --git a/home/modules/desktop/wayland/launcher/tofi/default.nix b/home/modules/desktop/wayland/launcher/tofi.nix similarity index 86% rename from home/modules/desktop/wayland/launcher/tofi/default.nix rename to home/modules/desktop/wayland/launcher/tofi.nix index ddfc590..541f0e0 100644 --- a/home/modules/desktop/wayland/launcher/tofi/default.nix +++ b/home/modules/desktop/wayland/launcher/tofi.nix @@ -1,14 +1,14 @@ { lib, config, pkgs, ... }: let - cfg = config.ooknet.desktop.wayland.launcher.tofi; - fonts = config.ooknet.theme.fonts; inherit (config.colorscheme) palette; + inherit (lib) mkIf; + wayland = config.ooknet.wayland; + fonts = config.ooknet.fonts; in { - - config = lib.mkIf cfg.enable { + config = mkIf (wayland.launcher == "tofi") { home.packages = [pkgs.tofi]; xdg.configFile."tofi/config".text = /* config */ '' history = false @@ -37,6 +37,5 @@ in selection-color = ${palette.base04} ''; }; - } diff --git a/home/modules/desktop/wayland/lockscreen/default.nix b/home/modules/desktop/wayland/lockscreen/default.nix index 5143130..b0ec501 100644 --- a/home/modules/desktop/wayland/lockscreen/default.nix +++ b/home/modules/desktop/wayland/lockscreen/default.nix @@ -1,21 +1,7 @@ -{ lib, ... }: { - imports = [ - #./gtkLock --- still needs to be implemented - ./swaylock - ./hyprlock + ./swaylock.nix + ./hyprlock.nix ]; - - options.ooknet.desktop.wayland.lockscreen = { - swaylock = { - enable = lib.mkEnableOption "Enable Swaylock screen"; - }; - hyprlock = { - enable = lib.mkEnableOption "Enable hyprlock screen"; - }; - }; - - #TODO: make assertion to prevent 2 lockscreens } diff --git a/home/modules/desktop/wayland/lockscreen/hyprlock/default.nix b/home/modules/desktop/wayland/lockscreen/hyprlock.nix similarity index 84% rename from home/modules/desktop/wayland/lockscreen/hyprlock/default.nix rename to home/modules/desktop/wayland/lockscreen/hyprlock.nix index 6fccd48..b4658d2 100644 --- a/home/modules/desktop/wayland/lockscreen/hyprlock/default.nix +++ b/home/modules/desktop/wayland/lockscreen/hyprlock.nix @@ -1,19 +1,15 @@ { lib, config, inputs, pkgs, ... }: let - cfg = config.ooknet.desktop.wayland.lockscreen.hyprlock; - fonts = config.ooknet.theme.fonts; inherit (config.colorscheme) palette; + inherit (lib) mkIf; + wayland = config.ooknet.wayland; + fonts = config.ooknet.fonts; in { - imports = [ - # inputs.hyprlock.homeManagerModules.default - # inputs.hypridle.homeManagerModules.default - ]; - - config = lib.mkIf cfg.enable { - home.sessionVariables.LOCKER = "hyprlock"; + config = mkIf (wayland.locker == "hyprlock") { + ooknet.binds.locker = "hyprlock"; programs.hyprlock = { settings = { enable = true; diff --git a/home/modules/desktop/wayland/lockscreen/swaylock/default.nix b/home/modules/desktop/wayland/lockscreen/swaylock.nix similarity index 83% rename from home/modules/desktop/wayland/lockscreen/swaylock/default.nix rename to home/modules/desktop/wayland/lockscreen/swaylock.nix index fe87cd9..63883a4 100644 --- a/home/modules/desktop/wayland/lockscreen/swaylock/default.nix +++ b/home/modules/desktop/wayland/lockscreen/swaylock.nix @@ -2,13 +2,14 @@ let inherit (config.colorscheme) palette; - fonts = config.ooknet.theme.fonts; - wallpaperPath = config.ooknet.theme.wallpaper.path; - cfg = config.ooknet.desktop.wayland.lockscreen.swaylock; + inherit (lib) mkIf; + fonts = config.ooknet.fonts; + wallpaperPath = config.ooknet.wallpaper.path; + wayland = config.ooknet.wayland; in { - config = lib.mkIf cfg.enable { - home.sessionVariables.LOCKER = "swaylock"; + config = mkIf (wayland.locker == "swaylock") { + ooknet.binds.locker = "swaylock"; programs.swaylock = { enable = true; settings = { diff --git a/home/modules/desktop/wayland/notification/default.nix b/home/modules/desktop/wayland/notification/default.nix index 50f9b75..baba5b3 100644 --- a/home/modules/desktop/wayland/notification/default.nix +++ b/home/modules/desktop/wayland/notification/default.nix @@ -1,14 +1,5 @@ -{ lib, ... }: { - imports = [ - ./mako - #./dunst -- still needs to be implemented + ./mako.nix ]; - - options.ooknet.desktop.wayland.notification = { - mako = { - enable = lib.mkEnableOption "Enable mako notification daemon"; - }; - }; } diff --git a/home/modules/desktop/wayland/notification/mako/default.nix b/home/modules/desktop/wayland/notification/mako.nix similarity index 86% rename from home/modules/desktop/wayland/notification/mako/default.nix rename to home/modules/desktop/wayland/notification/mako.nix index c2bef67..8687033 100644 --- a/home/modules/desktop/wayland/notification/mako/default.nix +++ b/home/modules/desktop/wayland/notification/mako.nix @@ -1,10 +1,14 @@ { config, lib, ... }: + let inherit (config.colorscheme) palette variant; - fonts = config.ooknet.theme.fonts; - cfg = config.ooknet.desktop.wayland.notification.mako; -in { - config = lib.mkIf cfg.enable { + inherit (lib) mkIf; + fonts = config.ooknet.fonts; + wayland = config.ooknet.wayland; +in + +{ + config = mkIf (wayland.notification == "mako") { services.mako = { enable = true; iconPath = diff --git a/home/modules/desktop/wayland/utility/default.nix b/home/modules/desktop/wayland/utility/default.nix index 64e213c..b9669fc 100644 --- a/home/modules/desktop/wayland/utility/default.nix +++ b/home/modules/desktop/wayland/utility/default.nix @@ -1,17 +1,6 @@ -{ lib, ... }: - { imports = [ - ./gammastep - ./tools + ./gammastep.nix + ./tools.nix ]; - - options.ooknet.desktop.wayland.utility = { - tools = { - enable = lib.mkEnableOption "Enable wayland specific tools"; - }; - gammastep = { - enable = lib.mkEnableOption "Enable gammastep module"; - }; - }; } diff --git a/home/modules/desktop/wayland/utility/gammastep/default.nix b/home/modules/desktop/wayland/utility/gammastep.nix similarity index 76% rename from home/modules/desktop/wayland/utility/gammastep/default.nix rename to home/modules/desktop/wayland/utility/gammastep.nix index 83a7e94..6769e5b 100644 --- a/home/modules/desktop/wayland/utility/gammastep/default.nix +++ b/home/modules/desktop/wayland/utility/gammastep.nix @@ -1,11 +1,12 @@ { lib, config, ... }: let - cfg = config.ooknet.desktop.wayland.utility.gammastep; + inherit (lib) mkIf; + cfg = config.ooknet.wayland; in { - config = lib.mkIf cfg.enable { + config = mkIf cfg.enable { services.gammastep = { enable = true; enableVerboseLogging = true; diff --git a/home/modules/desktop/wayland/utility/tools/default.nix b/home/modules/desktop/wayland/utility/tools.nix similarity index 88% rename from home/modules/desktop/wayland/utility/tools/default.nix rename to home/modules/desktop/wayland/utility/tools.nix index 3bc587b..537b62a 100644 --- a/home/modules/desktop/wayland/utility/tools/default.nix +++ b/home/modules/desktop/wayland/utility/tools.nix @@ -1,7 +1,8 @@ { lib, config, pkgs, ... }: let - cfg = config.ooknet.desktop.wayland.utility.tools; + inherit (lib) mkIf; + cfg = config.ooknet.wayland; in { diff --git a/home/modules/desktop/wayland/windowManager/default.nix b/home/modules/desktop/wayland/windowManager/default.nix deleted file mode 100644 index 8177a43..0000000 --- a/home/modules/desktop/wayland/windowManager/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ lib, ... }: - -{ - imports = [ - ./hyprland - ]; - - options.ooknet.desktop.wayland.windowManager = { - hyprland = { - enable = lib.mkEnableOption "Enable Hyprland window-manager"; - }; - }; - -} diff --git a/home/modules/desktop/wayland/windowManager/hyprland/extras/default.nix b/home/modules/desktop/wayland/windowManager/hyprland/extras/default.nix deleted file mode 100644 index 76e65c3..0000000 --- a/home/modules/desktop/wayland/windowManager/hyprland/extras/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ lib, ... }: - -{ - imports = [ - ./hyprcapture - ./hyprshade - ]; - - options.ooknet.desktop.wayland.windowManager.hyprland.extras = { - hyprcapture = { - enable = lib.mkEnableOption "Enable hyprcapture screenshot/recording module"; - }; - hyprshade = { - enable = lib.mkEnableOption "Enable hyprshade tool module"; - }; - }; -} diff --git a/home/modules/desktop/wayland/windowManager/hyprland/settings/binds.nix b/home/modules/desktop/wayland/windowManager/hyprland/settings/binds.nix deleted file mode 100644 index 85d43a9..0000000 --- a/home/modules/desktop/wayland/windowManager/hyprland/settings/binds.nix +++ /dev/null @@ -1,128 +0,0 @@ -{ lib, config, pkgs, ... }: - -let - cfg = config.ooknet.desktop.wayland.windowManager.hyprland; -in - -{ - wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { - bind = let - terminal = config.home.sessionVariables.TERMINAL; - browser = config.home.sessionVariables.BROWSER; - editor = config.home.sessionVariables.EDITOR; - locker = config.home.sessionVariables.LOCKER; - - spotifyctl = "${pkgs.spotify-player}/bin/spotify_player"; - discord = "${pkgs.vesktop}/bin/vesktop"; - - explorer = "${pkgs.cinnamon.nemo-with-extensions}/bin/nemo"; - - password = "${pkgs._1password-gui}/bin/1password"; - in [ - - # Program Launch - "SUPER, b, exec, ${browser}" - "SUPER, return, exec, ${terminal}" - "SUPER, e, exec, ${terminal} ${editor}" - "SUPERSHIFT, P, exec, ${password}" - "SUPER, d, exec, ${discord}" - "SUPERSHIFT, e, exec, ${explorer}" - "SUPERSHIFT, S, exec, steam" - "SUPER, escape, exec, ${terminal} --title=BTOP btop" - "SUPER CTRL, return, exec, zellijmenu -n" - - "SUPER, delete, exec, powermenu -c dmenu" - - - - # Spotify PLayer Controls - - "SUPER, bracketright, exec, ${spotifyctl} playback next" - "SUPER, bracketleft, exec, ${spotifyctl} playback previous" - "SUPER, backslash, exec, ${spotifyctl} playback play-pause" - - # Brightness - - ",XF86MonBrightnessUp, exec, hyprbrightness up" - ",XF86MonBrightnessDown, exec, hyprbrightness down" - - # Volume - - ",XF86AudioRaiseVolume, exec, hyprvolume up" - ",XF86AudioLowerVolume, exec, hyprvolume down" - ",XF86AudioMute, exec, hyprvolume mute" - - # Window Management - - "SUPER, Q, killactive" - "SUPER CTRL, backspace, killactive" - "SUPERSHIFT ALT, delete, exec, hyprkillsession" - "SUPER, F, fullscreen" - "SUPER CTRL, F, fakefullscreen" - "SUPER, Space, togglefloating" - "SUPER, P, pseudo" # dwindle - "SUPER, S, togglesplit" # dwindle - - # Focus - - "SUPER, left, movefocus,l" - "SUPER, right, movefocus,r" - "SUPER, up, movefocus,u" - "SUPER, down, movefocus,d" - - # Move - - "SUPERSHIFT, left, movewindow,l" - "SUPERSHIFT, right, movewindow,r" - "SUPERSHIFT, up, movewindow,u" - "SUPERSHIFT, down, movewindow,d" - - #Resize - - "SUPER CTRL, left, resizeactive,-20 0" - "SUPERCTRL, right, resizeactive,20 0" - "SUPER CTRL, up, resizeactive,0 -20" - "SUPERCTRL, down, resizeactive,0 20" - - # Switch workspace - - "SUPER, 1, workspace,1" - "SUPER, 2, workspace,2" - "SUPER, 3, workspace,3" - "SUPER, 4, workspace,4" - "SUPER, 5, workspace,5" - "SUPER, 6, workspace,6" - "SUPER, 7, workspace,7" - "SUPER, 8, workspace,8" - "SUPER, 9, workspace,9" - "SUPER, 0, workspace,10" - "SUPER, comma, workspace,e+1" - "SUPER, period, workspace,e-1" - "SUPER, tab, focusCurrentOrLast" - - # Move workspace - - "SUPERSHIFT, 1, movetoworkspace,1" - "SUPERSHIFT, 2, movetoworkspace,2" - "SUPERSHIFT, 3, movetoworkspace,3" - "SUPERSHIFT, 4, movetoworkspace,4" - "SUPERSHIFT, 5, movetoworkspace,5" - "SUPERSHIFT, 6, movetoworkspace,6" - "SUPERSHIFT, 7, movetoworkspace,7" - "SUPERSHIFT, 8, movetoworkspace,8" - "SUPERSHIFT, 9, movetoworkspace,9" - "SUPERSHIFT, 0, movetoworkspace,10" - - # Lock Screen - "SUPER, Backspace, exec, ${locker}" - ]; - # Mouse - bindm = [ - "SUPER, mouse:272, movewindow" - "SUPER, mouse:273, resizewindow" - ]; - # bindr = [ - # "SUPER, SUPER_L, exec, killall rofi || rofi -show drun" - # ]; - }; -} diff --git a/home/modules/desktop/wayland/windowManager/hyprland/settings/hyprpaper.nix b/home/modules/desktop/wayland/windowManager/hyprland/settings/hyprpaper.nix deleted file mode 100644 index 0279186..0000000 --- a/home/modules/desktop/wayland/windowManager/hyprland/settings/hyprpaper.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ lib, config, inputs, ... }: - -let - cfg = config.ooknet.desktop.wayland.windowManager.hyprland; - wallpaperPath = config.ooknet.theme.wallpaper.path; -in - -{ - config = lib.mkIf cfg.enable { - services.hyprpaper = { - enable = true; - }; - xdg.configFile."hypr/hyprpaper.conf".text = '' - preload = ${wallpaperPath} - wallpaper = , ${wallpaperPath} - splash = false - ipc = off - ''; - }; -} diff --git a/home/modules/options/appearance/cursor.nix b/home/modules/options/appearance/cursor.nix new file mode 100644 index 0000000..4f0fe2b --- /dev/null +++ b/home/modules/options/appearance/cursor.nix @@ -0,0 +1,29 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption mkOption types; +in + +{ + options.ooknet.cursor = { + enable = mkEnableOption "Enable cursor module"; + package = mkOption { + type = types.package; + default = null; + description = "Package for cursor"; + example = "pkgs.bibata-cursors"; + }; + name = mkOption { + type = types.str; + default = ""; + description = "Name of cursor"; + example = "Bibata-Modern-Ice"; + }; + size = lib.mkOption { + type = types.int; + default = 22; + description = "Size of cursor"; + example = "22"; + }; + }; +} diff --git a/home/modules/theme/fonts/default.nix b/home/modules/options/appearance/fonts.nix similarity index 65% rename from home/modules/theme/fonts/default.nix rename to home/modules/options/appearance/fonts.nix index 869a928..a72dee1 100644 --- a/home/modules/theme/fonts/default.nix +++ b/home/modules/options/appearance/fonts.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, ... }: +{ lib, ... }: let mkFontOption = kind: { @@ -15,7 +15,6 @@ let example = "pkgs.fira-code"; }; }; - cfg = config.ooknet.theme.fonts; in { options.ooknet.theme.fonts = { @@ -23,18 +22,4 @@ in monospace = mkFontOption "monospace"; regular = mkFontOption "regular"; }; - - - config = lib.mkIf cfg.enable { - fonts.fontconfig.enable = true; - home.packages = [ - cfg.monospace.package - cfg.regular.package - - pkgs.noto-fonts - pkgs.noto-fonts-cjk - pkgs.noto-fonts-emoji - ]; - }; } - diff --git a/home/modules/options/appearance/gtk.nix b/home/modules/options/appearance/gtk.nix new file mode 100644 index 0000000..4ad413a --- /dev/null +++ b/home/modules/options/appearance/gtk.nix @@ -0,0 +1,9 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.gtk.enable = mkEnableOption; +} diff --git a/home/modules/options/appearance/qt.nix b/home/modules/options/appearance/qt.nix new file mode 100644 index 0000000..b1abad2 --- /dev/null +++ b/home/modules/options/appearance/qt.nix @@ -0,0 +1,9 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.qt.enable = mkEnableOption ""; +} diff --git a/home/modules/options/appearance/theme.nix b/home/modules/options/appearance/theme.nix new file mode 100644 index 0000000..b319ac6 --- /dev/null +++ b/home/modules/options/appearance/theme.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: + +let + inherit (lib) mkOption; + inherit (lib.types) nullOr enum; +in + +{ + options.ooknet.theme = mkOption { + type = nullOr (enum [ "minimal" "phone" ]); + default = null; + }; +} diff --git a/home/modules/options/appearance/wallpaper.nix b/home/modules/options/appearance/wallpaper.nix new file mode 100644 index 0000000..a5e8aac --- /dev/null +++ b/home/modules/options/appearance/wallpaper.nix @@ -0,0 +1,16 @@ +{ lib, ... }: + +let + inherit (lib) types mkEnableOption mkOption; +in + +{ + options.ooknet.wallpaper = { + enable = mkEnableOption ""; + path = mkOption { + type = types.path; + default = null; + description = "Wallpaper Path"; + }; + }; +} diff --git a/home/modules/options/console/editor.nix b/home/modules/options/console/editor.nix new file mode 100644 index 0000000..a196919 --- /dev/null +++ b/home/modules/options/console/editor.nix @@ -0,0 +1,12 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.editor = { + helix.enable = mkEnableOption ""; + nvim.enable = mkEnableOption ""; + }; +} diff --git a/home/modules/options/console/multiplexer.nix b/home/modules/options/console/multiplexer.nix new file mode 100644 index 0000000..38b3816 --- /dev/null +++ b/home/modules/options/console/multiplexer.nix @@ -0,0 +1,12 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.multiplexer = { + zellij.enable = mkEnableOption ""; + tmux.enable = mkEnableOption ""; + }; +} diff --git a/home/modules/options/console/shell.nix b/home/modules/options/console/shell.nix new file mode 100644 index 0000000..b033368 --- /dev/null +++ b/home/modules/options/console/shell.nix @@ -0,0 +1,13 @@ +{ lib , ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.shell = { + fish.enable = mkEnableOption ""; + zsh.enable = mkEnableOption ""; + bash.enable = mkEnableOption ""; + }; +} diff --git a/home/modules/options/console/tools.nix b/home/modules/options/console/tools.nix new file mode 100644 index 0000000..33ea889 --- /dev/null +++ b/home/modules/options/console/tools.nix @@ -0,0 +1,20 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.tools = { + btop.enable = mkEnableOption ""; + eza.enable = mkEnableOption ""; + bat.enable = mkEnableOption ""; + direnv.enable = mkEnableOption ""; + fzf.enable = mkEnableOption ""; + git.enable = mkEnableOption ""; + ssh.enable = mkEnableOption ""; + nixIndex.enable = mkEnableOption ""; + starship.enable = mkEnableOption ""; + utils.enable = mkEnableOption ""; + }; +} diff --git a/home/modules/options/desktop/binds.nix b/home/modules/options/desktop/binds.nix new file mode 100644 index 0000000..8dd2f61 --- /dev/null +++ b/home/modules/options/desktop/binds.nix @@ -0,0 +1,56 @@ +{ lib, ... }: + +let + inherit (lib) mkOption types; + inherit (types) str; + mkWarn = message: "notify-send --urgency=normal 'warning' '${message}'"; +in + +{ + options.ooknet.binds = { + browser = mkOption { + type = str; + default = mkWarn "No browser is enabled"; + }; + + terminal = mkOption { + type = str; + default = mkWarn "No terminal is enabled"; + }; + + terminalLaunch = mkOption { + type = str; + default = mkWarn "Failed to launch tui"; + }; + + fileManager = mkOption { + type = str; + default = mkWarn "No file manager is enabled."; + }; + + notes = mkOption { + type = str; + default = mkWarn "No notes app is enabled"; + }; + + discord = mkOption { + type = str; + default = mkWarn "No discord app is enabled"; + }; + + steam = mkOption { + type = str; + default = mkWarn "Steam is not enabled"; + }; + + powerMenu = mkOption { + type = str; + default = mkWarn "No power menu is enabled"; + }; + + locker = mkOption { + type = str; + default = mkWarn "No screen locker enabled"; + }; + }; +} diff --git a/home/modules/options/desktop/browser.nix b/home/modules/options/desktop/browser.nix new file mode 100644 index 0000000..1d278a4 --- /dev/null +++ b/home/modules/options/desktop/browser.nix @@ -0,0 +1,12 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.browser = { + firefox.enable = mkEnableOption ""; + brave.enable = mkEnableOption ""; + }; +} diff --git a/home/modules/options/desktop/communication.nix b/home/modules/options/desktop/communication.nix new file mode 100644 index 0000000..387e7b0 --- /dev/null +++ b/home/modules/options/desktop/communication.nix @@ -0,0 +1,11 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.communication = { + discord.enable = mkEnableOption ""; + }; +} diff --git a/home/modules/options/desktop/creative.nix b/home/modules/options/desktop/creative.nix new file mode 100644 index 0000000..2d820ef --- /dev/null +++ b/home/modules/options/desktop/creative.nix @@ -0,0 +1,12 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.creative = { + inkscape.enable = mkEnableOption ""; + audacity.enable = mkEnableOption ""; + }; +} diff --git a/home/modules/options/desktop/gaming.nix b/home/modules/options/desktop/gaming.nix new file mode 100644 index 0000000..5130fb1 --- /dev/null +++ b/home/modules/options/desktop/gaming.nix @@ -0,0 +1,13 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.gaming = { + factorio.enable = mkEnableOption ""; + bottles.enable = mkEnableOption ""; + lutris.enable = mkEnableOption ""; + }; +} diff --git a/home/modules/options/desktop/media.nix b/home/modules/options/desktop/media.nix new file mode 100644 index 0000000..7f4712f --- /dev/null +++ b/home/modules/options/desktop/media.nix @@ -0,0 +1,21 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.media = { + image = { + imv.enable = mkEnableOption ""; + }; + video = { + mpv.enable = mkEnableOption ""; + jellyfinPlayer.enable = mkEnableOption ""; + youtube.enable = mkEnableOption ""; + }; + music = { + spotifyCli.enable = mkEnableOption ""; + }; + }; +} diff --git a/home/modules/options/desktop/productivity.nix b/home/modules/options/desktop/productivity.nix new file mode 100644 index 0000000..0d183bb --- /dev/null +++ b/home/modules/options/desktop/productivity.nix @@ -0,0 +1,19 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.productivity = { + notes = { + obsidian.enable = mkEnableOption ""; + }; + office = { + libreoffice.enable = mkEnableOption ""; + }; + pdf = { + zathura.enable = mkEnableOption ""; + }; + }; +} diff --git a/home/modules/options/desktop/terminal.nix b/home/modules/options/desktop/terminal.nix new file mode 100644 index 0000000..023eae9 --- /dev/null +++ b/home/modules/options/desktop/terminal.nix @@ -0,0 +1,11 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.terminal = { + foot.enable = mkEnableOption ""; + }; +} diff --git a/home/modules/options/desktop/tools.nix b/home/modules/options/desktop/tools.nix new file mode 100644 index 0000000..43961ae --- /dev/null +++ b/home/modules/options/desktop/tools.nix @@ -0,0 +1,11 @@ +{ lib, ... }: + +let + inherit (lib) mkEnableOption; +in + +{ + options.ooknet.tools = { + kdeconnect.enable = mkEnableOption ""; + }; +} diff --git a/home/modules/options/desktop/wayland.nix b/home/modules/options/desktop/wayland.nix new file mode 100644 index 0000000..2138636 --- /dev/null +++ b/home/modules/options/desktop/wayland.nix @@ -0,0 +1,31 @@ +{ lib, ... }: + +let + inherit (lib) mkOption mkEnableOption types; + inherit (types) nullOr enum; +in + +{ + ooknet.wayland = { + enable = mkEnableOption ""; + compositor = mkOption { + type = nullOr (enum [ "hyprland" ]); + }; + launcher = mkOption { + type = nullOr (enum [ "rofi" "tofi" ]); + default = null; + }; + locker = mkOption { + type = nullOr (enum [ "hyprlock" "swaylock" ]); + default = null; + }; + notification = mkOption { + type = nullOr (enum [ "mako" ]); + default = null; + }; + bar = mkOption { + type = nullOr (enum [ "waybar" ]); + default = null; + }; + }; +} diff --git a/home/modules/options/profiles/console.nix b/home/modules/options/profiles/console.nix new file mode 100644 index 0000000..6803a82 --- /dev/null +++ b/home/modules/options/profiles/console.nix @@ -0,0 +1,27 @@ +{ lib, ... }: + +let + inherit (lib) mkOption types; + inherit (types) nullOr enum; +in + +{ + options.ooknet.console = { + editor = mkOption { + type = nullOr (enum ["helix" "nvim"]); + default = "helix"; + }; + shell = mkOption { + type = nullOr (enum ["fish" "bash" "zsh"]); + default = "zsh"; + }; + multiplexer = mkOption { + type = nullOr (enum ["tmux" "zellij"]); + default = null; + }; + fileManager = mkOption { + type = nullOr (enum ["yazi" "ranger" "lf"]); + default = null; + }; + }; +} diff --git a/home/modules/options/profiles/desktop.nix b/home/modules/options/profiles/desktop.nix new file mode 100644 index 0000000..f87aad2 --- /dev/null +++ b/home/modules/options/profiles/desktop.nix @@ -0,0 +1,51 @@ +{ lib, ... }: + +let + inherit (lib) mkOption types; + inherit (types) enum nullOr listOf; +in + +{ + options.ooknet.desktop = { + + environment = mkOption { + type = nullOr (enum [ "hyprland" ]); + default = "hyprland"; + }; + + browser = mkOption { + type = nullOr (enum [ "firefox" "brave" ]); + default = null; + }; + + terminal = mkOption { + type = nullOr (enum [ "foot" "kitty" "wezterm" ]); + default = "foot"; + }; + + fileManager = mkOption { + type = nullOr (enum [ "nemo" ]); + default = null; + }; + + notes = mkOption { + type = nullOr (enum [ "obsidian" ]); + default = null; + }; + + pdf = mkOption { + type = nullOr (enum [ "zathura" ]); + default = null; + }; + + discord = mkOption { + type = nullOr (enum [ "vesktop" ]); + default = null; + }; + + suites = mkOption { + type = listOf (enum [ "gaming" "tools" "media" "creative" ]); + default = [ ]; + }; + }; +} diff --git a/home/modules/theme/cursor/default.nix b/home/modules/theme/cursor/default.nix deleted file mode 100644 index aa08c53..0000000 --- a/home/modules/theme/cursor/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ lib, config, ... }: -let - cfg = config.ooknet.theme.cursor; -in - -{ - options.ooknet.theme.cursor = { - enable = lib.mkEnableOption "Enable cursor module"; - package = lib.mkOption { - type = lib.types.package; - default = null; - description = "Package for cursor"; - example = "pkgs.bibata-cursors"; - }; - name = lib.mkOption { - type = lib.types.str; - default = ""; - description = "Name of cursor"; - example = "Bibata-Modern-Ice"; - }; - size = lib.mkOption { - type = lib.types.int; - default = 22; - description = "Size of cursor"; - example = "22"; - }; - }; - config = lib.mkIf cfg.enable { - home.pointerCursor = { - package = cfg.package; - name = cfg.name; - size = cfg.size; - gtk.enable = true; - x11.enable = true; - }; - }; -} - diff --git a/home/modules/theme/default.nix b/home/modules/theme/default.nix deleted file mode 100644 index 1e1cf22..0000000 --- a/home/modules/theme/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - imports = [ - ./fonts - ./cursor - ./gtk - ./qt - ./wallpaper - ]; -} diff --git a/home/modules/theme/qt/default.nix b/home/modules/theme/qt/default.nix deleted file mode 100644 index fdf8e86..0000000 --- a/home/modules/theme/qt/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, lib, ... }: -let - cfg = config.ooknet.theme.qt; -in -{ - options.ooknet.theme.qt.enable = lib.mkEnableOption "Enable qt module"; - - config = lib.mkIf cfg.enable { - qt = { - enable = true; - platformTheme.name = "gtk"; - }; - }; -} - diff --git a/home/profile/base/default.nix b/home/profile/base/default.nix deleted file mode 100644 index 4e0d5c4..0000000 --- a/home/profile/base/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ lib, config, ... }: -let - cfg = config.profiles.base; - inherit (lib) mkDefault; -in -{ - imports = [ - ../../modules - ]; - - config = lib.mkIf cfg.enable { - - systemd.user.startServices = mkDefault "sd-switch"; - - ooknet = { - config = { - home.enable = true; - userDirs.enable = true; - mimeApps.enable = true; - }; - - console = { - editor.helix = { - enable = true; - default = true; - }; - prompt.starship.enable = true; - shell = { - fish.enable = true; - bash.enable = true; - }; - multiplexer.zellij.enable = true; - utility = { - ssh.enable = true; - nixIndex.enable = true; - git.enable = true; - tools.enable = true; - }; - }; - }; - }; -} diff --git a/home/profile/creative/default.nix b/home/profile/creative/default.nix deleted file mode 100644 index e69de29..0000000 diff --git a/home/profile/default.nix b/home/profiles/default.nix similarity index 100% rename from home/profile/default.nix rename to home/profiles/default.nix diff --git a/home/profiles/desktop-environments/hyprland.nix b/home/profiles/desktop-environments/hyprland.nix new file mode 100644 index 0000000..45fe7b4 --- /dev/null +++ b/home/profiles/desktop-environments/hyprland.nix @@ -0,0 +1,19 @@ +{ lib, config, ... }: + +let + inherit (lib) mkIf; + desktop = config.ooknet.desktop; +in + +{ + config = mkIf (desktop.environment == "hyprland") { + ooknet.wayland = { + enable = true; + compositor = "hyprland"; + launcher = "rofi"; + locker = "hyprlock"; + notification = "mako"; + bar = "waybar"; + }; + }; +} diff --git a/home/profile/hyprland/default.nix b/home/profiles/hyprland.nix similarity index 94% rename from home/profile/hyprland/default.nix rename to home/profiles/hyprland.nix index 67a66bf..a86cfbd 100644 --- a/home/profile/hyprland/default.nix +++ b/home/profiles/hyprland.nix @@ -9,7 +9,7 @@ in ]; config = lib.mkIf cfg.enable { - ooknet.desktop = { + homeModules.desktop = { wayland = { enable = true; @@ -56,6 +56,7 @@ in media = { music.tui.enable = true; + music.easyeffects.enable = true; image.imv.enable = true; video = { mpv.enable = true; diff --git a/home/modules/desktop/wayland/bar/eww/default.nix b/home/profiles/suites/create.nix similarity index 100% rename from home/modules/desktop/wayland/bar/eww/default.nix rename to home/profiles/suites/create.nix diff --git a/home/profile/gaming/default.nix b/home/profiles/suites/gaming.nix similarity index 92% rename from home/profile/gaming/default.nix rename to home/profiles/suites/gaming.nix index 9a73302..92dff77 100644 --- a/home/profile/gaming/default.nix +++ b/home/profiles/suites/gaming.nix @@ -9,7 +9,7 @@ in ]; config = lib.mkIf cfg.enable { - ooknet.desktop = { + homeModules.desktop = { gaming = { lutris.enable = false; }; diff --git a/home/profile/productivity/default.nix b/home/profiles/suites/productivity.nix similarity index 90% rename from home/profile/productivity/default.nix rename to home/profiles/suites/productivity.nix index 3ee8fb0..b86306b 100644 --- a/home/profile/productivity/default.nix +++ b/home/profiles/suites/productivity.nix @@ -9,7 +9,7 @@ in ]; config = lib.mkIf cfg.enable { - ooknet.desktop = { + homeModules.desktop = { productivity = { obsidian.enable = true; zathura.enable = true; diff --git a/home/profile/themes/default.nix b/home/profiles/themes/default.nix similarity index 100% rename from home/profile/themes/default.nix rename to home/profiles/themes/default.nix diff --git a/home/profile/themes/minimal/default.nix b/home/profiles/themes/minimal.nix similarity index 89% rename from home/profile/themes/minimal/default.nix rename to home/profiles/themes/minimal.nix index 87e6509..5ad1947 100644 --- a/home/profile/themes/minimal/default.nix +++ b/home/profiles/themes/minimal.nix @@ -1,19 +1,20 @@ { lib, config, pkgs, inputs, ... }: let - cfg = config.theme.minimal; inherit (inputs.nix-colors) colorSchemes; + inherit (lib) mkIf; + theme = config.ooknet.theme; in { imports = [ inputs.nix-colors.homeManagerModule ]; - config = lib.mkIf cfg.enable { + config = mkIf (theme == "minimal") { colorscheme = colorSchemes.gruvbox-material-dark-soft; home.file.".colorscheme".text = config.colorscheme.slug; home.sessionVariables.COLOR_SCHEME = "${config.colorscheme.slug}"; - ooknet.theme = { + ooknet = { fonts.enable = true; fonts.regular = { family = "Fira Sans"; diff --git a/home/profile/themes/phone/default.nix b/home/profiles/themes/phone.nix similarity index 87% rename from home/profile/themes/phone/default.nix rename to home/profiles/themes/phone.nix index e7bab0b..3e1cf7d 100644 --- a/home/profile/themes/phone/default.nix +++ b/home/profiles/themes/phone.nix @@ -1,13 +1,14 @@ { lib, config, pkgs, inputs, ... }: let - cfg = config.theme.phone; inherit (inputs.nix-colors) colorSchemes; + inherit (lib) mkIf; + theme = config.ooknet.theme; in { imports = [ inputs.nix-colors.homeManagerModule ]; - config = lib.mkIf cfg.enable { + config = mkIf (theme == "phone") { colorscheme = colorSchemes.gruvbox-material-dark-soft; home.file.".colorscheme".text = config.colorscheme.slug; diff --git a/home/user/ooks/ooksdesk/default.nix b/home/user/ooks/ooksdesk/default.nix index 24544bc..6e4a8fa 100644 --- a/home/user/ooks/ooksdesk/default.nix +++ b/home/user/ooks/ooksdesk/default.nix @@ -10,14 +10,5 @@ theme.minimal.enable = true; home.sessionVariables.HN = "ooksdesk"; - - monitors = [{ - name = "DP-1"; - width = 2560; - height = 1440; - refreshRate = 155; - workspace = "1"; - primary = true; - }]; } diff --git a/home/user/ooks/ookst480s/default.nix b/home/user/ooks/ookst480s/default.nix index 0d36a0e..ad56a00 100644 --- a/home/user/ooks/ookst480s/default.nix +++ b/home/user/ooks/ookst480s/default.nix @@ -7,17 +7,16 @@ activeProfiles = ["base" "hyprland" "productivity"]; - theme.minimal.enable = true; - + ooknet = { + theme = "minimal"; + desktop = { + environment = "hyprland"; + browser = "firefox"; + terminal = "foot"; + notes = "obsidian"; + discord = "vesktop"; + }; + }; home.sessionVariables.HN = "ookst480s"; - - monitors = [{ - name = "eDP-1"; - width = 1920; - height = 1080; - workspace = "1"; - primary = true; - transform = 0; - }]; } diff --git a/hosts/ooksdesk/default.nix b/hosts/ooksdesk/default.nix index 4b2978b..eab8dc4 100644 --- a/hosts/ooksdesk/default.nix +++ b/hosts/ooksdesk/default.nix @@ -24,6 +24,14 @@ in cpu.amd.pstate.enable = true; gpu.type = "amd"; features = [ "ssd" "audio" "video" ]; + monitors = [{ + name = "DP-1"; + primary = true; + width = 2560; + height = 1440; + refreshRate = 155; + workspace = "1"; + }]; }; }; diff --git a/sys/modules/base/host/admin.nix b/sys/modules/base/host/admin.nix index 9b37185..2bc1468 100644 --- a/sys/modules/base/host/admin.nix +++ b/sys/modules/base/host/admin.nix @@ -19,6 +19,16 @@ in default = "zsh"; description = "The login shell of the primary user"; }; + gitName = mkOption { + type = types.str; + default = "ooks-io"; + description = "Github username of admin"; + }; + gitEmail = mkOption { + type = types.str; + default = "ooks@protonmail.com"; + description = "Github email of admin"; + }; sshKey = mkOption { type = types.str; default = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBn3ff3HaZHIyH4K13k8Mwqu/o7jIABJ8rANK+r2PfJk"; diff --git a/sys/modules/base/host/hardware/default.nix b/sys/modules/base/host/hardware/default.nix index 710bbc1..addabe8 100644 --- a/sys/modules/base/host/hardware/default.nix +++ b/sys/modules/base/host/hardware/default.nix @@ -4,5 +4,6 @@ ./gpu ./features ./common.nix + ./monitors.nix ]; } diff --git a/home/modules/config/monitors/default.nix b/sys/modules/base/host/hardware/monitors.nix similarity index 85% rename from home/modules/config/monitors/default.nix rename to sys/modules/base/host/hardware/monitors.nix index 6620852..6baca77 100644 --- a/home/modules/config/monitors/default.nix +++ b/sys/modules/base/host/hardware/monitors.nix @@ -2,10 +2,10 @@ let inherit (lib) mkOption types; - cfg = config.monitors; + cfg = config.ooknet.host.hardware.monitors; in { - options.monitors = mkOption { + options.ooknet.host.hardware.monitors = mkOption { type = types.listOf (types.submodule { options = { name = mkOption { @@ -54,9 +54,9 @@ in }; config = { assertions = [{ - assertion = ((lib.length config.monitors) != 0) -> - ((lib.length (lib.filter (m: m.primary) config.monitors)) == 1); + assertion = ((lib.length cfg) != 0) -> + ((lib.length (lib.filter (m: m.primary) cfg)) == 1); message = "Exactly one monitor must be set to primary."; }]; }; -} \ No newline at end of file +}