This commit is contained in:
gwg313 2024-12-15 14:08:33 -05:00
parent 308bdbebf9
commit badcf3aa40
Signed by: gwg313
GPG key ID: 60FF63B4826B7400
43 changed files with 1972 additions and 253 deletions

View file

@ -1,9 +1,10 @@
{pkgs, ...}: { { pkgs, ... }:
{
services.printing.enable = true; services.printing.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gnome.adwaita-icon-theme adwaita-icon-theme
gnome.gnome-themes-extra gnome-themes-extra
firefox-wayland firefox-wayland
librewolf librewolf
discord discord

View file

@ -2,7 +2,8 @@
pkgs, pkgs,
inputs, inputs,
... ...
}: { }:
{
imports = [ imports = [
./common.nix ./common.nix
./dbus.nix ./dbus.nix
@ -29,7 +30,7 @@
variant = ""; variant = "";
layout = "us"; layout = "us";
}; };
excludePackages = [pkgs.xterm]; excludePackages = [ pkgs.xterm ];
# videoDrivers = ["amdgpu"]; # videoDrivers = ["amdgpu"];
libinput = { libinput = {
enable = true; enable = true;
@ -51,15 +52,16 @@
programs = { programs = {
hyprland = { hyprland = {
enable = true; enable = true;
withUWSM = true; # recommended for most users
package = inputs.hyprland.packages.${pkgs.system}.hyprland; package = inputs.hyprland.packages.${pkgs.system}.hyprland;
xwayland = { xwayland = {
enable = true; enable = true;
}; };
}; };
waybar = { waybar = {
enable = true; enable = false;
package = pkgs.waybar.overrideAttrs (oldAttrs: { package = pkgs.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"]; mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
}); });
}; };
thunar = { thunar = {

View file

@ -1,11 +1,13 @@
{lib, ...}: { { lib, ... }:
{
imports = [ imports = [
./zerotier.nix ./zerotier.nix
./firewall.nix ./firewall.nix
./wireless.nix # ./wireless.nix
./networkmanager.nix
]; ];
zerotier.enable = lib.mkDefault true; zerotier.enable = lib.mkDefault true;
firewall.enable = lib.mkDefault true; firewall.enable = lib.mkDefault true;
wireless.enable = lib.mkDefault false; # wireless.enable = lib.mkDefault false;
} }

View file

@ -0,0 +1,29 @@
{
config,
pkgs,
...
}:
{
sops.secrets."wireless.env" = { };
networking = {
networkmanager = {
enable = true;
ensureProfiles = {
environmentFiles = [ config.sops.secrets."wireless.env".path ];
profiles = {
home-wifi = {
connection.id = "home-wifi";
connection.type = "wifi";
wifi.ssid = "$home_uuid";
wifi-security = {
auth-alg = "open";
key-mgmt = "wpa-psk";
psk = "$home_psk";
};
};
};
};
};
};
}

View file

@ -2,10 +2,12 @@
config, config,
lib, lib,
... ...
}: { }:
{
imports = [ imports = [
./bluetooth.nix ./bluetooth.nix
../networking/wireless.nix # ../networking/wireless.nix
../networking/networkmanager.nix
]; ];
options = { options = {
laptop.enable = lib.mkEnableOption "Enables Laptop options"; laptop.enable = lib.mkEnableOption "Enables Laptop options";
@ -19,6 +21,6 @@
services.tlp.enable = true; services.tlp.enable = true;
bluetooth.enable = true; bluetooth.enable = true;
wireless.enable = true; # wireless.enable = true;
}; };
} }

30
common/nixos/tuigreet.nix Normal file
View file

@ -0,0 +1,30 @@
{ pkgs, ... }:
{
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --remember --asterisks --container-padding 2 --time --time-format '%I:%M %p | %a %h | %F' --cmd Hyprland";
# command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland";
user = "greeter";
};
};
};
environment.systemPackages = with pkgs; [ greetd.tuigreet ];
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
StandardError = "journal"; # Without this errors will spam on screen
# Without these bootlogs will spam on screen
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
security.pam.services.greetd.enableGnomeKeyring = true;
# To prevent getting stuck at shutdown
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
}

View file

@ -0,0 +1,9 @@
{ lib, ... }:
{
options = {
var = lib.mkOption {
type = lib.types.attrs;
default = { };
};
};
}

View file

@ -0,0 +1,18 @@
{
rounding = 15;
gaps-in = 10;
gaps-out = 10 * 2;
active-opacity = 1;
inactive-opacity = 0.89;
blur = true;
border-size = 3;
animation-speed = "medium"; # "fast" | "medium" | "slow"
fetch = "fastfetch"; # "nerdfetch" | "neofetch" | "pfetch" | "none"
bar = {
position = "top"; # "top" | "bottom"
transparent = true;
transparentButtons = false;
floating = true;
};
}

810
flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -10,6 +10,11 @@
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'. # Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
hyprpanel.url = "github:Jas-SinghFSU/HyprPanel";
hyprspace = {
url = "github:KZDKM/Hyprspace";
};
# Home manager # Home manager
home-manager.url = "github:nix-community/home-manager/master"; home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";

View file

@ -7,7 +7,8 @@
config, config,
pkgs, pkgs,
... ...
}: { }:
{
# You can import other home-manager modules here # You can import other home-manager modules here
imports = [ imports = [
# If you want to use modules your own flake exports (from modules/home-manager): # If you want to use modules your own flake exports (from modules/home-manager):
@ -18,6 +19,7 @@
inputs.ags.homeManagerModules.default inputs.ags.homeManagerModules.default
# You can also split up your configuration and import pieces of it here: # You can also split up your configuration and import pieces of it here:
./candlekeep/variables.nix
# ./nvim.nix # ./nvim.nix
../modules/common.nix ../modules/common.nix
../modules/hyprland.nix ../modules/hyprland.nix
@ -29,6 +31,12 @@
../modules/ags.nix ../modules/ags.nix
../modules/neovim ../modules/neovim
../modules/yazi.nix ../modules/yazi.nix
../modules/hyprpanel.nix
../modules/hyprlock.nix
../modules/hypridle.nix
# ../modules/hyprspace.nix
../modules/qutebrowser.nix
../scripts/default.nix
]; ];
nixpkgs = { nixpkgs = {
@ -41,7 +49,7 @@
# You can also add overlays exported from other flakes: # You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default # neovim-nightly-overlay.overlays.default
(final: prev: {neovim = inputs.neovim-config.packages."x86_64-linux".default;}) (final: prev: { neovim = inputs.neovim-config.packages."x86_64-linux".default; })
# Or define it inline, for example: # Or define it inline, for example:
# (final: prev: { # (final: prev: {
@ -49,6 +57,7 @@
# patches = [ ./change-hello-to-hi.patch ]; # patches = [ ./change-hello-to-hi.patch ];
# }); # });
# }) # })
inputs.hyprpanel.overlay
]; ];
# Configure your nixpkgs instance # Configure your nixpkgs instance
config = { config = {
@ -66,7 +75,7 @@
stylix = { stylix = {
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-latte.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-latte.yaml";
image = ../../wallpapers/nixos-wallpaper-catppuccin-latte.png; image = ../../wallpapers/forrest.png;
autoEnable = true; autoEnable = true;
enable = true; enable = true;
@ -103,7 +112,11 @@
# Add stuff for your user as you see fit: # Add stuff for your user as you see fit:
# programs.neovim.enable = true; # programs.neovim.enable = true;
home.packages = with pkgs; [openvpn]; home.packages = with pkgs; [
openvpn
hyprpanel
nerd-fonts.overpass
];
# Enable home-manager and git # Enable home-manager and git
programs.home-manager.enable = true; programs.home-manager.enable = true;

View file

@ -0,0 +1,26 @@
{ config, ... }:
{
imports = [ ../../../common/nixos/variables-config.nix ];
config.var = {
hostname = "candlekeep";
username = "gwg313";
configDirectory = "/home/" + config.var.username + "/.config/nixos";
keyboardLayout = "en_US";
location = "Ottawa";
timeZone = "American/Toronto";
defaultLocale = "en_US.UTF-8";
git = {
username = "gwg313";
email = "gwg313@pm.me";
};
autoUpgrade = true;
autoGarbageCollector = true;
theme = import ../../../common/style/vars/candlekeep.nix;
};
}

View file

@ -13,7 +13,8 @@
}; };
font = { font = {
normal = { normal = {
family = lib.mkForce "Monaspace Krypton"; # family = lib.mkForce "Monaspace Krypton";
family = lib.mkForce "Comic Code";
}; };
}; };
}; };

View file

@ -1,7 +1,9 @@
{pkgs, ...}: { { pkgs, ... }:
{
imports = [ imports = [
./alacritty.nix ./alacritty.nix
./fuzzel.nix ./fuzzel.nix
./kitty.nix
]; ];
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
@ -11,7 +13,7 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
# fonts # fonts
nerdfonts nerd-fonts.monaspace
noto-fonts-cjk-sans noto-fonts-cjk-sans
rPackages.fontawesome rPackages.fontawesome
ubuntu_font_family ubuntu_font_family

View file

@ -16,6 +16,7 @@
./tmux/tmux.nix ./tmux/tmux.nix
./zoxide.nix ./zoxide.nix
./zsh.nix ./zsh.nix
./nushell.nix
]; ];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -60,6 +61,7 @@
atac atac
dblab dblab
gobang gobang
lazyjournal
# TUI Apps # TUI Apps
#ncdu_2 #ncdu_2

View file

@ -0,0 +1,28 @@
# Hypridle is a daemon that listens for user activity and runs commands when the user is idle.
{ pkgs, ... }:
{
services.hypridle = {
enable = true;
settings = {
general = {
ignore_dbus_inhibit = false;
lock_cmd = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
{
timeout = 600;
on-timeout = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
}
{
timeout = 660;
on-timeout = "systemctl suspend";
}
];
};
};
}

View file

@ -2,16 +2,17 @@
config, config,
pkgs, pkgs,
... ...
}: { }:
imports = [./waybar.nix]; {
imports = [ ./waybar.nix ];
services.mako = { # services.mako = {
enable = true; # enable = true;
defaultTimeout = 4000; # defaultTimeout = 4000;
borderRadius = 5; # borderRadius = 5;
borderSize = 2; # borderSize = 2;
layer = "overlay"; # layer = "overlay";
}; # };
wayland.windowManager.hyprland.enable = true; wayland.windowManager.hyprland.enable = true;
@ -96,13 +97,17 @@
bind = [ bind = [
# general binds # general binds
"$mod, RETURN, exec, ${pkgs.alacritty}/bin/alacritty" ",switch:Lid Switch, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock when closing Lid
# "$mod, RETURN, exec, ${pkgs.alacritty}/bin/alacritty"
"$mod, RETURN, exec, ${pkgs.kitty}/bin/kitty"
"$shiftMod,SPACE, exec, hyprfocus-toggle" # Toggle HyprFocus
"$mod, Q, killactive" "$mod, Q, killactive"
"SUPER_SHIFT, Q, exec, ${pkgs.wlogout}/bin/wlogout" "SUPER_SHIFT, Q, exec, ${pkgs.wlogout}/bin/wlogout"
"$mod, SPACE, exec, pkill fuzzel || ${pkgs.fuzzel}/bin/fuzzel" # pkill or allows for toggle "$mod, SPACE, exec, pkill fuzzel || ${pkgs.fuzzel}/bin/fuzzel" # pkill or allows for toggle
"SUPER_SHIFT, SPACE, togglefloating" "SUPER_SHIFT, SPACE, togglefloating"
"$mod, F, fullscreen" # "$mod, F, fullscreen"
"$mod, L, exec, ${pkgs.swaylock-effects}/bin/swaylock -f" "$mod,F, exec, hyprfocus-toggle" # Toggle HyprFocus
"$mod, L, exec, ${pkgs.hyprlock}/bin/hyprlock"
"$mod, B, exec, ${pkgs.grim}/bin/grim \"desktop-$(${pkgs.busybox}/bin/date +\"%Y%m%d%H%m\").png" "$mod, B, exec, ${pkgs.grim}/bin/grim \"desktop-$(${pkgs.busybox}/bin/date +\"%Y%m%d%H%m\").png"
"SUPER_SHIFT, B, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -d)\" - | ${pkgs.wl-clipboard}/bin/wl-copy" # Screenshot selection directly to clipboard "SUPER_SHIFT, B, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -d)\" - | ${pkgs.wl-clipboard}/bin/wl-copy" # Screenshot selection directly to clipboard
@ -114,8 +119,10 @@
# Screen Brightness # Screen Brightness
#",XF86MonBrightnessUp, exec, ${pkgs.light}/bin/light -A 10" #",XF86MonBrightnessUp, exec, ${pkgs.light}/bin/light -A 10"
#",XF86MonBrightnessDown, exec, ${pkgs.light}/bin/light -U 10" #",XF86MonBrightnessDown, exec, ${pkgs.light}/bin/light -U 10"
",XF86MonBrightnessUp, exec, ${pkgs.light}/bin/light -S \"$(${pkgs.light}/bin/light -G | ${pkgs.busybox}/bin/awk '{ print int(($1 + .72) * 1.4) }')\"" # ",XF86MonBrightnessUp, exec, ${pkgs.light}/bin/light -S \"$(${pkgs.light}/bin/light -G | ${pkgs.busybox}/bin/awk '{ print int(($1 + .72) * 1.4) }')\""
",XF86MonBrightnessDown, exec, ${pkgs.light}/bin/light -S \"$(${pkgs.light}/bin/light -G | ${pkgs.busybox}/bin/awk '{ print int($1 / 1.4) }')\"" # ",XF86MonBrightnessDown, exec, ${pkgs.light}/bin/light -S \"$(${pkgs.light}/bin/light -G | ${pkgs.busybox}/bin/awk '{ print int($1 / 1.4) }')\""
",XF86MonBrightnessUp, exec, brightness-up" # Brightness Up
",XF86MonBrightnessDown, exec, brightness-down" # Brightness Down
# move focus # move focus
"$mod, left, movefocus, l" "$mod, left, movefocus, l"
"$mod, right, movefocus, r" "$mod, right, movefocus, r"
@ -160,9 +167,9 @@
"$mod_ALT, mouse:272, resizewindow" "$mod_ALT, mouse:272, resizewindow"
]; ];
monitor = [",preferred,auto,1"]; monitor = [ ",preferred,auto,1" ];
# monitor = [ "HDMI-A-1,1920x1080@144,auto,1" ]; # monitor = [ "HDMI-A-1,1920x1080@144,auto,1" ];
exec = ["${pkgs.swaybg}/bin/swaybg -i ${config.stylix.image} -m fill"]; exec = [ "${pkgs.swaybg}/bin/swaybg -i ${config.stylix.image} -m fill" ];
exec-once = [ exec-once = [
# Enables clipboard sync # Enables clipboard sync
"${pkgs.wl-clipboard}/bin/wl-paste -p | ${pkgs.wl-clipboard}/bin/wl-copy" "${pkgs.wl-clipboard}/bin/wl-paste -p | ${pkgs.wl-clipboard}/bin/wl-copy"
@ -189,35 +196,5 @@
# will reset the submap, meaning end the current one and return to the global one # will reset the submap, meaning end the current one and return to the global one
submap=reset submap=reset
''; '';
services.swayidle = {
enable = true;
events = [
{
event = "before-sleep";
command = "${pkgs.swaylock}/bin/swaylock -f";
}
{
event = "lock";
command = "lock";
}
];
timeouts = [
{
timeout = 1800;
command = "${pkgs.swaylock}/bin/swaylock -f";
}
];
systemdTarget = "xdg-desktop-portal-hyprland.service";
};
programs.swaylock = {
enable = true;
settings = {
font-size = "24";
indicator-idle-visible = false;
indicator-radius = 100;
indicator-thickness = 20;
show-failed-attempts = true;
};
};
} }

View file

@ -0,0 +1,89 @@
{ config, lib, ... }:
let
foreground = "rgba(216, 222, 233, 0.70)";
imageStr = toString config.stylix.image;
font = config.stylix.fonts.serif.name;
in
{
programs.hyprlock = {
enable = true;
settings = {
general = {
grace = 5;
no_fade_in = false;
disable_loading_bar = false;
};
# BACKGROUND
background = {
monitor = "";
# path = imageStr;
blur_passes = 0;
contrast = 0.8916;
brightness = 0.7172;
vibrancy = 0.1696;
vibrancy_darkness = 0.0;
};
label = [
{
# Day-Month-Date
monitor = "";
text = ''cmd[update:1000] echo -e "$(date +"%A, %B %d")"'';
color = foreground;
font_size = 28;
font_family = font + " Bold";
position = "0, 490";
halign = "center";
valign = "center";
}
# Time
{
monitor = "";
text = ''cmd[update:1000] echo "<span>$(date +"%I:%M")</span>"'';
color = foreground;
font_size = 160;
font_family = "steelfish outline regular";
position = "0, 370";
halign = "center";
valign = "center";
}
# USER
{
monitor = "";
text = " $USER";
color = foreground;
outline_thickness = 2;
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true;
font_size = 18;
font_family = font + " Bold";
position = "0, -180";
halign = "center";
valign = "center";
}
];
# INPUT FIELD
input-field = lib.mkForce {
monitor = "";
size = "300, 60";
outline_thickness = 2;
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true;
outer_color = "rgba(255, 255, 255, 0)";
inner_color = "rgba(255, 255, 255, 0.1)";
font_color = foreground;
fade_on_empty = false;
font_family = font + " Bold";
placeholder_text = "<i>🔒 Enter Password</i>";
hide_input = false;
position = "0, -250";
halign = "center";
valign = "center";
};
};
};
}

View file

@ -0,0 +1,239 @@
# Hyprpanel is the bar on top of the screen
# Display informations like workspaces, battery, wifi, ...
{ pkgs, config, ... }:
let
transparentButtons = config.var.theme.bar.transparentButtons;
location = config.var.location;
username = config.var.username;
accent = "#${config.lib.stylix.colors.base0D}";
accent-alt = "#${config.lib.stylix.colors.base03}";
background = "#${config.lib.stylix.colors.base00}";
background-alt = "#${config.lib.stylix.colors.base01}";
foreground = "#${config.lib.stylix.colors.base05}";
font = "${config.stylix.fonts.serif.name}";
fontSize = "${toString config.stylix.fonts.sizes.desktop}";
rounding = config.var.theme.rounding;
border-size = config.var.theme.border-size;
gaps-out = config.var.theme.gaps-out;
gaps-in = config.var.theme.gaps-in;
floating = config.var.theme.bar.floating;
transparent = config.var.theme.bar.transparent;
position = config.var.theme.bar.position;
in
{
wayland.windowManager.hyprland.settings.exec-once = [ "${pkgs.hyprpanel}/bin/hyprpanel" ];
home.packages = with pkgs; [
hyprpanel
libnotify
];
home.file.".cache/ags/hyprpanel/options.json" = {
text = # json
''
{
"bar.layouts": {
"0": {
"left": [
"dashboard",
"workspaces",
"windowtitle"
],
"middle": [
"media"
],
"right": [
"systray",
"volume",
"bluetooth",
"battery",
"network",
"clock",
"notifications"
]
},
"1": {
"left": [
"dashboard",
"workspaces",
"windowtitle"
],
"middle": [
"media"
],
"right": [
"systray",
"volume",
"bluetooth",
"battery",
"network",
"clock",
"notifications"
]
},
"2": {
"left": [
"dashboard",
"workspaces",
"windowtitle"
],
"middle": [
"media"
],
"right": [
"systray",
"volume",
"bluetooth",
"battery",
"network",
"clock",
"notifications"
]
}
},
"theme.font.name": "${font}",
"theme.font.size": "${fontSize}px",
"theme.bar.outer_spacing": "${if floating && transparent then "0" else "8"}px",
"theme.bar.buttons.y_margins": "${if floating && transparent then "0" else "8"}px",
"theme.bar.buttons.spacing": "0.3em",
"theme.bar.buttons.radius": "${
if transparent then toString rounding else toString (rounding - 8)
}px",
"theme.bar.floating": ${if floating then "true" else "false"},
"theme.bar.buttons.padding_x": "0.8rem",
"theme.bar.buttons.padding_y": "0.4rem",
"theme.bar.buttons.workspaces.hover": "${accent-alt}",
"theme.bar.buttons.workspaces.active": "${accent}",
"theme.bar.buttons.workspaces.available": "${accent-alt}",
"theme.bar.buttons.workspaces.occupied": "${accent}",
"theme.bar.margin_top": "${if position == "top" then toString (gaps-in * 2) else "0"}px",
"theme.bar.margin_bottom": "${if position == "top" then "0" else toString (gaps-in * 2)}px",
"theme.bar.margin_sides": "${toString gaps-out}px",
"theme.bar.border_radius": "${toString rounding}px",
"bar.launcher.icon": "",
"theme.bar.transparent": ${if transparent then "true" else "false"},
"bar.workspaces.show_numbered": false,
"bar.workspaces.workspaces": 5,
"bar.workspaces.monitorSpecific": true,
"bar.workspaces.hideUnoccupied": false,
"bar.windowtitle.label": true,
"bar.volume.label": false,
"bar.network.truncation_size": 12,
"bar.bluetooth.label": false,
"bar.clock.format": "%a %b %d %I:%M %p",
"bar.notifications.show_total": true,
"theme.notification.border_radius": "${toString rounding}px",
"theme.osd.enable": true,
"theme.osd.orientation": "vertical",
"theme.osd.location": "left",
"theme.osd.radius": "${toString rounding}px",
"theme.osd.margins": "0px 0px 0px 10px",
"theme.osd.muted_zero": true,
"menus.clock.weather.location": "${location}",
"menus.clock.weather.key": "myapikey",
"menus.clock.weather.unit": "metric",
"menus.dashboard.powermenu.avatar.image": "/home/${username}/.profile_picture.png",
"menus.dashboard.powermenu.confirmation": false,
"menus.dashboard.shortcuts.left.shortcut1.icon": "",
"menus.dashboard.shortcuts.left.shortcut1.command": "qutebrowser",
"menus.dashboard.shortcuts.left.shortcut1.tooltip": "Qutebrowser",
"menus.dashboard.shortcuts.left.shortcut2.icon": "󰅶",
"menus.dashboard.shortcuts.left.shortcut2.command": "caffeine",
"menus.dashboard.shortcuts.left.shortcut2.tooltip": "Caffeine",
"menus.dashboard.shortcuts.left.shortcut3.icon": "󰖔",
"menus.dashboard.shortcuts.left.shortcut3.command": "night-shift",
"menus.dashboard.shortcuts.left.shortcut3.tooltip": "Night-shift",
"menus.dashboard.shortcuts.left.shortcut4.icon": "",
"menus.dashboard.shortcuts.left.shortcut4.command": "menu",
"menus.dashboard.shortcuts.left.shortcut4.tooltip": "Search Apps",
"menus.dashboard.shortcuts.right.shortcut1.icon": "",
"menus.dashboard.shortcuts.right.shortcut1.command": "hyprpicker -a",
"menus.dashboard.shortcuts.right.shortcut1.tooltip": "Color Picker",
"menus.dashboard.shortcuts.right.shortcut3.icon": "󰄀",
"menus.dashboard.shortcuts.right.shortcut3.command": "screenshot region swappy",
"menus.dashboard.shortcuts.right.shortcut3.tooltip": "Screenshot",
"menus.dashboard.directories.left.directory1.label": "󰉍 Downloads",
"menus.dashboard.directories.left.directory1.command": "bash -c \"thunar $HOME/Downloads/\"",
"menus.dashboard.directories.left.directory2.label": "󰉏 Pictures",
"menus.dashboard.directories.left.directory2.command": "bash -c \"thunar $HOME/Pictures/\"",
"menus.dashboard.directories.left.directory3.label": "󱧶 Documents",
"menus.dashboard.directories.left.directory3.command": "bash -c \"thunar $HOME/Documents/\"",
"menus.dashboard.directories.right.directory1.label": "󱂵 Home",
"menus.dashboard.directories.right.directory1.command": "bash -c \"thunar $HOME/\"",
"menus.dashboard.directories.right.directory2.label": "󰚝 Projects",
"menus.dashboard.directories.right.directory2.command": "bash -c \"thunar $HOME/dev/\"",
"menus.dashboard.directories.right.directory3.label": " Config",
"menus.dashboard.directories.right.directory3.command": "bash -c \"thunar $HOME/.config/\"",
"theme.bar.menus.monochrome": true,
"wallpaper.enable": false,
"theme.bar.menus.background": "${background}",
"theme.bar.menus.cards": "${background-alt}",
"theme.bar.menus.card_radius": "${toString rounding}px",
"theme.bar.menus.label": "${foreground}",
"theme.bar.menus.text": "${foreground}",
"theme.bar.menus.border.size": "${toString border-size}px",
"theme.bar.menus.border.color": "${accent}",
"theme.bar.menus.border.radius": "${toString rounding}px",
"theme.bar.menus.popover.text": "${foreground}",
"theme.bar.menus.popover.background": "${background-alt}",
"theme.bar.menus.listitems.active": "${accent}",
"theme.bar.menus.icons.active": "${accent}",
"theme.bar.menus.switch.enabled":"${accent}",
"theme.bar.menus.check_radio_button.active": "${accent}",
"theme.bar.menus.buttons.default": "${accent}",
"theme.bar.menus.buttons.active": "${accent}",
"theme.bar.menus.iconbuttons.active": "${accent}",
"theme.bar.menus.progressbar.foreground": "${accent}",
"theme.bar.menus.slider.primary": "${accent}",
"theme.bar.menus.tooltip.background": "${background-alt}",
"theme.bar.menus.tooltip.text": "${foreground}",
"theme.bar.menus.dropdownmenu.background":"${background-alt}",
"theme.bar.menus.dropdownmenu.text": "${foreground}",
"theme.bar.background": "${background + (if transparentButtons then "00" else "")}",
"theme.bar.buttons.style": "default",
"theme.bar.buttons.monochrome": true,
"theme.bar.buttons.text": "${foreground}",
"theme.bar.buttons.background": "${
(if transparent then background else background-alt) + (if transparentButtons then "00" else "")
}",
"theme.bar.buttons.icon": "${accent}",
"theme.bar.buttons.notifications.background": "${background-alt}",
"theme.bar.buttons.hover": "${background}",
"theme.bar.buttons.notifications.hover": "${background}",
"theme.bar.buttons.notifications.total": "${accent}",
"theme.bar.buttons.notifications.icon": "${accent}",
"theme.notification.background": "${background-alt}",
"theme.notification.actions.background": "${accent}",
"theme.notification.actions.text": "${foreground}",
"theme.notification.label": "${accent}",
"theme.notification.border": "${background-alt}",
"theme.notification.text": "${foreground}",
"theme.notification.labelicon": "${accent}",
"theme.osd.bar_color": "${accent}",
"theme.osd.bar_overflow_color": "${accent-alt}",
"theme.osd.icon": "${background}",
"theme.osd.icon_container": "${accent}",
"theme.osd.label": "${accent}",
"theme.osd.bar_container": "${background-alt}",
"theme.bar.menus.menu.media.background.color": "${background-alt}",
"theme.bar.menus.menu.media.card.color": "${background-alt}",
"theme.bar.menus.menu.media.card.tint": 90,
"bar.customModules.updates.pollingInterval": 1440000,
"bar.media.show_active_only": true,
"theme.bar.location": "${position}"
}
'';
};
}

View file

@ -0,0 +1,19 @@
{ inputs, pkgs, ... }:
{
wayland.windowManager.hyprland = {
plugins = [ inputs.hyprspace.packages.${pkgs.system}.Hyprspace ];
settings = {
plugin = {
overview = {
autoDrag = false;
};
};
bind = [
"$mod,S, overview:toggle" # Overview
];
};
};
}

View file

@ -0,0 +1,29 @@
# A fast, GPU-accelerated terminal emulator.
{
pkgs,
lib,
...
}:
{
programs.kitty = {
enable = true;
font = {
# name = lib.mkForce "Comic Code";
size = lib.mkForce 16;
};
shellIntegration.enableZshIntegration = true;
extraConfig = ''
font_family family="Comic Code Ligatures"
bold_font auto
italic_font auto
bold_italic_font auto
symbol_map U+e000-U+e00a,U+ea60-U+ebeb,U+e0a0-U+e0c8,U+e0ca,U+e0cc-U+e0d7,U+e200-U+e2a9,U+e300-U+e3e3,U+e5fa-U+e6b1,U+e700-U+e7c5,U+ed00-U+efc1,U+f000-U+f2ff,U+f000-U+f2e0,U+f300-U+f372,U+f400-U+f533,U+f0001-U+f1af0 Symbols Nerd Font Mono
'';
environment = {
"TERM" = "xterm-256color";
};
};
home.packages = with pkgs; [
ueberzugpp
];
}

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
imports = [ imports = [
./discord ./discord
./zathura.nix ./zathura.nix
@ -27,5 +28,6 @@
chromium chromium
vlc vlc
zotero zotero
feishin
]; ];
} }

View file

@ -2,7 +2,8 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
programs.nixvim = { programs.nixvim = {
extraConfigLuaPre = extraConfigLuaPre =
# lua # lua
@ -63,10 +64,10 @@
servers = { servers = {
nil-ls = { nil-ls = {
enable = true; enable = true;
filetypes = ["nix"]; filetypes = [ "nix" ];
settings = { settings = {
formatting = { formatting = {
command = ["${lib.getExe pkgs.nixfmt-rfc-style}"]; command = [ "${lib.getExe pkgs.nixfmt-rfc-style}" ];
}; };
}; };
}; };
@ -74,14 +75,19 @@
pyright.enable = true; pyright.enable = true;
hls.enable = true; hls.enable = true;
gopls.enable = true; gopls.enable = true;
hls.installGhc = true; # hls.installGhc = true;
hls.filetypes = [
"haskell"
"lhaskell"
"cabal"
];
leanls.enable = true; leanls.enable = true;
texlab.enable = true; texlab.enable = true;
html.enable = true; html.enable = true;
cmake = { cmake = {
enable = true; enable = true;
filetypes = ["cmake"]; filetypes = [ "cmake" ];
}; };
# ccls = { # ccls = {

View file

@ -0,0 +1,118 @@
# A cat clone with syntax highlighting and Git integration.
{ pkgs, ... }:
{
programs.nushell = {
enable = true;
envFile.text = ''
# Environment Variables
$env.XDG_CONFIG_HOME = ($env.HOME | path join ".config")
# Starship Prompt
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
# Zoxide
zoxide init nushell | save -f ~/.zoxide.nu
'';
shellAliases = {
update = "sudo nixos-rebuild switch";
clean = "nix-collect-garbage -d";
repair = "nix-store --repair --verify --check-contents";
"." = "cd ../";
".." = "cd ../../";
"..." = "cd ../../../";
"...." = "cd ../../../../";
ls = "ls | grid -c -i";
ll = "ls";
ps = "procs";
grep = "rg";
cat = "bat";
vim = "nvim";
# Default flags
rm = "rm -i";
chmod = "chmod -R";
cp = "cp -i -v";
mv = "mv -i -v";
mkdir = "mkdir -p -v";
df = "df -h";
du = "du -h -s";
dd = "dd status=progress bs=4M conv=fdatasync ";
wgetpaste = "wgetpaste -Xx";
sudo = "sudo "; # Makes sudo work with es
ssh = "TERM=xterm ssh"; # Fixes some issues with ssh on some terminals
wget = "wget -c";
ping = "ping -c 5";
ftp = "ftp -p";
# Misc alieses I use often
ports = "ss -tulanp";
rmd = "rm -rf";
mine = "sudo chown -R $(whoami):users";
benchmark = "hyperfine --warmup 3 ";
c = "clear";
listen = "lsof -P -i -n";
octal = "stat -c '%a %n'";
};
configFile.text = ''
$env.config = {
show_banner: false
}
# Starhip Prompt
use ~/.cache/starship/init.nu
# Zoxide
source ~/.zoxide.nu
# nix shell
def nix-shell [] {
nix-shell --run $env.SHELL
}
def "version-completions" [] {
[
{value: "4", description: "IPv4 address (default)"},
{value: "6", description: "IPv6 address"}
]}
# Define the function with completion annotation
def "whatismyip" [
version?: int@version-completions # Parameter with custom completion
] {
# Validate and set default version
let version = if ($version == null) {
4
} else if ($version in [4 6]) {
$version
} else {
error make {
msg: "Invalid IP version. Must be either 4 or 6."
}
}
# Get IP address
let ip = (http get $"https://api($version).ipify.org")
# Create record and display as table
{
$"ip($version)": $ip
} | table
}
'';
};
home.packages = with pkgs; [
fastfetch
];
programs = {
carapace.enable = true;
carapace.enableNushellIntegration = true;
# starship = {
# enable = true;
# settings = {
# add_newline = true;
# character = {
# success_symbol = "[➜](bold green)";
# error_symbol = "[➜](bold red)";
# };
# };
# };
};
}

View file

@ -0,0 +1,170 @@
# A cat clone with syntax highlighting and Git integration.
{ ... }:
{
programs.qutebrowser = {
enable = true;
searchEngines = {
"DEFAULT" = "https://duckduckgo.com/?q={}&ia=web";
"d" = "https://duckduckgo.com/?q={}&ia=web";
"g" = "https://google.com/search?q={}";
"y" = "https://youtube.com/results?search_query={}";
"ya" = "https://yandex.com/search/?text={}";
"n" = "https://mynixos.com/search?q={}";
"nixo" = "https://search.nixos.org/options?channel=unstable&query={}";
"nixp" = "https://search.nixos.org/packages?channel=unstable&query={}";
"gt" = "https://github.com/search?q={}&type=repositories";
};
quickmarks = {
home = "github.com/gwg313";
mynixos = "https://mynixos.com";
github = "https://github.com";
outlook = "https://outlook.office.com/mail/";
office = "https://www.office.com/?auth=2";
proton = "https://mail.proton.me/u/0/inbox";
cloudflare-one = "https://one.dash.cloudflare.com/";
chatgpt = "https://chat.openai.com/";
nixvim = "https://nix-community.github.io/nixvim/";
hyprland = "https://wiki.hyprland.org/";
nerdfont = "https://www.nerdfonts.com/cheat-sheet";
youtube = "https://youtube.com/";
cloudflare = "https://dash.cloudflare.com/";
};
settings = {
url = {
default_page = "github.com/gwg313";
start_pages = [ "github.com/gwg313" ];
};
colors = {
webpage.preferred_color_scheme = "dark"; # Enable dark mode for websites that support it
};
statusbar.show = "in-mode";
completion = {
height = "30%";
open_categories = [ "history" ];
scrollbar = {
padding = 0;
width = 0;
};
show = "always";
shrink = true;
timestamp_format = "";
web_history.max_items = 7;
};
content = {
autoplay = false;
javascript.clipboard = "access";
javascript.enabled = true;
webgl = true;
pdfjs = true;
};
downloads = {
position = "bottom";
remove_finished = 0;
};
hints = {
radius = 1;
};
scrolling = {
bar = "never";
smooth = true;
};
tabs = {
show = "multiple";
last_close = "close";
mode_on_change = "restore";
close_mouse_button = "right";
};
zoom.default = "100%";
qt.force_software_rendering = "chromium";
};
keyBindings = {
normal = {
" p" = "tab-move -";
" n" = "tab-move +";
" w" = "tab-close";
" 1" = "tab-focus 1";
" 2" = "tab-focus 2";
" 3" = "tab-focus 3";
" 4" = "tab-focus 4";
" 5" = "tab-focus 5";
" 6" = "tab-focus 6";
" 7" = "tab-focus 7";
" 8" = "tab-focus 8";
" 9" = "tab-focus 9";
" 0" = "tab-focus 10";
"<Ctrl-w>" = "tab-close";
"<Ctrl-n>" = "open -w";
"<Ctrl-1>" = "tab-focus 1";
"<Ctrl-2>" = "tab-focus 2";
"<Ctrl-3>" = "tab-focus 3";
"<Ctrl-4>" = "tab-focus 4";
"<Ctrl-5>" = "tab-focus 5";
"<Ctrl-6>" = "tab-focus 6";
"<Ctrl-7>" = "tab-focus 7";
"<Ctrl-8>" = "tab-focus 8";
"<Ctrl-9>" = "tab-focus 9";
"<Ctrl-0>" = "tab-focus 10";
};
command = {
"<Ctrl-w>" = "tab-close";
"<Ctrl-n>" = "open -w";
"<Ctrl-1>" = "tab-focus 1";
"<Ctrl-2>" = "tab-focus 2";
"<Ctrl-3>" = "tab-focus 3";
"<Ctrl-4>" = "tab-focus 4";
"<Ctrl-5>" = "tab-focus 5";
"<Ctrl-6>" = "tab-focus 6";
"<Ctrl-7>" = "tab-focus 7";
"<Ctrl-8>" = "tab-focus 8";
"<Ctrl-9>" = "tab-focus 9";
"<Ctrl-0>" = "tab-focus 10";
};
insert = {
"<Ctrl-w>" = "tab-close";
"<Ctrl-n>" = "open -w";
"<Ctrl-1>" = "tab-focus 1";
"<Ctrl-2>" = "tab-focus 2";
"<Ctrl-3>" = "tab-focus 3";
"<Ctrl-4>" = "tab-focus 4";
"<Ctrl-5>" = "tab-focus 5";
"<Ctrl-6>" = "tab-focus 6";
"<Ctrl-7>" = "tab-focus 7";
"<Ctrl-8>" = "tab-focus 8";
"<Ctrl-9>" = "tab-focus 9";
"<Ctrl-0>" = "tab-focus 10";
};
};
extraConfig = ''
config.unbind("gm")
config.unbind("gd")
config.unbind("gb")
config.unbind("tl")
config.unbind("gt")
c.tabs.padding = {"bottom": 6, "left": 7, "right": 7, "top": 6}
c.statusbar.padding = {"bottom": 6, "left": 7, "right": 7, "top": 6}
config.load_autoconfig(True)
'';
};
}

View file

@ -1,8 +1,10 @@
# A customizable prompt for shells. # A customizable prompt for shells.
{...}: { { ... }:
{
programs.starship = { programs.starship = {
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
enableNushellIntegration = true;
settings = { settings = {
add_newline = true; add_newline = true;
character = { character = {

View file

@ -1,7 +1,9 @@
# ✨ Magical shell history # ✨ Magical shell history
{...}: { { ... }:
{
programs.zoxide = { programs.zoxide = {
enable = true; enable = true;
enableNushellIntegration = true;
}; };
programs.zsh = { programs.zsh = {

View file

@ -4,7 +4,8 @@
pkgs, pkgs,
user, user,
... ...
}: { }:
{
programs.zsh = { programs.zsh = {
enable = true; enable = true;
shellAliases = { shellAliases = {
@ -53,10 +54,10 @@
zplug = { zplug = {
enable = true; enable = true;
plugins = [ plugins = [
{name = "zsh-users/zsh-autosuggestions";} { name = "zsh-users/zsh-autosuggestions"; }
{name = "zsh-users/zsh-completions";} { name = "zsh-users/zsh-completions"; }
{name = "zsh-users/zsh-syntax-highlighting";} { name = "zsh-users/zsh-syntax-highlighting"; }
{name = "MichaelAquilina/zsh-you-should-use";} { name = "MichaelAquilina/zsh-you-should-use"; }
]; ];
}; };
@ -75,6 +76,11 @@
}; };
initExtra = '' initExtra = ''
eval $(thefuck --alias) eval $(thefuck --alias)
fastfetch
''; '';
}; };
home.packages = with pkgs; [
fastfetch
];
} }

View file

@ -0,0 +1,41 @@
# - ## Brightness
#-
#- This module provides a set of scripts to control the brightness of the screen.
#-
#- - `brightness-up` increases the brightness by 5%.
#- - `brightness-down` decreases the brightness by 5%.
#- - `brightness-set [value]` sets the brightness to the given value.
#- - `brightness-change [up|down] [value]` increases or decreases the brightness by the given value.
{ pkgs, ... }:
let
increments = "5";
brightness-change = pkgs.writeShellScriptBin "brightness-change" ''
[[ $1 == "up" ]] && ${pkgs.brightnessctl}/bin/brightnessctl set ''${2-${increments}}%+
[[ $1 == "down" ]] && ${pkgs.brightnessctl}/bin/brightnessctl set ''${2-${increments}}%-
'';
brightness-set = pkgs.writeShellScriptBin "brightness-set" ''
${pkgs.brightnessctl}/bin/brightnessctl set ''${1-100}%
'';
brightness-up = pkgs.writeShellScriptBin "brightness-up" ''
brightness-change up ${increments}
'';
brightness-down = pkgs.writeShellScriptBin "brightness-down" ''
brightness-change down ${increments}
'';
in
{
home.packages = [
pkgs.brightnessctl
brightness-change
brightness-up
brightness-down
brightness-set
];
}

View file

@ -0,0 +1,40 @@
# - ## Caffeine
#-
#- Caffeine is a simple script that toggles hypridle (disable suspend & screenlock).
#-
#- - `caffeine-status` - Check if hypridle is running. (0/1)
#- - `caffeine-status-icon` - Check if hypridle is running. (icon)
#- - `caffeine` - Toggle hypridle.
{ pkgs, ... }:
let
caffeine-status = pkgs.writeShellScriptBin "caffeine-status" ''
[[ $(pidof "hypridle") ]] && echo "0" || echo "1"
'';
caffeine-status-icon = pkgs.writeShellScriptBin "caffeine-status-icon" ''
[[ $(pidof "hypridle") ]] && echo "󰾪" || echo "󰅶"
'';
caffeine = pkgs.writeShellScriptBin "caffeine" ''
if [[ $(pidof "hypridle") ]]; then
systemctl --user stop hypridle.service
title="󰅶 Caffeine Activated"
description="Caffeine is now active! Your screen will not turn off automatically."
else
systemctl --user start hypridle.service
title="󰾪 Caffeine Deactivated"
description="Caffeine is now deactivated! Your screen will turn off automatically."
fi
notif "caffeine" "$title" "$description"
'';
in
{
home.packages = [
caffeine-status
caffeine
caffeine-status-icon
];
}

View file

@ -0,0 +1,11 @@
{
imports = [
./night-shift
./brightness
./hyprfocus
./hyprpanel
./caffeine
./notification
./screenshot
];
}

View file

@ -0,0 +1,52 @@
# - ## Hyprfocus
#-
#- A simple script to toggle focus on few windows in Hyprland.
#- (disable gaps, border, shadow, opacity, etc.)
#-
#- - `hyprfocus-on` - Enable hyprfocus.
#- - `hyprfocus-off` - Disable hyprfocus.
#- - `hyprfocus-toggle` - Toggle hyprfocus.
{ pkgs, ... }:
let
hyprfocus-on =
pkgs.writeShellScriptBin "hyprfocus-on"
# bash
''
hyprpanel-hide
hyprctl keyword "general:gaps_in" 0
hyprctl keyword "general:gaps_out" 0
hyprctl keyword "general:border_size" 1
hyprctl keyword "decoration:rounding" 0
hyprctl keyword "decoration:drop_shadow" false
hyprctl keyword "decoration:inactive_opacity" 0.98
hyprctl keyword "decoration:active_opacity" 1
echo "1" > /tmp/hyprfocus
'';
hyprfocus-off =
pkgs.writeShellScriptBin "hyprfocus-off"
# bash
''
hyprctl reload
hyprpanel-show
rm /tmp/hyprfocus
'';
hyprfocus-toggle =
pkgs.writeShellScriptBin "hyprfocus-toggle"
# bash
''
if [ -f /tmp/hyprfocus ]; then
hyprfocus-off
else
hyprfocus-on
fi
'';
in
{
home.packages = [
hyprfocus-on
hyprfocus-off
hyprfocus-toggle
];
}

View file

@ -0,0 +1,52 @@
# - ## Hyprpanel
#-
#- Quick scripts to toggle, reload, hide & show hyprpanel.
#-
#- - `hyprpanel-toggle` - Toggle hyprpanel (hide/show).
#- - `hyprpanel-show` - Show hyprpanel.
#- - `hyprpanel-hide` - Hide hyprpanel.
#- - `hyprpanel-reload` - Reload hyprpanel.
{ pkgs, ... }:
let
hyprpanel-toggle = pkgs.writeShellScriptBin "hyprpanel-toggle" ''
hyprpanel -t bar-0
hyprpanel -t bar-1
hyprpanel -t bar-2
hyprpanel -t bar-3
'';
hyprpanel-hide = pkgs.writeShellScriptBin "hyprpanel-hide" ''
status=$(hyprpanel -r "isWindowVisible('bar-0')")
if [[ $status == "true" ]]; then
hyprpanel -t bar-0
fi
status=$(hyprpanel -r "isWindowVisible('bar-1')")
if [[ $status == "true" ]]; then
hyprpanel -t bar-1
fi
'';
hyprpanel-show = pkgs.writeShellScriptBin "hyprpanel-show" ''
status=$(hyprpanel -r "isWindowVisible('bar-0')")
if [[ $status == "false" ]]; then
hyprpanel -t bar-0
fi
status=$(hyprpanel -r "isWindowVisible('bar-1')")
if [[ $status == "false" ]]; then
hyprpanel -t bar-1
fi
'';
hyprpanel-reload = pkgs.writeShellScriptBin "hyprpanel-reload" ''
[ $(pgrep "ags") ] && pkill ags
hyprctl dispatch exec hyprpanel
'';
in
{
home.packages = [
hyprpanel-toggle
hyprpanel-reload
hyprpanel-hide
hyprpanel-show
];
}

View file

@ -0,0 +1,79 @@
# - ## Night-Shift
#-
#- Night-Shift is a feature that reduces the amount of blue light emitted by your screen, which can help reduce eye strain and improve sleep quality. This module provides a set of scripts to control Night-Shift on your system.
#- It use hyprsunset to control the screen temperature.
#-
#- - `night-shift-on` activates Night-Shift.
#- - `night-shift-off` deactivates Night-Shift.
#- - `night-shift` toggles Night-Shift.
#- - `night-shift-status` checks if Night-Shift is active. (0/1)
#- - `night-shift-status-icon` checks if Night-Shift is active. (icon)
{ pkgs, ... }:
let
value = "4500"; # Default value for night-shift temperature
night-shift-on =
pkgs.writeShellScriptBin "night-shift-on"
# bash
''
${pkgs.hyprsunset}/bin/hyprsunset -t ${value} &
title="󰖔 Night-Shift Activated"
description="Night-Shift is now activated! Your screen will be warmer and easier on the eyes."
notif "night-shift" "$title" "$description"
'';
night-shift-off =
pkgs.writeShellScriptBin "night-shift-off"
# bash
''
pkill hyprsunset
title="󰖕 Night-Shift Deactivated"
description="Night-Shift is now deactivated! Your screen will return to normal."
notif "night-shift" "$title" "$description"
'';
night-shift =
pkgs.writeShellScriptBin "night-shift"
# bash
''
if pidof "hyprsunset"; then
night-shift-off
else
night-shift-on
fi
'';
night-shift-status =
pkgs.writeShellScriptBin "night-shift-status"
# bash
''
if pidof "hyprsunset"; then
echo "1"
else
echo "0"
fi
'';
night-shift-status-icon =
pkgs.writeShellScriptBin "night-shift-status-icon"
# bash
''
if pidof "hyprsunset"; then
echo "󰖔"
else
echo "󰖕"
fi
'';
in
{
home.packages = [
pkgs.hyprsunset
night-shift-on
night-shift-off
night-shift
night-shift-status
night-shift-status-icon
];
}

View file

@ -0,0 +1,33 @@
{ pkgs, ... }:
let
notif =
pkgs.writeShellScriptBin "notif" # bash
''
# Shell script to send custom notifications
# Usage: notif "sender_id" "message" ["description"]
NOTIF_FOLDER="/tmp/notif"
sender_id=$1 # To overwrite existing notifications
title=$2
description=$3
[[ -d "$NOTIF_FOLDER" ]] || mkdir $NOTIF_FOLDER
[[ -f "$NOTIF_FOLDER/$sender_id" ]] || (echo "0" > "$NOTIF_FOLDER/$sender_id")
old_notification_id=$(cat "$NOTIF_FOLDER/$sender_id")
[[ -z "$old_notification_id" ]] && old_notification_id=0
${pkgs.libnotify}/bin/notify-send \
--replace-id="$old_notification_id" --print-id \
--app-name="$sender_id" \
"$title" \
"$description" \
> "$NOTIF_FOLDER/$sender_id"
'';
in
{
home.packages = [
pkgs.libnotify
notif
];
}

View file

@ -0,0 +1,40 @@
# - ## Screenshot
#-
#- This module provides a script to take screenshots using `grimblast` and `swappy`.
#-
#- - `screenshot [region|window|monitor] [swappy]` - Take a screenshot of the region, window, or monitor. Optionally, use `swappy` to copy the screenshot to the clipboard.
{ pkgs, ... }:
let
screenshot = pkgs.writeShellScriptBin "screenshot" ''
if [[ $2 == "swappy" ]];then
folder="/tmp"
else
folder="$HOME/Pictures"
fi
filename="$(date +%Y-%m-%d_%H:%M:%S).png"
if [[ $1 == "window" ]];then
mode="active"
elif [[ $1 == "region" ]];then
mode="area"
elif [[ $1 == "monitor" ]];then
mode="output"
fi
${pkgs.grimblast}/bin/grimblast --notify --freeze save $mode "$folder/$filename" || exit 1
if [[ $2 == "swappy" ]];then
${pkgs.swappy}/bin/swappy -f "$folder/$filename" -o "$HOME/Pictures/$filename"
exit 0
fi
'';
in
{
home.packages = [
pkgs.hyprshot
screenshot
pkgs.slurp
pkgs.grim
pkgs.grimblast
];
}

View file

@ -8,7 +8,8 @@
user, user,
pkgs, pkgs,
... ...
}: { }:
{
# You can import other NixOS modules here # You can import other NixOS modules here
imports = [ imports = [
# If you want to use modules your own flake exports (from modules/nixos): # If you want to use modules your own flake exports (from modules/nixos):
@ -16,7 +17,9 @@
../../common/nixos/common.nix ../../common/nixos/common.nix
../../common/gui/hyprland.nix ../../common/gui/hyprland.nix
../../common/style/stylix.nix ../../common/style/stylix.nix
# ../../common/style/vars/candlekeep.nix
../../common/nixos/sysctl ../../common/nixos/sysctl
# ../../common/nixos/tuigreet.nix
../../common/networking ../../common/networking
../../common/nixos ../../common/nixos
@ -53,7 +56,8 @@
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
initrd.luks.devices."luks-b13379b3-2025-4d55-a40a-c0f3ad8ec801".device = "/dev/disk/by-uuid/b13379b3-2025-4d55-a40a-c0f3ad8ec801"; initrd.luks.devices."luks-1dbfdeb6-8537-41b2-abf0-09373af3eeee".device =
"/dev/disk/by-uuid/1dbfdeb6-8537-41b2-abf0-09373af3eeee";
}; };
# sops # sops
@ -90,19 +94,17 @@
# This will add each flake input as a registry # This will add each flake input as a registry
# To make nix3 commands consistent with your flake # To make nix3 commands consistent with your flake
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ( nix.registry = (lib.mapAttrs (_: flake: { inherit flake; })) (
(lib.filterAttrs (_: lib.isType "flake")) inputs (lib.filterAttrs (_: lib.isType "flake")) inputs
); );
# This will additionally add your inputs to the system's legacy channels # This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome! # Making legacy nix commands consistent as well, awesome!
nix.nixPath = ["/etc/nix/path"]; nix.nixPath = [ "/etc/nix/path" ];
environment.etc = environment.etc = lib.mapAttrs' (name: value: {
lib.mapAttrs' (name: value: {
name = "nix/path/${name}"; name = "nix/path/${name}";
value.source = value.flake; value.source = value.flake;
}) }) config.nix.registry;
config.nix.registry;
networking.hostName = "candlekeep"; networking.hostName = "candlekeep";
# networking.networkmanager.enable = true; # networking.networkmanager.enable = true;
@ -114,7 +116,7 @@
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILq54YrM3BbhBs0oDLOrc1bkg6FCCmkV4E3pWLZp0ejN gwg313@pm.me" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILq54YrM3BbhBs0oDLOrc1bkg6FCCmkV4E3pWLZp0ejN gwg313@pm.me"
]; ];
extraGroups = ["wheel"]; extraGroups = [ "wheel" ];
}; };
}; };
@ -129,6 +131,7 @@
EDITOR = "nvim"; EDITOR = "nvim";
VISUAL = "nvim"; VISUAL = "nvim";
PAGER = "moar"; PAGER = "moar";
PASSWORD_STORE_DIR = "$HOME/.local/share/password-store";
}; };
}; };
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion

View file

@ -26,19 +26,23 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/f2c87d99-ea17-4ef3-9ef6-bcc6637357f2"; device = "/dev/disk/by-uuid/c79b630a-d130-42ed-8cdc-3f8545fe2993";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-58623f70-2e6b-4ee0-8d14-d2bf34c07daf".device = "/dev/disk/by-uuid/58623f70-2e6b-4ee0-8d14-d2bf34c07daf"; boot.initrd.luks.devices."luks-96e3b309-ca79-4b42-aca5-3f098b123758".device =
"/dev/disk/by-uuid/96e3b309-ca79-4b42-aca5-3f098b123758";
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/2394-0AAF"; device = "/dev/disk/by-uuid/1FBA-8B80";
fsType = "vfat"; fsType = "vfat";
}; options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [ swapDevices = [
{ device = "/dev/disk/by-uuid/dd8d717a-d872-4780-af3c-af4c702b587a"; } { device = "/dev/disk/by-uuid/17eec89e-2381-4a25-8935-63cbcc67d07c"; }
]; ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -8,7 +8,8 @@
pkgs, pkgs,
user, user,
... ...
}: { }:
{
# You can import other NixOS modules here # You can import other NixOS modules here
imports = [ imports = [
# If you want to use modules your own flake exports (from modules/nixos): # If you want to use modules your own flake exports (from modules/nixos):
@ -56,7 +57,8 @@
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
initrd.luks.devices."luks-276bd2e3-9d6d-4df6-9155-3684907b48f0".device = "/dev/disk/by-uuid/276bd2e3-9d6d-4df6-9155-3684907b48f0"; initrd.luks.devices."luks-276bd2e3-9d6d-4df6-9155-3684907b48f0".device =
"/dev/disk/by-uuid/276bd2e3-9d6d-4df6-9155-3684907b48f0";
}; };
# sops # sops
@ -93,19 +95,17 @@
# This will add each flake input as a registry # This will add each flake input as a registry
# To make nix3 commands consistent with your flake # To make nix3 commands consistent with your flake
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ( nix.registry = (lib.mapAttrs (_: flake: { inherit flake; })) (
(lib.filterAttrs (_: lib.isType "flake")) inputs (lib.filterAttrs (_: lib.isType "flake")) inputs
); );
# This will additionally add your inputs to the system's legacy channels # This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome! # Making legacy nix commands consistent as well, awesome!
nix.nixPath = ["/etc/nix/path"]; nix.nixPath = [ "/etc/nix/path" ];
environment.etc = environment.etc = lib.mapAttrs' (name: value: {
lib.mapAttrs' (name: value: {
name = "nix/path/${name}"; name = "nix/path/${name}";
value.source = value.flake; value.source = value.flake;
}) }) config.nix.registry;
config.nix.registry;
networking.hostName = "grymforge"; networking.hostName = "grymforge";
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -117,16 +117,16 @@
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILq54YrM3BbhBs0oDLOrc1bkg6FCCmkV4E3pWLZp0ejN gwg313@pm.me" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILq54YrM3BbhBs0oDLOrc1bkg6FCCmkV4E3pWLZp0ejN gwg313@pm.me"
]; ];
extraGroups = ["wheel"]; extraGroups = [ "wheel" ];
}; };
}; };
environment = { environment = {
loginShellInit = '' # loginShellInit = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then # # if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
exec Hyprland # # exec Hyprland
fi # # fi
''; # Will automatically open Hyprland when logged into tty1 # ''; # Will automatically open Hyprland when logged into tty1
variables = { variables = {
TERMINAL = "alacritty"; TERMINAL = "alacritty";
EDITOR = "nvim"; EDITOR = "nvim";

View file

@ -1,6 +1,5 @@
restic_key: ENC[AES256_GCM,data:DzpWvFP5gyhrnLVIYgu9ouotWqkOAHehihSKf/TqJE+sHTD4vnIScfhzoKzdkoDoWfkcmQ==,iv:q83qNYuP/3mngvg+kUfOVToogL8VTvZ6HiGIztpnP/s=,tag:YNWwbma0HmPKqYCS1L5kQQ==,type:str] restic_key: ENC[AES256_GCM,data:DzpWvFP5gyhrnLVIYgu9ouotWqkOAHehihSKf/TqJE+sHTD4vnIScfhzoKzdkoDoWfkcmQ==,iv:q83qNYuP/3mngvg+kUfOVToogL8VTvZ6HiGIztpnP/s=,tag:YNWwbma0HmPKqYCS1L5kQQ==,type:str]
wireless.env: ENC[AES256_GCM,data:/5i0Kv+VFTtVpaD7tfO2ahePu20eYkUYAqoh39PA2aoMWywLddQEQy4arj2Nvcw8hsRk760Kiq4wz3c23dPDqy7rU980NF2RaP4ODMIiQISfYeQP9coD84JhlnSTW+7EkhV520naqJgIYY0IsA8OxR/5euyFMHOL75FKnBh1ILY2DPSsJNG2m2ldw+US7E+7r4REl8tDqKfCIL5tznmbVTbPrer7cwrXe+ScFaholmqSntaB06yIIO3yr88TmE6EXF6oLCXU,iv:DPOqx7M7E83+DYjGFPZy44cxrta/3953IDjXL40rLAc=,tag:KmYBpQKgshMSgxnC96T1bQ==,type:str] wireless.env: ENC[AES256_GCM,data:/5i0Kv+VFTtVpaD7tfO2ahePu20eYkUYAqoh39PA2aoMWywLddQEQy4arj2Nvcw8hsRk760Kiq4wz3c23dPDqy7rU980NF2RaP4ODMIiQISfYeQP9coD84JhlnSTW+7EkhV520naqJgIYY0IsA8OxR/5euyFMHOL75FKnBh1ILY2DPSsJNG2m2ldw+US7E+7r4REl8tDqKfCIL5tznmbVTbPrer7cwrXe+ScFaholmqSntaB06yIIO3yr88TmE6EXF6oLCXU,iv:DPOqx7M7E83+DYjGFPZy44cxrta/3953IDjXL40rLAc=,tag:KmYBpQKgshMSgxnC96T1bQ==,type:str]
home_uuid: ENC[AES256_GCM,data:VX92mQuoYXpPxe6EzQ==,iv:3i7Ll7rITrOTYMKK4tHy+IU5DVWFbFjrFHQ3uw3Gr7g=,tag:0bp/XaR4JOdFYpSVtpxm5A==,type:str]
sops: sops:
kms: [] kms: []
gcp_kms: [] gcp_kms: []
@ -16,8 +15,8 @@ sops:
US9oa0pORXRVWWlyYlZZTGhXdTdOaWsKClqIK/YNJIIGFqOO0t4oni8dRTTXQniG US9oa0pORXRVWWlyYlZZTGhXdTdOaWsKClqIK/YNJIIGFqOO0t4oni8dRTTXQniG
ioIwAOdEgE/n0vcYhHXxLxWlTeqGZF076g7EFfIqiSNqrDtacRnazg== ioIwAOdEgE/n0vcYhHXxLxWlTeqGZF076g7EFfIqiSNqrDtacRnazg==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2024-10-03T04:35:54Z" lastmodified: "2024-12-16T02:59:51Z"
mac: ENC[AES256_GCM,data:6h43edjI9ouW2vbTcydrvbrqDb7GmMVgXBUk8nHyd0mV5QzR0ZeGzl+WXN5cwTRqwahAMsFax6riWyCFyMAEHIC66ucQhhPKH90vsKpm7/Nh037lbIfbYnqVG5PTdRzLo0zELkNmB5NX7j0amgynEX3xm1ipcWPGowTQiVjkQ98=,iv:zsVRb2ahPZ27hOkdhjmDl3px0wBri+xIwSvya2Kg8Hg=,tag:qrDuyDrIfccOnvqekiNnWA==,type:str] mac: ENC[AES256_GCM,data:E8dmBkTvRlVGqPuHLciY4pXyvRqJU8uJo1pjmKaTnKc5s5O/k+bSRcG4XKsD+TLAEqSIE0zQlvTknV+yvc37VNYuxYx0g5KsDzW1zHwzQ2G+87dLSo4V6cCvo+ySdZNTCumal1lKAXGXuWxul34K3U5YG72YPnQpU8WXMQ/y5sk=,iv:uER87eu8mXu5YMGINGtBqeJbULyOdErJvbCASNrqe58=,tag:0bpnLA0Us0VLWA82oyJhxA==,type:str]
pgp: [] pgp: []
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.9.0 version: 3.9.2

BIN
wallpapers/anime-girl.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

BIN
wallpapers/forrest.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 MiB