Skip to content

Commit

Permalink
Merge branch 'main' into fix-link-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman authored Jul 23, 2024
2 parents 8a589a1 + 11ea209 commit 3b19c8f
Show file tree
Hide file tree
Showing 47 changed files with 1,498 additions and 860 deletions.
574 changes: 371 additions & 203 deletions flake.lock

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
anyrun.url = "github:anyrun-org/anyrun";
anyrun-nixos-options.url = "github:n3oney/anyrun-nixos-options";

aquamarine-patched.url = "github:sjcobb2022/aquamarine-patched";

catppuccin-cursors.url = "github:catppuccin/cursors";
catppuccin.url = "github:catppuccin/nix";

Expand Down Expand Up @@ -40,12 +42,11 @@
# Hyprlock
hyprlock = {
url = "github:hyprwm/Hyprlock";
# NOTE: required to prevent red screen on lock
inputs.nixpkgs.follows = "nixpkgs";
};

# Hyprland
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
hyprland.inputs.aquamarine.follows = "aquamarine-patched";
# hyprland.url = "git+https://github.com/khaneliman/Hyprland?ref=windows&submodules=1";

# Hyprpaper
Expand Down Expand Up @@ -99,6 +100,7 @@
url = "github:nix-community/nix-ld-rs";
inputs.nixpkgs.follows = "nixpkgs";
};

# Neovim nix configuration
nixvim = {
url = "github:nix-community/nixvim";
Expand Down
2 changes: 2 additions & 0 deletions homes/aarch64-darwin/khaneliman@khanelimac/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ in
suites = {
business = enabled;
common = enabled;
desktop = enabled;
development = {
enable = true;

nixEnable = true;
};
music = enabled;
networking = enabled;
photo = enabled;
social = enabled;
};
Expand Down
58 changes: 56 additions & 2 deletions homes/x86_64-linux/khaneliman@khanelinix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ in
prependConfig = # bash
lib.concatStringsSep "\n" [
"# See https://wiki.hyprland.org/Configuring/Monitors/"
"monitor=DP-3, 3840x2160@60, 1420x0, 2"
"monitor=DP-1, 5120x1440@120, 0x1080, 1"
"monitor=DP-3, 3840x2160@60, 1420x0, 2, bitdepth, 10"
"monitor=DP-1, 5120x1440@120, 0x1080, 1, bitdepth, 10"
""
(
"exec-once = ${getExe pkgs.xorg.xrandr} "
Expand All @@ -80,6 +80,59 @@ in
"workspace = 9, monitor:DP-1, persistent:true"
];
};

sway = {
enable = true;

settings = {
output = {
"DP-3" = {
resolution = "3840x2160";
position = "1420,0";
scale = "2";
};
"DP-1" = {
resolution = "5120x1440";
position = "0,1080";
};
};

workspaceOutputAssign = [
{
workspace = "1";
output = "DP-3";
}
{
workspace = "2";
output = "DP-1";
}
{
workspace = "3";
output = "DP-1";
}
{
workspace = "4";
output = "DP-1";
}
{
workspace = "5";
output = "DP-1";
}
{
workspace = "6";
output = "DP-1";
}
{
workspace = "7";
output = "DP-1";
}
{
workspace = "8";
output = "DP-1";
}
];
};
};
};
};

Expand Down Expand Up @@ -162,6 +215,7 @@ in
emulation = enabled;
games = enabled;
music = enabled;
networking = enabled;
photo = enabled;
social = enabled;
video = enabled;
Expand Down
4 changes: 4 additions & 0 deletions lib/module/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,9 @@ rec {

default-attrs = mapAttrs (_key: mkDefault);

force-attrs = mapAttrs (_key: mkForce);

nested-default-attrs = mapAttrs (_key: default-attrs);

nested-force-attrs = mapAttrs (_key: force-attrs);
}
2 changes: 1 addition & 1 deletion modules/darwin/archetypes/workstation/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ in

config = mkIf cfg.enable {
khanelinix = {
desktop.addons.barrier = enabled;
# TODO: input-leap replace barrier

suites = {
business = enabled;
Expand Down
23 changes: 0 additions & 23 deletions modules/darwin/desktop/addons/barrier/default.nix

This file was deleted.

10 changes: 0 additions & 10 deletions modules/darwin/suites/networking/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
config,
lib,
pkgs,
namespace,
...
}:
Expand All @@ -26,14 +25,5 @@ in
networking = enabled;
};
};

environment.systemPackages = with pkgs; [
# ifstat-legacy
nmap
openssh
speedtest-cli
ssh-copy-id
wireguard-go
];
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ weather.details = Sbar.add("item", "weather.details", {
})

-- Update function
weather.temp:subscribe({ "routine", "forced", "weather_update" }, function()
weather.temp:subscribe({ "routine", "forced", "system_woke", "weather_update" }, function()
-- Reset popup state
weather.temp:set({ popup = { drawing = false } })

Expand Down
59 changes: 35 additions & 24 deletions modules/home/programs/graphical/bars/waybar/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ let
default-modules = import ./modules/default-modules.nix { inherit lib pkgs; };
group-modules = import ./modules/group-modules.nix;
hyprland-modules = import ./modules/hyprland-modules.nix { inherit config lib; };
sway-modules = import ./modules/sway-modules.nix { inherit config lib; };

commonAttributes = {
layer = "top";
Expand All @@ -39,36 +40,45 @@ let
margin-left = 20;
margin-right = 20;

modules-left = [
"custom/power"
"hyprland/workspaces"
"custom/separator-left"
"hyprland/window"
];
modules-left =
[ "custom/power" ]
++ lib.optionals config.${namespace}.programs.graphical.wms.hyprland.enable [
"hyprland/workspaces"
]
++ lib.optionals config.${namespace}.programs.graphical.wms.sway.enable [ "sway/workspaces" ]
++ [ "custom/separator-left" ]
++ lib.optionals config.${namespace}.programs.graphical.wms.hyprland.enable [ "hyprland/window" ]
++ lib.optionals config.${namespace}.programs.graphical.wms.sway.enable [ "sway/window" ];
};

fullSizeModules = {
modules-right = [
"group/tray"
"custom/separator-right"
"group/stats"
"custom/separator-right"
"group/control-center"
"hyprland/submap"
"custom/weather"
"clock"
];
modules-right =
[
"group/tray"
"custom/separator-right"
"group/stats"
"custom/separator-right"
"group/control-center"
]
++ lib.optionals config.${namespace}.programs.graphical.wms.hyprland.enable [ "hyprland/submap" ]
++ [
"custom/weather"
"clock"
];
};

condensedModules = {
modules-right = [
"group/tray-drawer"
"group/stats-drawer"
"group/control-center"
"hyprland/submap"
"custom/weather"
"clock"
];
modules-right =
[
"group/tray-drawer"
"group/stats-drawer"
"group/control-center"
]
++ lib.optionals config.${namespace}.programs.graphical.wms.hyprland.enable [ "hyprland/submap" ]
++ [
"custom/weather"
"clock"
];
};

mkBarSettings =
Expand All @@ -80,6 +90,7 @@ let
default-modules
group-modules
(lib.mkIf config.${namespace}.programs.graphical.wms.hyprland.enable hyprland-modules)
(lib.mkIf config.${namespace}.programs.graphical.wms.sway.enable sway-modules)
];

generateOutputSettings =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,21 +128,23 @@ in
menu-actions =
let
systemctl = getExe' pkgs.systemd "systemctl";
lock = getExe config.programs.hyprlock.package;
hyprlock = getExe config.programs.hyprlock.package;
swaylock = getExe config.programs.swaylock.package;
poweroff = getExe' pkgs.systemd "poweroff";
reboot = getExe' pkgs.systemd "reboot";
terminal = getExe config.programs.kitty.package;
top = getExe config.programs.btop.package;
hyprctl = getExe' config.wayland.windowManager.hyprland.package "hyprctl";
swaymsg = getExe' config.wayland.windowManager.sway.package "swaymsg";
in
{
inherit poweroff reboot;

hibernate = "${systemctl} hibernate";
lock = "${lock} --immediate";
lock = ''([[ "$XDG_CURRENT_DESKTOP" == "sway" ]] && ${swaylock} -defF) || ([[ "$XDG_CURRENT_DESKTOP" == "Hyprland" ]] && ${hyprlock} --immediate)'';
suspend = "${systemctl} suspend";
top = "${terminal} ${top}";
logout = "${hyprctl} dispatch exit && ${systemctl} --user exit ";
logout = "$(${hyprctl} dispatch exit || ${swaymsg} exit) && ${systemctl} --user exit ";
};
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{ lib, pkgs, ... }:
let
inherit (lib) getExe getExe';

catppuccin = import (lib.snowfall.fs.get-file "modules/home/theme/catppuccin/colors.nix");
in
{
backlight =
Expand Down Expand Up @@ -83,6 +85,26 @@ in
clock = {
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format = "󰃭 {:%a %d %b \n 󰅐 %I:%M %p}";
calendar = {
mode = "year";
mode-mon-col = 3;
weeks-pos = "right";
on-scroll = 1;
format = {
months = "<span color='${catppuccin.colors.rosewater.hex}'><b>{}</b></span>";
days = "<span color='${catppuccin.colors.flamingo.hex}'><b>{}</b></span>";
weeks = "<span color='${catppuccin.colors.teal.hex}'><b>W{}</b></span>";
weekdays = "<span color='${catppuccin.colors.yellow.hex}'><b>{}</b></span>";
today = "<span color='${catppuccin.colors.red.hex}'><b><u>{}</u></b></span>";
};
};
actions = {
on-click-right = "mode";
on-click-forward = "tz_up";
on-click-backward = "tz_down";
on-scroll-up = "shift_up";
on-scroll-down = "shift_down";
};
};

cpu = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ in
"class<thunderbird>" = "";
"class<unityhub>" = "󰚯";
"class<virt-manager>" = "󰢹";
"class<vlc>" = "󰕼";
"class<vlc>" = "󱍼";
"class<wlroots> title<.*WL-1.*>" = "";
"class<xwaylandvideobridge>" = "";
"code-url-handler" = "󰨞";
Expand Down
Loading

0 comments on commit 3b19c8f

Please sign in to comment.