i heard you liked modules so i
put modules in you r modules so you can mo dule while you mod ule
This commit is contained in:
parent
2d08836672
commit
8bac46929b
13 changed files with 274 additions and 83 deletions
|
|
@ -7,9 +7,11 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./defaults
|
||||
./development
|
||||
./terminal
|
||||
./desktop
|
||||
./misc
|
||||
./gaming
|
||||
];
|
||||
}
|
||||
|
|
|
|||
59
modules/defaults/default.nix
Normal file
59
modules/defaults/default.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
device = {
|
||||
type = {
|
||||
laptop = lib.mkEnableOption "laptop";
|
||||
desktop = lib.mkEnableOption "desktop";
|
||||
server = lib.mkEnableOption "server";
|
||||
};
|
||||
};
|
||||
};
|
||||
imports = [
|
||||
./laptop.nix
|
||||
./desktop.nix
|
||||
./server.nix
|
||||
];
|
||||
config = {
|
||||
development = lib.mkDefault {
|
||||
git.enable = true;
|
||||
};
|
||||
terminal = lib.mkDefault {
|
||||
ranger.enable = true;
|
||||
};
|
||||
misc = lib.mkDefault{
|
||||
bitwarden.enable = true;
|
||||
};
|
||||
syncthing = lib.mkDefault {
|
||||
devices = {
|
||||
marty-pc = {
|
||||
id = "6PJZD52-EEWIO7U-MZMJJ5B-33DGNSU-O7DJVRT-GAE7QZG-ZY3VIMV-VSMBDQP";
|
||||
autoAcceptFolder = true;
|
||||
};
|
||||
marty-server = {
|
||||
id = "UDMXEKZ-HYIFI5S-VAKE75O-K3C65QV-LS43QA5-3JTHWKL-CI5C3Y6-P4NSQQM";
|
||||
autoAcceptFolders = true;
|
||||
};
|
||||
marty-latitude = {
|
||||
id = "SOAWHKA-BCQGO5G-IJ24WTO-RDETP5M-LNTVO66-MHIOUU2-NNQ57P6-FFKNSA6";
|
||||
autoAcceptFolders = true;
|
||||
};
|
||||
marty-pixel = {
|
||||
id = "GSBXOGW-6SYLDUQ-HPH7FBJ-CKHWQIK-K5YORB4-CYKGYT6-DLCVSAK-LA2RMAK";
|
||||
autoAcceptFolders = true;
|
||||
};
|
||||
marty-fairphone = {
|
||||
id = "2ISVWQV-4USY5IA-2OU55CE-Q7VLPD7-4RVQ5WX-FXQSJMY-2ES4EZG-IGFB7QG";
|
||||
autoAcceptFolders = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
28
modules/defaults/desktop.nix
Normal file
28
modules/defaults/desktop.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.device.type.desktop {
|
||||
development = lib.mkDefault {
|
||||
vscodium.enable = true;
|
||||
};
|
||||
terminal = lib.mkDefault {
|
||||
kitty.enable = true;
|
||||
};
|
||||
desktop = lib.mkDefault {
|
||||
hyprland = {
|
||||
enable = true;
|
||||
numlock = true;
|
||||
};
|
||||
waybar.enable = true;
|
||||
walker.enable = true;
|
||||
wallpaper.enable = true;
|
||||
grimblast.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
30
modules/defaults/laptop.nix
Normal file
30
modules/defaults/laptop.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.device.type.laptop {
|
||||
home.packages = with pkgs; [
|
||||
light
|
||||
];
|
||||
development = lib.mkDefault {
|
||||
vscodium.enable = true;
|
||||
};
|
||||
terminal = lib.mkDefault {
|
||||
kitty.enable = true;
|
||||
};
|
||||
desktop = lib.mkDefault {
|
||||
hyprland = {
|
||||
enable = true;
|
||||
};
|
||||
waybar.enable = true;
|
||||
walker.enable = true;
|
||||
wallpaper.enable = true;
|
||||
grimblast.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
11
modules/defaults/server.nix
Normal file
11
modules/defaults/server.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -16,6 +16,25 @@
|
|||
];
|
||||
description = ''declare monitors'';
|
||||
};
|
||||
workspaces = {
|
||||
workspaces = lib.mkOption {
|
||||
default = (
|
||||
builtins.concatLists (builtins.genList (i:
|
||||
let ws = i + 1;
|
||||
in [
|
||||
"name:${toString i},,persistent:true"
|
||||
]
|
||||
)
|
||||
config.desktop.hyprland.workspaces.amount)
|
||||
)
|
||||
;
|
||||
description = ''declare workspace'';
|
||||
};
|
||||
amount = lib.mkOption {
|
||||
default = 9;
|
||||
description = ''declare workspace amount'';
|
||||
};
|
||||
};
|
||||
numlock = lib.mkEnableOption "numlock by default";
|
||||
};
|
||||
};
|
||||
|
|
@ -36,6 +55,7 @@
|
|||
enable = true;
|
||||
settings = {
|
||||
monitor = config.desktop.hyprland.monitors;
|
||||
workspace = config.desktop.hyprland.workspaces.workspaces;
|
||||
exec-once = [
|
||||
(lib.mkIf (config.desktop.walker.enable) "elephant")
|
||||
(lib.mkIf (config.desktop.waybar.enable) "waybar")
|
||||
|
|
@ -43,7 +63,9 @@
|
|||
];
|
||||
"$mod" = "SUPER";
|
||||
"$shiftmod" = "SUPER_SHIFT";
|
||||
"$controlmod" = "SUPER_CTRL";
|
||||
bind = [
|
||||
|
||||
(lib.mkIf (config.desktop.walker.enable) "$mod, D, exec, walker")
|
||||
(lib.mkIf (config.desktop.rofi.enable) "$mod, D, exec, rofi -show drun")
|
||||
(lib.mkIf (config.terminal.kitty.enable) "$mod, return, exec, kitty")
|
||||
|
|
@ -53,6 +75,46 @@
|
|||
"$mod, F, fullscreen, 1"
|
||||
"$shiftmod, F, fullscreen, 0"
|
||||
"$shiftmod, Q, killactive,"
|
||||
"$mod, S, togglespecialworkspace, magic"
|
||||
"$shiftmod, S, movetoworkspace, special:magic"
|
||||
"$controlmod, right, workspace, m-1"
|
||||
"$controlmod, left, workspace, m+1"
|
||||
"$mod, mouse_down, workspace, m-1"
|
||||
"$mod, mouse_up, workspace, m+1"
|
||||
"$mod, left, movefocus, l"
|
||||
"$mod, right, movefocus, r"
|
||||
"$mod, up, movefocus, u"
|
||||
"$mod, down, movefocus, d"
|
||||
"$mod, J, exec, playerctl previous"
|
||||
"$mod, K, exec, playerctl play-pause"
|
||||
"$mod, L, exec, playerctl, next"
|
||||
"$mod, G, togglefloating,"
|
||||
"$mod, F1, exec, hyprlock"
|
||||
"$shiftmod, E, exec, codium"
|
||||
"$controlmod, up, exec, light -A 10"
|
||||
"$controlmod, down, exec, light -U 10"
|
||||
"$controlmod, Q, exec, hyprctl kill"
|
||||
]
|
||||
++ (
|
||||
builtins.concatLists (builtins.genList (i:
|
||||
let ws = i + 1;
|
||||
in [
|
||||
"$mod, code:1${toString i}, workspace, ${toString ws}"
|
||||
"$shiftmod, code:1${toString i}, movetoworkspacesilent, ${toString ws}"
|
||||
]
|
||||
)
|
||||
config.desktop.hyprland.workspaces.amount)
|
||||
)
|
||||
;
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
binde = [
|
||||
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
];
|
||||
bindl = [
|
||||
",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
];
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
|
|
|
|||
13
modules/gaming/default.nix
Normal file
13
modules/gaming/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./steam.nix
|
||||
|
||||
];
|
||||
}
|
||||
18
modules/gaming/steam.nix
Normal file
18
modules/gaming/steam.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
gaming = {
|
||||
steam.enable = lib.mkEnableOption "enable steam";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.gaming.steam.enable {
|
||||
home.packages = with pkgs; [steam];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue