aight, making progress
This commit is contained in:
parent
c2d6c719a2
commit
9aa634bd71
37 changed files with 451 additions and 620 deletions
|
@ -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];
|
||||
};
|
||||
}
|
|
@ -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
|
||||
];
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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
|
||||
];
|
||||
};
|
||||
}
|
|
@ -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"];
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
|
@ -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
|
||||
];
|
||||
};
|
||||
}
|
|
@ -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
|
||||
];
|
||||
};
|
||||
}
|
|
@ -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 <filename>user.js</filename>
|
||||
'';
|
||||
extraConfig = mkOpt' lines "" ''
|
||||
Extra lines to add to <filename>user.js</filename>
|
||||
'';
|
||||
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
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
}
|
|
@ -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
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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 []);
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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"
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -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 {
|
||||
|
||||
};
|
||||
}
|
15
modules/home/application/bitwarden/default.nix
Normal file
15
modules/home/application/bitwarden/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
26
modules/home/application/default.nix
Normal file
26
modules/home/application/default.nix
Normal file
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
15
modules/home/application/discord/default.nix
Normal file
15
modules/home/application/discord/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
15
modules/home/application/ladybird/default.nix
Normal file
15
modules/home/application/ladybird/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
32
modules/home/application/obs/default.nix
Normal file
32
modules/home/application/obs/default.nix
Normal file
|
@ -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;
|
||||
};
|
||||
}
|
16
modules/home/application/onlyoffice/default.nix
Normal file
16
modules/home/application/onlyoffice/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
15
modules/home/application/signal/default.nix
Normal file
15
modules/home/application/signal/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
55
modules/home/application/steam/default.nix
Normal file
55
modules/home/application/steam/default.nix
Normal file
|
@ -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"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
15
modules/home/application/studio/default.nix
Normal file
15
modules/home/application/studio/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
15
modules/home/application/teamspeak/default.nix
Normal file
15
modules/home/application/teamspeak/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
|
@ -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
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
19
modules/home/application/zen/default.nix
Normal file
19
modules/home/application/zen/default.nix
Normal file
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
24
modules/home/editor/default.nix
Normal file
24
modules/home/editor/default.nix
Normal file
|
@ -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;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
30
modules/home/editor/nano/default.nix
Normal file
30
modules/home/editor/nano/default.nix
Normal file
|
@ -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
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
43
modules/home/editor/nvim/default.nix
Normal file
43
modules/home/editor/nvim/default.nix
Normal file
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
73
modules/home/editor/zed/default.nix
Normal file
73
modules/home/editor/zed/default.nix
Normal file
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
15
modules/home/game/minecraft/default.nix
Normal file
15
modules/home/game/minecraft/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
18
modules/nixos/editor/nvim/default.nix
Normal file
18
modules/nixos/editor/nvim/default.nix
Normal file
|
@ -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 {
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue