mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 10:51:53 -05:00
add 'laptopMode' option and config
This commit is contained in:
parent
db26ccee2f
commit
70c1e7dd3b
|
@ -167,6 +167,12 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
laptopMode = lib.mkOption {
|
||||||
|
description = "Enable laptop configuration.";
|
||||||
|
default = osConfig.ar.laptopMode;
|
||||||
|
type = lib.types.bool;
|
||||||
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
easyeffects = {
|
easyeffects = {
|
||||||
enable = lib.mkEnableOption "EasyEffects user service.";
|
enable = lib.mkEnableOption "EasyEffects user service.";
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
osConfig,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports =
|
imports = [./laptop.nix];
|
||||||
if (osConfig.networking.hostName == "mauville")
|
|
||||||
then [./ultrawide.nix]
|
|
||||||
else [./laptop.nix];
|
|
||||||
programs.waybar.settings.mainBar."bluetooth" = {
|
programs.waybar.settings.mainBar."bluetooth" = {
|
||||||
"on-click" = lib.mkForce "${lib.getExe pkgs.rofi-bluetooth} -i";
|
"on-click" = lib.mkForce "${lib.getExe pkgs.rofi-bluetooth} -i";
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,33 +4,35 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
wayland.windowManager = {
|
config = lib.mkIf config.ar.home.laptopMode {
|
||||||
sway.config = {
|
wayland.windowManager = {
|
||||||
assigns = {
|
sway.config = {
|
||||||
"workspace 1:web" = [{app_id = "firefox";} {app_id = "brave-browser";}];
|
assigns = {
|
||||||
"workspace 2:note" = [{app_id = "obsidian";}];
|
"workspace 1:web" = [{app_id = "firefox";} {app_id = "brave-browser";}];
|
||||||
"workspace 3:code" = [{app_id = "codium-url-handler";} {app_id = "dev.zed.Zed";}];
|
"workspace 2:note" = [{app_id = "obsidian";}];
|
||||||
"workspace 4:mail" = [{app_id = "thunderbird";}];
|
"workspace 3:code" = [{app_id = "codium-url-handler";} {app_id = "dev.zed.Zed";}];
|
||||||
"workspace 5:work" = [{app_id = "firework";}];
|
"workspace 4:mail" = [{app_id = "thunderbird";}];
|
||||||
|
"workspace 5:work" = [{app_id = "firework";}];
|
||||||
|
};
|
||||||
|
|
||||||
|
startup = [
|
||||||
|
{command = "sleep 2 && ${lib.getExe' config.wayland.windowManager.sway.package "swaymsg"} workspace 1:web";}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
startup = [
|
hyprland.settings = {
|
||||||
{command = "sleep 2 && ${lib.getExe' config.wayland.windowManager.sway.package "swaymsg"} workspace 1:web";}
|
exec-once = [
|
||||||
];
|
"sleep 2 && hyprctl dispatch workspace 2 && sleep 2 && hyprctl dispatch workspace 3 && sleep 2 && hyprctl dispatch workspace 4 && sleep 2 && hyprctl dispatch workspace 1;"
|
||||||
};
|
];
|
||||||
|
|
||||||
hyprland.settings = {
|
workspace = [
|
||||||
exec-once = [
|
"1,defaultName:web,on-created-empty:${lib.getExe config.ar.home.defaultApps.webBrowser}"
|
||||||
"sleep 2 && hyprctl dispatch workspace 2 && sleep 2 && hyprctl dispatch workspace 3 && sleep 2 && hyprctl dispatch workspace 4 && sleep 2 && hyprctl dispatch workspace 1;"
|
"2,defaultName:note,on-created-empty:${lib.getExe' pkgs.obsidian "obsidian"}"
|
||||||
];
|
"3,defaultName:code,on-created-empty:${lib.getExe config.ar.home.defaultApps.editor}"
|
||||||
|
"4,defaultName:mail,on-created-empty:${lib.getExe pkgs.thunderbird}"
|
||||||
workspace = [
|
"special:magic,on-created-empty:${lib.getExe pkgs.fractal}"
|
||||||
"1,defaultName:web,on-created-empty:${lib.getExe config.ar.home.defaultApps.webBrowser}"
|
];
|
||||||
"2,defaultName:note,on-created-empty:${lib.getExe' pkgs.obsidian "obsidian"}"
|
};
|
||||||
"3,defaultName:code,on-created-empty:${lib.getExe config.ar.home.defaultApps.editor}"
|
|
||||||
"4,defaultName:mail,on-created-empty:${lib.getExe pkgs.thunderbird}"
|
|
||||||
"special:magic,on-created-empty:${lib.getExe pkgs.fractal}"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
{
|
|
||||||
}
|
|
|
@ -41,7 +41,8 @@
|
||||||
|
|
||||||
sway.enable = true;
|
sway.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
laptopMode = true;
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
|
|
|
@ -45,6 +45,8 @@
|
||||||
hyprland.enable = true;
|
hyprland.enable = true;
|
||||||
sway.enable = true;
|
sway.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
laptopMode = true;
|
||||||
|
|
||||||
users.aly = {
|
users.aly = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -65,6 +65,8 @@
|
||||||
hyprland.enable = true;
|
hyprland.enable = true;
|
||||||
sway.enable = true;
|
sway.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
laptopMode = true;
|
||||||
|
|
||||||
users.aly = {
|
users.aly = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -40,6 +40,8 @@
|
||||||
|
|
||||||
sway.enable = true;
|
sway.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
laptopMode = true;
|
||||||
|
|
||||||
users.aly = {
|
users.aly = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
steam.enable = lib.mkEnableOption "Steam + Gamescope session.";
|
steam.enable = lib.mkEnableOption "Steam + Gamescope session.";
|
||||||
sway.enable = lib.mkEnableOption "Sway wayland session.";
|
sway.enable = lib.mkEnableOption "Sway wayland session.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
laptopMode = lib.mkEnableOption "Enable laptop configuration.";
|
||||||
|
|
||||||
services.flatpak.enable = lib.mkEnableOption "Flatpak support with GUI.";
|
services.flatpak.enable = lib.mkEnableOption "Flatpak support with GUI.";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue