diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-05-20 16:10:21 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-05-20 16:14:26 +0200 |
commit | 368cb6b0d25db2ae23be42ad51584de059997e51 (patch) | |
tree | 3282e45d3ebced63c8498a47e83a255c35de620b /pkgs/sources/scripts/default.nix | |
parent | refactor(hm): Rename to `modules/home` (diff) | |
download | nixos-config-368cb6b0d25db2ae23be42ad51584de059997e51.tar.gz nixos-config-368cb6b0d25db2ae23be42ad51584de059997e51.zip |
refactor(sys): Modularize and move to `modules/system` or `pkgs`
Diffstat (limited to '')
-rw-r--r-- | pkgs/sources/scripts/default.nix (renamed from sys/nixpkgs/pkgs/scripts/default.nix) | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/sys/nixpkgs/pkgs/scripts/default.nix b/pkgs/sources/scripts/default.nix index 5279b241..09c8d411 100644 --- a/sys/nixpkgs/pkgs/scripts/default.nix +++ b/pkgs/sources/scripts/default.nix @@ -1,6 +1,7 @@ { sysLib, - config, + homeConfig, + nixosConfig, }: [ ( final: prev: let @@ -45,7 +46,6 @@ ''; ## Begin of shell scripts - aumo-scr = write_shell { name = "aumo"; path = "apps"; @@ -65,6 +65,14 @@ dependencies = []; }; + brightness-scr = lib.mkIf nixosConfig.soispha.laptop.enable (write_shell { + name = "brightness"; + path = "small_functions"; + generateCompletions = true; + dependencies = []; + replacementStrings = {BACKLIGHT_NAME = nixosConfig.soispha.laptop.backlight;}; + }); + con2pdf-scr = sysLib.writeShellScript { name = "con2pdf"; src = ./source/apps/con2pdf.sh; @@ -125,7 +133,7 @@ git gnused # $EDITOR - + ; }; }; @@ -247,13 +255,13 @@ generateCompletions = true; replacementStrings = { DEFAULT_NEORG_PROJECT_DIR = - config.programs.nixvim.plugins.neorg.modules."core.dirman".config.workspaces.projects; - HOME_TASKRC = "${config.xdg.configHome}/task/home-manager-taskrc"; - NEORG_REVIEW_PATH = "${config.xdg.dataHome}/neorg/review"; - ALL_PROJECTS_NEWLINE = "${config.soispha.taskwarrior.projects.projects_newline}"; - ALL_PROJECTS_COMMA = "${config.soispha.taskwarrior.projects.projects_comma}"; - ALL_PROJECTS_PIPE = "${config.soispha.taskwarrior.projects.projects_pipe}"; - ALL_WORKSPACES = "${lib.strings.concatStringsSep "|" (builtins.attrNames config.programs.nixvim.plugins.neorg.modules."core.dirman".config.workspaces)}"; + homeConfig.programs.nixvim.plugins.neorg.modules."core.dirman".config.workspaces.projects; + HOME_TASKRC = "${homeConfig.xdg.configHome}/task/home-manager-taskrc"; + NEORG_REVIEW_PATH = "${homeConfig.xdg.dataHome}/neorg/review"; + ALL_PROJECTS_NEWLINE = "${homeConfig.soispha.taskwarrior.projects.projects_newline}"; + ALL_PROJECTS_COMMA = "${homeConfig.soispha.taskwarrior.projects.projects_comma}"; + ALL_PROJECTS_PIPE = "${homeConfig.soispha.taskwarrior.projects.projects_pipe}"; + ALL_WORKSPACES = "${lib.strings.concatStringsSep "|" (builtins.attrNames homeConfig.programs.nixvim.plugins.neorg.modules."core.dirman".config.workspaces)}"; ID_GENERATION_FUNCTION = "${sysLib.writeShellScript { name = "neorg_id_function"; src = ./source/specific/neorg/neorg_id_function.sh; @@ -324,8 +332,8 @@ ]; generateCompletions = true; replacementStrings = { - XDG_CACHE_HOME = config.xdg.cacheHome; - XDG_MUSIC_DIR = config.xdg.userDirs.music; + XDG_CACHE_HOME = homeConfig.xdg.cacheHome; + XDG_MUSIC_DIR = homeConfig.xdg.userDirs.music; }; }; @@ -365,6 +373,7 @@ # llp = llp-scr; # TODO: see above aumo = aumo-scr; battery = battery-scr; + brightness = brightness-scr; con2pdf = con2pdf-scr; description = description-scr; fupdate = fupdate-scr; @@ -373,9 +382,9 @@ ll = ll-scr; lock = lock-scr; lyrics = lyrics-scr; + mpc = mpc-scr; mpc-fav = mpc-fav-scr; mpc-rm = mpc-rm-scr; - mpc = mpc-scr; nato = nato-scr; neorg = neorg-scr; screenshot_persistent = screenshot_persistent-scr; @@ -390,3 +399,14 @@ } ) ] + + + pkgs = import nixpkgs (import ./sys/nixpkgs { + inherit (nixpkgs) lib; + inherit system sysLib; + + # FIXME: Don't unconditionally use tiamat here <2024-02-24> + homeConfig = self.nixosConfigurations.tiamat.config.home-manager.users.soispha; + nixosConfig = self.nixosConfigurations.tiamat.config; + overlays = []; + }); |