This commit is contained in:
Madeleine Sydney
2025-03-23 23:16:03 -06:00
parent c3c1359b4f
commit ef9943b707
22 changed files with 300 additions and 106 deletions

View File

@@ -0,0 +1,21 @@
# -*- mode: snippet -*-
# name: Nix module
# uuid:
# key: __module
# condition: t
# expand-env: ((yas-indent-line 'fixed) (yas-wrap-around-region 'nil) (this-current-file-name (file-name-base (buffer-file-name (current-buffer)))))
# --
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.${1:`this-current-file-name`};
in {
options.$1 = {
enable = mkEnableOption "$2";
};
config = mkIf cfg.enable {
$3
};
}

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: enable
# uuid:
# key: enable
# condition: t
# --
enable = lib.mkEnableOption "$1";