mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-15 05:13:10 +01:00
use lib.getExe where possible
This commit is contained in:
parent
20dd0ece6c
commit
1169e53c76
|
@ -170,11 +170,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687098182,
|
"lastModified": 1687167448,
|
||||||
"narHash": "sha256-kBys+Cwmcxzh7UNVWTrunOgaR02zl2XN3feA8fSlqVo=",
|
"narHash": "sha256-p4/h9h6Inj34uwf0ncww8Ufub6Vpk+5vHGVTwUT4z1E=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "0480dabc99e1b669ebe909949180fa2786e733cd",
|
"rev": "a10aa82e8aaee11d8e8b8c5e7e19f758a7553bf0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
default_session = {
|
default_session = {
|
||||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd sway";
|
command = "${lib.getExe pkgs.greetd.tuigreet} --cmd sway";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
clock24 = true;
|
clock24 = true;
|
||||||
extraConfig =
|
extraConfig =
|
||||||
''
|
''
|
||||||
set -g default-shell ${pkgs.zsh}/bin/zsh
|
set -g default-shell ${lib.getExe pkgs.zsh}
|
||||||
bind P display-popup
|
bind P display-popup
|
||||||
set -sg escape-time 10
|
set -sg escape-time 10
|
||||||
set -g @dracula-plugins "git time"
|
set -g @dracula-plugins "git time"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
{
|
{
|
||||||
programs.command-not-found.enable = false;
|
programs.command-not-found.enable = false;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
switch() {
|
switch() {
|
||||||
sudo true # ask the password so we can leave during the (sometimes quite long) build process
|
sudo true # ask the password so we can leave during the (sometimes quite long) build process
|
||||||
OUT_PATH=/tmp/nixos-rebuild-nom-$(date +%s)
|
OUT_PATH=/tmp/nixos-rebuild-nom-$(date +%s)
|
||||||
${pkgs.nix-output-monitor}/bin/nom build /etc/nixos#nixosConfigurations.${config.networking.hostName}.config.system.build.toplevel -o $OUT_PATH
|
${lib.getExe pkgs.nix-output-monitor} build /etc/nixos#nixosConfigurations.${config.networking.hostName}.config.system.build.toplevel -o $OUT_PATH
|
||||||
sudo ${pkgs.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set $OUT_PATH
|
sudo ${pkgs.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set $OUT_PATH
|
||||||
sudo $OUT_PATH/bin/switch-to-configuration switch
|
sudo $OUT_PATH/bin/switch-to-configuration switch
|
||||||
unlink $OUT_PATH
|
unlink $OUT_PATH
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
libsixel
|
libsixel
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
server.enable = true;
|
server.enable = true;
|
||||||
settings = rec {
|
settings = rec {
|
||||||
main = {
|
main = {
|
||||||
shell = "${pkgs.zsh}/bin/zsh";
|
shell = lib.getExe pkgs.zsh;
|
||||||
dpi-aware = "yes";
|
dpi-aware = "yes";
|
||||||
font = "monospace:family=Iosevka Nerd Font, size=8";
|
font = "monospace:family=Iosevka Nerd Font, size=8";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "Rouven Seifert";
|
userName = "Rouven Seifert";
|
||||||
userEmail = "rouven@rfive.de";
|
userEmail = "rouven@rfive.de";
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
core.pager = "${pkgs.delta}/bin/delta";
|
core.pager = lib.getExe pkgs.delta;
|
||||||
interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
|
interactive.diffFilter = "${lib.getExe pkgs.delta} --color-only";
|
||||||
delta = {
|
delta = {
|
||||||
navigate = true;
|
navigate = true;
|
||||||
light = false;
|
light = false;
|
||||||
|
|
|
@ -67,9 +67,6 @@
|
||||||
# libs
|
# libs
|
||||||
libyubikey
|
libyubikey
|
||||||
libfido2
|
libfido2
|
||||||
# (pkgs.texlive.combine {
|
|
||||||
# inherit (pkgs.texlive) scheme-medium;
|
|
||||||
# })
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services.kdeconnect = {
|
services.kdeconnect = {
|
||||||
|
@ -77,6 +74,8 @@
|
||||||
indicator = true;
|
indicator = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.texlive.enable = true;
|
||||||
|
|
||||||
xdg.mimeApps = {
|
xdg.mimeApps = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultApplications =
|
defaultApplications =
|
||||||
|
|
|
@ -12,14 +12,14 @@
|
||||||
config = rec {
|
config = rec {
|
||||||
startup = [
|
startup = [
|
||||||
{
|
{
|
||||||
command = "${pkgs.swaybg}/bin/swaybg -i ${../../../../images/wallpaper.png}";
|
command = "${lib.getExe pkgs.swaybg} -i ${../../../../images/wallpaper.png}";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = "${pkgs.autotiling-rs}/bin/autotiling-rs";
|
command = lib.getExe pkgs.autotiling-rs;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
menu = "${pkgs.fuzzel}/bin/fuzzel";
|
menu = lib.getExe pkgs.fuzzel;
|
||||||
terminal = "${pkgs.foot}/bin/footclient";
|
terminal = "${pkgs.foot}/bin/footclient";
|
||||||
bars = [ ];
|
bars = [ ];
|
||||||
gaps = {
|
gaps = {
|
||||||
|
@ -40,10 +40,10 @@
|
||||||
keybindings =
|
keybindings =
|
||||||
lib.mkOptionDefault {
|
lib.mkOptionDefault {
|
||||||
"Mod1+space" = "exec ${menu}";
|
"Mod1+space" = "exec ${menu}";
|
||||||
"Print" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
|
"Print" = "exec ${lib.getExe pkgs.sway-contrib.grimshot} copy area";
|
||||||
"XF86Launch2" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot save area - | ${pkgs.swappy}/bin/swappy -f -";
|
"XF86Launch2" = "exec ${lib.getExe pkgs.sway-contrib.grimshot} save area - | ${lib.getExe pkgs.swappy} -f -";
|
||||||
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 10";
|
"XF86MonBrightnessUp" = "exec ${lib.getExe pkgs.light} -A 10";
|
||||||
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 10";
|
"XF86MonBrightnessDown" = "exec ${lib.getExe pkgs.light} -U 10";
|
||||||
# audio controls
|
# audio controls
|
||||||
"XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
"XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||||
"XF86AudioMicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
"XF86AudioMicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
"Shift+XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ -5%";
|
"Shift+XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ -5%";
|
||||||
|
|
||||||
"XF86Favorites" = "exec ${pkgs.systemd}/bin/loginctl lock-session";
|
"XF86Favorites" = "exec ${pkgs.systemd}/bin/loginctl lock-session";
|
||||||
"XF86PowerOff" = "exec ${pkgs.wlogout}/bin/wlogout";
|
"XF86PowerOff" = "exec ${lib.getExe pkgs.wlogout}";
|
||||||
|
|
||||||
"XF86Messenger" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel";
|
"XF86Messenger" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel";
|
||||||
"Cancel" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --hide-latest";
|
"Cancel" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client --hide-latest";
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
icon-theme=${config.gtk.iconTheme.name}
|
icon-theme=${config.gtk.iconTheme.name}
|
||||||
show-actions=yes
|
show-actions=yes
|
||||||
width=80
|
width=80
|
||||||
terminal=${pkgs.foot}/bin/foot
|
terminal=${lib.getExe pkgs.foot}
|
||||||
|
|
||||||
[colors]
|
[colors]
|
||||||
background=${config.colorScheme.colors.base00}ff
|
background=${config.colorScheme.colors.base00}ff
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
swaylock-effects
|
swaylock-effects
|
||||||
|
@ -10,11 +10,11 @@
|
||||||
services.swayidle = {
|
services.swayidle = {
|
||||||
enable = true;
|
enable = true;
|
||||||
events = [
|
events = [
|
||||||
{ event = "before-sleep"; command = "${pkgs.swaylock-effects}/bin/swaylock"; }
|
{ event = "before-sleep"; command = lib.getExe pkgs.swaylock-effects; }
|
||||||
{ event = "lock"; command = "${pkgs.swaylock-effects}/bin/swaylock"; }
|
{ event = "lock"; command = lib.getExe pkgs.swaylock-effects; }
|
||||||
];
|
];
|
||||||
timeouts = [
|
timeouts = [
|
||||||
{ timeout = 300; command = "${pkgs.swaylock-effects}/bin/swaylock"; }
|
{ timeout = 300; command = lib.getExe pkgs.swaylock-effects; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
systemd.user.services.swaync = {
|
systemd.user.services.swaync = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ self, config, pkgs, ... }:
|
{ self, config, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.swaynotificationcenter}/bin";
|
systemd.user.services.waybar.Service.Environment = "PATH=${pkgs.swaynotificationcenter}/bin";
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
format = " {}";
|
format = " {}";
|
||||||
max-length = 80;
|
max-length = 80;
|
||||||
return-type = "json";
|
return-type = "json";
|
||||||
exec = "${self.packages.x86_64-linux.pww}/bin/pww -w spotifyd:title -p None 2> /dev/null";
|
exec = "${lib.getExe self.packages.x86_64-linux.pww} -w spotifyd:title -p None 2> /dev/null";
|
||||||
};
|
};
|
||||||
cpu = {
|
cpu = {
|
||||||
format = "{usage}% ";
|
format = "{usage}% ";
|
||||||
|
|
|
@ -7,16 +7,14 @@ let
|
||||||
tomlFormat = pkgs.formats.toml { };
|
tomlFormat = pkgs.formats.toml { };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
meta.maintainers = [ hm.maintainers.therealr5 ];
|
meta.maintainers = [ maintainers.therealr5 ];
|
||||||
options.services.shikane = {
|
options.services.shikane = {
|
||||||
|
|
||||||
enable = mkEnableOption
|
enable = mkEnableOption
|
||||||
"shikane, A dynamic output configuration tool that automatically detects and configures connected outputs based on a set of profiles.";
|
"shikane, A dynamic output configuration tool that automatically detects and configures connected outputs based on a set of profiles.";
|
||||||
package = mkOption {
|
|
||||||
type = types.package;
|
package = mkPackageOption pkgs "shikane" { };
|
||||||
default = pkgs.shikane;
|
|
||||||
defaultText = literalExpression "pkgs.shikane";
|
|
||||||
description = "The package to use for shikane.";
|
|
||||||
};
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = tomlFormat.type;
|
type = tomlFormat.type;
|
||||||
default = { };
|
default = { };
|
||||||
|
@ -63,17 +61,17 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
xdg.configFile."shikane/config.toml".source = tomlFormat.generate "shikane-config" cfg.settings;
|
xdg.configFile."shikane/config.toml".source =
|
||||||
|
tomlFormat.generate "shikane-config" cfg.settings;
|
||||||
systemd.user.services.shikane = {
|
systemd.user.services.shikane = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Dynamic output configuration tool";
|
Description = "Dynamic output configuration tool";
|
||||||
Documentation = "man:shikane(1)";
|
Documentation = "man:shikane(1)";
|
||||||
|
After = [ "graphical-session-pre.target" ];
|
||||||
PartOf = [ "graphical-session.target" ];
|
PartOf = [ "graphical-session.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = { ExecStart = getExe cfg.package; };
|
||||||
ExecStart = "${cfg.package}/bin/shikane";
|
|
||||||
};
|
|
||||||
|
|
||||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue