perf: Home-manager to module
feat: Optionise config
This commit is contained in:
7
user/chest/home.nix
Normal file
7
user/chest/home.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ pkgs, pkgs-stable, ... }: {
|
||||
disabledModules = [ ../../modules/user/packages/coding.nix ];
|
||||
home.packages = [
|
||||
pkgs.nautilus
|
||||
pkgs-stable.jetbrains.pycharm-community
|
||||
];
|
||||
}
|
7
user/chest/modules/git.nix
Normal file
7
user/chest/modules/git.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "cheeest";
|
||||
userEmail = "e.a.sunduk@gmail.com";
|
||||
};
|
||||
}
|
90
user/chest/modules/hyprland.nix
Normal file
90
user/chest/modules/hyprland.nix
Normal file
@ -0,0 +1,90 @@
|
||||
{ pkgs, lib, config, inputs, ... }: {
|
||||
imports = [(
|
||||
import ../../../modules/user/patterns/hyprland.nix {
|
||||
inherit lib;
|
||||
inherit pkgs;
|
||||
inherit config;
|
||||
inherit inputs;
|
||||
collection = "cheeeest/1767552";
|
||||
swww_flags = "";
|
||||
}
|
||||
)];
|
||||
|
||||
wayland.windowManager.hyprland = let
|
||||
colors = config.lib.stylix.colors;
|
||||
in {
|
||||
settings = {
|
||||
monitor = ",preferred,auto,1";
|
||||
exec-once =["${lib.getExe pkgs.linux-wallpaperengine} /mnt/D/SteamLibrary/steamapps/workshop/content/431960/816353979 --assets-dir /mnt/D/SteamLibrary/steamapps/common/wallpaper_engine/assets --screen-root DP-1 --noautomute"];
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 5;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgba(${colors.base0C}ee) rgba(${colors.base0B}ee) 45deg";
|
||||
"col.inactive_border" = "rgba(${colors.base05}aa)";
|
||||
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 16;
|
||||
passes = 2;
|
||||
new_optimizations = true;
|
||||
};
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = "rgba(1a1a1aee)";
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
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"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
smart_split = true;
|
||||
};
|
||||
|
||||
master.new_status = "master";
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_invert = true;
|
||||
workspace_swipe_distance = 200;
|
||||
workspace_swipe_forever = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
animate_manual_resizes = true;
|
||||
animate_mouse_windowdragging = true;
|
||||
enable_swallow = true;
|
||||
render_ahead_of_time = false;
|
||||
disable_hyprland_logo = false;
|
||||
};
|
||||
|
||||
bind = [
|
||||
''$mainMod Shift, S, exec, ${lib.getExe pkgs.grim} -g "$(${lib.getExe pkgs.slurp})" - | ${lib.getExe pkgs.swappy} -f -''
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
41
user/chest/modules/style.nix
Normal file
41
user/chest/modules/style.nix
Normal file
@ -0,0 +1,41 @@
|
||||
{ pkgs, config, lib, ... }: {
|
||||
stylix = {
|
||||
enable = true;
|
||||
targets = {
|
||||
hyprland.enable = false;
|
||||
waybar.enable = false;
|
||||
kitty.variant256Colors = true;
|
||||
};
|
||||
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/eris.yaml";
|
||||
polarity = "dark";
|
||||
|
||||
image = pkgs.fetchurl {
|
||||
url = "https://w.wallhaven.cc/full/kx/wallhaven-kxedr7.jpg";
|
||||
sha256 = "0ypqnq7bsr2giq7nq1c3xrw2m0gkii9j5zhfp512r93wc96zvm50";
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
enable = true;
|
||||
package = pkgs.pop-icon-theme;
|
||||
dark = "Pop-Dark";
|
||||
};
|
||||
|
||||
fonts = {
|
||||
monospace = {
|
||||
name = "JetBrains Mono";
|
||||
package = pkgs.jetbrains-mono;
|
||||
};
|
||||
|
||||
sizes = {
|
||||
applications = 13;
|
||||
desktop = 12;
|
||||
};
|
||||
};
|
||||
|
||||
opacity = {
|
||||
popups = .8;
|
||||
terminal = .5;
|
||||
};
|
||||
};
|
||||
}
|
23
user/chest/secrets.yaml
Normal file
23
user/chest/secrets.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
tokens:
|
||||
apis:
|
||||
wallhaven: ENC[AES256_GCM,data:7vHkndUVda78lMscP25sAAxSjTcJ7a/Fb+Wu0NHtUG4=,iv:O9xJAYEwkX7RMoxOf6QHWt1wOaMAmTGzJkCBO/cGvXs=,tag:lwsWCtbC8NxMf11Sj1ifLw==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1j3uuyax673fvl5x4dveupq3dylngnrq0e5uy7fmclsexkfd25vysk646wk
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnbDl6ZWZpc2U2SnNYQVpJ
|
||||
cmtBRzVOZTdOaXd6MFFnTGFLbzBhNldlN25RCisyNnAwY21udlZCWEc4U2hPa2di
|
||||
WXN5cEduMXUwNXpmU0hBQzdkamtSd28KLS0tIHUzd3RTbUM4VnFYZkRYbXJCUDZl
|
||||
UkZPZUlLQVNUZ1ZGV3BZM3hib3JHMXcKqyQUcRMhoVHK78lAYl2vSJUCxBL6atLb
|
||||
VXT5DV67KKnUKyKUAQ+gjEP9EpvR16PBCZ+EcSFfx/azHONCtV3mZg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-10-02T18:38:04Z"
|
||||
mac: ENC[AES256_GCM,data:xe8S8xpJtqd8ip5w7ZOWVSlkVEBpLVMSWCrJiz+bTd0Pgn5EVLtIro5JJu5hFbCspMj42sukuj0nI0fC/ryESm0eKwSzBQy0jGCr0jyd2Ie280Do4QYYasnoZ46GbhhHAxBLnr2FKHhZLS7dUzGp3nsgh1d3RAvf6hiB1GcYv5k=,iv:1DPhQgiwNzc8IUmgX6UMdK5sWzjP0pLJkEmRKJ5ol/U=,tag:LvieY4xTgy118/iOctRkOA==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.0
|
62
user/common.nix
Normal file
62
user/common.nix
Normal file
@ -0,0 +1,62 @@
|
||||
{ pkgs, pkgs-stable, lib, inputs, name, fullname ? name, ... }: {
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.${name} = {
|
||||
imports = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.stylix.homeManagerModules.stylix
|
||||
../modules/user.nix
|
||||
./${name}/modules/git.nix
|
||||
./${name}/modules/hyprland.nix
|
||||
./${name}/modules/style.nix
|
||||
./${name}/home.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
username = name;
|
||||
homeDirectory = "/home/${name}";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
};
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
inherit pkgs-stable;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
|
||||
users."${name}" = {
|
||||
isNormalUser = true;
|
||||
description = fullname;
|
||||
extraGroups = [ "networkmanager" "wheel" "input" "libvirtd" ];
|
||||
};
|
||||
};
|
||||
|
||||
services.greetd = let
|
||||
tuigreet = lib.getExe pkgs.greetd.tuigreet;
|
||||
session = lib.getExe inputs.hyprland.packages.${pkgs.system}.default;
|
||||
in {
|
||||
enable = true;
|
||||
settings = {
|
||||
initial_session = {
|
||||
command = "${session}";
|
||||
user = "${name}";
|
||||
};
|
||||
default_session = {
|
||||
command = "${tuigreet} --greeting 'Welcome to NixOS!' --asterisks --remember --remember-user-session --time -cmd ${session}";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings.trusted-users = [ name ];
|
||||
}
|
3
user/sweetbread/home.nix
Normal file
3
user/sweetbread/home.nix
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
programs.hyprlock.enable = true;
|
||||
}
|
7
user/sweetbread/modules/git.nix
Normal file
7
user/sweetbread/modules/git.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Sweetbread";
|
||||
userEmail = "sweetbread@coders-squad.com";
|
||||
};
|
||||
}
|
97
user/sweetbread/modules/hyprland.nix
Normal file
97
user/sweetbread/modules/hyprland.nix
Normal file
@ -0,0 +1,97 @@
|
||||
{ pkgs, lib, config, inputs, ... }: {
|
||||
imports = [(
|
||||
import ../../../modules/user/patterns/hyprland.nix {
|
||||
inherit lib;
|
||||
inherit pkgs;
|
||||
inherit config;
|
||||
inherit inputs;
|
||||
collection = "sweetbread/1764377";
|
||||
swww_flags = "--transition-type center";
|
||||
}
|
||||
)];
|
||||
|
||||
wayland.windowManager.hyprland = let
|
||||
colors = config.lib.stylix.colors;
|
||||
in {
|
||||
settings = {
|
||||
monitor = [
|
||||
"DP-3, 3440x1440@165.00Hz, auto-right, 1"
|
||||
# "HDMI-A-1, 3840x2160@60.00Hz, auto-left, 2"
|
||||
"HDMI-A-1, disabled"
|
||||
",preferred,auto,1"
|
||||
];
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 20;
|
||||
border_size = 3;
|
||||
"col.active_border" = "rgba(${colors.base0C}ee) rgba(${colors.base0B}ee) 45deg";
|
||||
"col.inactive_border" = "rgba(${colors.base05}aa)";
|
||||
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 16;
|
||||
passes = 2;
|
||||
new_optimizations = true;
|
||||
};
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = "rgba(1a1a1aee)";
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
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"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
smart_split = true;
|
||||
};
|
||||
|
||||
master.new_status = "master";
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_invert = true;
|
||||
workspace_swipe_distance = 200;
|
||||
workspace_swipe_forever = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
animate_manual_resizes = true;
|
||||
animate_mouse_windowdragging = true;
|
||||
enable_swallow = true;
|
||||
render_ahead_of_time = false;
|
||||
disable_hyprland_logo = false;
|
||||
};
|
||||
|
||||
bind = [
|
||||
" , Print, exec, grimblast --notify --freeze copy output"
|
||||
"CTRL, Print, exec, grimblast --notify --freeze copy area"
|
||||
"ALT , Print, exec, grimblast --notify --freeze copy active"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
46
user/sweetbread/modules/style.nix
Normal file
46
user/sweetbread/modules/style.nix
Normal file
@ -0,0 +1,46 @@
|
||||
{ pkgs, config, lib, ... }: {
|
||||
stylix = {
|
||||
enable = true;
|
||||
targets = {
|
||||
hyprland.enable = false;
|
||||
waybar.enable = false;
|
||||
kitty.variant256Colors = true;
|
||||
};
|
||||
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
polarity = "dark";
|
||||
|
||||
image = pkgs.fetchurl {
|
||||
url = "https://w.wallhaven.cc/full/8o/wallhaven-8o52j2.jpg";
|
||||
sha256 = "sha256-u4d21a0Kh5OHEzQMSQ7+ey/Va2ftS1DefrOQFahaeC4=";
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
enable = true;
|
||||
package = pkgs.pop-icon-theme;
|
||||
dark = "Pop-Dark";
|
||||
};
|
||||
|
||||
fonts = {
|
||||
monospace = {
|
||||
name = "JetBrains Mono";
|
||||
package = pkgs.jetbrains-mono;
|
||||
};
|
||||
|
||||
serif = {
|
||||
name = "GabrieLa";
|
||||
package = (pkgs.google-fonts.override { fonts = [ "Gabriela" ]; });
|
||||
};
|
||||
|
||||
sizes = {
|
||||
applications = 13;
|
||||
desktop = 12;
|
||||
};
|
||||
};
|
||||
|
||||
opacity = {
|
||||
popups = .8;
|
||||
terminal = .9;
|
||||
};
|
||||
};
|
||||
}
|
23
user/sweetbread/secrets.yaml
Normal file
23
user/sweetbread/secrets.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
tokens:
|
||||
apis:
|
||||
wallhaven: ENC[AES256_GCM,data:mawmbX0FQkhQHruABPc34mm+QtyEv6SulAXOGL6tMoQ=,iv:P+LtVoGzhc9kv4XUXOIJCosg52JXBAyWTQ+os9clibg=,tag:TQ0dLVKDkAo20p4w9HKn2g==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1j3uuyax673fvl5x4dveupq3dylngnrq0e5uy7fmclsexkfd25vysk646wk
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnbDl6ZWZpc2U2SnNYQVpJ
|
||||
cmtBRzVOZTdOaXd6MFFnTGFLbzBhNldlN25RCisyNnAwY21udlZCWEc4U2hPa2di
|
||||
WXN5cEduMXUwNXpmU0hBQzdkamtSd28KLS0tIHUzd3RTbUM4VnFYZkRYbXJCUDZl
|
||||
UkZPZUlLQVNUZ1ZGV3BZM3hib3JHMXcKqyQUcRMhoVHK78lAYl2vSJUCxBL6atLb
|
||||
VXT5DV67KKnUKyKUAQ+gjEP9EpvR16PBCZ+EcSFfx/azHONCtV3mZg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-08-26T18:55:20Z"
|
||||
mac: ENC[AES256_GCM,data:x9TX4OfDmw8qySadz/l5BUTyQLsOnROKASMn34Ps5Sb0LzYKrlQoHPQhiJ6YVNfYE+7WtNMqoQvUEjg9FQfEVcH5PFeXZjAaeLKDvEhgXjklhrSfbWCn7a+1yIbwutKb63cIuMh9ZcDUCmtAZlt+FssI/TjB0k5QqV4a358hjQE=,iv:GJWGCINdJr3HLX33YFEqTE+TlmfCpZBCLBUUHGSvvG8=,tag:6sKlM2/3r3os1h0U5ToqiA==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.0
|
Reference in New Issue
Block a user