aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--custom.nix12
-rw-r--r--gui/default.nix9
-rw-r--r--home.nix4
-rw-r--r--tasks/default.nix (renamed from gui/tasker.nix)8
4 files changed, 23 insertions, 10 deletions
diff --git a/custom.nix b/custom.nix
index 266a37e..acc8f0e 100644
--- a/custom.nix
+++ b/custom.nix
@@ -1,8 +1,14 @@
{ pkgs, ... }:
{
- options.custom.hidpi = pkgs.lib.mkOption {
- type = pkgs.lib.types.bool;
- description = "Configure UI for high DPI displays";
+ options.custom = {
+ hidpi = pkgs.lib.mkOption {
+ type = pkgs.lib.types.bool;
+ description = "Configure UI for high DPI displays";
+ };
+
+ tasks = pkgs.lib.mkOption {
+ type = pkgs.lib.types.attrs;
+ };
};
}
diff --git a/gui/default.nix b/gui/default.nix
index 6948139..93cf8c3 100644
--- a/gui/default.nix
+++ b/gui/default.nix
@@ -9,14 +9,13 @@ in {
./kitty.nix
./vim.nix
./zathura.nix
- # desktop shortcuts for project specific tasks
- ./tasker.nix
# applications grouped by purpose
./apps/file.nix
./apps/web.nix
./apps/dev.nix
];
+# hidpi specific xorg flags
xresources.extraConfig = pkgs.lib.mkIf hidpi ''
Xft.dpi: 160
Xft.autohint: 0
@@ -26,4 +25,10 @@ in {
Xft.antialias: 1
Xft.rgba: rgb
'';
+
+# desktop shortcuts for project specific tasks
+ home.packages = pkgs.callPackage ./pkgs/tasker.nix {
+ inherit pkgs;
+ tasks = config.custom.tasks;
+ };
}
diff --git a/home.nix b/home.nix
index 3cc427d..d0dbb69 100644
--- a/home.nix
+++ b/home.nix
@@ -7,8 +7,12 @@
};
imports = [
+ # define options custom to this config
./custom.nix
+ # load host specific stuff
./host/current.nix
+ # task shortcuts common to all setups
+ ./tasks/default.nix
];
home = {
diff --git a/gui/tasker.nix b/tasks/default.nix
index e7092ba..9fbee61 100644
--- a/gui/tasker.nix
+++ b/tasks/default.nix
@@ -1,7 +1,7 @@
-{ pkgs, ... }:
+{ ... }:
-let
- tasks = {
+{
+ custom.tasks = {
"bsc_edit" = {
description = "Grid refinement BSc thesis editor";
directory = "~/university/documents/bachelor/arbeit";
@@ -33,6 +33,4 @@ let
command = "nix-shell --command fish";
};
};
-in {
- home.packages = pkgs.callPackage ./pkgs/tasker.nix { inherit pkgs; inherit tasks; };
}