summaryrefslogtreecommitdiff
path: root/hm
diff options
context:
space:
mode:
Diffstat (limited to 'hm')
-rw-r--r--hm/conf/git.nix39
-rw-r--r--hm/env/swayidle.nix16
-rw-r--r--hm/shell/fish.nix1
3 files changed, 49 insertions, 7 deletions
diff --git a/hm/conf/git.nix b/hm/conf/git.nix
index b297153..67fcaa4 100644
--- a/hm/conf/git.nix
+++ b/hm/conf/git.nix
@@ -1,4 +1,9 @@
-{ config, lib, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
let
cfg = config.hm.conf.git;
in
@@ -8,11 +13,39 @@ in
programs.git = {
enable = true;
lfs.enable = true;
+ signing = {
+ key = "EF69F2FB25C8B5A66918EA91A38ACEAB9656CD94";
+ signByDefault = true;
+ };
settings = {
- user.name = "adikro";
- user.email = "adikro@disroot.org";
+ user = {
+ name = "adikro";
+ email = "adikro@disroot.org";
+ };
init.defaultBranch = "main";
+ push.autoSetupRemote = true;
+ pull.rebase = true;
+ "url \"git@codeberg.org:\"".insteadOf = "https://codeberg.org/";
};
+ ignores = [
+ "*.swp"
+ "result"
+ ".direnv/"
+ "secrets/*.tmp"
+ ];
+ hooks.pre-commit = pkgs.writeShellScript "sops-pre-commit" ''
+ for file in secrets/*.yaml; do
+ if [[ -f "$file" ]]; then
+ if ! ${pkgs.ripgrep}/bin/rg -q "sops" "$file"; then
+ echo "--------------------------------------------------------"
+ echo "ABORTING COMMIT: Unencrypted file detected: $file"
+ echo "Please run 'sops -e -i $file' before committing."
+ echo "--------------------------------------------------------"
+ exit 1
+ fi
+ fi
+ done
+ '';
};
};
}
diff --git a/hm/env/swayidle.nix b/hm/env/swayidle.nix
index 94e819a..1150948 100644
--- a/hm/env/swayidle.nix
+++ b/hm/env/swayidle.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
let
cfg = config.hm.env.swayidle;
in
@@ -9,11 +14,14 @@ in
enable = true;
systemdTarget = "graphical-session.target";
events = {
- before-sleep = "${pkgs.swaylock-effects}/bin/swaylock -f";
- lock = "${pkgs.swaylock-effects}/bin/swaylock -f";
+ # before-sleep = "${pkgs.swaylock-effects}/bin/swaylock -f";
+ lock = "${pkgs.swaylock-effects}/bin/swaylock -f";
};
timeouts = [
- { timeout = 300; command = "${pkgs.swaylock-effects}/bin/swaylock -f"; }
+ {
+ timeout = 600;
+ command = "${pkgs.swaylock-effects}/bin/swaylock -f";
+ }
{
timeout = 600;
command = "niri msg action power-off-monitors";
diff --git a/hm/shell/fish.nix b/hm/shell/fish.nix
index a417274..d7f7248 100644
--- a/hm/shell/fish.nix
+++ b/hm/shell/fish.nix
@@ -25,6 +25,7 @@ in
nd = "nix develop .";
nos = "nh os switch .";
nob = "nh os boot .";
+ nus = "nh os switch . -u";
nfu = "nix flake update";
md = "mkdir -p";