diff --git a/_modules/home/desktop/applications/communication.nix b/_modules/home/desktop/applications/communication.nix deleted file mode 100644 index 371bf0a..0000000 --- a/_modules/home/desktop/applications/communication.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ options, config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf mkForce mkMerge; - inherit (lib.attrsets) attrValues; - - cfg = config.modules.${user}.desktop.applications.communication; -in -{ - options.modules.${user}.desktop.applications.communication = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "Enable office suite (only-office)"; - }; - - config = mkIf cfg.enable - { - home-manager.users.${user}.home.packages = with pkgs; [vesktop teamspeak_client signal-desktop]; - }; -} diff --git a/_modules/home/desktop/applications/office.nix b/_modules/home/desktop/applications/office.nix deleted file mode 100644 index 9965144..0000000 --- a/_modules/home/desktop/applications/office.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ options, config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf mkForce mkMerge; - inherit (lib.attrsets) attrValues; - - cfg = config.modules.${user}.desktop.applications.office; -in -{ - options.modules.${user}.desktop.applications.office = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "Enable office suite (only-office)"; - }; - - config = mkIf cfg.enable - { - home-manager.users.${user}.home.packages = attrValues { - inherit (pkgs) onlyoffice-bin; - }; - -# nixpkgs.config.allowUnfreePredicate = pkg: -# builtins.elem (lib.getName pkg) [ "corefonts" ]; - - fonts.packages = with pkgs; [ - corefonts - ]; - }; -} diff --git a/_modules/home/desktop/applications/passwords.nix b/_modules/home/desktop/applications/passwords.nix deleted file mode 100644 index 9a07bb4..0000000 --- a/_modules/home/desktop/applications/passwords.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ options, config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf mkForce mkMerge; - inherit (lib.attrsets) attrValues; - - cfg = config.modules.${user}.desktop.applications.passwords; -in -{ - options.modules.${user}.desktop.applications.passwords = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "Enable password manager (bitwarden)"; - }; - - config = mkIf cfg.enable - { - home-manager.users.${user}.home.packages = attrValues { - inherit (pkgs) bitwarden-desktop; - }; - }; -} diff --git a/_modules/home/desktop/applications/recording.nix b/_modules/home/desktop/applications/recording.nix deleted file mode 100644 index b8ba73b..0000000 --- a/_modules/home/desktop/applications/recording.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ options, config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf mkForce mkMerge; - inherit (lib.attrsets) attrValues; - - cfg = config.modules.${user}.desktop.applications.recording; -in -{ - options.modules.${user}.desktop.applications.recording = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "Enable recording software (OBS Studio)"; - }; - - config = mkIf cfg.enable - { - boot = { - extraModulePackages = with config.boot.kernelPackages; [ - v4l2loopback - ]; - - extraModprobeConfig = '' - options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 - ''; - }; - - security.polkit.enable = true; - - home-manager.users.${user}.home.packages = with pkgs; [ - obs-studio - obs-studio-plugins.wlrobs - obs-studio-plugins.obs-backgroundremoval - obs-studio-plugins.obs-pipewire-audio-capture - ]; - }; -} diff --git a/_modules/home/desktop/applications/steam.nix b/_modules/home/desktop/applications/steam.nix deleted file mode 100644 index 7f483e7..0000000 --- a/_modules/home/desktop/applications/steam.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib) mkEnableOption mkIf mkForce mkMerge; - - cfg = config.modules.${user}.desktop.applications.steam; - desktop = config.modules.${user}.desktop; -in -{ - options.modules.${user}.desktop.applications.steam = { - enable = mkEnableOption "Enable steam, the game/software store"; - hardware.enable = mkEnableOption "Support for steam hardware"; - }; - - config = mkIf cfg.enable (mkMerge [ - { - programs.steam = { - enable = true; - package = pkgs.steam-small.override { - extraEnv = { - DXVK_HUD = "compiler"; - MANGOHUD = true; - }; - }; - }; - hardware.steam-hardware.enable = mkForce cfg.hardware.enable; - - # https://github.com/FeralInteractive/gamemode - programs.gamemode = { - enable = true; - enableRenice = true; - settings = {}; - }; - } - - (mkIf (desktop.type == "wayland") { - # https://github.com/ValveSoftware/gamescope - programs.gamescope = { - enable = true; - capSysNice = true; - env = { - DXVK_HDR = "1"; - ENABLE_GAMESCOPE_WSI = "1"; - WINE_FULLSCREEN_FSR = "1"; - WLR_RENDERER = "vulkan"; - }; - args = ["--hdr-enabled"]; - }; - - programs.steam.gamescopeSession = { - enable = true; - args = ["--immediate-flips"]; - }; - }) - ]); -} diff --git a/_modules/home/desktop/applications/studio.nix b/_modules/home/desktop/applications/studio.nix deleted file mode 100644 index 940c386..0000000 --- a/_modules/home/desktop/applications/studio.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ pkgs, config, lib, user, ... }: -let - inherit (lib) mkIf mkEnableOption; - - cfg = config.modules.${user}.desktop.applications.studio; -in -{ - options.modules.${user}.desktop.applications.studio = { - enable = mkEnableOption "Enable Bricklink Studio"; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - my.studio - ]; - }; -} diff --git a/_modules/home/desktop/browsers/ladybird.nix b/_modules/home/desktop/browsers/ladybird.nix deleted file mode 100644 index b9f698f..0000000 --- a/_modules/home/desktop/browsers/ladybird.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.options) mkEnableOption; - inherit (lib.modules) mkIf; - - cfg = config.modules.${user}.desktop.browsers.ladybird; -in { - options.modules.${user}.desktop.browsers.ladybird = { - enable = mkEnableOption "Enable Ladybird"; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - ladybird - ]; - }; -} diff --git a/_modules/home/desktop/browsers/zen.nix b/_modules/home/desktop/browsers/zen.nix deleted file mode 100644 index cf70760..0000000 --- a/_modules/home/desktop/browsers/zen.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ inputs, options, config, lib, pkgs, user, ... }: -let - inherit (builtins) toJSON; - inherit (lib.attrsets) attrValues mapAttrsToList; - inherit (lib.modules) mkIf mkMerge; - inherit (lib.strings) concatStrings; - - cfg = config.modules.${user}.desktop.browsers.zen; -in { - options.modules.${user}.desktop.browsers.zen = let - inherit (lib.options) mkEnableOption; - inherit (lib.types) attrsOf oneOf bool int lines str; - inherit (lib.my) mkOpt mkOpt'; - in { - enable = mkEnableOption "Gecko-based libre browser"; - privacy.enable = mkEnableOption "Privacy Focused Firefox fork"; - - profileName = mkOpt str config.user.name; - settings = mkOpt' (attrsOf (oneOf [bool int str])) {} '' - Firefox preferences set in user.js - ''; - extraConfig = mkOpt' lines "" '' - Extra lines to add to user.js - ''; - userChrome = mkOpt' lines "" "CSS Styles for Firefox's interface"; - userContent = mkOpt' lines "" "Global CSS Styles for websites"; - }; - - config = mkMerge [ - (mkIf (config.modules.${user}.desktop.type == "wayland") { - environment.variables.MOZ_ENABLE_WAYLAND = "1"; - }) - - (mkIf cfg.enable { - home-manager.users.${user}.home.packages = let - inherit (pkgs) makeDesktopItem; - inherit (inputs.zen.packages.${pkgs.system}.specific) zen; - in [ - zen - ]; - }) - ]; -} diff --git a/_modules/home/desktop/editors/default.nix b/_modules/home/desktop/editors/default.nix deleted file mode 100644 index 292f324..0000000 --- a/_modules/home/desktop/editors/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ - config, - options, - lib, - pkgs, - user, - ... -}: let - inherit (lib.attrsets) attrValues; - inherit (lib.modules) mkIf mkMerge; - cfg = config.modules.${user}.desktop.editors; -in { - options.modules.${user}.desktop.editors = let - inherit (lib.options) mkOption; - inherit (lib.types) nullOr enum; - in { - default = mkOption { - type = nullOr (enum [ "nano" "nvim" "zed" "kate" "vscodium" ]); - default = "nano"; - description = "Default editor for text manipulation"; - example = "nvim"; - }; - }; - - config = mkMerge [ - (mkIf (cfg.default != null) { - home-manager.users.${user}.home.sessionVariables = { - EDITOR = cfg.default; - }; - }) - - (mkIf (cfg.default == "nvim") { - home-manager.users.${user}.home.packages = attrValues { - inherit (pkgs) imagemagick editorconfig-core-c sqlite deno pandoc nuspell; - inherit (pkgs.hunspellDicts) nl_NL en_GB-ise; - }; - }) - ]; -} diff --git a/_modules/home/desktop/editors/kate.nix b/_modules/home/desktop/editors/kate.nix deleted file mode 100644 index 9e030e5..0000000 --- a/_modules/home/desktop/editors/kate.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, options, lib, pkgs, user, ... }: -let - inherit (lib.meta) getExe; - inherit (lib.modules) mkIf; - - cfg = config.modules.${user}.desktop.editors.kate; -in -{ - options.modules.${user}.desktop.editors.kate = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "kate"; - }; - - config = mkIf cfg.enable { - home-manager.users.${user}.programs.kate.enable = true; - }; -} diff --git a/_modules/home/desktop/editors/nano.nix b/_modules/home/desktop/editors/nano.nix deleted file mode 100644 index ff39996..0000000 --- a/_modules/home/desktop/editors/nano.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ config, options, lib, pkgs, user, ... }: -let - inherit (lib.meta) getExe; - inherit (lib.modules) mkIf; - - cfg = config.modules.${user}.desktop.editors.nano; -in -{ - options.modules.${user}.desktop.editors.nano = let - inherit (lib.options) mkEnableOption; - in { enable = mkEnableOption "nano"; }; - - config = mkIf cfg.enable { - home-manager.users.${user}.home.packages = with pkgs; [ - nano - ]; - - programs.nano = { - enable = true; - syntaxHighlight = true; - nanorc = '' - set autoindent - set jumpyscrolling - set linenumbers - set mouse - set saveonexit - set smarthome - set tabstospaces - set tabsize 2 - ''; - }; - }; -} diff --git a/_modules/home/desktop/editors/nvim.nix b/_modules/home/desktop/editors/nvim.nix deleted file mode 100644 index 9a738d5..0000000 --- a/_modules/home/desktop/editors/nvim.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ config, lib, user, ... }: -let - inherit (lib.modules) mkIf; - - cfg = config.modules.${user}.desktop.editors.nvim; -in -{ - options.modules.${user}.desktop.editors.nvim = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "neo-vim (nixvim)"; - }; - - config = mkIf cfg.enable { - modules.desktop.editors.nvim.enable = true; - - programs.nvf = { - enable = true; - settings = { - vim = { - statusline.lualine.enable = true; - telescope.enable = true; - autocomplete.nvim-cmp.enable = true; - - lsp.enable = true; - - languages = { - enableTreesitter = true; - - nix.enable = true; - ts.enable = true; - rust.enable = true; - }; - }; - }; - }; - }; -} diff --git a/_modules/home/desktop/editors/vscodium.nix b/_modules/home/desktop/editors/vscodium.nix deleted file mode 100644 index 93524bc..0000000 --- a/_modules/home/desktop/editors/vscodium.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - inherit (lib.attrsets) attrValues; - - cfg = config.modules.${user}.desktop.editors.vscodium; -in -{ - options.modules.${user}.desktop.editors.vscodium = let - inherit (lib.options) mkEnableOption; - in { enable = mkEnableOption "vscodium"; }; - - config = mkIf cfg.enable { - home-manager.users.${user}.home.packages = attrValues { - inherit (pkgs) vscodium; - }; - }; -} diff --git a/_modules/home/desktop/editors/zed.nix b/_modules/home/desktop/editors/zed.nix deleted file mode 100644 index cbaafa3..0000000 --- a/_modules/home/desktop/editors/zed.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ config, lib, pkgs, user, ... }: let - inherit (lib.modules) mkIf; - - cfg = config.modules.${user}.desktop.editors.zed; -in { - options.modules.${user}.desktop.editors.zed = let - inherit (lib.options) mkEnableOption; - in {enable = mkEnableOption "zed";}; - - config = mkIf cfg.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ - zed-editor nixd nil alejandra - ]; - - programs.zed-editor = { - enable = true; - - extensions = ["nix" "toml" "html"]; - - userSettings = { - assistant.enabled = false; - - vim_mode = false; - load_direnv = "shell_hook"; - base_keymap = "JetBrains"; - - format_on_save = "on"; - bindings = { - "ctrl+s" = "workspace::SaveAll"; - }; - - tabs = { - file_icons = true; - git_status = true; - }; - project_panel.auto_reveal_entries = false; - - "experimental.theme_overrides" = { - border = "#ffffff07"; - }; - - hour_format = "hour24"; - auto_update = false; - - lsp = { - nixd = {}; - nil = { - initialization_options = { - nix = { - flake = { - autoArchive = true; - }; - }; - formatting = { - command = ["alejandra" "--quiet" "--"]; - }; - }; - binary = { - path_lookup = true; - }; - }; - }; - - languages = { - "Nix" = { - language_servers = ["nixd" "nil"]; - format_on_save = "on"; - }; - }; - }; - }; - }; - }; -} diff --git a/_modules/home/desktop/games/default.nix b/_modules/home/desktop/games/default.nix deleted file mode 100644 index 8e4bb22..0000000 --- a/_modules/home/desktop/games/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib, pkgs, user, ... }: let - inherit (lib) mkEnableOption mkIf; - - cfg = config.modules.${user}.desktop.games; -in -{ - options.modules.${user}.desktop.games = { - enable = mkEnableOption "enable proton GE"; - }; - - config = mkIf cfg.enable { - home-manager.users.${user} = { - home.packages = with pkgs; [ protonup ]; - - home.sessionVariables = { - STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d"; - }; - }; - }; -} diff --git a/_modules/home/desktop/games/minecraft.nix b/_modules/home/desktop/games/minecraft.nix deleted file mode 100644 index b56fceb..0000000 --- a/_modules/home/desktop/games/minecraft.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ options, config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf mkForce mkMerge; - inherit (lib.attrsets) attrValues; - - cfg = config.modules.${user}.desktop.games.minecraft; -in -{ - options.modules.${user}.desktop.games.minecraft = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "minecraft (Modrinth)"; - }; - - config = mkIf cfg.enable { - # environment.systemPackages = [ - # pkgs.minecract - # ]; - home-manager.users.${user}.home.packages = attrValues { - inherit (pkgs) prismlauncher; - }; - }; -} diff --git a/_modules/home/user.nix b/_modules/home/user.nix deleted file mode 100644 index 4fa3d0e..0000000 --- a/_modules/home/user.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ options, config, lib, pkgs, user, ... }: -let - inherit (lib.attrsets) attrValues; - inherit (lib.modules) mkIf mkMerge; - - cfg = config.modules.${user}.user; -in -{ - options.modules.${user}.user = let - inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) nullOr enum; - in with lib.types; { - full_name = mkOption { - type = nullOr str; - default = null; - example = "John Doe"; - description = "Full name of the user, this is used as the kde plasma display name for example"; - }; - - email = mkOption { - type = nullOr str; - default = null; - example = "name@domain.tld"; - description = "user's email address"; - }; - - is_trusted = mkOption { - type = bool; - default = false; - example = true; - description = "this is used to grant sudo priviledges for the user"; - }; - - groups = mkOption { - type = listOf str; - default = []; - example = [ "some" "group" "names" ]; - description = "groups to add the user to"; - }; - }; - - config = mkIf (user != "root") { - users.users.${user} = { - description = (cfg.full_name or user); - extraGroups = cfg.groups ++ (if cfg.is_trusted then [ "wheel" ] else []); - }; - }; -} diff --git a/_modules/home/xgd.nix b/_modules/home/xgd.nix deleted file mode 100644 index 4af3989..0000000 --- a/_modules/home/xgd.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ config, user, ... }: -{ - home-manager.users.${user}.xdg.enable = true; - - environment = { - sessionVariables = { - XDG_CACHE_HOME = "$HOME/.cache"; - XDG_CONFIG_HOME = "$HOME/.config"; - XDG_DATA_HOME = "$HOME/.local/share"; - XDG_BIN_HOME = "$HOME/.local/bin"; - }; - - variables = { - __GL_SHADER_DISK_CACHE_PATH = "$XDG_CACHE_HOME/nv"; - ASPELL_CONF = '' - per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; - personal $XDG_CONFIG_HOME/aspell/en_US.pws; - repl $XDG_CONFIG_HOME/aspell/en.prepl; - ''; - CUDA_CACHE_PATH = "$XDG_CACHE_HOME/nv"; - HISTFILE = "$XDG_DATA_HOME/bash/history"; - INPUTRC = "$XDG_CONFIG_HOME/readline/inputrc"; - LESSHISTFILE = "$XDG_CACHE_HOME/lesshst"; - WGETRC = "$XDG_CONFIG_HOME/wgetrc"; - }; - - extraInit = '' - export XAUTHORITY=/tmp/Xauthority - [ -e ~/.Xauthority ] && mv -f ~/.Xauthority "$XAUTHORITY" - ''; - }; -} diff --git a/_modules/system/desktop/editors/nvim.nix b/_modules/system/desktop/editors/nvim.nix deleted file mode 100644 index 12bdead..0000000 --- a/_modules/system/desktop/editors/nvim.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ inputs, config, options, lib, pkgs, ... }: -let - inherit (lib.meta) getExe; - inherit (lib.modules) mkIf; - - cfg = options.modules.desktop.editors.nvim; -in -{ - imports = [ - inputs.nvf.nixosModules.default - ]; - - options.modules.desktop.editors.nvim = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "neo-vim (nixvim)"; - }; - - config = mkIf cfg.enable { - - }; -} diff --git a/modules/home/application/bitwarden/default.nix b/modules/home/application/bitwarden/default.nix new file mode 100644 index 0000000..f2cd869 --- /dev/null +++ b/modules/home/application/bitwarden/default.nix @@ -0,0 +1,15 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.bitwarden; +in +{ + options.${namespace}.application.bitwarden = { + enable = mkEnableOption "enable bitwarden"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ bitwarden-desktop ]; + }; +} diff --git a/modules/home/application/default.nix b/modules/home/application/default.nix new file mode 100644 index 0000000..702193d --- /dev/null +++ b/modules/home/application/default.nix @@ -0,0 +1,26 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkOption; + inherit (lib.types) subModule; + + cfg = config.${namespace}.application; +in +{ + options.${namespace}.application = { + defaults = mkOption { + type = subModule { + browser = mkOption { + type = enum [ "ladybird" "zen" ]; + default = "zen"; + example = "ladybird"; + }; + }; + }; + }; + + config = { + home.sessionVariables = { + BROWSER = cfg.defaults.browser; + }; + }; +} diff --git a/modules/home/application/discord/default.nix b/modules/home/application/discord/default.nix new file mode 100644 index 0000000..a736b37 --- /dev/null +++ b/modules/home/application/discord/default.nix @@ -0,0 +1,15 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.discord; +in +{ + options.${namespace}.application.discord = { + enable = mkEnableOption "enable discord (vesktop)"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ vesktop ]; + }; +} diff --git a/modules/home/application/ladybird/default.nix b/modules/home/application/ladybird/default.nix new file mode 100644 index 0000000..31d7c17 --- /dev/null +++ b/modules/home/application/ladybird/default.nix @@ -0,0 +1,15 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.ladybird; +in +{ + options.${namespace}.application.ladybird = { + enable = mkEnableOption "enable ladybird"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ ladybird ]; + }; +} diff --git a/modules/home/application/obs/default.nix b/modules/home/application/obs/default.nix new file mode 100644 index 0000000..52e4100 --- /dev/null +++ b/modules/home/application/obs/default.nix @@ -0,0 +1,32 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.obs; +in +{ + options.${namespace}.application.obs = { + enable = mkEnableOption "enable obs"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + obs-studio + obs-studio-plugins.wlrobs + obs-studio-plugins.obs-backgroundremoval + obs-studio-plugins.obs-pipewire-audio-capture + ]; + + boot = { + extraModulePackages = with config.boot.kernelPackages; [ + v4l2loopback + ]; + + extraModprobeConfig = '' + options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 + ''; + }; + + security.polkit.enable = true; + }; +} diff --git a/modules/home/application/onlyoffice/default.nix b/modules/home/application/onlyoffice/default.nix new file mode 100644 index 0000000..4bbb07b --- /dev/null +++ b/modules/home/application/onlyoffice/default.nix @@ -0,0 +1,16 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.onlyoffice; +in +{ + options.${namespace}.application.onlyoffice = { + enable = mkEnableOption "enable onlyoffice"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ onlyoffice-bin ]; + fonts.packages = with pkgs; [ corefonts ]; + }; +} diff --git a/modules/home/application/signal/default.nix b/modules/home/application/signal/default.nix new file mode 100644 index 0000000..f4eb1d0 --- /dev/null +++ b/modules/home/application/signal/default.nix @@ -0,0 +1,15 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.signal; +in +{ + options.${namespace}.application.signal = { + enable = mkEnableOption "enable signal"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ signal-desktop ]; + }; +} diff --git a/modules/home/application/steam/default.nix b/modules/home/application/steam/default.nix new file mode 100644 index 0000000..104acd7 --- /dev/null +++ b/modules/home/application/steam/default.nix @@ -0,0 +1,55 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.steam; +in +{ + options.${namespace}.application.steam = { + enable = mkEnableOption "enable steam"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ protonup ]; + + home.sessionVariables = { + STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d"; + }; + + programs = { + steam = { + enable = true; + package = pkgs.steam-small.override { + extraEnv = { + DXVK_HUD = "compiler"; + MANGOHUD = true; + }; + }; + + gamescopeSession = { + enable = true; + args = ["--immediate-flips"]; + }; + }; + + # https://github.com/FeralInteractive/gamemode + gamemode = { + enable = true; + enableRenice = true; + settings = {}; + }; + + gamescope = { + enable = true; + capSysNice = true; + env = { + DXVK_HDR = "1"; + ENABLE_GAMESCOPE_WSI = "1"; + WINE_FULLSCREEN_FSR = "1"; + WLR_RENDERER = "vulkan"; + }; + args = ["--hdr-enabled"]; + }; + }; + }; +} diff --git a/modules/home/application/studio/default.nix b/modules/home/application/studio/default.nix new file mode 100644 index 0000000..f515b77 --- /dev/null +++ b/modules/home/application/studio/default.nix @@ -0,0 +1,15 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.studio; +in +{ + options.${namespace}.application.studio = { + enable = mkEnableOption "enable Bricklink Studio"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ studio ]; + }; +} diff --git a/modules/home/application/teamspeak/default.nix b/modules/home/application/teamspeak/default.nix new file mode 100644 index 0000000..e15bd96 --- /dev/null +++ b/modules/home/application/teamspeak/default.nix @@ -0,0 +1,15 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.teamspeak; +in +{ + options.${namespace}.application.teamspeak = { + enable = mkEnableOption "enable teamspeak"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ teamspeak_client ]; + }; +} diff --git a/_modules/home/desktop/applications/email.nix b/modules/home/application/thunderbird/default.nix similarity index 52% rename from _modules/home/desktop/applications/email.nix rename to modules/home/application/thunderbird/default.nix index 7fb8fd3..caffe2a 100644 --- a/_modules/home/desktop/applications/email.nix +++ b/modules/home/application/thunderbird/default.nix @@ -1,29 +1,22 @@ -{ options, config, lib, pkgs, user, ... }: +{ inputs, config, lib, pkgs, namespace, ... }: let - inherit (lib.modules) mkIf mkForce mkMerge; - inherit (lib.attrsets) attrValues; + inherit (lib) mkIf mkEnableOption; - cfg = config.modules.${user}.desktop.applications.email; + cfg = config.${namespace}.application.thunderbird; in { - options.modules.${user}.desktop.applications.email = let - inherit (lib.options) mkEnableOption; - in { - enable = mkEnableOption "Enable email client (thunderbird)"; + options.${namespace}.application.thunderbird = { + enable = mkEnableOption "enable thunderbird"; }; - config = mkIf cfg.enable - { + config = mkIf cfg.enable { + home.packages = with pkgs; [ thunderbird ]; + programs.thunderbird = { enable = true; }; - - home-manager.users.${user} = { - home.packages = attrValues { - inherit (pkgs) thunderbird; - }; - - accounts.email.accounts = { + + accounts.email.accounts = { kruining = { primary = true; address = "chris@kruinin.eu"; @@ -48,6 +41,5 @@ in }; }; }; - }; }; } diff --git a/modules/home/application/zen/default.nix b/modules/home/application/zen/default.nix new file mode 100644 index 0000000..e07c29d --- /dev/null +++ b/modules/home/application/zen/default.nix @@ -0,0 +1,19 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.zen; +in +{ + options.${namespace}.application.zen = { + enable = mkEnableOption "enable zen"; + }; + + config = mkIf cfg.enable { + home.packages = with inputs.zen.packages.${pkgs.system}.specific; [ zen ]; + + sessionVariables = { + MOZ_ENABLE_WAYLAND = "1"; + }; + }; +} diff --git a/modules/home/editor/default.nix b/modules/home/editor/default.nix new file mode 100644 index 0000000..f2ea10d --- /dev/null +++ b/modules/home/editor/default.nix @@ -0,0 +1,24 @@ +{ config, options, lib, pkgs, namespace, ... }: +let + inherit (lib) attrValues mkIf mkMerge mkOption; + inherit (lib.types) nullOr enum; + + cfg = config.${namespace}.editors; +in { + options.${namespace}.editors = { + default = mkOption { + type = nullOr (enum [ "nano" "nvim" "zed" "kate" "vscodium" ]); + default = "nano"; + description = "Default editor for text manipulation"; + example = "nvim"; + }; + }; + + config = mkMerge [ + (mkIf (cfg.default != null) { + home.sessionVariables = { + EDITOR = cfg.default; + }; + }) + ]; +} diff --git a/modules/home/editor/nano/default.nix b/modules/home/editor/nano/default.nix new file mode 100644 index 0000000..13eb800 --- /dev/null +++ b/modules/home/editor/nano/default.nix @@ -0,0 +1,30 @@ +{ config, options, lib, pkgs, namespace, ... }: +let + inherit (lib) mkEnableOption mkIf; + + cfg = config.${namespace}.editors.nano; +in +{ + options.${namespace}.editors.nano = { + enable = mkEnableOption "nano"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ nano ]; + + programs.nano = { + enable = true; + syntaxHighlight = true; + nanorc = '' + set autoindent + set jumpyscrolling + set linenumbers + set mouse + set saveonexit + set smarthome + set tabstospaces + set tabsize 2 + ''; + }; + }; +} diff --git a/modules/home/editor/nvim/default.nix b/modules/home/editor/nvim/default.nix new file mode 100644 index 0000000..3e0a047 --- /dev/null +++ b/modules/home/editor/nvim/default.nix @@ -0,0 +1,43 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.editor.nvim; +in +{ + options.${namespace}.editor.nvim = { + enable = mkEnableOption "enable nvim via nvf on user level"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + imagemagick + editorconfig-core-c + sqlite + deno + pandoc + nuspell + hunspellDicts.nl_NL + hunspellDicts.en_GB-ise + ]; + + programs.nvf = { + enable = true; + settings.vim = { + statusline.lualine.enable = true; + telescope.enable = true; + autocomplete.nvim-cmp.enable = true; + + lsp.enable = true; + + languages = { + enableTreesitter = true; + + nix.enable = true; + ts.enable = true; + rust.enable = true; + }; + }; + }; + }; +} diff --git a/modules/home/editor/zed/default.nix b/modules/home/editor/zed/default.nix new file mode 100644 index 0000000..94e63d3 --- /dev/null +++ b/modules/home/editor/zed/default.nix @@ -0,0 +1,73 @@ +{ config, lib, pkgs, namespace, ... }: let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.editors.zed; +in { + options.${namespace}.editors.zed = { + enable = mkEnableOption "zed"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + zed-editor nixd nil alejandra + ]; + + programs.zed-editor = { + enable = true; + + extensions = [ "nix" "toml" "html" ]; + + userSettings = { + assistant.enabled = false; + + vim_mode = false; + load_direnv = "shell_hook"; + base_keymap = "JetBrains"; + + format_on_save = "on"; + bindings = { + "ctrl+s" = "workspace::SaveAll"; + }; + + tabs = { + file_icons = true; + git_status = true; + }; + project_panel.auto_reveal_entries = false; + + "experimental.theme_overrides" = { + border = "#ffffff07"; + }; + + hour_format = "hour24"; + auto_update = false; + + lsp = { + nixd = {}; + nil = { + initialization_options = { + nix = { + flake = { + autoArchive = true; + }; + }; + formatting = { + command = ["alejandra" "--quiet" "--"]; + }; + }; + binary = { + path_lookup = true; + }; + }; + }; + + languages = { + "Nix" = { + language_servers = ["nixd" "nil"]; + format_on_save = "on"; + }; + }; + }; + }; + }; +} diff --git a/modules/home/game/minecraft/default.nix b/modules/home/game/minecraft/default.nix new file mode 100644 index 0000000..e5dedc6 --- /dev/null +++ b/modules/home/game/minecraft/default.nix @@ -0,0 +1,15 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.game.minecraft; +in +{ + options.${namespace}.game.minecraft = { + enable = mkEnableOption "enable minecraft"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ prismlauncher ]; + }; +} diff --git a/modules/nixos/editor/nvim/default.nix b/modules/nixos/editor/nvim/default.nix new file mode 100644 index 0000000..c29de0f --- /dev/null +++ b/modules/nixos/editor/nvim/default.nix @@ -0,0 +1,18 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.editor.nvim; +in +{ + imports = [ + inputs.nvf.nixosModules.default + ]; + + options.${namespace}.editor.nvim = { + enable = mkEnableOption "enable nvim via nvf on system level"; + }; + + config = mkIf cfg.enable { + }; +}