mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-25 16:08:30 +02:00
added and configured shikane
This commit is contained in:
parent
0620ebaa2a
commit
fa6f58e0e9
13 changed files with 154 additions and 43 deletions
|
@ -12,7 +12,7 @@
|
|||
home-manager.useGlobalPkgs = true;
|
||||
|
||||
home-manager.users.rouven = { ... }: {
|
||||
imports = [ ./modules ];
|
||||
imports = [ ./modules ./options ];
|
||||
|
||||
config = {
|
||||
home.username = "rouven";
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
gimp
|
||||
ffmpeg
|
||||
|
||||
thunderbird
|
||||
|
||||
# sound
|
||||
pavucontrol
|
||||
x32edit
|
||||
|
|
|
@ -21,6 +21,10 @@ in
|
|||
port = 2222;
|
||||
};
|
||||
falkenstein-1 = matchBlocks."rfive.de";
|
||||
"durian" = {
|
||||
hostname = "manual.ifsr.de";
|
||||
user = "root";
|
||||
};
|
||||
"kaki" = {
|
||||
hostname = "kaki.ifsr.de";
|
||||
user = "root";
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
# ./hyprpaper.nix
|
||||
./session.nix
|
||||
./waybar.nix
|
||||
./shikane.nix
|
||||
];
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
|
|
35
users/rouven/modules/sway/shikane.nix
Normal file
35
users/rouven/modules/sway/shikane.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
services.shikane = {
|
||||
enable = true;
|
||||
settings = {
|
||||
profile = [
|
||||
{
|
||||
name = "external-monitor-default";
|
||||
output = [
|
||||
{
|
||||
match = "eDP-1";
|
||||
enable = true;
|
||||
}
|
||||
{
|
||||
match = "HDMI-A-1";
|
||||
enable = true;
|
||||
position = {
|
||||
x = 1920;
|
||||
y = 0;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "builtin";
|
||||
output = [
|
||||
{
|
||||
match = "eDP-1";
|
||||
enable = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
" vim: filetype=vifm :
|
||||
|
||||
set vicmd=nvim
|
||||
set vicmd=hx
|
||||
|
||||
set syscalls
|
||||
|
||||
|
|
3
users/rouven/options/default.nix
Normal file
3
users/rouven/options/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
imports = [ ./shikane.nix ];
|
||||
}
|
78
users/rouven/options/shikane.nix
Normal file
78
users/rouven/options/shikane.nix
Normal file
|
@ -0,0 +1,78 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.shikane;
|
||||
tomlFormat = pkgs.formats.toml { };
|
||||
in
|
||||
{
|
||||
meta.maintainers = [ hm.maintainers.therealr5 ];
|
||||
options.services.shikane = {
|
||||
enable = mkEnableOption "shikane, A dynamic output configuration tool that automatically detects and configures connected outputs based on a set of profiles.";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.shikane;
|
||||
defaultText = literalExpression "pkgs.shikane";
|
||||
description = "The package to use for shikane.";
|
||||
};
|
||||
settings = mkOption {
|
||||
type = tomlFormat.type;
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
profile = [
|
||||
{
|
||||
name = "external-monitor-default";
|
||||
output = [
|
||||
{
|
||||
match = "eDP-1";
|
||||
enable = true;
|
||||
}
|
||||
{
|
||||
match = "HDMI-A-1";
|
||||
enable = true;
|
||||
position = {
|
||||
x = 1920;
|
||||
y = 0;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "builtin-monitor-only";
|
||||
output = [
|
||||
{
|
||||
match = "eDP-1";
|
||||
enable = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Configuration written to
|
||||
<filename>$XDG_CONFIG_HOME/shikane/config.toml</filename>.
|
||||
</para><para>
|
||||
See <link xlink:href="https://gitlab.com/w0lff/shikane/-/blob/master/docs/shikane.5.man.md" />
|
||||
for more information.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.user.services.shikane = {
|
||||
Unit = {
|
||||
Description = "Dynamic output configuration tool";
|
||||
Documentation = "man:shikane(1)";
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "${cfg.package}/bin/shikane -c ${tomlFormat.generate "shikane-config" cfg.settings}";
|
||||
};
|
||||
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue