Compare commits

...

6 Commits

Author SHA1 Message Date
6b305a59d7 Merge branch 'my-base' 2024-06-15 14:23:53 +02:00
d2a8129a20 Revert "Add all of iogamaster modules"
This reverts commit fa99b32cadd768164006629dbde5cdee1863e0d5.
2024-06-15 14:23:44 +02:00
8134c4bcc3 Wofi: also show run 2024-06-15 14:20:17 +02:00
83385a638f Modify waybar 2024-06-15 13:54:37 +02:00
baf240c27d Switch from gtklock to hyprlock 2024-06-15 12:43:34 +02:00
a9d0e298b3 Port iogamasters hyprland config 2024-06-15 12:17:52 +02:00
123 changed files with 512 additions and 3115 deletions

View File

@ -34,10 +34,13 @@
neovim.enable = true;
alacritty.enable = true;
emacs.enable = true;
# i3.enable = true;
# rofi.enable = true;
hyprland.enable = true;
nix-helper.enable = true;
desktop.enable = true;
};
home.packages =
@ -61,7 +64,7 @@
# Further tools
cntr # nix debugger
(lib.frajul.my-helper-function lazygit)
lazygit
languagetool
# wireguard-tools

View File

@ -1,6 +1,7 @@
{ pkgs, ... }:
with pkgs; [
with pkgs;
[
(nerdfonts.override { fonts = [ "FiraCode" ]; })
font-awesome
dejavu_fonts

View File

@ -38,7 +38,6 @@ with pkgs;
libnfc
xournalpp
path-of-building
xfce.thunar-archive-plugin
zip
@ -119,7 +118,6 @@ with pkgs;
fdupes # find and delete duplicate files
digikam
dbeaver-bin
pavucontrol
sqlite
nomacs

View File

@ -1,18 +0,0 @@
{
# This is the merged library containing your namespaced library as well as all libraries from
# your flake's inputs.
lib,
# Your flake inputs are also available.
inputs,
# Additionally, Snowfall Lib's own inputs are passed. You probably don't need to use this!
snowfall-inputs, }: {
# This will be available as `lib.my-namespace.my-helper-function`.
my-helper-function = x: x;
my-scope = {
# This will be available as `lib.my-namespace.my-scope.my-scoped-helper-function`.
my-scoped-helper-function = x: x;
};
}

View File

@ -6,30 +6,33 @@
inputs,
...
}:
with lib;
with lib.frajul;
let
inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) gtkThemeFromScheme;
cfg = config.desktop;
cfg = config.modules.desktop;
in
{
options.desktop = with types; {
colorscheme = mkOpt str "catppuccin-mocha" "Theme to use for the desktop";
autoLogin = mkBoolOpt false "Do auto login";
};
options.modules.desktop =
with lib.frajul;
with lib.types;
{
colorscheme = mkOpt str "catppuccin-mocha" "Theme to use for the desktop";
enable = mkBoolOpt false "Enable desktop";
};
config = {
# Do not make conditional, just toggle things on and off
imports = [
inputs.prism.homeModules.prism
inputs.nix-colors.homeManagerModules.default
];
config = lib.mkIf cfg.enable {
prism = {
enable = true;
wallpapers = ./wallpapers;
colorscheme = inputs.nix-colors.colorschemes.${cfg.colorscheme};
};
environment.variables = {
GTK_THEME = "Catppuccin-Mocha-Compact-Blue-dark";
};
home.extraOptions.gtk = {
gtk = {
enable = true;
theme = {
name = inputs.nix-colors.colorschemes.${cfg.colorscheme}.slug;
@ -40,10 +43,5 @@ in
package = pkgs.papirus-icon-theme;
};
};
services.xserver.displayManager.autoLogin = mkIf cfg.autoLogin {
enable = true;
user = config.user.name;
};
};
}

View File

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 182 KiB

View File

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 177 KiB

View File

Before

Width:  |  Height:  |  Size: 823 KiB

After

Width:  |  Height:  |  Size: 823 KiB

View File

Before

Width:  |  Height:  |  Size: 759 KiB

After

Width:  |  Height:  |  Size: 759 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

Before

Width:  |  Height:  |  Size: 1024 KiB

After

Width:  |  Height:  |  Size: 1024 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

View File

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

Before

Width:  |  Height:  |  Size: 499 KiB

After

Width:  |  Height:  |  Size: 499 KiB

View File

Before

Width:  |  Height:  |  Size: 607 KiB

After

Width:  |  Height:  |  Size: 607 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

Before

Width:  |  Height:  |  Size: 719 KiB

After

Width:  |  Height:  |  Size: 719 KiB

View File

Before

Width:  |  Height:  |  Size: 464 KiB

After

Width:  |  Height:  |  Size: 464 KiB

View File

Before

Width:  |  Height:  |  Size: 831 KiB

After

Width:  |  Height:  |  Size: 831 KiB

View File

Before

Width:  |  Height:  |  Size: 159 KiB

After

Width:  |  Height:  |  Size: 159 KiB

View File

Before

Width:  |  Height:  |  Size: 354 KiB

After

Width:  |  Height:  |  Size: 354 KiB

View File

Before

Width:  |  Height:  |  Size: 861 KiB

After

Width:  |  Height:  |  Size: 861 KiB

View File

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

Before

Width:  |  Height:  |  Size: 267 KiB

After

Width:  |  Height:  |  Size: 267 KiB

View File

Before

Width:  |  Height:  |  Size: 299 KiB

After

Width:  |  Height:  |  Size: 299 KiB

View File

Before

Width:  |  Height:  |  Size: 10 MiB

After

Width:  |  Height:  |  Size: 10 MiB

View File

Before

Width:  |  Height:  |  Size: 2.7 MiB

After

Width:  |  Height:  |  Size: 2.7 MiB

View File

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 126 KiB

View File

Before

Width:  |  Height:  |  Size: 537 KiB

After

Width:  |  Height:  |  Size: 537 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

Before

Width:  |  Height:  |  Size: 4.0 MiB

After

Width:  |  Height:  |  Size: 4.0 MiB

View File

Before

Width:  |  Height:  |  Size: 261 KiB

After

Width:  |  Height:  |  Size: 261 KiB

View File

Before

Width:  |  Height:  |  Size: 269 KiB

After

Width:  |  Height:  |  Size: 269 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

Before

Width:  |  Height:  |  Size: 216 KiB

After

Width:  |  Height:  |  Size: 216 KiB

View File

Before

Width:  |  Height:  |  Size: 342 KiB

After

Width:  |  Height:  |  Size: 342 KiB

View File

Before

Width:  |  Height:  |  Size: 412 KiB

After

Width:  |  Height:  |  Size: 412 KiB

View File

Before

Width:  |  Height:  |  Size: 595 KiB

After

Width:  |  Height:  |  Size: 595 KiB

View File

@ -22,20 +22,30 @@
let
cfg = config.modules.hyprland;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.modules.hyprland = {
enable = lib.mkOption { default = false; };
options.modules.hyprland = with lib.frajul; {
enable = mkBoolOpt false "Enable or disable the hyprland window manager.";
};
# imports = [ (ib.mkIf inputs.hyprland.homeManagerModules.default) ];
imports = [ inputs.hyprland.homeManagerModules.default ];
config = lib.mkIf cfg.enable {
modules.desktop.addons = {
waybar.enable = true;
wofi.enable = true;
mako.enable = true;
hyprlock.enable = true;
wlogout.enable = true;
};
services.dunst.enable = true;
# services.dunst.enable = true;
home.packages = with pkgs; [
wofi
# wofi
xfce.thunar
# hyprpicker # TODO
# hyprcursor # TODO
@ -43,116 +53,51 @@ in
grimblast
];
services.copyq.enable = true;
programs.hyprlock.enable = true;
programs.hyprlock.settings = {
general = {
disable_loading_bar = true;
hide_cursor = true;
ignore_empty_input = true;
};
background = [
{
path = "screenshot";
blur_passes = 3;
blur_size = 8;
}
];
input-field = [
{
size = "200, 50";
position = "0, -80";
monitor = "";
dots_center = true;
fade_on_empty = false;
font_color = "rgb(202, 211, 245)";
inner_color = "rgb(91, 96, 120)";
outer_color = "rgb(24, 25, 38)";
outline_thickness = 5;
placeholder_text = "Password...";
shadow_passes = 2;
}
];
};
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 300; # 5min
on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = "brightnessctl -r"; # monitor backlight restore.
xdg.configFile = {
"hypr/launch".source = ./launch;
# "hypr/hyprland.conf".source = ./hyprland.conf;
"hypr/colors.conf" = {
text = ''
general {
col.active_border = 0xff${palette.base0C} 0xff${palette.base0D} 270deg
col.inactive_border = 0xff${palette.base00}
}
{
timeout = 360; # 6min
on-timeout = "hyprlock"; # lock screen when timeout has passed
}
{
timeout = 600; # 10min
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
}
];
'';
};
};
programs.waybar = {
enable = true;
systemd.enable = true;
style = builtins.readFile ./style.css;
settings.mainBar = builtins.fromJSON (builtins.readFile ./waybar-config.json);
# settings = {
# mainBar = {
# layer = "top";
# position = "bottom";
# height = 30;
# output = [
# "eDP-1"
# "HDMI-A-1"
# ];
# modules-left = [
# "hyprland/workspaces"
# "hyprland/submap"
# ];
# modules-center = [ "hyprland/window" ];
# modules-right = [
# # "mpd"
# # "idle_inhibitor"
# "pulseaudio"
# # "network"
# "power-profiles-daemon"
# "cpu"
# "memory"
# # "temperature"
# # "backlight"
# # "keyboard-state"
# "battery"
# # "battery#bat2"
# "clock"
# "tray"
# ];
# services.copyq.enable = true;
# # "sway/workspaces" = {
# # disable-scroll = true;
# # all-outputs = true;
# # };
# };
# };
};
# services.hypridle = {
# enable = true;
# settings = {
# general = {
# after_sleep_cmd = "hyprctl dispatch dpms on";
# ignore_dbus_inhibit = false;
# lock_cmd = "hyprlock";
# };
# listener = [
# {
# timeout = 300; # 5min
# on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
# on-resume = "brightnessctl -r"; # monitor backlight restore.
# }
# {
# timeout = 360; # 6min
# on-timeout = "hyprlock"; # lock screen when timeout has passed
# }
# {
# timeout = 600; # 10min
# on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
# on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
# }
# ];
# };
# };
programs.wlogout.enable = true; # can be configured
# services.hypridle.enable = true; # can be configured
services.network-manager-applet.enable = true;
@ -161,7 +106,7 @@ in
# Whether to enable Hyprland wayland compositor
enable = true;
# The hyprland package to use (simplifies use of plugins)
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
# package = inputs.hyprland.packages.${pkgs.system}.hyprland;
# Whether to enable XWayland
xwayland.enable = true;
@ -286,7 +231,7 @@ in
"$mod, P, pseudo," # dwindle
# opening applications
"$mod, D, exec, wofi --show run"
"$mod, D, exec, wofi --show drun,run"
"$mod, E, exec, thunar"
"$mod, Return, exec, alacritty"
"$mod, B, exec, firefox"

View File

@ -0,0 +1,57 @@
{
options,
config,
lib,
pkgs,
inputs,
...
}:
let
cfg = config.modules.desktop.addons.hyprlock;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.modules.desktop.addons.hyprlock =
with lib.frajul;
with lib.types;
{
enable = mkBoolOpt false "Enable or disable the hyprlock screen locker.";
};
config = lib.mkIf cfg.enable {
programs.hyprlock.enable = true;
programs.hyprlock.settings = {
general = {
disable_loading_bar = true;
hide_cursor = true;
ignore_empty_input = true;
};
background = [
{
color = "#${palette.base00}";
# path = "screenshot";
# blur_passes = 3;
# blur_size = 8;
}
];
input-field = [
{
size = "200, 50";
position = "0, -80";
monitor = "";
dots_center = true;
fade_on_empty = false;
font_color = "#${palette.base0B}";
inner_color = "#${palette.base01}";
outer_color = "#${palette.base05}";
outline_thickness = 5;
placeholder_text = "Password...";
}
];
};
};
}

View File

@ -6,24 +6,27 @@
inputs,
...
}:
with lib;
with lib.frajul;
let
cfg = config.desktop.addons.mako;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.desktop.colorscheme}) palette;
cfg = config.modules.desktop.addons.mako;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.desktop.addons.mako = with types; {
enable = mkBoolOpt false "Enable or disable mako";
};
options.modules.desktop.addons.mako =
with lib.frajul;
with lib.types;
{
enable = mkBoolOpt false "Enable or disable mako";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
mako
libnotify
];
home.configFile."mako/config" = {
xdg.configFile."mako/config" = {
text = ''
background-color=#${palette.base00}
text-color=#${palette.base05}

View File

@ -1,29 +1,55 @@
{
"position": "bottom",
"height": 10,
"layer": "top",
"position": "bottom",
"mode": "dock",
"exclusive": true,
"passtrough": true,
"height": 32,
"modules-left": [
"hyprland/workspaces"
],
"modules-center": [],
"modules-left": ["hyprland/workspaces"],
"modules-right": ["idle_inhibitor", "disk", "cpu", "memory", "pulseaudio", "battery", "clock", "tray"],
"hyprland/window": {
"format": "{}"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": " ",
"deactivated": " "
"activated": "",
"deactivated": ""
}
},
"disk": {
"interval": 30,
"format": "free: {percentage_free}% ({free})",
"format": "Free: {percentage_free}% ({free})",
"path": "/",
"unit": "GB"
},
"tray": {
"spacing": 10
},
"clock": {
"tooltip-format": "{calendar}",
"format": "{:%a %d.%m %H:%M:%S}",
"interval": 1
"hyprland/workspaces": {
"on-scroll-up": "hyprctl dispatch workspace m+1",
"on-scroll-down": "hyprctl dispatch workspace m-1",
"all-outputs": false,
"on-click": "activate",
"format": "{icon}",
"format-icons": {
"1": "1",
"2": "2",
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7",
"8": "8",
"9": "9",
"10": "10"
}
},
"cpu": {
"format": " {usage}%"
@ -31,9 +57,34 @@
"memory": {
"format": " {}%"
},
"tray": {
"icon-size": 16,
"tooltip": false,
"spacing": 10
},
"clock": {
"tooltip-format": "{calendar}",
"format": "{:%a %d.%m %H:%M:%S}",
"interval": 1
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": "<big>󰝟</big>",
"format-icons": {
"headphone": "",
"default": ["", "", ""]
},
"scroll-step": 5.0,
"max-volume": 200,
"on-click": "pulseaudio-popup",
"on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
},
"battery": {
"states": {
"good": 95,
"warning": 30,
"critical": 15
},
@ -42,16 +93,5 @@
"format-plugged": " {capacity}% ({time})",
"format-full": "{icon} ",
"format-icons": ["", "", "", "", ""]
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": " {format_source}",
"format-icons": {
"headphone": "",
"default": ["", "", ""]
},
"scroll-step": 5.0,
"max-volume": 200,
"on-click": "pulseaudio-popup"
}
}

View File

@ -9,29 +9,26 @@
with lib;
with lib.frajul;
let
cfg = config.desktop.addons.waybar;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.desktop.colorscheme}) palette;
cfg = config.modules.desktop.addons.waybar;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.desktop.addons.waybar = with types; {
options.modules.desktop.addons.waybar = with types; {
enable = mkBoolOpt false "Enable or disable waybar";
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.waybar ];
home.configFile."waybar/config.jsonc" = {
source = ./config.jsonc;
onChange = ''
${pkgs.busybox}/bin/pkill -SIGUSR2 waybar
'';
};
home.configFile."waybar/style.css" = {
text = ''
programs.waybar = {
enable = true;
systemd.enable = true;
settings.mainBar = builtins.fromJSON (builtins.readFile ./config.json);
style = ''
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: JetBrainsMono Nerd Font;
font-size: 13px;
font-size: 14px;
border-radius: 17px;
}
@ -48,6 +45,8 @@ in
#custom-spotify,
#pulseaudio,
#window,
#idle_inhibitor,
#cpu,
#tray {
padding: 5 15px;
border-radius: 12px;
@ -183,7 +182,11 @@ in
#tray menu {
background-color: #${palette.base00};
opacity: 0.8;
opacity: 1.0;
}
#battery.warning {
color: #${palette.base08};
}
#pulseaudio.muted {
@ -215,9 +218,6 @@ in
border-radius: 17px;
}
'';
onChange = ''
${pkgs.busybox}/bin/pkill -SIGUSR2 waybar
'';
};
};
}

View File

@ -6,21 +6,24 @@
inputs,
...
}:
with lib;
with lib.frajul; let
cfg = config.desktop.addons.wlogout;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.desktop.colorscheme}) palette;
in {
options.desktop.addons.wlogout = with types; {
enable = mkBoolOpt false "Enable or disable wlogout.";
};
let
cfg = config.modules.desktop.addons.wlogout;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.modules.desktop.addons.wlogout =
with lib.frajul;
with lib.types;
{
enable = mkBoolOpt false "Enable or disable wlogout.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
wlogout
];
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ wlogout ];
home.configFile."wlogout/style.css".text = ''
xdg.configFile."wlogout/style.css".text = ''
* {
all: unset;
font-family: JetBrains Mono Nerd Font;
@ -44,7 +47,7 @@ in {
}
'';
home.configFile."wlogout/layout".text = ''
xdg.configFile."wlogout/layout".text = ''
{
"label" : "lock",
"action" : "gtklock",

View File

@ -1,7 +1,7 @@
width=900
height=600
location=center
show=drun
show=drun,run
prompt=Search...
filter_rate=100
allow_markup=true

View File

@ -6,22 +6,25 @@
inputs,
...
}:
with lib;
with lib.frajul;
let
cfg = config.desktop.addons.wofi;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.desktop.colorscheme}) palette;
cfg = config.modules.desktop.addons.wofi;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.desktop.addons.wofi = with types; {
enable = mkBoolOpt false "Enable or disable the wofi run launcher.";
};
options.modules.desktop.addons.wofi =
with lib.frajul;
with lib.types;
{
enable = mkBoolOpt false "Enable or disable the wofi run launcher.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ wofi ];
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ wofi ];
home.configFile."wofi/config".source = ./config;
home.configFile."wofi/style.css".text = ''
xdg.configFile."wofi/config".source = ./config;
xdg.configFile."wofi/style.css".text = ''
window {
margin: 5px;
border: 5px solid #181926;

View File

@ -1,23 +0,0 @@
{
options,
config,
pkgs,
lib,
...
}:
with lib;
with lib.frajul; let
cfg = config.apps.brave;
in {
options.apps.brave = with types; {
enable = mkBoolOpt false "Enable or disable brave browser";
};
config = mkIf cfg.enable {
environment.systemPackages = [pkgs.brave];
home.persist.directories = [
".local/share/BraveSoftware"
];
};
}

View File

@ -1,26 +0,0 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.frajul;
let
cfg = config.apps.discord;
in
{
options.apps.discord = with types; {
enable = mkBoolOpt false "Enable discord";
};
config = mkIf cfg.enable {
environment.systemPackages = [
(pkgs.discord.override { withOpenASAR = true; })
pkgs.xwaylandvideobridge
];
home.persist.directories = [ ".config/discord" ];
};
}

View File

@ -1,29 +0,0 @@
{
options,
config,
pkgs,
lib,
...
}:
with lib;
with lib.frajul;
let
cfg = config.apps.firefox;
in
{
options.apps.firefox = with types; {
enable = mkBoolOpt false "Enable or disable firefox browser";
};
config = mkIf cfg.enable {
home.programs.firefox = {
enable = true;
package = pkgs.librewolf;
};
home.persist.directories = [
".librewolf"
".cache/librewolf"
];
};
}

View File

@ -1,47 +0,0 @@
{
options,
config,
pkgs,
lib,
inputs,
...
}:
with lib;
with lib.frajul;
let
cfg = config.apps.foot;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.desktop.colorscheme}) palette;
in
{
options.apps.foot = with types; {
enable = mkBoolOpt false "Enable or disable the foot terminal.";
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.foot ];
home.configFile."foot/foot.ini".text = ''
font=JetBrains Mono Nerd Font:size=12
pad=5x5
[colors]
foreground=${palette.base05}
background=${palette.base00}
regular0=${palette.base03}
regular1=${palette.base08}
regular2=${palette.base0B}
regular3=${palette.base0A}
regular4=${palette.base0D}
regular5=${palette.base0F}
regular6=${palette.base0C}
regular7=${palette.base05}
bright0=${palette.base04}
bright1=${palette.base08}
bright2=${palette.base0B}
bright3=${palette.base0A}
bright4=${palette.base0D}
bright5=${palette.base0F}
bright6=${palette.base0C}
bright7=${palette.base05}
'';
};
}

View File

@ -1,38 +0,0 @@
{
options,
config,
pkgs,
lib,
...
}:
with lib;
with lib.frajul; let
cfg = config.apps.lutris;
in {
options.apps.lutris = with types; {
enable = mkBoolOpt false "Enable or disable lutris";
};
config = mkIf cfg.enable {
environment.systemPackages = [
pkgs.lutris
pkgs.fuse
];
home.persist.directories = [
".local/share/lutris"
".cache/lutris"
"Games"
];
# Appimages for certain games
boot.binfmt.registrations.appimage = {
wrapInterpreterInShell = false;
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
recognitionType = "magic";
offset = 0;
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
magicOrExtension = ''\x7fELF....AI\x02'';
};
};
}

View File

@ -1,45 +0,0 @@
{
options,
config,
pkgs,
lib,
...
}:
with lib;
with lib.frajul; let
cfg = config.apps.misc;
in {
options.apps.misc = with types; {
enable = mkBoolOpt false "Enable or disable misc apps";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
# Development
git
git-remote-gcrypt
bat
eza
fzf
fd
# Util
unzip
sshfs
btop
ffmpeg
python3
wl-clipboard
obsidian
pandoc
bookworm
kjv
];
home.persist.directories = [
".config/obsidian"
];
};
}

View File

@ -1,37 +0,0 @@
{
options,
config,
pkgs,
lib,
...
}:
with lib;
with lib.frajul; let
cfg = config.apps.neovim;
in {
options.apps.neovim = with types; {
enable = mkBoolOpt false "Enable or disable neovim";
};
config = mkIf cfg.enable {
environment.variables = {
EDITOR = "nvim";
};
environment.systemPackages = [
pkgs.neovim
pkgs.lazygit
pkgs.stylua
pkgs.sumneko-lua-language-server
pkgs.ripgrep
];
home.persist.directories = [
".local/share/nvim"
".vim"
".wakatime"
];
home.persist.files = [".wakatime.cfg" ".wakatime.bdb"];
};
}

View File

@ -1,33 +0,0 @@
{
options,
config,
pkgs,
lib,
...
}:
with lib;
with lib.frajul; let
cfg = config.apps.pass;
in {
options.apps.pass = with types; {
enable = mkBoolOpt false "Enable or disable pass";
};
config = mkIf cfg.enable {
apps.tools.gnupg.enable = true;
environment.systemPackages = with pkgs; [
(writeShellScriptBin "pass" ''
GNUPGHOME="$XDG_DATA_HOME/gnupg" PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass" ${pkgs.pass.withExtensions (exts: [
exts.pass-otp
exts.pass-update
exts.pass-audit
])}/bin/pass $@
'')
];
home.persist.directories = [
".local/share/pass"
];
};
}

View File

@ -1,40 +0,0 @@
{
options,
config,
pkgs,
lib,
...
}:
with lib;
with lib.frajul; let
cfg = config.apps.steam;
in {
options.apps.steam = with types; {
enable = mkBoolOpt false "Enable or disable steam";
};
config = mkIf cfg.enable {
programs.steam.enable = true;
programs.steam.remotePlay.openFirewall = true;
programs.steam.gamescopeSession.enable = true;
environment.systemPackages = [
pkgs.steam
pkgs.mangohud
pkgs.protonup
];
environment.sessionVariables = {
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/${config.user.name}/.steam/root/compatibilitytools.d";
};
programs.gamemode.enable = true;
home.persist.directories = [
".local/share/Steam"
".steam"
".local/share/Terraria"
];
};
}

View File

@ -1,28 +0,0 @@
{
options,
config,
lib,
...
}:
with lib;
with lib.frajul; let
cfg = config.apps.tools.direnv;
in {
options.apps.tools.direnv = with types; {
enable = mkBoolOpt false "Enable direnv";
};
config = mkIf cfg.enable {
home.programs.direnv = {
enable = true;
nix-direnv.enable = true;
enableNushellIntegration = true;
};
environment.sessionVariables.DIRENV_LOG_FORMAT = ""; # Blank so direnv will shut up
home.persist.directories = [
".local/share/direnv"
];
};
}

View File

@ -1,19 +0,0 @@
{sshKeyPath}: ''
[user]
name = IogaMaster
email = iogamastercode@gmail.com
signingkey = ${sshKeyPath}
[pull]
rebase = true
[init]
defaultBranch = main
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
[gpg]
format = ssh
[commit]
gpgsign = true
''

View File

@ -1,45 +0,0 @@
{
options,
config,
pkgs,
lib,
...
}:
with lib;
with lib.frajul; let
cfg = config.apps.tools.git;
in {
options.apps.tools.git = with types; {
enable = mkBoolOpt false "Enable or disable git";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
git
git-remote-gcrypt
gh # GitHub cli
lazygit
commitizen
];
environment.shellAliases = {
# Git aliases
ga = "git add .";
gc = "git commit -m ";
gp = "git push -u origin";
g = "lazygit";
};
home.configFile."git/config".text = import ./config.nix {sshKeyPath = "/home/${config.user.name}/.ssh/key.pub";};
home.configFile."lazygit/config.yml".source = ./lazygitConfig.yml;
home.persist.directories = [
".config/gh"
".config/lazygit"
".config/systemd" # For git maintainance
];
};
}

View File

@ -1,26 +0,0 @@
gui:
nerdFontsVersion: "3"
git:
overrideGpg: true
customCommands:
- key: "C"
command: "git cz c"
description: "commit with commitizen"
context: "files"
loadingText: "opening commitizen commit tool"
subprocess: true
- key: 'D'
command: >-
git push {{ .SelectedLocalBranch.UpstreamRemote }} --delete {{ .SelectedLocalBranch.UpstreamBranch }} &&
git branch -D {{ .SelectedLocalBranch.Name }}
description: "delete local AND remote branch"
context: 'localBranches'
stream: true
- key: 'T'
command: >-
for branch in $(git branch --all | grep '^\s*remotes' | egrep --invert-match '(:?HEAD|master)$'); do git branch --track "${branch##*/}" "$branch"; done
description: "add ALL remote branches to the list"
context: 'localBranches'
stream: true

View File

@ -1,44 +0,0 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.frajul; let
cfg = config.apps.tools.gnupg;
in {
options.apps.tools.gnupg = with types; {
enable = mkBoolOpt false "Enable gnupg";
};
config = mkIf cfg.enable {
environment.systemPackages = [
pkgs.pinentry
pkgs.pinentry-curses
(pkgs.writeShellScriptBin "gpg" ''
GNUPGHOME=${config.environment.variables.GNUPGHOME} ${pkgs.gnupg}/bin/gpg $@
'')
];
services.pcscd.enable = true;
programs.gnupg.agent = {
enable = true;
pinentryPackage = pkgs.pinentry-curses;
enableSSHSupport = true;
};
home.file.".local/share/gnupg/gpg-agent.conf".source = ./gpg-agent.conf;
environment.variables = {
GNUPGHOME = "$XDG_DATA_HOME/gnupg";
};
home.persist.directories = [
".local/share/gnupg"
".pki"
];
};
}

View File

@ -1 +0,0 @@
pinentry-program /run/current-system/sw/bin/pinentry-curses

View File

@ -1,22 +0,0 @@
{
options,
config,
lib,
inputs,
...
}:
with lib;
with lib.frajul; let
cfg = config.apps.tools.nix-ld;
in {
imports = with inputs; [
nix-ld.nixosModules.nix-ld
];
options.apps.tools.nix-ld = with types; {
enable = mkBoolOpt false "Enable nix-ld";
};
config = mkIf cfg.enable {
programs.nix-ld.enable = true;
};
}

View File

@ -7,10 +7,10 @@
with lib;
with lib.frajul;
let
cfg = config.modules.system.boot.efi;
cfg = config.modules.system.boot-efi;
in
{
options.modules.system.boot.efi = with types; {
options.modules.system.boot-efi = with types; {
enable = mkBoolOpt false "Whether or not to enable efi booting.";
};

View File

@ -1,14 +0,0 @@
(defpoll hostname :interval "1000s" "hostnamectl hostname")
(defpoll username :interval "1000s" "echo $USER")
(defpoll net :interval "100s" `nmcli -terse -fields SIGNAL,ACTIVE device wifi | awk --field-separator ':' '{if($2=="yes")print$1}'`)
(defpoll ssid :interval "100s" `nmcli -terse -fields SSID,ACTIVE device wifi | awk --field-separator ':' '{if($2=="yes")print$1}'`)
(defvar profile "~/.face")
(defpoll dunst :interval "1s" "[ $(dunstctl is-paused) = false ] && echo  || echo ")
(defpoll time :interval "1s" `date +'{"hour":"%H","min":"%M","sec":"%S","pretty":"%a, %e %b","day":"%A","month":"%B","dom":"%e","year":"%Y","day_num":"%d","month_num":"%m","year_num":"%y"}'`)
(deflisten music :initial ""
"playerctl --follow metadata --format '{{ title }} - {{ artist }}' || true")

View File

@ -1,113 +0,0 @@
* {
all: unset; //Unsets everything so you can style everything from scratch
}
$bg: #1e1e2e;
$black: #313244;
$red: #f38ba8;
$green: #a6e3a1;
$yellow: #f9e2af;
$pink: #f5c2e7;
$blue: #89b4fa;
$purple: #cba6f7;
$cyan: #89dceb;
$white: #cdd6f4;
$gray: #313244;
* {
transition: 200ms ease;
font-family: "JetBrainsMono Nerd Font";
}
.bar {
background-color: $bg;
color: $white;
padding: 10px;
}
.bar2 {
background-color: $bg;
color: $white;
padding: 10px;
}
.workspaces {
padding-left: 10;
font-size: 20;
}
.system {
padding-right: 10;
}
.module { margin: 0 5px; }
.metric scale trough highlight {
all: unset;
background-color: $blue;
color: $black;
border-radius: 10px;
}
.metric scale trough {
all: unset;
background-color: $gray;
border-radius: 50px;
min-height: 3px;
min-width: 50px;
margin-left: 10px;
margin-right: 20px;
}
.metric scale trough highlight {
all: unset;
background-color: $blue;
color: $black;
border-radius: 10px;
}
.metric scale trough {
all: unset;
background-color: $gray;
border-radius: 50px;
min-height: 3px;
min-width: 50px;
margin-left: 10px;
margin-right: 20px;
}
.bat-box scale trough highlight {
all: unset;
background-color: $blue;
color: $black;
border-radius: 10px;
}
.bat-box scale trough {
all: unset;
background-color: $gray;
border-radius: 50px;
min-height: 3px;
min-width: 50px;
margin-left: 10px;
margin-right: 20px;
}
.bat-box scale trough highlight {
all: unset;
background-color: $blue;
color: $black;
border-radius: 10px;
}
.bat-box scale trough {
all: unset;
background-color: $gray;
border-radius: 50px;
min-height: 3px;
min-width: 50px;
margin-left: 10px;
margin-right: 20px;
}

View File

@ -1,39 +0,0 @@
(include "./widgets/workspaces.yuck")
(include "./widgets/music.yuck")
(include "./widgets/metrics.yuck")
(defwidget bar []
(centerbox :orientation "h"
(box
:space-evenly false
:halign "start"
(workspaces))
(label :text "")
(metrics)))
;; Windows
(defwindow bar
:monitor 0
:geometry (geometry :x "0%"
:y "0px"
:width "100%"
:height "4%"
:anchor "top center")
:stacking "fg"
:windowtype "dock"
:wm-ignore false
:exclusive true
(bar))
(defwindow bar2
:monitor 1
:geometry (geometry :x "0%"
:y "0px"
:width "100%"
:height "4%"
:anchor "top center")
:stacking "fg"
:windowtype "dock"
:wm-ignore false
:exclusive true
(bar))

View File

@ -1,8 +0,0 @@
#!/usr/bin/env sh
set -eu
if [ -f /sys/class/power_supply/BAT0/capacity ]; then
cat /sys/class/power_supply/BAT0/capacity
fi

View File

@ -1,8 +0,0 @@
#!/usr/bin/env sh
set -eu
if [ -f /sys/class/power_supply/BAT0/status]; then
cat /sys/class/power_supply/BAT0/status
fi

View File

@ -1,83 +0,0 @@
#!/usr/bin/env bash
source ~/.config/theme/workspace_colors
# get initial focused workspace
focusedws=$(hyprctl -j monitors | jaq -r '.[] | select(.focused == true) | .activeWorkspace.id')
declare -A o=([1]=0 [2]=0 [3]=0 [4]=0 [5]=0 [6]=0 [7]=0 [8]=0 [9]=0 [10]=0)
declare -A monitormap
declare -A workspaces
# set color for each workspace
status() {
if [ "${o[$1]}" -eq 1 ]; then
mon=${monitormap[${workspaces[$1]}]}
if [ $focusedws -eq "$1" ]; then
echo -n "${colors[$mon]}"
else
echo -n "${dimmed[$mon]}"
fi
else
echo -n "$empty"
fi
}
# handle workspace create/destroy
workspace_event() {
o[$1]=$2
while read -r k v; do workspaces[$k]="$v"; done < <(hyprctl -j workspaces | gojq -r '.[]|"\(.id) \(.monitor)"')
}
# handle monitor (dis)connects
monitor_event() {
while read -r k v; do monitormap["$k"]=$v; done < <(hyprctl -j monitors | gojq -r '.[]|"\(.name) \(.id) "')
}
# generate the json for eww
generate() {
echo -n '['
for i in {1..10}; do
echo -n ''$([ $i -eq 1 ] || echo ,) '{ "number": "'"$i"'", "color": "'$(status "$i")'" }'
done
echo ']'
}
# setup
# add monitors
monitor_event
# add workspaces
while read -r k v; do workspaces[$k]="$v"; done < <(hyprctl -j workspaces | gojq -r '.[]|"\(.id) \(.monitor)"')
# check occupied workspaces
for num in "${!workspaces[@]}"; do
o[$num]=1
done
# generate initial widget
generate
# main loop
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r line; do
case ${line%>>*} in
"workspace")
focusedws=${line#*>>}
;;
"focusedmon")
focusedws=${line#*,}
;;
"createworkspace")
workspace_event "${line#*>>}" 1
;;
"destroyworkspace")
workspace_event "${line#*>>}" 0
;;
"monitor"*)
monitor_event
;;
esac
generate
done

View File

@ -1,48 +0,0 @@
(defwidget metrics []
(box :class "system" :orientation "h" :space-evenly false :halign "end"
(_battery)
(metric :label "󰘚"
:value {EWW_RAM.used_mem_perc}
:onchange "")
(metric :label "󰋊"
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
:onchange "")
))
(defwidget metric [label value onchange]
(box :orientation "h"
:class "metric"
:space-evenly false
(box :class "label" label)
(scale :min 0
:max 151
:active {onchange != ""}
:value value
:onchange onchange)))
(defpoll battery-percent :interval "30s"
:initial ''
"./scripts/battery-percent")
(defpoll battery-status :interval "5s"
:initial ''
"./scripts/battery-status")
(defwidget _battery []
(box :class "bat-box" :space-evenly false :spacing 8
:visable {battery-status != ''}
(label :text {battery-status == 'Charging' ? "󰂄" :
battery-percent < 10 ? "󰂃" :
battery-percent < 20 ? "󰁻" :
battery-percent < 30 ? "󰁼" :
battery-percent < 40 ? "󰁽" :
battery-percent < 50 ? "󰁾" :
battery-percent < 60 ? "󰁿" :
battery-percent < 70 ? "󰂀" :
battery-percent < 80 ? "󰂁" :
battery-percent < 90 ? "󰂂" : "󰁹"})))
(defpoll time :interval "1s"
"date '+%H:%M'")

View File

@ -1,9 +0,0 @@
(defwidget music []
(box :class "music"
:orientation "h"
:space-evenly false
:halign "center"
{music != "" ? "󰽰 ${music}" : ""}))
(deflisten music :initial ""
"playerctl --follow metadata --format '{{ title }} - {{ artist }}' || true")

View File

@ -1,13 +0,0 @@
(defwidget workspaces []
(eventbox
:onscroll "echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\" | xargs hyprctl dispatch workspace"
(box
:class "module workspaces"
:spacing 10
(for i in workspace
(button
:onclick "hyprctl dispatch workspace ${i.number}"
:class "ws"
:style "color: ${i.color};"
"●")))))
(deflisten workspace "./scripts/workspace")

View File

@ -1,32 +0,0 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.frajul; let
cfg = config.desktop.addons.eww;
in {
options.desktop.addons.eww = with types; {
enable = mkBoolOpt false "Enable or disable EWW.";
wayland = mkBoolOpt false "Enable wayland support";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
eww-wayland
playerctl
gojq
jaq
socat
];
home.configFile."eww/" = {
recursive = true;
source = ./config;
};
};
}

View File

@ -1,37 +0,0 @@
{
options,
config,
lib,
pkgs,
inputs,
...
}:
with lib;
with lib.frajul; let
cfg = config.desktop.addons.gtklock;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.desktop.colorscheme}) palette;
in {
options.desktop.addons.gtklock = with types; {
enable = mkBoolOpt false "Enable or disable the gtklock screen locker.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
gtklock
];
security.pam.services.gtklock = {};
home.configFile."gtklock/style.css".text = ''
window {
background-size: cover;
background-repeat: no-repeat;
background-position: center;
background-color: #${palette.base00};
}
clock-label {
color: #${palette.base05};
}
'';
};
}

View File

@ -1,22 +0,0 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.frajul; let
cfg = config.desktop.addons.swaync;
in {
options.desktop.addons.swaync = with types; {
enable = mkBoolOpt false "Enable or disable swaync";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
swaync
libnotify
];
};
}

View File

@ -1,31 +0,0 @@
{
options,
config,
pkgs,
lib,
...
}:
with lib;
with lib.frajul;
let
cfg = config.desktop.addons.swww;
in
{
options.desktop.addons.swww = with types; {
enable = mkBoolOpt false "Enable or disable SWWW";
};
config = mkIf cfg.enable {
environment.systemPackages = [
pkgs.swww
(pkgs.writeShellScriptBin "wallpaper" ''
/usr/bin/env ls ~/.config/wallpapers/ | sort -R | tail -1 |while read file; do
swww img ~/.config/wallpapers/$file --transition-fps 255 --transition-type wipe
echo "$file"
done
'')
];
home.persist.directories = [ ".cache/swww" ];
};
}

View File

@ -1,80 +0,0 @@
{
"layer": "top",
"position": "top",
"mod": "dock",
"exclusive": true,
"passtrough": false,
"gtk-layer-shell": true,
"height": 32,
"modules-left": [
"hyprland/workspaces"
],
"modules-center": [],
"modules-right": [
"tray",
"network",
"battery",
"clock"
],
"hyprland/window": {
"format": "{}"
},
"hyprland/workspaces": {
"on-scroll-up": "hyprctl dispatch workspace e+1",
"on-scroll-down": "hyprctl dispatch workspace e-1",
"all-outputs": true,
"on-click": "activate",
"format": "{icon}",
"format-icons": {
"1": "1",
"2": "2",
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7",
"8": "8",
"9": "9",
"10": "10"
}
},
"tray": {
"icon-size": 12,
"tooltip": false,
"spacing": 10
},
"clock": {
"format": "{:%H:%M}",
},
"pulseaudio": {
"format": " {volume}%",
"tooltip": false,
"format-muted": " N/A",
"on-click": "pavucontrol &",
"scroll-step": 5
},
"network": {
"format-wifi": " {essid} {signalStrength}%",
"format-ethernet": "󰈀",
"format-disconnected": "󰈂"
},
"battery": {
"states": {
"warning": 20,
"critical": 15
},
"format": "󰁹 {capacity}%",
"format-charging": "󰂄 {capacity}%",
"format-plugged": "󰂄 {capacity}%"
}
}

View File

@ -1,69 +0,0 @@
{
options,
config,
lib,
pkgs,
inputs,
...
}:
with lib;
with lib.frajul;
let
cfg = config.desktop.hyprland;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.desktop.colorscheme}) palette;
in
{
options.desktop.hyprland = with types; {
enable = mkBoolOpt false "Enable or disable the hyprland window manager.";
};
config = mkIf cfg.enable {
# Desktop additions
desktop.addons = {
waybar.enable = true;
swww.enable = true;
wofi.enable = true;
mako.enable = true;
gtklock.enable = true;
wlogout.enable = true;
};
apps.foot.enable = true;
programs.hyprland.enable = true;
programs.hyprland.xwayland.enable = true;
xdg.portal.enable = true;
environment.sessionVariables.NIXOS_OZONE_WL = "1"; # Hint electron apps to use wayland
environment.systemPackages = with pkgs; [
grim
slurp
swappy
imagemagick
(writeShellScriptBin "screenshot" ''
grim -g "$(slurp)" - | convert - -shave 1x1 PNG:- | wl-copy
'')
(writeShellScriptBin "screenshot-edit" ''
wl-paste | swappy -f -
'')
pulseaudio
];
# Hyprland configuration files
home.configFile = {
"hypr/launch".source = ./launch;
"hypr/hyprland.conf".source = ./hyprland.conf;
"hypr/colors.conf" = {
text = ''
general {
col.active_border = 0xff${palette.base0C} 0xff${palette.base0D} 270deg
col.inactive_border = 0xff${palette.base00}
}
'';
};
};
};
}

View File

@ -1,32 +0,0 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.frajul; let
cfg = config.hardware.audio;
in {
options.hardware.audio = with types; {
enable = mkBoolOpt false "Enable pipewire";
};
config = mkIf cfg.enable {
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
wireplumber.enable = true;
jack.enable = true;
pulse.enable = true;
};
programs.noisetorch.enable = true;
environment.systemPackages = with pkgs; [
pavucontrol
];
};
}

View File

@ -1,21 +0,0 @@
{
options,
config,
lib,
...
}:
with lib;
with lib.frajul; let
cfg = config.hardware.networking;
in {
options.hardware.networking = with types; {
enable = mkBoolOpt false "Enable networkmanager";
};
config = mkIf cfg.enable {
networking.networkmanager.enable = true;
environment.persist.directories = [
"/etc/NetworkManager"
];
};
}

View File

@ -1,30 +0,0 @@
{
options,
config,
pkgs,
lib,
...
}:
with lib;
with lib.frajul; let
cfg = config.hardware.nvidia;
in {
options.hardware.nvidia = with types; {
enable = mkBoolOpt false "Enable drivers and patches for Nvidia hardware.";
};
config = mkIf cfg.enable {
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia.modesetting.enable = true;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production;
environment.variables = {
CUDA_CACHE_PATH = "$XDG_CACHE_HOME/nv";
};
environment.shellAliases = {nvidia-settings = "nvidia-settings --config='$XDG_CONFIG_HOME'/nvidia/settings";};
# Hyprland settings
environment.sessionVariables.WLR_NO_HARDWARE_CURSORS = "1"; # Fix cursor rendering issue on wlr nvidia.
};
}

View File

@ -1,54 +0,0 @@
{
options,
config,
lib,
inputs,
...
}:
with lib;
with lib.frajul;
let
cfg = config.modules.nixos.home;
in
{
imports = with inputs; [
home-manager.nixosModules.home-manager
nix-colors.homeManagerModules.default
prism.homeModules.prism
];
options.modules.nixos.home = with types; {
enable = mkBoolOpt false "Enable or disable nixos home";
};
options.home = with types; {
file = mkOpt attrs { } "A set of files to be managed by home-manager's <option>home.file</option>.";
configFile =
mkOpt attrs { }
"A set of files to be managed by home-manager's <option>xdg.configFile</option>.";
programs = mkOpt attrs { } "Programs to be managed by home-manager.";
extraOptions = mkOpt attrs { } "Options to pass directly to home-manager.";
persist = mkOpt attrs { } "Files and directories to persist in the home";
};
config = mkIf cfg.enable {
home.extraOptions = {
home.stateVersion = config.system.stateVersion;
home.file = mkAliasDefinitions options.home.file;
xdg.enable = true;
xdg.configFile = mkAliasDefinitions options.home.configFile;
programs = mkAliasDefinitions options.home.programs;
};
home-manager = {
useUserPackages = true;
users.${config.user.name} = mkAliasDefinitions options.home.extraOptions;
};
environment.persistence."/persist".users.${config.user.name} = mkIf options.impermanence.enable.value (
mkAliasDefinitions options.home.persist
);
};
}

View File

@ -1,55 +0,0 @@
{
options,
config,
lib,
inputs,
...
}:
with lib;
with lib.frajul; let
cfg = config.impermanence;
in {
imports = with inputs; [
impermanence.nixosModules.impermanence
persist-retro.nixosModules.persist-retro
];
options.impermanence = with types; {
enable = mkBoolOpt false "Enable impermanence";
removeTmpFilesOlderThan = mkOpt int 14 "Number of days to keep old btrfs_tmp files";
};
options.environment = with types; {
persist = mkOpt attrs {} "Files and directories to persist in the home";
};
config = {
# This script does the actual wipe of the system
# So if it doesn't run, the btrfs system effectively acts like a normal system
boot.initrd.postDeviceCommands = mkIf cfg.enable (lib.mkAfter ''
mkdir /btrfs_tmp
mount /dev/pool/root /btrfs_tmp
if [[ -e /btrfs_tmp/root ]]; then
mkdir -p /btrfs_tmp/old_roots
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
fi
delete_subvolume_recursively() {
IFS=$'\n'
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
delete_subvolume_recursively "/btrfs_tmp/$i"
done
btrfs subvolume delete "$1"
}
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +${builtins.toString cfg.removeTmpFilesOlderThan}); do
delete_subvolume_recursively "$i"
done
btrfs subvolume create /btrfs_tmp/root
umount /btrfs_tmp
'');
environment.persistence."/persist" = mkIf cfg.enable (mkAliasDefinitions options.environment.persist);
};
}

View File

@ -1,30 +0,0 @@
{
options,
config,
lib,
...
}:
with lib;
with lib.frajul; let
cfg = config.services.arion.filebrowser;
in {
options.services.arion.filebrowser = with types; {
enable = mkBoolOpt false "Enable the filebrowser docker service";
};
config = mkIf cfg.enable {
virtualisation.arion.enable = true;
virtualisation.arion.projects.filebrowser.settings = {
project.name = "filebrowser";
services.filebrowser.service = {
image = "filebrowser/filebrowser";
ports = [
"8080:80"
];
volumes = [
"/home/${config.user.name}:/srv"
];
};
};
};
}

View File

@ -1,37 +0,0 @@
{
options,
config,
lib,
...
}:
with lib;
with lib.frajul; let
cfg = config.services.arion.jellyfin;
in {
options.services.arion.jellyfin = with types; {
enable = mkBoolOpt false "Enable jellyfin";
};
config = mkIf cfg.enable {
virtualisation.arion.enable = true;
virtualisation.arion.projects.jellyfin.settings = {
project.name = "jellyfin";
services.jellyfin.service = {
image = "jellyfin/jellyfin";
ports = [
"8096:8096"
];
volumes = [
"/home/${config.user.name}/.local/share/jellyfin/config:/config"
"/home/${config.user.name}/.local/share/jellyfin/cache:/cache"
"/home/${config.user.name}/.local/share/jellyfin/media:/media"
];
};
};
home.persist.directories = [
".local/share/jellyfin/config"
".local/share/jellyfin/cache"
];
};
}

View File

@ -1,48 +0,0 @@
{
options,
config,
lib,
...
}:
with lib;
with lib.frajul; let
cfg = config.services.arion.terraria.vanilla;
in {
options.services.arion.terraria.vanilla = with types; {
enable = mkBoolOpt false "";
};
config = mkIf cfg.enable {
virtualisation.arion.enable = true;
virtualisation.arion.projects.terraria-vanilla.settings = {
project.name = "vanilla";
services.terraria.service = {
image = "ryshe/terraria:latest";
environment = {
WORLD_FILENAME = "world.wld";
CONFIGPATH = "config.json";
};
ports = [
"7777:7777"
];
volumes = [
"/home/${config.user.name}/.local/share/terraria/vanilla/worlds:/root/.local/share/Terraria/Worlds"
];
# For the first run you will need to generate a new world with a size where: 1 = Small, 2=Medium, 3=Large
command = [
"-autocreate"
"2"
];
};
services.ngrok.service = {
image = "ngrok/ngrok";
env_file = ["${config.sops.secrets."ngrok/terraria".path}"];
command = ["tcp" "terraria:7777"];
};
};
home.persist.directories = [
".local/share/terraria/vanilla/worlds"
];
};
}

View File

@ -1,40 +0,0 @@
{
options,
config,
lib,
...
}:
with lib;
with lib.frajul; let
cfg = config.services.arion.windows;
in {
options.services.arion.windows = with types; {
enable = mkBoolOpt false "Enable the windows docker service";
};
config = mkIf cfg.enable {
virtualisation.arion.enable = true;
virtualisation.arion.projects.windows.settings = {
project.name = "windows";
services.windows.service = {
image = "dockurr/windows";
environment.VERSION = "win11";
ports = [
"8006:8006"
"3389:3389/tcp"
"3389:3389/udp"
];
devices = [
"/dev/kvm"
];
capabilities = {
NET_ADMIN = true;
};
stop_grace_period = "2m";
volumes = [
"/home/${config.user.name}:/srv"
];
};
};
};
}

View File

@ -1,52 +0,0 @@
{
options,
config,
lib,
...
}:
with lib;
with lib.frajul; let
cfg = config.services.internalDomain;
in {
options.services.internalDomain = with types; {
enable = mkBoolOpt false "Enable dnsmasq, a custom internalDomain server";
domain = mkOpt str "home.lan" "Internal Domain to use, defaults to home.lan";
reverseProxyIp = mkOpt str "127.0.0.1" "IP address for the reverse proxy";
};
config =
(mkIf cfg.enable {
services.caddy.enable = true;
services.caddy.virtualHosts."*.home.lan".extraConfig = ''
tls internal
'';
networking.firewall.allowedTCPPorts = [53];
networking.firewall.allowedUDPPorts = [53];
services.dnsmasq = {
enable = true;
resolveLocalQueries = true;
alwaysKeepRunning = true;
settings = {
server = ["9.9.9.9"];
inherit (cfg) domain;
local = "/${cfg.domain}/";
bogus-priv = true;
expand-hosts = true;
no-hosts = true;
domain-needed = true;
no-resolv = true;
no-poll = true;
address = [
"/${cfg.domain}/${cfg.reverseProxyIp}"
];
};
};
})
// {
};
}

View File

@ -1,50 +0,0 @@
{
options,
config,
lib,
...
}:
with lib;
with lib.frajul;
let
cfg = config.services.ssh;
in
{
options.services.ssh = with types; {
enable = mkBoolOpt false "Enable ssh";
};
config = mkIf cfg.enable {
services.openssh = {
enable = true;
ports = [ 22 ];
passwordAuthentication = false;
};
users.users = {
root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL9nKsW0v9SMQo86fxHlX5gnS/ELlWqAS/heyzZ+oPzd iogamastercode@gmail.com"
];
${config.user.name}.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL9nKsW0v9SMQo86fxHlX5gnS/ELlWqAS/heyzZ+oPzd iogamastercode@gmail.com"
];
};
home.file.".ssh/config".text = ''
identityfile ~/.ssh/key
'';
home.persist.directories = [ ".ssh" ];
environment.persist.directories = [ "/root/ssh" ];
environment.persist.files = [
"/etc/machine-id"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
];
};
}

View File

@ -24,23 +24,23 @@ let
cfg = config.modules.sops;
in
{
# imports = [ inputs.sops-nix.nixosModules.sops ];
imports = [ inputs.sops-nix.nixosModules.sops ];
# options.modules.sops = { };
options.modules.sops = { };
# config = {
#sops.defaultSopsFile = ../../../secrets/secrets.yaml;
#sops.defaultSopsFormat = "yaml";
#sops.age.keyFile = "/home/julian/.config/sops/age/keys.txt";
config = {
#sops.defaultSopsFile = ../../../secrets/secrets.yaml;
#sops.defaultSopsFormat = "yaml";
#sops.age.keyFile = "/home/julian/.config/sops/age/keys.txt";
# List of defined secrets
#sops.secrets."aspi/password" = {
# neededForUsers = true;
#};
# List of defined secrets
#sops.secrets."aspi/password" = {
# neededForUsers = true;
#};
# sops.secrets."aspi/syncthing/key" = {
# neededForUsers = true;
# };
# sops.secrets."ngrok/terraria" = { };
# };
# sops.secrets."aspi/syncthing/key" = {
# neededForUsers = true;
# };
# sops.secrets."ngrok/terraria" = { };
};
}

View File

@ -1,65 +0,0 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.frajul;
let
cfg = config.suites.common;
in
{
options.suites.common = with types; {
enable = mkBoolOpt false "Enable the common suite";
};
config = mkIf cfg.enable {
system.nix.enable = true;
system.security.doas.enable = true;
hardware.audio.enable = true;
hardware.networking.enable = true;
apps.misc.enable = true;
hardware.bluetooth.enable = true;
hardware.bluetooth.settings = {
General = {
FastConnectable = true;
JustWorksRepairing = "always";
Privacy = "device";
};
Policy = {
AutoEnable = true;
};
inputs = {
UserSpaceHID = true;
};
};
environment.persist.directories = [ "/etc/bluetooth" ];
apps.pass.enable = true;
apps.tools.git.enable = true;
apps.tools.nix-ld.enable = true;
services.ssh.enable = true;
programs.dconf.enable = true;
environment.systemPackages = [
pkgs.bluetuith
pkgs.nh # pkgs.custom.sys
pkgs.deploy-rs
];
system = {
fonts.enable = true;
locale.enable = true;
time.enable = true;
xkb.enable = true;
};
};
}

View File

@ -1,43 +0,0 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.frajul;
let
cfg = config.suites.desktop;
in
{
options.suites.desktop = with types; {
enable = mkBoolOpt false "Enable the desktop suite";
};
config = mkIf cfg.enable {
desktop.hyprland.enable = true;
apps.firefox.enable = true;
apps.discord.enable = true;
apps.tools.gnupg.enable = true;
apps.pass.enable = true;
suites.common.enable = true;
services.flatpak.enable = true;
services.xserver = {
enable = true;
displayManager.gdm.enable = true;
};
environment.persist.directories = [ "/etc/gdm" ];
environment.systemPackages = with pkgs; [
cinnamon.nemo
xclip
xarchiver
];
};
}

View File

@ -1,41 +0,0 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.frajul; let
cfg = config.suites.development;
in {
options.suites.development = with types; {
enable = mkBoolOpt false "Enable the development suite";
};
config = mkIf cfg.enable {
apps.neovim.enable = true;
apps.tools.direnv.enable = true;
apps.misc.enable = true;
home.configFile."nix-init/config.toml".text = ''
maintainers = ["iogamaster"]
commit = true
'';
environment.systemPackages = with pkgs; [
licensor
# Nix Utils
nix-index
nix-init
nix-melt
nix-update
nixpkgs-fmt
nixpkgs-hammering
nixpkgs-review
nurl
];
};
}

View File

@ -1,36 +0,0 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.frajul; let
cfg = config.suites.editing;
in {
options.suites.editing = with types; {
enable = mkBoolOpt false "Enable the editing suite";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
obs-studio
audacity
chromium
inkscape
mediainfo
vhs
];
# OBS
boot.extraModulePackages = with config.boot.kernelPackages; [v4l2loopback];
boot.kernelModules = [
"v4l2loopback"
];
home.persist.directories = [
".config/obs-studio"
];
};
}

View File

@ -1,64 +0,0 @@
{
options,
config,
lib,
pkgs,
inputs,
...
}:
with lib;
with lib.frajul;
let
cfg = config.suites.gaming;
in
{
imports = with inputs; [ dzgui-nix.nixosModules.default ];
options.suites.gaming = with types; {
enable = mkBoolOpt false "Enable the gaming suite";
};
config = mkIf cfg.enable {
apps.steam.enable = true;
hardware.opengl = {
enable = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
intel-media-driver
intel-ocl
vaapiIntel
];
};
programs.dzgui.enable = true;
environment.systemPackages = [
pkgs.prismlauncher
pkgs.lutris
pkgs.heroic
pkgs.gamemode
pkgs.mangohud
pkgs.gamescope
# pkgs.custom.relive
pkgs.r2modman
pkgs.bottles
];
home.persist.directories = [
".config/r2modman"
".config/r2modmanPlus-local"
".config/dztui"
".local/share/lutris"
".local/share/aspyr-media"
".local/share/bottles"
".local/share/PrismLauncher"
".local/share/dzgui"
"Games"
];
};
}

Some files were not shown because too many files have changed in this diff Show More