Group modules into feature directories
This commit is contained in:
parent
0baed7e6f6
commit
9782272a76
49 changed files with 244 additions and 83 deletions
47
nix/modules/home-manager/features/desktop/alacritty.nix
Normal file
47
nix/modules/home-manager/features/desktop/alacritty.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) strings;
|
||||
inherit (strings) toInt;
|
||||
|
||||
theme = import "${self}/nix/lib/theme" { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
options.features.desktop.alacritty.enable = lib.mkEnableOption "Enable Alacritty";
|
||||
|
||||
config = lib.mkIf config.features.desktop.alacritty.enable {
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
env = {
|
||||
TERM = "screen-256color";
|
||||
};
|
||||
|
||||
window.padding = {
|
||||
x = 15;
|
||||
y = 15;
|
||||
};
|
||||
|
||||
font = {
|
||||
size = toInt "${theme.fonts.monospace.size}";
|
||||
|
||||
bold.style = "Regular";
|
||||
normal.family = "${theme.fonts.monospace.name}";
|
||||
|
||||
offset.y = 6;
|
||||
glyph_offset.y = 3;
|
||||
};
|
||||
|
||||
terminal.shell = {
|
||||
program = "zsh";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
9
nix/modules/home-manager/features/desktop/copyq.nix
Normal file
9
nix/modules/home-manager/features/desktop/copyq.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.features.desktop.copyq.enable = lib.mkEnableOption "Enable copyq";
|
||||
|
||||
config = lib.mkIf config.features.desktop.copyq.enable {
|
||||
services.copyq.enable = true;
|
||||
};
|
||||
}
|
13
nix/modules/home-manager/features/desktop/default.nix
Normal file
13
nix/modules/home-manager/features/desktop/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
imports = [
|
||||
./alacritty.nix
|
||||
./copyq.nix
|
||||
./discord.nix
|
||||
./espanso.nix
|
||||
./flameshot.nix
|
||||
./gtk.nix
|
||||
./media
|
||||
./slack.nix
|
||||
./zoom.nix
|
||||
];
|
||||
}
|
14
nix/modules/home-manager/features/desktop/discord.nix
Normal file
14
nix/modules/home-manager/features/desktop/discord.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.discord.enable = lib.mkEnableOption "Enable Discord";
|
||||
|
||||
config = lib.mkIf config.features.desktop.discord.enable {
|
||||
home.packages = with pkgs; [ discord ];
|
||||
};
|
||||
}
|
22
nix/modules/home-manager/features/desktop/espanso.nix
Normal file
22
nix/modules/home-manager/features/desktop/espanso.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.features.desktop.espanso.enable = lib.mkEnableOption "Enable espanso";
|
||||
|
||||
config = lib.mkIf config.features.desktop.espanso.enable {
|
||||
services.espanso = {
|
||||
enable = true;
|
||||
|
||||
configs = {
|
||||
default = {
|
||||
show_notifications = false;
|
||||
toggle_key = "LEFT_ALT";
|
||||
};
|
||||
};
|
||||
|
||||
matches = {
|
||||
base = import ./espanso/matches/base.nix { inherit lib; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
{ lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) removePrefix;
|
||||
|
||||
websiteUrl = "https://www.oliverdavies.uk";
|
||||
dailyUrl = "https://dailydrupaler.com";
|
||||
githubUrl = "https://github.com/opdavies";
|
||||
podcastUrl = "https://beyondblockspodcast.com";
|
||||
in
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
trigger = ":email";
|
||||
replace = "oliver@${removePrefix "https://www." websiteUrl}";
|
||||
}
|
||||
{
|
||||
trigger = ":archive";
|
||||
replace = "${websiteUrl}/archive";
|
||||
}
|
||||
{
|
||||
trigger = ":atdc";
|
||||
replace = "${websiteUrl}/atdc";
|
||||
}
|
||||
{
|
||||
trigger = ":call";
|
||||
replace = "${websiteUrl}/call";
|
||||
}
|
||||
{
|
||||
trigger = ":coaching";
|
||||
replace = "${websiteUrl}/team-coaching";
|
||||
}
|
||||
{
|
||||
trigger = ":daily";
|
||||
replace = "${dailyUrl}";
|
||||
}
|
||||
{
|
||||
trigger = ":dot";
|
||||
replace = "${githubUrl}/dotfiles";
|
||||
}
|
||||
{
|
||||
trigger = ":gh";
|
||||
replace = "${githubUrl}";
|
||||
}
|
||||
{
|
||||
trigger = ":gt";
|
||||
replace = "Great, thanks!";
|
||||
}
|
||||
{
|
||||
trigger = ":guest";
|
||||
replace = "If you'd like to be a guest on ${podcastUrl} and talk about ..., I'd love to have you on the show.";
|
||||
}
|
||||
{
|
||||
trigger = ":lh";
|
||||
replace = "http://localhost";
|
||||
}
|
||||
{
|
||||
trigger = ":podcast";
|
||||
replace = "${podcastUrl}";
|
||||
}
|
||||
{
|
||||
trigger = ":pricing";
|
||||
replace = "${websiteUrl}/pricing";
|
||||
}
|
||||
{
|
||||
trigger = ":record";
|
||||
replace = "https://savvycal.com/opdavies/beyond-blocks";
|
||||
}
|
||||
{
|
||||
trigger = ":talks";
|
||||
replace = "${websiteUrl}/presentations";
|
||||
}
|
||||
{
|
||||
trigger = ":website";
|
||||
replace = "${websiteUrl}";
|
||||
}
|
||||
{
|
||||
trigger = ":zet";
|
||||
replace = "https://zet.oliverdavies.uk";
|
||||
}
|
||||
{
|
||||
trigger = ":zoom";
|
||||
replace = "https://savvycal.com/opdavies/zoom";
|
||||
}
|
||||
];
|
||||
}
|
26
nix/modules/home-manager/features/desktop/flameshot.nix
Normal file
26
nix/modules/home-manager/features/desktop/flameshot.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.flameshot.enable = lib.mkEnableOption "Enable flameshot";
|
||||
|
||||
config = lib.mkIf config.features.desktop.flameshot.enable {
|
||||
services.flameshot = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
General = {
|
||||
disabledTrayIcon = false;
|
||||
saveAfterCopy = true;
|
||||
savePath = "/home/${username}/Pictures/Screenshots";
|
||||
showHelp = false;
|
||||
uiColor = "#60a5fa";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
26
nix/modules/home-manager/features/desktop/gtk.nix
Normal file
26
nix/modules/home-manager/features/desktop/gtk.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.gtk.enable = lib.mkEnableOption "Enable gtk";
|
||||
|
||||
config = lib.mkIf config.features.desktop.gtk.enable {
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
theme = {
|
||||
name = "Arc-Dark";
|
||||
package = pkgs.arc-theme;
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
name = "Arc";
|
||||
package = pkgs.arc-icon-theme;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./gimp.nix
|
||||
./kdenlive.nix
|
||||
./mpv.nix
|
||||
./pocket-casts.nix
|
||||
];
|
||||
}
|
14
nix/modules/home-manager/features/desktop/media/gimp.nix
Normal file
14
nix/modules/home-manager/features/desktop/media/gimp.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.media.gimp.enable = lib.mkEnableOption "Enable gimp";
|
||||
|
||||
config = lib.mkIf config.features.desktop.media.gimp.enable {
|
||||
home.packages = with pkgs; [ gimp ];
|
||||
};
|
||||
}
|
14
nix/modules/home-manager/features/desktop/media/kdenlive.nix
Normal file
14
nix/modules/home-manager/features/desktop/media/kdenlive.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.media.kdenlive.enable = lib.mkEnableOption "Enable kdenlive";
|
||||
|
||||
config = lib.mkIf config.features.desktop.media.kdenlive.enable {
|
||||
home.packages = with pkgs; [ kdenlive ];
|
||||
};
|
||||
}
|
17
nix/modules/home-manager/features/desktop/media/mpv.nix
Normal file
17
nix/modules/home-manager/features/desktop/media/mpv.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.features.desktop.media.mpv.enable = lib.mkEnableOption "Enable mpv media player";
|
||||
|
||||
config = lib.mkIf config.features.desktop.media.mpv.enable {
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
|
||||
# https://github.com/mpv-player/mpv/blob/master/etc/input.conf
|
||||
bindings = {
|
||||
"DOWN" = "add volume -5";
|
||||
"UP" = "add volume 5";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.media.pocket-casts.enable = lib.mkEnableOption "Enable Pocket Casts";
|
||||
|
||||
config = lib.mkIf config.features.desktop.media.pocket-casts.enable {
|
||||
home.packages = with pkgs; [ pocket-casts ];
|
||||
};
|
||||
}
|
14
nix/modules/home-manager/features/desktop/slack.nix
Normal file
14
nix/modules/home-manager/features/desktop/slack.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.slack.enable = lib.mkEnableOption "Enable Slack";
|
||||
|
||||
config = lib.mkIf config.features.desktop.slack.enable {
|
||||
home.packages = with pkgs; [ slack ];
|
||||
};
|
||||
}
|
14
nix/modules/home-manager/features/desktop/zoom.nix
Normal file
14
nix/modules/home-manager/features/desktop/zoom.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.zoom.enable = lib.mkEnableOption "Enable zoom";
|
||||
|
||||
config = lib.mkIf config.features.desktop.zoom.enable {
|
||||
home.packages = with pkgs; [ nixpkgs-2405.zoom-us ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue