Begin stabilize system module

This commit is contained in:
Florian RICHER 2024-05-25 23:51:37 +02:00
parent edcbfaf379
commit 6163188786
24 changed files with 63 additions and 59 deletions

View file

@ -0,0 +1,32 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.modules.desktop.chromium;
in
{
options.modules.desktop.chromium = {
enable = mkEnableOption ''
Enable chromium with my custom configurations
'';
};
config = mkIf cfg.enable {
programs.chromium = {
enable = true;
package = pkgs.chromium.override {
enableWideVine = true; # Enable DRM
};
extensions = [
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # Ublock Origin
{ id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden
{ id = "fnaicdffflnofjppbagibeoednhnbjhg"; } # Floccus Bookmark manager
{ id = "fihnjjcciajhdojfnbdddfaoknhalnja"; } # I don't care about cookies
{ id = "cimiefiiaegbelhefglklhhakcgmhkai"; } # Plasma Integration
{ id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; } # Dark reader
{ id = "mnjggcdmjocbbbhaepdhchncahnbgone"; } # SponsorBlock
];
};
};
}

11
modules/home/default.nix Normal file
View file

@ -0,0 +1,11 @@
{ config, pkgs, ... }:
{
imports = [
./chromium
./flatpak
./jetbrainsToolbox
./kitty
./vscode
];
}

View file

@ -0,0 +1,43 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.modules.desktop.flatpak;
in
{
options.modules.desktop.flatpak = {
enable = mkEnableOption ''
Enable flatpak with my custom configurations
'';
};
config = mkIf cfg.enable {
imports = [ nix-flatpak.homeManagerModules.nix-flatpak ];
services.flatpak = {
enable = true;
update.onActivation = true;
packages = [
# Gaming
{ appId = "com.discordapp.Discord"; origin = "flathub"; }
{ appId = "com.valvesoftware.Steam"; origin = "flathub"; }
{ appId = "net.lutris.Lutris"; origin = "flathub"; }
# Pro
{ appId = "com.slack.Slack"; origin = "flathub"; }
{ appId = "com.skype.Client"; origin = "flathub"; }
{ appId = "org.mozilla.Thunderbird"; origin = "flathub"; }
{ appId = "ch.protonmail.protonmail-bridge"; origin = "flathub"; }
{ appId = "org.kde.neochat"; origin = "flathub"; }
# Loisir
{ appId = "com.spotify.Client"; origin = "flathub"; }
{ appId = "io.gitlab.news_flash.NewsFlash"; origin = "flathub"; }
{ appId = "org.videolan.VLC"; origin = "flathub"; }
{ appId = "com.obsproject.Studio"; origin = "flathub"; }
{ appId = "io.github.achetagames.epic_asset_manager"; origin = "flathub"; }
];
};
};
}

View file

@ -0,0 +1,16 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.modules.desktop.jetbrainsToolbox;
in
{
options.modules.desktop.jetbrainsToolbox = {
enable = mkEnableOption ''
Enable jetbrainsToolbox with my custom configurations
'';
};
config = mkIf cfg.enable {
home.packages = with pkgs; [jetbrains-toolbox];
};
}

View file

@ -0,0 +1,45 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.modules.desktop.kitty;
in
{
options.modules.desktop.kitty = {
enable = mkEnableOption ''
Enable kitty with my custom configurations
'';
enableBlur = mkOption {
default = !config.desktop.hyprland.enable; # Disable by default if hyprland is enabled (Hyprland enable own blur)
example = true;
description = ''
Enable blur (Usefull to disable with hyprland)
'';
type = types.bool;
};
};
config = mkIf cfg.enable {
programs.kitty = {
enable = true;
font = {
name = "FiraCode Nerd Font";
package = pkgs.fira-code-nerdfont;
};
settings = lib.mkMerge [
{
disable_ligatures = "never";
sync_to_monitor = "yes"; # Avoid to update a lot
confirm_os_window_close = 0; # Disable close confirmation
background_opacity = "0.7";
}
(lib.mkIf cfg.enableBlur { background_blur = "1"; })
(lib.mkIf config.programs.zsh.enable { shell = "zsh"; })
];
};
};
}

View file

@ -0,0 +1,47 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.modules.home.vscode;
in
{
options.modules.home.vscode = {
enable = mkEnableOption ''
Enable vscode with my custom configurations
'';
};
config = mkIf cfg.enable {
programs.vscode = {
enable = true;
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
userSettings = {
"files.autoSave" = "onFocusChange";
"emmet.includeLanguages" = {
"phoenix-heex" = "html";
};
"git.autofetch" = true;
};
userTasks = {};
extensions = with pkgs; with vscode-extensions; [
# Nix
bbenoist.nix
# Rust
rust-lang.rust-analyzer
serayuzgur.crates
tamasfe.even-better-toml
# Phoenix
phoenixframework.phoenix
elixir-lsp.vscode-elixir-ls
# Ruby
shopify.ruby-lsp
];
};
};
}