mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-23 16:29:42 -04:00
wm.sway module
This commit is contained in:
parent
35cf3c5d4a
commit
00b46789d6
17 changed files with 34 additions and 29 deletions
|
|
@ -32,7 +32,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
gui = {
|
gui = {
|
||||||
sway.enable = true;
|
wm.sway.enable = true;
|
||||||
alacritty.enable = true;
|
alacritty.enable = true;
|
||||||
browsers.enable = true;
|
browsers.enable = true;
|
||||||
corn.enable = true;
|
corn.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
gui = {
|
gui = {
|
||||||
sway.enable = true;
|
wm.sway.enable = true;
|
||||||
alacritty.enable = true;
|
alacritty.enable = true;
|
||||||
browsers.enable = true;
|
browsers.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ userConfigs = rec {
|
||||||
email = "bryan@ramos.codes";
|
email = "bryan@ramos.codes";
|
||||||
shell = pkgs.bash;
|
shell = pkgs.bash;
|
||||||
|
|
||||||
# Image name from ~Pictures/wallpapers directory
|
# From wallpapers directory
|
||||||
wallpaper = "mountains.jpg";
|
wallpaper = "mountains.jpg";
|
||||||
|
|
||||||
groups = [ "wheel" "networkmanager" "home-manager" "input" ];
|
groups = [ "wheel" "networkmanager" "home-manager" "input" ];
|
||||||
|
|
|
||||||
1
src/user/configs/wallpapers
Symbolic link
1
src/user/configs/wallpapers
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../modules/gui/modules/wm/sway/config/wallpapers/
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib }:
|
{ lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,11 @@
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.user.bash;
|
cfg = config.modules.user.bash;
|
||||||
gui = config.modules.user.gui.sway;
|
gui = config.modules.user.gui.wm;
|
||||||
|
|
||||||
|
wm = {
|
||||||
|
enable = builtins.any (mod: mod.enable or false) (builtins.attrValues gui);
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.user.bash = { enable = mkEnableOption "user.bash"; };
|
{ options.modules.user.bash = { enable = mkEnableOption "user.bash"; };
|
||||||
|
|
@ -22,7 +26,7 @@ in
|
||||||
eza = {
|
eza = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableAliases = true;
|
enableAliases = true;
|
||||||
} // optionalAttrs gui.enable {
|
} // optionalAttrs wm.enable {
|
||||||
icons = true;
|
icons = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,9 @@
|
||||||
{ lib, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
mkModules = dir: recursiveUpdate
|
|
||||||
(attrsets.mapAttrs (_: moduleDir: {
|
|
||||||
inherit (moduleDir) default;
|
|
||||||
}) (filterAttrs (n: v: isAttrs v) (attrsets.mapAttrs (_: v: builtins.readDir v) dir)))
|
|
||||||
{ inherit (dir) default; };
|
|
||||||
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = mkModules ./.;
|
imports = [
|
||||||
|
./bash
|
||||||
|
./git
|
||||||
|
./gui
|
||||||
|
./security
|
||||||
|
./utils
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./desktopEnvironments
|
|
||||||
./modules
|
./modules
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,15 @@
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.user.gui.alacritty;
|
cfg = config.modules.user.gui.alacritty;
|
||||||
|
gui = config.modules.user.gui.wm;
|
||||||
|
|
||||||
|
wm = {
|
||||||
|
enable = builtins.any (mod: mod.enable or false) (builtins.attrValues gui);
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.user.gui.alacritty = { enable = mkEnableOption "user.gui.alacritty"; };
|
{ options.modules.user.gui.alacritty = { enable = mkEnableOption "user.gui.alacritty"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf (cfg.enable && wm.enable) {
|
||||||
programs.alacritty = {
|
programs.alacritty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = import ./config/alacritty.nix;
|
settings = import ./config/alacritty.nix;
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,6 @@
|
||||||
./fun
|
./fun
|
||||||
./utils
|
./utils
|
||||||
./writing
|
./writing
|
||||||
|
./wm
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 609 KiB After Width: | Height: | Size: 609 KiB |
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||||
|
wallpapers = builtins.path {
|
||||||
|
path = ./wallpapers;
|
||||||
|
name = "wallpapers";
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
{ enable = true;
|
{ enable = true;
|
||||||
|
|
@ -17,13 +21,13 @@ in
|
||||||
HDMI-A-1 = {
|
HDMI-A-1 = {
|
||||||
resolution = "1920x1080";
|
resolution = "1920x1080";
|
||||||
position = "0,0";
|
position = "0,0";
|
||||||
bg = "~/Pictures/wallpapers/${config.user.wallpaper} fill";
|
bg = "${wallpapers}/${config.user.wallpaper} fill";
|
||||||
};
|
};
|
||||||
DP-1 = {
|
DP-1 = {
|
||||||
resolution = "1080x1920";
|
resolution = "1080x1920";
|
||||||
position = "1920,0";
|
position = "1920,0";
|
||||||
transform = "90";
|
transform = "90";
|
||||||
bg = "~/Pictures/wallpapers/${config.user.wallpaper} fill";
|
bg = "${wallpapers}/${config.user.wallpaper} fill";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
modifier = "Mod1";
|
modifier = "Mod1";
|
||||||
1
src/user/modules/gui/modules/wm/sway/config/wallpapers
Symbolic link
1
src/user/modules/gui/modules/wm/sway/config/wallpapers
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../../../wallpapers/
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.user.gui.sway;
|
cfg = config.modules.user.gui.wm.sway;
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.user.gui.sway = { enable = mkEnableOption "user.gui.sway"; };
|
{ options.modules.user.gui.wm.sway = { enable = mkEnableOption "user.gui.wm.sway"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
wayland.windowManager.sway = import ./config/sway.nix { inherit pkgs config lib; };
|
wayland.windowManager.sway = import ./config/sway.nix { inherit pkgs config lib; };
|
||||||
programs.rofi = import ./config/rofi.nix { inherit pkgs config lib; };
|
programs.rofi = import ./config/rofi.nix { inherit pkgs config lib; };
|
||||||
|
|
@ -55,10 +55,5 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
home.file."Pictures/wallpapers" = {
|
|
||||||
source = ../../wallpapers;
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue