mirror of
https://github.com/tuxdotrs/nix-config.git
synced 2026-09-20 09:09:04 +05:30
feat(desktop): add twm and hyprland module
This commit is contained in:
16
flake.lock
generated
16
flake.lock
generated
@@ -1974,6 +1974,7 @@
|
|||||||
"treefmt-nix": "treefmt-nix_4",
|
"treefmt-nix": "treefmt-nix_4",
|
||||||
"trok": "trok",
|
"trok": "trok",
|
||||||
"tshell": "tshell",
|
"tshell": "tshell",
|
||||||
|
"twm": "twm",
|
||||||
"vicinae-extensions": "vicinae-extensions",
|
"vicinae-extensions": "vicinae-extensions",
|
||||||
"voxtype": "voxtype",
|
"voxtype": "voxtype",
|
||||||
"wezterm-flake": "wezterm-flake"
|
"wezterm-flake": "wezterm-flake"
|
||||||
@@ -2486,6 +2487,21 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"twm": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1789847958,
|
||||||
|
"narHash": "sha256-0XZpBvmt677u2zqy53OI2gBtkJCOtH2lxUAgv3Lvnxc=",
|
||||||
|
"owner": "tuxdotrs",
|
||||||
|
"repo": "twm",
|
||||||
|
"rev": "e3352d44ce24e3319901c4eb30a0758cb0fb6171",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "tuxdotrs",
|
||||||
|
"repo": "twm",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
|
|||||||
@@ -95,5 +95,6 @@
|
|||||||
opencode.url = "github:anomalyco/opencode";
|
opencode.url = "github:anomalyco/opencode";
|
||||||
serpantinum.url = "github:ilyamiro/serpantinum";
|
serpantinum.url = "github:ilyamiro/serpantinum";
|
||||||
llm-agents.url = "github:numtide/llm-agents.nix";
|
llm-agents.url = "github:numtide/llm-agents.nix";
|
||||||
|
twm.url = "github:tuxdotrs/twm";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
nur = inputs.nur.overlays.default;
|
nur = inputs.nur.overlays.default;
|
||||||
copyparty = inputs.copyparty.overlays.default;
|
copyparty = inputs.copyparty.overlays.default;
|
||||||
llm-agents = inputs.llm-agents.overlays.shared-nixpkgs;
|
llm-agents = inputs.llm-agents.overlays.shared-nixpkgs;
|
||||||
|
twm = inputs.twm.overlays.default;
|
||||||
};
|
};
|
||||||
|
|
||||||
perSystem = {system, ...}: let
|
perSystem = {system, ...}: let
|
||||||
|
|||||||
@@ -1,11 +1,24 @@
|
|||||||
{
|
{
|
||||||
flake.modules.homeManager.desktop = {
|
flake.modules.homeManager.desktop = {
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
# TODO: Hyprland 0.55 switched to Lua-based configuration.
|
with lib; let
|
||||||
# HM module is updated but I'm too lazy at this point so we symlink our config instead.
|
cfg = config.tnix.desktop.hyprland;
|
||||||
|
in {
|
||||||
|
options.tnix.desktop.hyprland = {
|
||||||
|
enable = mkEnableOption "tux's Hyprland";
|
||||||
|
|
||||||
|
monitorConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
description = "Hyprland monitor configuration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = null;
|
package = null;
|
||||||
@@ -16,10 +29,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/hypr/config".source =
|
".config/hypr" = {
|
||||||
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Projects/hypr/config";
|
recursive = true;
|
||||||
".config/hypr/hyprland.lua".source =
|
source = pkgs.twm.hyprland;
|
||||||
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Projects/hypr/hyprland.lua";
|
};
|
||||||
|
".config/hypr/config/monitors.lua".text = cfg.monitorConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
@@ -40,4 +54,5 @@
|
|||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,18 @@
|
|||||||
|
|
||||||
tnix = {
|
tnix = {
|
||||||
desktop = {
|
desktop = {
|
||||||
|
hyprland = {
|
||||||
|
enable = true;
|
||||||
|
monitorConfig = ''
|
||||||
|
hl.monitor({
|
||||||
|
output = "eDP-1",
|
||||||
|
mode = "2560x1440@165",
|
||||||
|
position = "0x0",
|
||||||
|
scale = "1",
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
mangowm = {
|
mangowm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
monitorRule = [
|
monitorRule = [
|
||||||
|
|||||||
@@ -6,6 +6,34 @@
|
|||||||
|
|
||||||
tnix = {
|
tnix = {
|
||||||
desktop = {
|
desktop = {
|
||||||
|
hyprland = {
|
||||||
|
enable = true;
|
||||||
|
monitorConfig = ''
|
||||||
|
hl.monitor({
|
||||||
|
output = "DP-2",
|
||||||
|
mode = "2560x1440@144",
|
||||||
|
position = "0x0",
|
||||||
|
scale = "1",
|
||||||
|
transform = 1,
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.monitor({
|
||||||
|
output = "DP-3",
|
||||||
|
mode = "2560x1440@144",
|
||||||
|
position = "1440x0",
|
||||||
|
scale = "1",
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.monitor({
|
||||||
|
output = "DP-1",
|
||||||
|
mode = "1920x1080@144",
|
||||||
|
position = "4000x0",
|
||||||
|
scale = "1",
|
||||||
|
transform = 3,
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
mangowm = {
|
mangowm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
monitorRule = [
|
monitorRule = [
|
||||||
|
|||||||
Reference in New Issue
Block a user