From fb9dd66cf4bbf72174902c87d032c5f4116a8588 Mon Sep 17 00:00:00 2001 From: John Ogle Date: Sun, 7 Sep 2025 11:24:23 -0700 Subject: [PATCH] [home] Refactor into roles --- CLAUDE.md | 35 ++++- flake.nix | 48 +++++-- home/home-desktop.nix | 38 +++++ home/home-laptop-compact.nix | 41 ++++++ home/home-live-usb.nix | 42 ++++++ home/home-media-center.nix | 42 ++++++ home/home-nix-book.nix | 11 -- home/home.nix | 203 --------------------------- home/roles/base/default.nix | 86 ++++++++++++ home/roles/communication/default.nix | 24 ++++ home/roles/default.nix | 13 ++ home/roles/desktop/default.nix | 44 ++++++ home/roles/development/default.nix | 23 +++ home/roles/gaming/default.nix | 20 +++ home/roles/kdeconnect/default.nix | 20 +++ home/roles/media/default.nix | 21 +++ home/roles/office/default.nix | 22 +++ home/roles/sync/default.nix | 22 +++ 18 files changed, 528 insertions(+), 227 deletions(-) create mode 100644 home/home-desktop.nix create mode 100644 home/home-laptop-compact.nix create mode 100644 home/home-live-usb.nix create mode 100644 home/home-media-center.nix delete mode 100644 home/home-nix-book.nix delete mode 100644 home/home.nix create mode 100644 home/roles/base/default.nix create mode 100644 home/roles/communication/default.nix create mode 100644 home/roles/default.nix create mode 100644 home/roles/desktop/default.nix create mode 100644 home/roles/development/default.nix create mode 100644 home/roles/gaming/default.nix create mode 100644 home/roles/kdeconnect/default.nix create mode 100644 home/roles/media/default.nix create mode 100644 home/roles/office/default.nix create mode 100644 home/roles/sync/default.nix diff --git a/CLAUDE.md b/CLAUDE.md index 424fced..8587279 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -43,6 +43,33 @@ roles = { }; ``` +### Home-Manager Role System +The repository also uses a modular home-manager role system for user-space configuration: + +**Available Home Roles:** +- `home.roles.base`: Core CLI tools, git, ssh, bash, rbw (enabled everywhere) +- `home.roles.desktop`: GUI applications, Firefox, KDE services +- `home.roles.office`: LibreOffice, OpenSCAD (heavy packages) +- `home.roles.media`: VLC, Jellyfin, Moonlight (media consumption) +- `home.roles.development`: Custom packages, kubectl, development tools +- `home.roles.communication`: Element, Nextcloud Talk, Google cookie tools +- `home.roles.sync`: Syncthing service and tray (for file synchronization) +- `home.roles.kdeconnect`: KDE Connect for device integration +- `home.roles.gaming`: Gaming applications (future expansion) + +**Role-Based Home Configurations:** +- `home-desktop.nix`: Full-featured desktop for development workstations +- `home-media-center.nix`: Living room media consumption and gaming setup (boxy) +- `home-laptop-compact.nix`: Essential tools only, excludes office/media for storage constraints (nix-book) +- `home-live-usb.nix`: Minimal setup for live environments, no persistent services + +**Machine-Specific Role Usage:** +- **nix-book**: Compact laptop → excludes office/media roles due to SSD space constraints +- **boxy**: Living room media center → optimized for media consumption, excludes sync/office (shared machine) +- **zix790prors**: All-purpose workstation → full desktop experience with all roles enabled +- **wixos**: WSL2 development → full desktop experience, inherits from zix790prors Windows host +- **live-usb**: Temporary environment → only base + desktop roles, no persistent services + ## Common Commands ### Building and Switching Configurations @@ -58,9 +85,11 @@ home-manager switch --flake .#johno ``` ### Available Machine Configurations -- `nix-book`: Uses `home/home-nix-book.nix` -- `boxy`: Gaming desktop with AMD GPU, uses `home/home.nix` -- `wixos`: WSL configuration, uses `home/home.nix` +- `nix-book`: Compact laptop with storage constraints, uses `home/home-laptop-compact.nix` +- `boxy`: Shared living room media center/gaming desktop with AMD GPU, uses `home/home-media-center.nix` +- `zix790prors`: Powerful all-purpose workstation (gaming, 3D modeling, development), dual-boots Windows 11 with shared btrfs /games partition, uses `home/home-desktop.nix` +- `wixos`: WSL2 development environment running in Windows partition of zix790prors, uses `home/home-desktop.nix` +- `live-usb`: Bootable ISO configuration, uses `home/home-live-usb.nix` ### Flake Operations ```bash diff --git a/flake.nix b/flake.nix index a9b25a1..bcb9b9e 100644 --- a/flake.nix +++ b/flake.nix @@ -43,7 +43,13 @@ modules = baseModules ++ [ ./machines/nix-book/configuration.nix { - home-manager.users.johno = import ./home/home-nix-book.nix; + home-manager.users.johno = { + imports = [ ./home/home-laptop-compact.nix ]; + # Machine-specific overrides + home.i3_sway.extraSwayConfig = { + output.eDP-1.scale = "1.75"; + }; + }; home-manager.extraSpecialArgs = { inherit system; }; } ]; @@ -55,7 +61,7 @@ ./machines/boxy/configuration.nix inputs.home-manager.nixosModules.home-manager { - home-manager.users.johno = import ./home/home.nix; + home-manager.users.johno = import ./home/home-media-center.nix; home-manager.extraSpecialArgs = { inherit system; }; } ]; @@ -68,7 +74,7 @@ ./machines/wixos/configuration.nix inputs.home-manager.nixosModules.home-manager { - home-manager.users.johno = import ./home/home.nix; + home-manager.users.johno = import ./home/home-desktop.nix; home-manager.extraSpecialArgs = { inherit system; }; } ]; @@ -80,7 +86,7 @@ ./machines/zix790prors/configuration.nix inputs.home-manager.nixosModules.home-manager { - home-manager.users.johno = import ./home/home.nix; + home-manager.users.johno = import ./home/home-desktop.nix; home-manager.extraSpecialArgs = { inherit system; }; } ]; @@ -92,21 +98,43 @@ modules = baseModules ++ [ ./machines/live-usb/configuration.nix { - home-manager.users.nixos = { ... }: { - imports = [ ./home/home.nix ]; - home.username = nixpkgs.lib.mkForce "nixos"; - home.homeDirectory = nixpkgs.lib.mkForce "/home/nixos"; - }; + home-manager.users.nixos = import ./home/home-live-usb.nix; home-manager.extraSpecialArgs = { inherit system; }; } ]; }; + # Standalone home-manager configurations for non-NixOS systems + homeConfigurations."johno@desktop" = inputs.home-manager.lib.homeManagerConfiguration { + pkgs = inputs.nixpkgs.legacyPackages."x86_64-linux"; + modules = [ + inputs.plasma-manager.homeManagerModules.plasma-manager + ./home/home-desktop.nix + ]; + extraSpecialArgs = { + system = "x86_64-linux"; + globalInputs = inputs; + }; + }; + + homeConfigurations."johno@laptop-compact" = inputs.home-manager.lib.homeManagerConfiguration { + pkgs = inputs.nixpkgs.legacyPackages."x86_64-linux"; + modules = [ + inputs.plasma-manager.homeManagerModules.plasma-manager + ./home/home-laptop-compact.nix + ]; + extraSpecialArgs = { + system = "x86_64-linux"; + globalInputs = inputs; + }; + }; + + # Legacy configuration for backward compatibility homeConfigurations."johno" = inputs.home-manager.lib.homeManagerConfiguration { pkgs = inputs.nixpkgs.legacyPackages."x86_64-linux"; modules = [ inputs.plasma-manager.homeManagerModules.plasma-manager - ./home/home.nix + ./home/home-desktop.nix ]; extraSpecialArgs = { system = "x86_64-linux"; diff --git a/home/home-desktop.nix b/home/home-desktop.nix new file mode 100644 index 0000000..5bcf598 --- /dev/null +++ b/home/home-desktop.nix @@ -0,0 +1,38 @@ +{ pkgs, globalInputs, system, ... }: + +let + customPkgs = pkgs.callPackage ../packages {}; +in +{ + # Provide arguments to role modules + _module.args = { inherit customPkgs; }; + # Home Manager configuration for full desktop experience + home.username = "johno"; + home.homeDirectory = "/home/johno"; + home.stateVersion = "24.05"; + + # Enable all desktop roles for full-featured experience + home.roles = { + base.enable = true; + desktop.enable = true; + office.enable = true; + media.enable = true; + development.enable = true; + communication.enable = true; + sync.enable = true; + kdeconnect.enable = true; + }; + + targets.genericLinux.enable = true; + home.sessionVariables = {}; + home.sessionPath = []; + + imports = [ + ./roles + ./modules/emacs + ./modules/i3+sway + ./modules/kubectl + ./modules/plasma-manager + ./modules/tmux + ]; +} \ No newline at end of file diff --git a/home/home-laptop-compact.nix b/home/home-laptop-compact.nix new file mode 100644 index 0000000..7b0e262 --- /dev/null +++ b/home/home-laptop-compact.nix @@ -0,0 +1,41 @@ +{ config, lib, pkgs, globalInputs, system, ... }: + +let + customPkgs = pkgs.callPackage ../packages {}; +in +{ + # Provide arguments to role modules + _module.args = { inherit customPkgs; }; + # Home Manager configuration for compact laptop setups + # Optimized for space-constrained environments + + home.username = "johno"; + home.homeDirectory = "/home/johno"; + home.stateVersion = "24.05"; + + # Enable essential roles only (exclude heavy office/media packages) + home.roles = { + base.enable = true; + desktop.enable = true; + development.enable = true; + communication.enable = true; + sync.enable = true; + kdeconnect.enable = true; + # office.enable = false; # Excluded for storage constraints + # media.enable = false; # Excluded for storage constraints + }; + + targets.genericLinux.enable = true; + home.sessionVariables = {}; + home.sessionPath = []; + + imports = [ + ./roles + ./modules/emacs + ./modules/i3+sway + ./modules/kubectl + ./modules/plasma-manager + ./modules/tmux + ]; + +} \ No newline at end of file diff --git a/home/home-live-usb.nix b/home/home-live-usb.nix new file mode 100644 index 0000000..2e394c7 --- /dev/null +++ b/home/home-live-usb.nix @@ -0,0 +1,42 @@ +{ pkgs, globalInputs, system, ... }: + +let + customPkgs = pkgs.callPackage ../packages {}; +in +{ + # Provide arguments to role modules + _module.args = { inherit customPkgs; }; + # Home Manager configuration for live USB environments + # Minimal setup without persistent services + + home.username = "nixos"; + home.homeDirectory = "/home/nixos"; + home.stateVersion = "24.05"; + + # Enable minimal roles only (no sync or kdeconnect for live environment) + home.roles = { + base.enable = true; + desktop.enable = true; + # development.enable = false; # Not needed for live USB + # communication.enable = false; # Not needed for live USB + # office.enable = false; # Not needed for live USB + # media.enable = false; # Not needed for live USB + # sync.enable = false; # No persistent sync on live USB + # kdeconnect.enable = false; # No device integration on live USB + }; + + targets.genericLinux.enable = true; + home.sessionVariables = {}; + home.sessionPath = []; + + imports = [ + ./roles + ./modules/emacs + ./modules/i3+sway + ./modules/kubectl + ./modules/plasma-manager + ./modules/tmux + ]; + + # Live USB specific overrides can go here if needed +} \ No newline at end of file diff --git a/home/home-media-center.nix b/home/home-media-center.nix new file mode 100644 index 0000000..1907789 --- /dev/null +++ b/home/home-media-center.nix @@ -0,0 +1,42 @@ +{ pkgs, globalInputs, system, ... }: + +let + customPkgs = pkgs.callPackage ../packages {}; +in +{ + # Provide arguments to role modules + _module.args = { inherit customPkgs; }; + # Home Manager configuration for media center setups + # Optimized for living room media consumption and gaming + + home.username = "johno"; + home.homeDirectory = "/home/johno"; + home.stateVersion = "24.05"; + + # Enable media center focused roles + home.roles = { + base.enable = true; + desktop.enable = true; + media.enable = true; + communication.enable = true; + kdeconnect.enable = true; + development.enable = true; + # office.enable = false; # Not needed for media center + # sync.enable = false; # Shared machine, no personal file sync + }; + + targets.genericLinux.enable = true; + home.sessionVariables = {}; + home.sessionPath = []; + + imports = [ + ./roles + ./modules/emacs + ./modules/i3+sway + ./modules/kubectl + ./modules/plasma-manager + ./modules/tmux + ]; + + # Media center specific overrides can go here if needed +} \ No newline at end of file diff --git a/home/home-nix-book.nix b/home/home-nix-book.nix deleted file mode 100644 index 8b63b82..0000000 --- a/home/home-nix-book.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./home.nix - ]; - - home.i3_sway.extraSwayConfig = { - output.eDP-1.scale = "1.75"; - }; -} diff --git a/home/home.nix b/home/home.nix deleted file mode 100644 index 52a2d36..0000000 --- a/home/home.nix +++ /dev/null @@ -1,203 +0,0 @@ -{ pkgs, customPkgs, globalInputs, system, ... }: - -let - customPkgs = pkgs.callPackage ../packages {}; -in -{ - # Home Manager needs a bit of information about you and the paths it should - # manage. - home.username = "johno"; - home.homeDirectory = "/home/johno"; - - # This value determines the Home Manager release that your configuration is - # compatible with. This helps avoid breakage when a new Home Manager release - # introduces backwards incompatible changes. - # - # You should not change this value, even if you update Home Manager. If you do - # want to update the value, then make sure to first check the Home Manager - # release notes. - home.stateVersion = "24.05"; # Please read the comment before changing. - - # The home.packages option allows you to install Nix packages into your - # environment. - home.packages = [ - # # Adds the 'hello' command to your environment. It prints a friendly - # # "Hello, world!" when run. - # pkgs.hello - - # # It is sometimes useful to fine-tune packages, for example, by applying - # # overrides. You can do that directly here, just don't forget the - # # parentheses. Maybe you want to install Nerd Fonts with a limited number of - # # fonts? - # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) - - # # You can also create simple shell scripts directly inside your - # # configuration. For example, this adds a command 'my-hello' to your - # # environment: - # (pkgs.writeShellScriptBin "my-hello" '' - # echo "Hello, ${config.home.username}!" - # '') - - pkgs.bitwarden - pkgs.claude-code - pkgs.codex - pkgs.dunst - pkgs.element-desktop - pkgs.fd - #pkgs.fluffychat # security vulnerability in current version - pkgs.goose-cli - pkgs.gzip - pkgs.htop - pkgs.jellyfin-media-player - pkgs.keepassxc - pkgs.killall - pkgs.kitty - pkgs.less - pkgs.moonlight-qt - pkgs.ncdu - pkgs.nextcloud-talk-desktop - pkgs.openscad-unstable - pkgs.syncthingtray - pkgs.pandoc - #pkgs.pinentry-qt - #pkgs.pytest - pkgs.shellcheck - pkgs.solaar # Logitech management software - (pkgs.snapcast.override { pulseaudioSupport = true; }) - pkgs.tmux - pkgs.waybar - pkgs.wofi - pkgs.vlc - - ## Kubernetes cluster management handled by kubectl-secure module - - globalInputs.google-cookie-retrieval.packages.${system}.default - - # Custom packages - customPkgs.tea-rbw - ]; - - # Home Manager is pretty good at managing dotfiles. The primary way to manage - # plain files is through 'home.file'. - home.file = { - # # Building this configuration will create a copy of 'dotfiles/screenrc' in - # # the Nix store. Activating the configuration will then make '~/.screenrc' a - # # symlink to the Nix store copy. - # ".screenrc".source = dotfiles/screenrc; - - # # You can also set the file content immediately. - # ".gradle/gradle.properties".text = '' - # org.gradle.console=verbose - # org.gradle.daemon.idletimeout=3600000 - # ''; - }; - - targets.genericLinux.enable = true; - - # Home Manager can also manage your environment variables through - # 'home.sessionVariables'. These will be explicitly sourced when using a - # shell provided by Home Manager. If you don't want to manage your shell - # through Home Manager then you have to manually source 'hm-session-vars.sh' - # located at either - # - # ~/.nix-profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # /etc/profiles/per-user/johno/etc/profile.d/hm-session-vars.sh - # - home.sessionVariables = { - }; - - home.sessionPath = [ - ]; - - imports = [ - ./modules/emacs - ./modules/i3+sway - ./modules/kubectl - ./modules/plasma-manager - ./modules/tmux - ]; - - programs.bash = { - enable = true; - initExtra = '' - codex() { - local key - key="$(rbw get openai-api-key-codex)" - OPENAI_API_KEY="$key" command codex "$@" - } - ''; - }; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; - - programs.command-not-found.enable = true; - - programs.firefox = { - enable = true; - }; - - programs.git = { - enable = true; - userName = "John Ogle"; - userEmail = "john@ogle.fyi"; - extraConfig = { - safe.directory = "/etc/nixos"; - }; - }; - - programs.jq.enable = true; - - programs.kubectl-secure.enable = true; - - programs.neovim = { - enable = true; - viAlias = true; - vimAlias = true; - }; - - programs.rbw = { - enable = true; - settings = { - email = "john@johnogle.info"; - base_url = "https://bitwarden.johnogle.info"; - pinentry = pkgs.pinentry-qt; - }; - }; - - programs.spotify-player.enable = true; - - programs.ssh = { - enable = true; - addKeysToAgent = "yes"; - matchBlocks = { - "nucdeb1" = { - hostname = "nucdeb1.oglehome"; - user = "root"; - }; - }; - }; - - services.kdeconnect = { - enable = true; - indicator = true; - package = pkgs.kdePackages.kdeconnect-kde; - }; - - services.gnome-keyring = { - enable = true; - }; - - services.syncthing = { - enable = true; - }; - - xdg.enable = true; -} diff --git a/home/roles/base/default.nix b/home/roles/base/default.nix new file mode 100644 index 0000000..000a050 --- /dev/null +++ b/home/roles/base/default.nix @@ -0,0 +1,86 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.home.roles.base; +in +{ + options.home.roles.base = { + enable = mkEnableOption "Enable base CLI tools and essential programs"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + # Core CLI utilities + fd + gzip + htop + killall + less + ncdu + shellcheck + tmux + + # Development/automation tools that are widely used + claude-code + codex + goose-cli + pandoc + ]; + + # Essential programs everyone needs + programs.bash = { + enable = true; + initExtra = '' + codex() { + local key + key="$(rbw get openai-api-key-codex)" + OPENAI_API_KEY="$key" command codex "$@" + } + ''; + }; + + programs.home-manager.enable = true; + programs.command-not-found.enable = true; + + programs.git = { + enable = true; + userName = "John Ogle"; + userEmail = "john@ogle.fyi"; + extraConfig = { + safe.directory = "/etc/nixos"; + }; + }; + + programs.jq.enable = true; + + programs.neovim = { + enable = true; + viAlias = true; + vimAlias = true; + }; + + programs.ssh = { + enable = true; + addKeysToAgent = "yes"; + matchBlocks = { + "nucdeb1" = { + hostname = "nucdeb1.oglehome"; + user = "root"; + }; + }; + }; + + programs.rbw = { + enable = true; + settings = { + email = "john@johnogle.info"; + base_url = "https://bitwarden.johnogle.info"; + pinentry = pkgs.pinentry-qt; + }; + }; + + # Note: modules must be imported at top-level home config + }; +} \ No newline at end of file diff --git a/home/roles/communication/default.nix b/home/roles/communication/default.nix new file mode 100644 index 0000000..b8b28c1 --- /dev/null +++ b/home/roles/communication/default.nix @@ -0,0 +1,24 @@ +{ config, lib, pkgs, globalInputs, system, ... }: + +with lib; + +let + cfg = config.home.roles.communication; +in +{ + options.home.roles.communication = { + enable = mkEnableOption "Enable communication and messaging applications"; + }; + + config = mkIf cfg.enable { + home.packages = [ + # Communication apps + pkgs.element-desktop + pkgs.fluffychat + pkgs.nextcloud-talk-desktop + + # For logging back into google chat + globalInputs.google-cookie-retrieval.packages.${system}.default + ]; + }; +} diff --git a/home/roles/default.nix b/home/roles/default.nix new file mode 100644 index 0000000..455774c --- /dev/null +++ b/home/roles/default.nix @@ -0,0 +1,13 @@ +{ + imports = [ + ./base + ./communication + ./desktop + ./development + ./gaming + ./kdeconnect + ./media + ./office + ./sync + ]; +} diff --git a/home/roles/desktop/default.nix b/home/roles/desktop/default.nix new file mode 100644 index 0000000..3d6218b --- /dev/null +++ b/home/roles/desktop/default.nix @@ -0,0 +1,44 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.home.roles.desktop; +in +{ + options.home.roles.desktop = { + enable = mkEnableOption "Enable desktop GUI applications and utilities"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + # Desktop applications + bitwarden + dunst + keepassxc + kitty + + # Desktop utilities + solaar # Logitech management software + waybar + wofi + + # System utilities with GUI components + (snapcast.override { pulseaudioSupport = true; }) + ]; + + programs.firefox = { + enable = true; + }; + + programs.spotify-player.enable = true; + + services.gnome-keyring = { + enable = true; + }; + + xdg.enable = true; + + # Note: modules must be imported at top-level home config + }; +} \ No newline at end of file diff --git a/home/roles/development/default.nix b/home/roles/development/default.nix new file mode 100644 index 0000000..29db5d6 --- /dev/null +++ b/home/roles/development/default.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, customPkgs, globalInputs, system, ... }: + +with lib; + +let + cfg = config.home.roles.development; +in +{ + options.home.roles.development = { + enable = mkEnableOption "Enable development tools and utilities"; + }; + + config = mkIf cfg.enable { + home.packages = [ + # Custom packages + customPkgs.tea-rbw + ]; + + programs.kubectl-secure.enable = true; + + # Note: modules must be imported at top-level home config + }; +} \ No newline at end of file diff --git a/home/roles/gaming/default.nix b/home/roles/gaming/default.nix new file mode 100644 index 0000000..ba6645a --- /dev/null +++ b/home/roles/gaming/default.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.home.roles.gaming; +in +{ + options.home.roles.gaming = { + enable = mkEnableOption "Enable gaming applications and tools"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + # Gaming applications would go here + # This role is created for future expansion + # moonlight-qt is currently in media role but could be moved here + ]; + }; +} \ No newline at end of file diff --git a/home/roles/kdeconnect/default.nix b/home/roles/kdeconnect/default.nix new file mode 100644 index 0000000..ceceb27 --- /dev/null +++ b/home/roles/kdeconnect/default.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.home.roles.kdeconnect; +in +{ + options.home.roles.kdeconnect = { + enable = mkEnableOption "Enable KDE Connect for device integration"; + }; + + config = mkIf cfg.enable { + services.kdeconnect = { + enable = true; + indicator = true; + package = pkgs.kdePackages.kdeconnect-kde; + }; + }; +} \ No newline at end of file diff --git a/home/roles/media/default.nix b/home/roles/media/default.nix new file mode 100644 index 0000000..421a850 --- /dev/null +++ b/home/roles/media/default.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.home.roles.media; +in +{ + options.home.roles.media = { + enable = mkEnableOption "Enable media and multimedia applications"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + # Media players and streaming + jellyfin-media-player + moonlight-qt + vlc + ]; + }; +} \ No newline at end of file diff --git a/home/roles/office/default.nix b/home/roles/office/default.nix new file mode 100644 index 0000000..cfbbbcb --- /dev/null +++ b/home/roles/office/default.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.home.roles.office; +in +{ + options.home.roles.office = { + enable = mkEnableOption "Enable office applications and document processing tools"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + # Office suite + libreoffice + + # CAD/Design tools + openscad-unstable + ]; + }; +} \ No newline at end of file diff --git a/home/roles/sync/default.nix b/home/roles/sync/default.nix new file mode 100644 index 0000000..1789b69 --- /dev/null +++ b/home/roles/sync/default.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.home.roles.sync; +in +{ + options.home.roles.sync = { + enable = mkEnableOption "Enable file synchronization services"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + syncthingtray + ]; + + services.syncthing = { + enable = true; + }; + }; +} \ No newline at end of file