diff options
Diffstat (limited to 'infra/libkookie/modules/workstation')
8 files changed, 67 insertions, 3 deletions
diff --git a/infra/libkookie/modules/workstation/default.nix b/infra/libkookie/modules/workstation/default.nix index 099d81858f82..5775e053f742 100644 --- a/infra/libkookie/modules/workstation/default.nix +++ b/infra/libkookie/modules/workstation/default.nix @@ -1,5 +1,6 @@ { ... }: { imports = [ + ./emacs ./ui ]; } diff --git a/infra/libkookie/modules/workstation/emacs/bootstrap.nix b/infra/libkookie/modules/workstation/emacs/bootstrap.nix new file mode 100644 index 000000000000..4e540ece2658 --- /dev/null +++ b/infra/libkookie/modules/workstation/emacs/bootstrap.nix @@ -0,0 +1,5 @@ +{ home-manager, packge, ... }: + +{ + home.packages = [ package ]; +} diff --git a/infra/libkookie/modules/workstation/emacs/core.nix b/infra/libkookie/modules/workstation/emacs/core.nix new file mode 100644 index 000000000000..e955e5cdbcfb --- /dev/null +++ b/infra/libkookie/modules/workstation/emacs/core.nix @@ -0,0 +1,9 @@ +{ lib, config, pkgs, home-manager, ... } @ args: + + + +{ + home-manager.users = with lib; + (listToAttrs (map (user: nameValuePair "${user}" ({ ... }: + { imports = [ ./setup.nix ]; })) config.libkookie.activeUsers)); +} diff --git a/infra/libkookie/modules/workstation/emacs/default.nix b/infra/libkookie/modules/workstation/emacs/default.nix new file mode 100644 index 000000000000..57949cb333b7 --- /dev/null +++ b/infra/libkookie/modules/workstation/emacs/default.nix @@ -0,0 +1,18 @@ +/** + * A custom wrapper module to configure an emacs installation. + * + */ + +{ config, lib, pkgs, home-manager, options, ...} @ args: + +let cfg = config.libkookie.emacs; +in +with lib; +{ + options.libkookie.emacs = { + enable = mkEnableOption "emacs configuration module"; + }; + + config = (lib.trace args.options {}); # (import ./core.nix args); +} + diff --git a/infra/libkookie/modules/workstation/emacs/ekookie/default.el b/infra/libkookie/modules/workstation/emacs/ekookie/default.el new file mode 100644 index 000000000000..af12c0ff7373 --- /dev/null +++ b/infra/libkookie/modules/workstation/emacs/ekookie/default.el @@ -0,0 +1,7 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; Basic libkookie emacs configuration template ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + diff --git a/infra/libkookie/modules/workstation/emacs/ekookie/loader.nix b/infra/libkookie/modules/workstation/emacs/ekookie/loader.nix new file mode 100644 index 000000000000..3058341c20ee --- /dev/null +++ b/infra/libkookie/modules/workstation/emacs/ekookie/loader.nix @@ -0,0 +1,19 @@ +{ cfg, ... }: + +# let +# # Create an emacs module with a single file in it +# loadModule = (file: pkgs.runCommand "${file}" {} '' +# mkdir -p $out/share/emacs/site-lisp +# cp -v ${file} $out/share/emacs/site-lisp/ +# ''); + +# # Create a full config from a set of +# buildConfig = (anchor: modules: pkgs.symlinkJoin { +# name = "libkookie-emacs"; +# paths = modules ++ [ (loadModule "${anchor}") ]; +# }); +# in + +# (buildConfig "default.el" cfg.libkookie.features) + +{} diff --git a/infra/libkookie/modules/workstation/emacs/setup.nix b/infra/libkookie/modules/workstation/emacs/setup.nix new file mode 100644 index 000000000000..143fa6ba33a7 --- /dev/null +++ b/infra/libkookie/modules/workstation/emacs/setup.nix @@ -0,0 +1,7 @@ +{ myCfg }: + +{ config, lib, pkgs, ... } @ args: + +pkgs.emacsWithPackages (epkgs: + (with epkgs; [ + ])) diff --git a/infra/libkookie/modules/workstation/ui/i3/default.nix b/infra/libkookie/modules/workstation/ui/i3/default.nix index 1967558f1884..9c2c011231fd 100644 --- a/infra/libkookie/modules/workstation/ui/i3/default.nix +++ b/infra/libkookie/modules/workstation/ui/i3/default.nix @@ -9,9 +9,7 @@ { config, lib, pkgs, home-manager, ... } @ args: -let - cfg = config.libkookie.ui.i3; - libkookie = config.libkookie; +let cfg = config.libkookie.ui.i3; in with lib; { |