summaryrefslogtreecommitdiff
path: root/hm/conf
diff options
context:
space:
mode:
Diffstat (limited to 'hm/conf')
-rw-r--r--hm/conf/clip.nix32
-rw-r--r--hm/conf/conf.nix9
-rw-r--r--hm/conf/git.nix18
-rw-r--r--hm/conf/ssh.nix11
-rw-r--r--hm/conf/xdg-dirs.nix51
5 files changed, 121 insertions, 0 deletions
diff --git a/hm/conf/clip.nix b/hm/conf/clip.nix
new file mode 100644
index 0000000..82de671
--- /dev/null
+++ b/hm/conf/clip.nix
@@ -0,0 +1,32 @@
+{ config, lib, pkgs, ... }:
+let
+ cfg = config.szpont.hm.conf.clipboard;
+in
+{
+ options.szpont.hm.conf.clipboard = {
+ enable = lib.mkEnableOption "cliphist clipboard history";
+
+ backend = lib.mkOption {
+ type = lib.types.enum [ "wayland" "x11" "both" ];
+ default = "both";
+ description = "which clipboard backend tools to install";
+ };
+ };
+
+ config = lib.mkIf cfg.enable {
+ services.cliphist = {
+ enable = true;
+ allowImages = true;
+ systemdTargets = "graphical-session.target";
+ };
+
+ home.packages = lib.mkMerge [
+ (lib.mkIf (cfg.backend == "wayland" || cfg.backend == "both") [
+ pkgs.wl-clipboard
+ ])
+ (lib.mkIf (cfg.backend == "x11" || cfg.backend == "both") [
+ pkgs.xclip
+ ])
+ ];
+ };
+}
diff --git a/hm/conf/conf.nix b/hm/conf/conf.nix
new file mode 100644
index 0000000..c05c5c3
--- /dev/null
+++ b/hm/conf/conf.nix
@@ -0,0 +1,9 @@
+{ ... }:
+{
+ imports = [
+ ./clip.nix
+ ./git.nix
+ ./ssh.nix
+ ./xdg-dirs.nix
+ ];
+}
diff --git a/hm/conf/git.nix b/hm/conf/git.nix
new file mode 100644
index 0000000..f6a7267
--- /dev/null
+++ b/hm/conf/git.nix
@@ -0,0 +1,18 @@
+{ config, lib, ... }:
+let
+ cfg = config.szpont.hm.conf.git;
+in
+{
+ options.szpont.hm.conf.git.enable = lib.mkEnableOption "enables git vcs";
+
+ config = lib.mkIf cfg.enable {
+ programs.git = {
+ enable = true;
+ settings = {
+ user.name = "adikro";
+ user.email = "adikro@disroot.org";
+ init.defaultBranch = "main";
+ };
+ };
+ };
+}
diff --git a/hm/conf/ssh.nix b/hm/conf/ssh.nix
new file mode 100644
index 0000000..4587751
--- /dev/null
+++ b/hm/conf/ssh.nix
@@ -0,0 +1,11 @@
+{ config, lib, ... }:
+let
+ cfg = config.szpont.hm.conf.ssh;
+in
+{
+ options.szpont.hm.conf.ssh.enable = lib.mkEnableOption "enables ssh support";
+
+ config = lib.mkIf cfg.enable {
+
+ };
+}
diff --git a/hm/conf/xdg-dirs.nix b/hm/conf/xdg-dirs.nix
new file mode 100644
index 0000000..2bd9e64
--- /dev/null
+++ b/hm/conf/xdg-dirs.nix
@@ -0,0 +1,51 @@
+{ config, lib, ... }:
+let
+ cfg = config.szpont.hm.conf.xdg-dirs;
+in
+{
+ options.szpont.hm.conf.xdg-dirs = {
+ enable = lib.mkEnableOption "enables xdg dirs";
+
+ mediaPath = lib.mkOption {
+ type = lib.types.path;
+ default = config.home.homeDirectory;
+ description = "base path for media";
+ };
+ };
+
+ config = lib.mkIf cfg.enable {
+ xdg.userDirs = {
+ enable = true;
+ createDirectories = true;
+
+ download = "${config.home.homeDirectory}/dl";
+ documents = "${config.home.homeDirectory}/docs";
+
+ pictures = "${toString cfg.mediaPath}/pics";
+ videos = "${toString cfg.mediaPath}/vids";
+
+ desktop = null;
+ music = null;
+ publicShare = null;
+ templates = null;
+
+ extraConfig = {
+ XDG_PROJECTS_DIR = "${config.home.homeDirectory}/proj";
+ XDG_GAMES_DIR = "${config.home.homeDirectory}/games";
+ XDG_MEDIA_DIR = "${toString cfg.mediaPath}";
+ XDG_SS_DIR = "${toString cfg.mediaPath}/pics/ss";
+ XDG_CLIPS_DIR = "${toString cfg.mediaPath}/vids/clips";
+ XDG_ARCHIVE_DIR = "${toString cfg.mediaPath}/archive";
+ };
+ };
+ home.sessionVariables = {
+ XDG_PROJECTS_DIR = "${config.home.homeDirectory}/proj";
+ XDG_GAMES_DIR = "${config.home.homeDirectory}/games";
+ XDG_MEDIA_DIR = "${toString cfg.mediaPath}";
+ XDG_SS_DIR = "${toString cfg.mediaPath}/pics/ss";
+ XDG_CLIPS_DIR = "${toString cfg.mediaPath}/vids/clips";
+ XDG_ARCHIVE_DIR = "${toString cfg.mediaPath}/archive";
+ };
+
+ };
+}