Re-organise Home Manager modules

This commit is contained in:
Oliver Davies 2024-09-11 21:44:13 +01:00
parent 9401bd3754
commit d63992ed63
11 changed files with 1 additions and 1 deletions

View file

@ -34,7 +34,7 @@ inputs.nixpkgs.lib.nixosSystem {
};
useGlobalPkgs = true;
useUserPackages = true;
users."${username}" = import ./home-manager;
users."${username}" = import "${self}/home/${username}";
};
}

View file

@ -1,76 +0,0 @@
{
config,
desktop,
inputs,
pkgs,
self,
username,
...
}:
let
desktop-config = import ./desktop.nix {
inherit
config
inputs
pkgs
username
;
};
shared-config = import "${self}/lib/shared/home-manager.nix" {
inherit
inputs
pkgs
self
username
;
};
shared-packages = import "${self}/lib/shared/home-manager-packages.nix" {
inherit
desktop
inputs
pkgs
username
;
};
in
{
imports =
if desktop then
[
desktop-config
shared-config
]
else
[ shared-config ];
home.packages =
shared-packages
++ pkgs.lib.optionals desktop [
pkgs.discord
pkgs.gimp
pkgs.gscan2pdf
pkgs.kdenlive
pkgs.meslo-lg
pkgs.obs-studio
pkgs.okular
pkgs.pamixer
pkgs.pass
pkgs.pavucontrol
pkgs.pinentry
pkgs.via
pkgs.xcape
pkgs.xsel
pkgs.zoom-us
];
home.sessionVariables = {
EDITOR = "nvim";
LANG = "en_GB.UTF-8";
LC_ALL = "en_GB.UTF-8";
LC_CTYPE = "en_GB.UTF-8";
PATH = "$PATH:./vendor/bin:./node_modules/.bin";
PULUMI_SKIP_UPDATE_CHECK = "true";
REPOS = "$HOME/Code";
RIPGREP_CONFIG_PATH = "$HOME/.config/ripgrep/config";
};
}

View file

@ -1,18 +0,0 @@
{
config,
inputs,
pkgs,
username,
}:
{
imports = [
./modules/alacritty.nix
./modules/copyq.nix
./modules/desktop/bluetuith.nix
./modules/espanso.nix
./modules/gtk.nix
./modules/flameshot.nix
./modules/gtk.nix
./modules/mpv.nix
];
}

View file

@ -1,34 +0,0 @@
{ lib, pkgs, self, ... }:
let
inherit (lib) strings;
inherit (strings) toInt;
theme = import "${self}/lib/theme" { inherit pkgs; };
in {
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 = 12;
glyph_offset.y = 6;
};
shell = { program = "zsh"; };
};
};
}

View file

@ -1 +0,0 @@
{ services.copyq.enable = true; }

View file

@ -1,19 +0,0 @@
{
xdg.configFile."bluetuith/bluetuith.conf" = {
text = ''
{
adapter: ""
adapter-states: ""
connect-bdaddr: ""
gsm-apn: ""
gsm-number: ""
keybindings: {
NavigateDown: j
NavigateUp: k
}
receive-dir: ""
theme: {}
}
'';
};
}

View file

@ -1,15 +0,0 @@
{
services.espanso = {
enable = true;
configs = {
default = {
show_notifications = false;
};
};
matches = {
base = import ./espanso/matches.nix;
};
};
}

View file

@ -1,77 +0,0 @@
let
websiteUrl = "https://www.oliverdavies.uk";
dailyUrl = "https://dailydrupaler.com";
podcastUrl = "https://beyondblockspodcast.com";
in
{
matches = [
{
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 = ":dotfiles";
replace = "https://github.com/opdavies/dotfiles.nix";
}
{
trigger = ":dc";
replace = "Drupal Commerce";
}
{
trigger = ":dr";
replace = "Drupal";
}
{
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 = ":talks";
replace = "${websiteUrl}/presentations";
}
{
trigger = ":website";
replace = "${websiteUrl}";
}
{
trigger = ":zet";
replace = "https://zet.oliverdavies.uk";
}
{
trigger = ":zoom";
replace = "https://savvycal.com/opdavies/zoom";
}
];
}

View file

@ -1,16 +0,0 @@
{ username, ... }:
{
services.flameshot = {
enable = true;
settings = {
General = {
disabledTrayIcon = false;
saveAfterCopy = true;
savePath = "/home/${username}/Pictures/Screenshots";
showHelp = false;
uiColor = "#60a5fa";
};
};
};
}

View file

@ -1,11 +0,0 @@
{ pkgs, ... }:
{
gtk = {
enable = true;
theme.package = pkgs.arc-theme;
theme.name = "Arc-Dark";
iconTheme.package = pkgs.arc-icon-theme;
iconTheme.name = "Arc";
};
}

View file

@ -1,11 +0,0 @@
{
programs.mpv = {
enable = true;
# https://github.com/mpv-player/mpv/blob/master/etc/input.conf
bindings = {
"DOWN" = "add volume -5";
"UP" = "add volume 5";
};
};
}