-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
home-manager/desktop: move i3/sway to it
- Loading branch information
1 parent
1675a59
commit 52c7496
Showing
31 changed files
with
1,164 additions
and
1,082 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,7 @@ | |
imports = [ | ||
./desktop | ||
./dev | ||
./i3 | ||
./minimal.nix | ||
./sway | ||
./theme | ||
]; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,10 @@ | |
imports = [ | ||
./chromium.nix | ||
./firefox.nix | ||
./i3 | ||
./kitty.nix | ||
./mpv | ||
./sway | ||
./xterm.nix | ||
]; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ config, lib, pkgs, osConfig, ... }: | ||
|
||
let | ||
hostName = osConfig.networking.hostName or "generic"; | ||
hostConfigFile = ./${hostName}.nix; | ||
in | ||
{ | ||
imports = lib.optionals (builtins.pathExists hostConfigFile) [ hostConfigFile ]; | ||
|
||
options.home-manager.desktop.i3.autorandr.enable = lib.mkEnableOption "autorandr config" // { | ||
default = config.home-manager.desktop.i3.enable; | ||
}; | ||
|
||
config = lib.mkIf config.home-manager.desktop.i3.autorandr.enable { | ||
home.activation = let inherit (config.xdg) configHome; in { | ||
# Set default profile to the virtual horizontal profile | ||
autorandrCreateDefaultProfile = lib.hm.dag.entryAfter [ "linkGeneration" ] '' | ||
cd "${configHome}/autorandr" | ||
$DRY_RUN_CMD ln -sf $VERBOSE_ARG horizontal default | ||
''; | ||
}; | ||
|
||
programs.autorandr = { | ||
enable = true; | ||
hooks = { | ||
postswitch = { | ||
notify-i3 = "${pkgs.i3}/bin/i3-msg restart"; | ||
reset-wallpaper = "systemctl restart --user wallpaper.service"; | ||
}; | ||
}; | ||
}; | ||
|
||
# Configure autorandr globally | ||
xdg.configFile = { | ||
# Skip gamma settings since this is controlled by gammastep | ||
"autorandr/settings.ini" = { | ||
inherit (config.programs.autorandr) enable; | ||
text = lib.generators.toINI { } { | ||
config = { | ||
skip-options = "gamma"; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
{ | ||
options.home-manager.desktop.i3.dunst.enable = lib.mkEnableOption "dunst config" // { | ||
default = config.home-manager.desktop.i3.enable; | ||
}; | ||
|
||
config = lib.mkIf config.home-manager.desktop.i3.dunst.enable { | ||
home.packages = with pkgs; [ | ||
dbus # for dbus-send, needed for dunstctl | ||
dunst | ||
]; | ||
|
||
services.dunst = { | ||
enable = true; | ||
iconTheme = with config.gtk.iconTheme; { inherit name package; }; | ||
settings = with config.theme.colors; | ||
let | ||
theme = { | ||
background = base00; | ||
foreground = base05; | ||
}; | ||
in | ||
{ | ||
global = with config.theme.fonts; { | ||
font = "${gui.name} 8"; | ||
markup = true; | ||
format = "<b>%s</b>\\n%b"; | ||
sort = true; | ||
indicate_hidden = true; | ||
alignment = "left"; | ||
show_age_threshold = 60; | ||
word_wrap = true; | ||
ignore_newline = false; | ||
width = 250; | ||
height = 200; | ||
origin = "top-right"; | ||
notification_limit = 5; | ||
transparency = 0; | ||
idle_threshold = 120; | ||
follow = "mouse"; | ||
sticky_history = true; | ||
line_height = 0; | ||
padding = 8; | ||
horizontal_padding = 8; | ||
separator_color = base03; | ||
frame_width = 1; | ||
frame_color = base01; | ||
show_indicators = false; | ||
icon_position = "left"; | ||
min_icon_size = 48; | ||
max_icon_size = 48; | ||
}; | ||
urgency_low = { timeout = 5; } // theme; | ||
urgency_normal = { timeout = 10; } // theme; | ||
urgency_high = { timeout = 20; } // theme; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
{ | ||
options.home-manager.desktop.i3.gammastep.enable = lib.mkEnableOption "gammastep config" // { | ||
default = config.home-manager.desktop.i3.enable; | ||
}; | ||
|
||
config = lib.mkIf config.home-manager.desktop.i3.gammastep.enable { | ||
services.gammastep = { | ||
enable = config.device.type != "vm"; | ||
tray = true; | ||
dawnTime = "6:30-7:30"; | ||
duskTime = "18:30-19:30"; | ||
package = pkgs.gammastep; | ||
temperature = { | ||
day = 5700; | ||
night = 3700; | ||
}; | ||
settings = { | ||
general = { | ||
gamma = 0.8; | ||
fade = 1; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |
Oops, something went wrong.