kaas
This commit is contained in:
parent
9aa634bd71
commit
3528e22c67
54 changed files with 380 additions and 1243 deletions
81
modules/home/application/chrome/default.nix
Normal file
81
modules/home/application/chrome/default.nix
Normal file
|
@ -0,0 +1,81 @@
|
|||
{ inputs, config, lib, pkgs, namespace, ... }:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
|
||||
cfg = config.${namespace}.application.chrome;
|
||||
in
|
||||
{
|
||||
options.${namespace}.application.chrome = {
|
||||
enable = mkEnableOption "enable chrome";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
chromium
|
||||
# (pkgs.ungoogled-chromium.override {
|
||||
# commandLineArgs = [
|
||||
# "--enable-features=AcceleratedVideoEncoder"
|
||||
# "--ignore-gpu-blocklist"
|
||||
# "--enable-zero-copy"
|
||||
# "--ozone-platform-hint=auto"
|
||||
# "--password-store=basic"
|
||||
# ];
|
||||
# })
|
||||
];
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
# enablePlasmaBrowserIntegration = true;
|
||||
extensions = let
|
||||
# create_extension_for = browserVersion: { id, sha256, version }: {
|
||||
# inherit id;
|
||||
# crxPath = fetchurl {
|
||||
# url = "https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion=${browserVersion}&x=id%3D${id}%26installsource%3Dondemand%26uc";
|
||||
# name = "${id}.crx";
|
||||
# inherit sha256;
|
||||
# };
|
||||
# inherit version;
|
||||
# };
|
||||
# create_extension = create_extension_for (lib.versions.major pkgs.ungoogled-chromium.version);
|
||||
in [
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # UBlock origin
|
||||
"mnjggcdmjocbbbhaepdhchncahnbgone" # Sponsor block
|
||||
"eimadpbcbfnmbkopoojfekhnkhdbieeh" # Dark reader
|
||||
"nngceckbapebfimnlniiiahkandclblb" # Bitwarden
|
||||
# (create_extension {
|
||||
# id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; # UBlock origin
|
||||
# sha256 = "sha256:1lnk0k8zy0w33cxpv93q1am0d7ds2na64zshvbwdnbjq8x4sw5p6";
|
||||
# version = "1.63.2";
|
||||
# })
|
||||
# (create_extension {
|
||||
# id = "mnjggcdmjocbbbhaepdhchncahnbgone"; # Sponsor block
|
||||
# sha265 = "";
|
||||
# version = "";
|
||||
# })
|
||||
# (create_extension {
|
||||
# id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; # Dark reader
|
||||
# sha265 = "";
|
||||
# version = "";
|
||||
# })
|
||||
# (create_extension {
|
||||
# id = "nngceckbapebfimnlniiiahkandclblb"; # Bitwarden
|
||||
# sha265 = "";
|
||||
# version = "";
|
||||
# })
|
||||
];
|
||||
# defaultSearchProviderEnabled = true;
|
||||
# defaultSearchProviderSearchURL = "https://duckduckgo.com?q={searchTerms}";
|
||||
# extraOpts = {
|
||||
# "ExtensionManifestV2Availability" = 2;
|
||||
# "BrowserSignin" = 0;
|
||||
# "SyncDisabled" = true;
|
||||
# "PasswordManagerEnabled" = false;
|
||||
# "SpellcheckEnabled" = true;
|
||||
# "SpellcheckLanguage" = [
|
||||
# "nl-NL"
|
||||
# "en-GB"
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{ 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;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ inputs, config, lib, pkgs, namespace, ... }:
|
||||
{ config, lib, pkgs, namespace, osConfig ? {}, ... }:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
|
||||
|
@ -16,16 +16,16 @@ in
|
|||
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
|
||||
'';
|
||||
};
|
||||
# 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;
|
||||
};
|
||||
|
|
|
@ -11,6 +11,6 @@ in
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [ onlyoffice-bin ];
|
||||
fonts.packages = with pkgs; [ corefonts ];
|
||||
# fonts.packages = with pkgs; [ corefonts ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -33,23 +33,23 @@ in
|
|||
};
|
||||
|
||||
# https://github.com/FeralInteractive/gamemode
|
||||
gamemode = {
|
||||
enable = true;
|
||||
enableRenice = true;
|
||||
settings = {};
|
||||
};
|
||||
# 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"];
|
||||
};
|
||||
# gamescope = {
|
||||
# enable = true;
|
||||
# capSysNice = true;
|
||||
# env = {
|
||||
# DXVK_HDR = "1";
|
||||
# ENABLE_GAMESCOPE_WSI = "1";
|
||||
# WINE_FULLSCREEN_FSR = "1";
|
||||
# WLR_RENDERER = "vulkan";
|
||||
# };
|
||||
# args = ["--hdr-enabled"];
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
47
modules/home/default.nix
Normal file
47
modules/home/default.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ pkgs, config, lib, namespace, ... }:
|
||||
let
|
||||
inherit (lib) mkOption;
|
||||
inherit (lib.types) enum;
|
||||
|
||||
cfg = config.${namespace}.defaults;
|
||||
in {
|
||||
options.${namespace}.defaults = {
|
||||
editor = mkOption {
|
||||
type = enum [ "nano" "nvim" "zed" ];
|
||||
default = "nano";
|
||||
description = "Default editor for text manipulation";
|
||||
example = "nvim";
|
||||
};
|
||||
|
||||
shell = mkOption {
|
||||
type = enum [ "fish" "zsh" "bash" ];
|
||||
default = "zsh";
|
||||
description = "Default shell";
|
||||
example = "zsh";
|
||||
};
|
||||
|
||||
terminal = mkOption {
|
||||
type = enum [ "ghostty" "alacritty" ];
|
||||
default = "ghostty";
|
||||
description = "Default terminal";
|
||||
example = "ghostty";
|
||||
};
|
||||
|
||||
browser = mkOption {
|
||||
type = enum [ "chrome" "ladybird" "zen" ];
|
||||
default = "zen";
|
||||
description = "Default terminal";
|
||||
example = "zen";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
home.sessionVariables = {
|
||||
EDITOR = cfg.editor;
|
||||
TERMINAL = cfg.terminal;
|
||||
BROWSER = cfg.browser;
|
||||
};
|
||||
|
||||
shell = pkgs.${cfg.shell};
|
||||
};
|
||||
}
|
15
modules/home/development/dotnet/default.nix
Normal file
15
modules/home/development/dotnet/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ config, lib, pkgs, namespace, ... }:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
cfg = config.${namespace}.development.dotnet;
|
||||
in
|
||||
{
|
||||
options.${namespace}.development.dotnet = {
|
||||
enable = mkEnableOption "Enable dotnet development tools";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [ dotnet-sdk_8 ];
|
||||
};
|
||||
}
|
15
modules/home/development/javascript/default.nix
Normal file
15
modules/home/development/javascript/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ config, lib, pkgs, namespace, ... }:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
cfg = config.${namespace}.development.javascript;
|
||||
in
|
||||
{
|
||||
options.${namespace}.development.javascript = {
|
||||
enable = mkEnableOption "Enable javascript development tools";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [ bun nodejs nodePackages_latest.typescript-language-server ];
|
||||
};
|
||||
}
|
15
modules/home/development/rust/default.nix
Normal file
15
modules/home/development/rust/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ config, lib, pkgs, namespace, ... }:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
cfg = config.${namespace}.development.rust;
|
||||
in
|
||||
{
|
||||
options.${namespace}.development.rust = {
|
||||
enable = mkEnableOption "Enable rust development tools";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
};
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
{ 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;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
|
@ -5,12 +5,16 @@ let
|
|||
cfg = config.${namespace}.editor.nvim;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.nvf.nixosModules.default
|
||||
];
|
||||
|
||||
options.${namespace}.editor.nvim = {
|
||||
enable = mkEnableOption "enable nvim via nvf on user level";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
home.packages = with pkgs; [
|
||||
imagemagick
|
||||
editorconfig-core-c
|
||||
sqlite
|
||||
|
|
|
@ -7,20 +7,10 @@ let
|
|||
in
|
||||
{
|
||||
options.${namespace}.shell = {
|
||||
default = mkOption {
|
||||
type = nullOr (enum ["fish" "zsh" "bash"]);
|
||||
default = null;
|
||||
description = "Default system shell";
|
||||
};
|
||||
|
||||
corePkgs.enable = mkEnableOption "core shell packages";
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
# (if (cfg.default != null) then {
|
||||
# shell = pkgs."${cfg.default}";
|
||||
# } else {})
|
||||
|
||||
(mkIf (cfg.corePkgs.enable) {
|
||||
${namespace}.shell.toolset = mkDefault {
|
||||
bat.enable = true;
|
||||
|
@ -52,4 +42,4 @@ in
|
|||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
43
modules/home/terminal/alacritty/default.nix
Normal file
43
modules/home/terminal/alacritty/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ config, lib, namespace, ... }:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
|
||||
cfg = config.${namespace}.terminal.alacritty;
|
||||
in
|
||||
{
|
||||
options.${namespace}.terminal.alacritty = {
|
||||
enable = mkEnableOption "enable alacritty";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
env = {
|
||||
TERM = "xterm-256color";
|
||||
WINIT_X11_SCALE_FACTOR = "1.0";
|
||||
};
|
||||
|
||||
window.dynamic_title = true;
|
||||
|
||||
scrolling = {
|
||||
history = 5000;
|
||||
multiplier = 3;
|
||||
};
|
||||
|
||||
selection = {
|
||||
semantic_escape_chars = '',│`|:"' ()[]{}<>'';
|
||||
save_to_clipboard = false;
|
||||
};
|
||||
|
||||
general.live_config_reload = true;
|
||||
|
||||
# terminal.shell = {
|
||||
# program = "${getExe pkgs.zsh}";
|
||||
# args = ["-l" "-c" "tmux new || tmux"];
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
24
modules/home/terminal/ghostty/default.nix
Normal file
24
modules/home/terminal/ghostty/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ config, lib, namespace, ... }:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
|
||||
cfg = config.${namespace}.terminal.ghostty;
|
||||
in
|
||||
{
|
||||
options.${namespace}.terminal.ghostty = {
|
||||
enable = mkEnableOption "enable ghostty";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
rograms.ghostty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background-blur-radius = 20;
|
||||
theme = "dark:stylix,light:stylix";
|
||||
window-theme = (config.${namespace}.themes.polarity or "dark");
|
||||
background-opacity = 0.8;
|
||||
minimum-contrast = 1.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -27,7 +27,7 @@ in
|
|||
({
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
|
||||
loader = {
|
||||
systemd-boot.enable = false;
|
||||
grub.enable = true;
|
||||
|
@ -38,8 +38,8 @@ in
|
|||
footer = true;
|
||||
};
|
||||
};
|
||||
|
||||
supportedFilesystems = [ "nfs" ]
|
||||
|
||||
supportedFilesystems = [ "nfs" ];
|
||||
};
|
||||
})
|
||||
|
||||
|
|
29
modules/nixos/services/security/vaultwarden/default.nix
Normal file
29
modules/nixos/services/security/vaultwarden/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, config, lib, namespace, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.${namespace}.services.security.vaultwarden;
|
||||
in
|
||||
{
|
||||
options.${namespace}.services.security.vaultwarden = {
|
||||
enable = mkEnableOption "enable vaultwarden";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
vaultwarden
|
||||
vaultwarden-postgresql
|
||||
];
|
||||
|
||||
services.vaultwarden = {
|
||||
enable = true;
|
||||
dbBackend = "postgresql";
|
||||
|
||||
config = {
|
||||
SIGNUPS_ALLOWED = false;
|
||||
DOMAIN = "https://passwords.kruining.eu";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue