Finish migrate all hosts conf
This commit is contained in:
parent
0aa0f2eb80
commit
d0e303d0f9
23 changed files with 348 additions and 2476 deletions
59
TODO
59
TODO
|
@ -1,59 +0,0 @@
|
|||
# Preparation integration server (Re-structuration configs)
|
||||
|
||||
home/
|
||||
----> alacritty
|
||||
----> chromium
|
||||
----> direnv
|
||||
----> emacs
|
||||
----> flatpak
|
||||
----> git
|
||||
----> default
|
||||
|
||||
======> hosts -> rename to machines
|
||||
machines/
|
||||
----> machine1/
|
||||
------------> hardware-configuration.nix
|
||||
------------> system.nix
|
||||
------------> home.nix
|
||||
----> machine2/
|
||||
------------> hardware-configuration.nix
|
||||
------------> system.nix
|
||||
------------> home.nix
|
||||
|
||||
======> modules -> rename to system
|
||||
system/
|
||||
----> server/
|
||||
------------> ssh
|
||||
------------> openvscode
|
||||
------------> docker
|
||||
----> graphics/
|
||||
------------> plasma
|
||||
------------> gnome
|
||||
------------> hyprland
|
||||
----> devices/
|
||||
------------> print-support
|
||||
------------> bluetooth
|
||||
------------> nvidia
|
||||
----> modules/
|
||||
------------> plymouth
|
||||
|
||||
secrets/ (In separate repo ? submodules ?)
|
||||
----> service1_secrets
|
||||
----> service2_secrets
|
||||
|
||||
pkgs/
|
||||
overlays/
|
||||
|
||||
How work WSL ?
|
||||
How work Darwin ?
|
||||
How work Nix only system (Not nixos) ?
|
||||
How work disko ?
|
||||
Separate explicitly config and basic usage ?
|
||||
|
||||
# SSH
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
|
||||
authorizedKeysFiles = [key1 key2 key3]; # From agenix
|
||||
}
|
|
@ -1,21 +1,6 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./programs/agenix.nix
|
||||
./programs/shell.nix
|
||||
./programs/atuin.nix
|
||||
./programs/git.nix
|
||||
# ./programs/emacs.nix
|
||||
./programs/jetbrains-toolbox.nix
|
||||
./programs/vscode.nix
|
||||
./programs/direnv.nix
|
||||
./programs/chromium.nix
|
||||
./programs/flatpak.nix
|
||||
|
||||
./homePrograms
|
||||
];
|
||||
|
||||
home = {
|
||||
username = "florian";
|
||||
homeDirectory = "/home/florian";
|
||||
|
@ -26,6 +11,4 @@
|
|||
programs.home-manager.enable = true;
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
homePrograms.kitty.enable = true;
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./kitty.nix
|
||||
./zsh
|
||||
];
|
||||
}
|
|
@ -1,225 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.homePrograms.hyprland = {
|
||||
enable = mkEnableOption ''
|
||||
Enable hyprland with my custom configurations
|
||||
'';
|
||||
};
|
||||
config =
|
||||
let
|
||||
cfg = config.homePrograms.hyprland;
|
||||
|
||||
set_volume = pkgs.writeScriptBin "set_volume.sh" ''
|
||||
#!${pkgs.runtimeShell}
|
||||
pactl set-sink-volume @DEFAULT_SINK@ $1 && $send_volume_notif notify-send "Volume" -h int:value:"$(pactl get-sink-volume @DEFAULT_SINK@ | cut -d ' ' -f6 | cut -d '%' -f1)"
|
||||
'';
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
homePrograms.kitty.enable = true; # Required
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
exec-once = [
|
||||
"dunst -conf ~/.config/hypr/dunstrc"
|
||||
"~/.config/hypr/eww/scripts/start"
|
||||
"~/.config/hypr/swww/start"
|
||||
|
||||
# Keyring daemon
|
||||
"gnome-keyring-daemon --start --components=gpg"
|
||||
"gnome-keyring-daemon --start --components=secrets"
|
||||
"gnome-keyring-daemon --start --components=ssh"
|
||||
"gnome-keyring-daemon --start --components=pkcs11"
|
||||
|
||||
"/usr/libexec/kf5/polkit-kde-authentication-agent-1"
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
];
|
||||
|
||||
env = "XCURSOR_SIZE,24";
|
||||
|
||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||
input = {
|
||||
kb_layout = config.services.xserver.xkb.layout;
|
||||
kb_variant = config.services.xserver.xkb.variant;
|
||||
kb_model = "";
|
||||
kb_options = "";
|
||||
kb_rules = "";
|
||||
|
||||
follow_mouse = 1;
|
||||
numlock_by_default = 1;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = "no";
|
||||
disable_while_typing = "yes";
|
||||
tap-to-click = "yes";
|
||||
};
|
||||
|
||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 20;
|
||||
border_size = 3;
|
||||
col.active_border = "rgb()";
|
||||
col.inactive_border = "rgb()";
|
||||
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
};
|
||||
|
||||
drop_shadow = "yes";
|
||||
shadow_range = 15;
|
||||
shadow_render_power = 4;
|
||||
col.shadow = "rgb()";
|
||||
col.shadow_inactive = "rgb()";
|
||||
};
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
animations = {
|
||||
enabled = "yes";
|
||||
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
dwindle = {
|
||||
pseudotile = "yes"; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = "yes"; # you probably want this
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
master = {
|
||||
new_is_master = "true";
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
gestures = {
|
||||
workspace_swipe = "on";
|
||||
workspace_swipe_forever = "on";
|
||||
};
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
||||
"device:epic-mouse-v1" = {
|
||||
sensitivity = "-0.5";
|
||||
};
|
||||
|
||||
"$mod" = "SUPER";
|
||||
|
||||
bind = [
|
||||
"SUPERSHIFT,R,hyprload,reload"
|
||||
"SUPERSHIFT,U,hyprload,update"
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
"$mainMod, RETURN, exec, kitty"
|
||||
"$mainMod, C, killactive,"
|
||||
"$mainMod SHIFT, C, exec, hyprpicker -a -f hex"
|
||||
"$mainMod SHIFT, Q, exit,"
|
||||
"$mainMod, E, exec, nautilus"
|
||||
"$mainMod, V, togglefloating,"
|
||||
"$mainMod, F, fullscreen, 0"
|
||||
"$mainMod, D, exec, wofi -i -s ~/.config/hypr/wofi/style.css --show drun"
|
||||
"$mainMod, P, pseudo," # dwindle
|
||||
"$mainMod, B, togglesplit," # dwindle
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"$mainMod, h, movefocus, l"
|
||||
"$mainMod, l, movefocus, r"
|
||||
"$mainMod, j, movefocus, u"
|
||||
"$mainMod, k, movefocus, d"
|
||||
|
||||
"$mainMod SHIFT_L, h, movewindow, l"
|
||||
"$mainMod SHIFT_L, l, movewindow, r"
|
||||
"$mainMod SHIFT_L, j, movewindow, u"
|
||||
"$mainMod SHIFT_L, k, movewindow, d"
|
||||
|
||||
"$mainMod ALT_L, v, exec, dunstctl context"
|
||||
"$mainMod ALT_L, c, exec, dunstctl close-all"
|
||||
"$mainMod ALT_L, x, exec, dunstctl close"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$mainMod, 1, split-workspace, 1"
|
||||
"$mainMod, 2, split-workspace, 2"
|
||||
"$mainMod, 3, split-workspace, 3"
|
||||
"$mainMod, 4, split-workspace, 4"
|
||||
"$mainMod, 5, split-workspace, 5"
|
||||
"$mainMod, 6, split-workspace, 6"
|
||||
"$mainMod, 7, split-workspace, 7"
|
||||
"$mainMod, 8, split-workspace, 8"
|
||||
"$mainMod, 9, split-workspace, 9"
|
||||
"$mainMod, 0, split-workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mainMod SHIFT, 1, split-movetoworkspace, 1"
|
||||
"$mainMod SHIFT, 2, split-movetoworkspace, 2"
|
||||
"$mainMod SHIFT, 3, split-movetoworkspace, 3"
|
||||
"$mainMod SHIFT, 4, split-movetoworkspace, 4"
|
||||
"$mainMod SHIFT, 5, split-movetoworkspace, 5"
|
||||
"$mainMod SHIFT, 6, split-movetoworkspace, 6"
|
||||
"$mainMod SHIFT, 7, split-movetoworkspace, 7"
|
||||
"$mainMod SHIFT, 8, split-movetoworkspace, 8"
|
||||
"$mainMod SHIFT, 9, split-movetoworkspace, 9"
|
||||
"$mainMod SHIFT, 0, split-movetoworkspace, 10"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"$mainMod, mouse_down, workspace, e+1"
|
||||
"$mainMod, mouse_up, workspace, e-1"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
binde = [
|
||||
"$mainMod CTRL_L, h, resizeactive, -50 0"
|
||||
"$mainMod CTRL_L, l, resizeactive, 50 0"
|
||||
"$mainMod CTRL_L, j, resizeactive, 0 -50"
|
||||
"$mainMod CTRL_L, k, resizeactive, 0 50"
|
||||
|
||||
# Use pactl to adjust volume in PulseAudio.
|
||||
", XF86AudioRaiseVolume, exec, ${set_volume} \"+5%\""
|
||||
", XF86AudioLowerVolume, exec, ${set_volume} \"-5%\""
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||||
", XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle"
|
||||
|
||||
# Media player controls
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
", XF86AudioPause, exec, playerctl play-pause"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
|
||||
# Screen brightness controls
|
||||
", XF86MonBrightnessUp, exec, xbacklight -inc 5"
|
||||
", XF86MonBrightnessDown, exec, xbacklight -dec 5"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.homePrograms.kitty = {
|
||||
enable = mkEnableOption ''
|
||||
Enable kitty with my custom configurations
|
||||
'';
|
||||
|
||||
enableBlur = mkOption {
|
||||
default = !config.homePrograms.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 =
|
||||
let
|
||||
cfg = config.homePrograms.kitty;
|
||||
in
|
||||
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"; })
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.homePrograms.zsh = {
|
||||
enable = mkEnableOption ''
|
||||
Enable zsh with my custom configurations
|
||||
'';
|
||||
};
|
||||
config =
|
||||
let
|
||||
cfg = config.homePrograms.zsh;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
initExtra = ''
|
||||
[[ ! -f ${./p10k.zsh} ]] || source ${./p10k.zsh}
|
||||
'';
|
||||
|
||||
plugins = with pkgs; [
|
||||
{
|
||||
file = "powerlevel10k.zsh-theme";
|
||||
name = "powerlevel10k";
|
||||
src = "${zsh-powerlevel10k}/share/zsh-powerlevel10k";
|
||||
}
|
||||
{
|
||||
file = "p10k.zsh";
|
||||
name = "powerlevel10k-config";
|
||||
src = zsh-powerlevel10k;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,7 +0,0 @@
|
|||
{ pkgs, agenix, ... }:
|
||||
|
||||
{
|
||||
home.packages = [
|
||||
agenix.packages."${pkgs.system}".default
|
||||
];
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.atuin = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Uncomment this to use your instance
|
||||
# sync_address = "https://majiy00-shell.fly.dev";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
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
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.direnv.enable = true;
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{ config, pkgs, nix-flatpak, ... }:
|
||||
|
||||
{
|
||||
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"; }
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Florian RICHER";
|
||||
userEmail = "florian.richer@protonmail.com";
|
||||
|
||||
# signing.signByDefault = true;
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [jetbrains-toolbox];
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{ config, pkgs, users, ... }:
|
||||
|
||||
{
|
||||
homePrograms.zsh.enable = true;
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
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
|
||||
];
|
||||
};
|
||||
}
|
32
modules/desktop/chromium/default.nix
Normal file
32
modules/desktop/chromium/default.nix
Normal 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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./chromium
|
||||
./flatpak
|
||||
./hyprland
|
||||
./jetbrains-toolbox
|
||||
./kitty
|
||||
./vscode
|
||||
];
|
||||
}
|
43
modules/desktop/flatpak/default.nix
Normal file
43
modules/desktop/flatpak/default.nix
Normal 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"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,225 +1,225 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.hyprland;
|
||||
|
||||
set_volume = pkgs.writeScriptBin "set_volume.sh" ''
|
||||
#!${pkgs.runtimeShell}
|
||||
pactl set-sink-volume @DEFAULT_SINK@ $1 && $send_volume_notif notify-send "Volume" -h int:value:"$(pactl get-sink-volume @DEFAULT_SINK@ | cut -d ' ' -f6 | cut -d '%' -f1)"
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.homePrograms.hyprland = {
|
||||
options.modules.desktop.hyprland = {
|
||||
enable = mkEnableOption ''
|
||||
Enable hyprland with my custom configurations
|
||||
'';
|
||||
};
|
||||
config =
|
||||
let
|
||||
cfg = config.homePrograms.hyprland;
|
||||
config = mkIf cfg.enable {
|
||||
modules.desktop.kitty.enable = true;
|
||||
|
||||
set_volume = pkgs.writeScriptBin "set_volume.sh" ''
|
||||
#!${pkgs.runtimeShell}
|
||||
pactl set-sink-volume @DEFAULT_SINK@ $1 && $send_volume_notif notify-send "Volume" -h int:value:"$(pactl get-sink-volume @DEFAULT_SINK@ | cut -d ' ' -f6 | cut -d '%' -f1)"
|
||||
'';
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
homePrograms.kitty.enable = true; # Required
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = {
|
||||
exec-once = [
|
||||
"dunst -conf ~/.config/hypr/dunstrc"
|
||||
"~/.config/hypr/eww/scripts/start"
|
||||
"~/.config/hypr/swww/start"
|
||||
|
||||
settings = {
|
||||
exec-once = [
|
||||
"dunst -conf ~/.config/hypr/dunstrc"
|
||||
"~/.config/hypr/eww/scripts/start"
|
||||
"~/.config/hypr/swww/start"
|
||||
# Keyring daemon
|
||||
"gnome-keyring-daemon --start --components=gpg"
|
||||
"gnome-keyring-daemon --start --components=secrets"
|
||||
"gnome-keyring-daemon --start --components=ssh"
|
||||
"gnome-keyring-daemon --start --components=pkcs11"
|
||||
|
||||
# Keyring daemon
|
||||
"gnome-keyring-daemon --start --components=gpg"
|
||||
"gnome-keyring-daemon --start --components=secrets"
|
||||
"gnome-keyring-daemon --start --components=ssh"
|
||||
"gnome-keyring-daemon --start --components=pkcs11"
|
||||
"/usr/libexec/kf5/polkit-kde-authentication-agent-1"
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
];
|
||||
|
||||
"/usr/libexec/kf5/polkit-kde-authentication-agent-1"
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
];
|
||||
env = "XCURSOR_SIZE,24";
|
||||
|
||||
env = "XCURSOR_SIZE,24";
|
||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||
input = {
|
||||
kb_layout = config.services.xserver.xkb.layout;
|
||||
kb_variant = config.services.xserver.xkb.variant;
|
||||
kb_model = "";
|
||||
kb_options = "";
|
||||
kb_rules = "";
|
||||
|
||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||
input = {
|
||||
kb_layout = config.services.xserver.xkb.layout;
|
||||
kb_variant = config.services.xserver.xkb.variant;
|
||||
kb_model = "";
|
||||
kb_options = "";
|
||||
kb_rules = "";
|
||||
follow_mouse = 1;
|
||||
numlock_by_default = 1;
|
||||
|
||||
follow_mouse = 1;
|
||||
numlock_by_default = 1;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = "no";
|
||||
disable_while_typing = "yes";
|
||||
tap-to-click = "yes";
|
||||
};
|
||||
|
||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 20;
|
||||
border_size = 3;
|
||||
col.active_border = "rgb()";
|
||||
col.inactive_border = "rgb()";
|
||||
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
};
|
||||
|
||||
drop_shadow = "yes";
|
||||
shadow_range = 15;
|
||||
shadow_render_power = 4;
|
||||
col.shadow = "rgb()";
|
||||
col.shadow_inactive = "rgb()";
|
||||
};
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
animations = {
|
||||
enabled = "yes";
|
||||
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
dwindle = {
|
||||
pseudotile = "yes"; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = "yes"; # you probably want this
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
master = {
|
||||
new_is_master = "true";
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
gestures = {
|
||||
workspace_swipe = "on";
|
||||
workspace_swipe_forever = "on";
|
||||
};
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
||||
"device:epic-mouse-v1" = {
|
||||
sensitivity = "-0.5";
|
||||
};
|
||||
|
||||
"$mod" = "SUPER";
|
||||
|
||||
bind = [
|
||||
"SUPERSHIFT,R,hyprload,reload"
|
||||
"SUPERSHIFT,U,hyprload,update"
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
"$mainMod, RETURN, exec, kitty"
|
||||
"$mainMod, C, killactive,"
|
||||
"$mainMod SHIFT, C, exec, hyprpicker -a -f hex"
|
||||
"$mainMod SHIFT, Q, exit,"
|
||||
"$mainMod, E, exec, nautilus"
|
||||
"$mainMod, V, togglefloating,"
|
||||
"$mainMod, F, fullscreen, 0"
|
||||
"$mainMod, D, exec, wofi -i -s ~/.config/hypr/wofi/style.css --show drun"
|
||||
"$mainMod, P, pseudo," # dwindle
|
||||
"$mainMod, B, togglesplit," # dwindle
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"$mainMod, h, movefocus, l"
|
||||
"$mainMod, l, movefocus, r"
|
||||
"$mainMod, j, movefocus, u"
|
||||
"$mainMod, k, movefocus, d"
|
||||
|
||||
"$mainMod SHIFT_L, h, movewindow, l"
|
||||
"$mainMod SHIFT_L, l, movewindow, r"
|
||||
"$mainMod SHIFT_L, j, movewindow, u"
|
||||
"$mainMod SHIFT_L, k, movewindow, d"
|
||||
|
||||
"$mainMod ALT_L, v, exec, dunstctl context"
|
||||
"$mainMod ALT_L, c, exec, dunstctl close-all"
|
||||
"$mainMod ALT_L, x, exec, dunstctl close"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$mainMod, 1, split-workspace, 1"
|
||||
"$mainMod, 2, split-workspace, 2"
|
||||
"$mainMod, 3, split-workspace, 3"
|
||||
"$mainMod, 4, split-workspace, 4"
|
||||
"$mainMod, 5, split-workspace, 5"
|
||||
"$mainMod, 6, split-workspace, 6"
|
||||
"$mainMod, 7, split-workspace, 7"
|
||||
"$mainMod, 8, split-workspace, 8"
|
||||
"$mainMod, 9, split-workspace, 9"
|
||||
"$mainMod, 0, split-workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mainMod SHIFT, 1, split-movetoworkspace, 1"
|
||||
"$mainMod SHIFT, 2, split-movetoworkspace, 2"
|
||||
"$mainMod SHIFT, 3, split-movetoworkspace, 3"
|
||||
"$mainMod SHIFT, 4, split-movetoworkspace, 4"
|
||||
"$mainMod SHIFT, 5, split-movetoworkspace, 5"
|
||||
"$mainMod SHIFT, 6, split-movetoworkspace, 6"
|
||||
"$mainMod SHIFT, 7, split-movetoworkspace, 7"
|
||||
"$mainMod SHIFT, 8, split-movetoworkspace, 8"
|
||||
"$mainMod SHIFT, 9, split-movetoworkspace, 9"
|
||||
"$mainMod SHIFT, 0, split-movetoworkspace, 10"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"$mainMod, mouse_down, workspace, e+1"
|
||||
"$mainMod, mouse_up, workspace, e-1"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
binde = [
|
||||
"$mainMod CTRL_L, h, resizeactive, -50 0"
|
||||
"$mainMod CTRL_L, l, resizeactive, 50 0"
|
||||
"$mainMod CTRL_L, j, resizeactive, 0 -50"
|
||||
"$mainMod CTRL_L, k, resizeactive, 0 50"
|
||||
|
||||
# Use pactl to adjust volume in PulseAudio.
|
||||
", XF86AudioRaiseVolume, exec, ${set_volume} \"+5%\""
|
||||
", XF86AudioLowerVolume, exec, ${set_volume} \"-5%\""
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||||
", XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle"
|
||||
|
||||
# Media player controls
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
", XF86AudioPause, exec, playerctl play-pause"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
|
||||
# Screen brightness controls
|
||||
", XF86MonBrightnessUp, exec, xbacklight -inc 5"
|
||||
", XF86MonBrightnessDown, exec, xbacklight -dec 5"
|
||||
];
|
||||
touchpad = {
|
||||
natural_scroll = "no";
|
||||
disable_while_typing = "yes";
|
||||
tap-to-click = "yes";
|
||||
};
|
||||
|
||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 20;
|
||||
border_size = 3;
|
||||
col.active_border = "rgb()";
|
||||
col.inactive_border = "rgb()";
|
||||
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
};
|
||||
|
||||
drop_shadow = "yes";
|
||||
shadow_range = 15;
|
||||
shadow_render_power = 4;
|
||||
col.shadow = "rgb()";
|
||||
col.shadow_inactive = "rgb()";
|
||||
};
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
animations = {
|
||||
enabled = "yes";
|
||||
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
dwindle = {
|
||||
pseudotile = "yes"; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = "yes"; # you probably want this
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
master = {
|
||||
new_is_master = "true";
|
||||
};
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
gestures = {
|
||||
workspace_swipe = "on";
|
||||
workspace_swipe_forever = "on";
|
||||
};
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
||||
"device:epic-mouse-v1" = {
|
||||
sensitivity = "-0.5";
|
||||
};
|
||||
|
||||
"$mod" = "SUPER";
|
||||
|
||||
bind = [
|
||||
"SUPERSHIFT,R,hyprload,reload"
|
||||
"SUPERSHIFT,U,hyprload,update"
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
"$mainMod, RETURN, exec, kitty"
|
||||
"$mainMod, C, killactive,"
|
||||
"$mainMod SHIFT, C, exec, hyprpicker -a -f hex"
|
||||
"$mainMod SHIFT, Q, exit,"
|
||||
"$mainMod, E, exec, nautilus"
|
||||
"$mainMod, V, togglefloating,"
|
||||
"$mainMod, F, fullscreen, 0"
|
||||
"$mainMod, D, exec, wofi -i -s ~/.config/hypr/wofi/style.css --show drun"
|
||||
"$mainMod, P, pseudo," # dwindle
|
||||
"$mainMod, B, togglesplit," # dwindle
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"$mainMod, h, movefocus, l"
|
||||
"$mainMod, l, movefocus, r"
|
||||
"$mainMod, j, movefocus, u"
|
||||
"$mainMod, k, movefocus, d"
|
||||
|
||||
"$mainMod SHIFT_L, h, movewindow, l"
|
||||
"$mainMod SHIFT_L, l, movewindow, r"
|
||||
"$mainMod SHIFT_L, j, movewindow, u"
|
||||
"$mainMod SHIFT_L, k, movewindow, d"
|
||||
|
||||
"$mainMod ALT_L, v, exec, dunstctl context"
|
||||
"$mainMod ALT_L, c, exec, dunstctl close-all"
|
||||
"$mainMod ALT_L, x, exec, dunstctl close"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$mainMod, 1, split-workspace, 1"
|
||||
"$mainMod, 2, split-workspace, 2"
|
||||
"$mainMod, 3, split-workspace, 3"
|
||||
"$mainMod, 4, split-workspace, 4"
|
||||
"$mainMod, 5, split-workspace, 5"
|
||||
"$mainMod, 6, split-workspace, 6"
|
||||
"$mainMod, 7, split-workspace, 7"
|
||||
"$mainMod, 8, split-workspace, 8"
|
||||
"$mainMod, 9, split-workspace, 9"
|
||||
"$mainMod, 0, split-workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mainMod SHIFT, 1, split-movetoworkspace, 1"
|
||||
"$mainMod SHIFT, 2, split-movetoworkspace, 2"
|
||||
"$mainMod SHIFT, 3, split-movetoworkspace, 3"
|
||||
"$mainMod SHIFT, 4, split-movetoworkspace, 4"
|
||||
"$mainMod SHIFT, 5, split-movetoworkspace, 5"
|
||||
"$mainMod SHIFT, 6, split-movetoworkspace, 6"
|
||||
"$mainMod SHIFT, 7, split-movetoworkspace, 7"
|
||||
"$mainMod SHIFT, 8, split-movetoworkspace, 8"
|
||||
"$mainMod SHIFT, 9, split-movetoworkspace, 9"
|
||||
"$mainMod SHIFT, 0, split-movetoworkspace, 10"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"$mainMod, mouse_down, workspace, e+1"
|
||||
"$mainMod, mouse_up, workspace, e-1"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
binde = [
|
||||
"$mainMod CTRL_L, h, resizeactive, -50 0"
|
||||
"$mainMod CTRL_L, l, resizeactive, 50 0"
|
||||
"$mainMod CTRL_L, j, resizeactive, 0 -50"
|
||||
"$mainMod CTRL_L, k, resizeactive, 0 50"
|
||||
|
||||
# Use pactl to adjust volume in PulseAudio.
|
||||
", XF86AudioRaiseVolume, exec, ${set_volume} \"+5%\""
|
||||
", XF86AudioLowerVolume, exec, ${set_volume} \"-5%\""
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||||
", XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle"
|
||||
|
||||
# Media player controls
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
", XF86AudioPause, exec, playerctl play-pause"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
|
||||
# Screen brightness controls
|
||||
", XF86MonBrightnessUp, exec, xbacklight -inc 5"
|
||||
", XF86MonBrightnessDown, exec, xbacklight -dec 5"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
16
modules/desktop/jetbrains-toolbox/default.nix
Normal file
16
modules/desktop/jetbrains-toolbox/default.nix
Normal 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];
|
||||
};
|
||||
}
|
47
modules/desktop/vscode/default.nix
Normal file
47
modules/desktop/vscode/default.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.vscode;
|
||||
in
|
||||
{
|
||||
options.modules.desktop.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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue