feat: add initial modules

This commit is contained in:
2026-02-20 15:10:12 +01:00
parent 9d9d85f1ef
commit 4a2dac4118
15 changed files with 468 additions and 0 deletions

View File

@@ -0,0 +1 @@
{ lib, my-lib }: args: (my-lib.autoDir ./.)

55
modules/nixos/sway.nix Normal file
View File

@@ -0,0 +1,55 @@
{
pkgs,
lib,
config,
...
}:
{
options = {
sway = {
enable = lib.mkEnableOption "enable sway module";
cmdFlags = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
description = "additional command line flags to pass to sway";
};
};
};
config = lib.mkIf config.sway.enable {
programs.sway = {
enable = true;
package = pkgs.swayfx;
wrapperFeatures.gtk = true;
extraOptions = config.sway.cmdFlags;
extraSessionCommands = ''
# Fix for some Java AWT applications (e.g. Android Studio),
# use this if they aren't displayed properly:
export _JAVA_AWT_WM_NONREPARENTING=1
'';
};
environment.systemPackages = with pkgs; [
# default extra packages
brightnessctl
foot
grim
pulseaudio
swayidle
# swaylock - use swaylock-effects instead
swaylock-effects
wmenu
# additional things i like
slurp
wofi
wl-clipboard
wob
pamixer
wlsunset
flameshot
waybar
wayland-pipewire-idle-inhibit
];
};
}

23
modules/nixos/yubikey.nix Normal file
View File

@@ -0,0 +1,23 @@
{
pkgs,
lib,
config,
...
}:
{
options = {
yubikey = {
enable = lib.mkEnableOption "enable yubikey module";
};
};
config = lib.mkIf config.yubikey.enable {
environment.systemPackages = with pkgs; [
yubikey-personalization
yubikey-manager
];
services.pcscd.enable = true;
};
}