Skip to content

Commit

Permalink
docs: add org-roam
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Oct 9, 2023
1 parent 516c0ca commit 2bd36be
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 13 deletions.
14 changes: 14 additions & 0 deletions .dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
;;; .dir-locals.el --- description -*- lexical-binding: t; -*-
;;;
((nil . ((eval . (setq org-roam-directory (concat (shell-command-to-string
"git rev-parse --show-toplevel | tr -d '\n'")
"/docs/org")))
(eval . (setq org-attach-id-dir (concat (shell-command-to-string
"git rev-parse --show-toplevel | tr -d '\n'")
"/docs/org/attach/")))
(eval . (setq org-roam-db-location (concat (shell-command-to-string
"git rev-parse --show-toplevel | tr -d '\n'")
"/.cache/org-roam.db")))))
(org-mode . ((org-tanglesync-mode . t)))
)
;;;docs/org-mode-locals.el ends here
11 changes: 11 additions & 0 deletions docs/org/homeModules.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:PROPERTIES:
:header-args: :noweb tangle :comments noweb :exports both
:PRJ-DIR: ../../nixos/homeModules
:ID: 84d2da32-5e9d-4bf0-9bec-7192415d8fe5
:END:
#+TITLE: homeModules
#+AUTHOR: GuangTao Zhang
#+EMAIL: gtrunsec@hardenedlinux.org
#+DATE: 2023-10-08 Sun 21:22

- tags :: [[id:6bb7d46d-7358-4110-a848-f68fffda5b4d][homeProfiles]]
49 changes: 49 additions & 0 deletions docs/org/homeProfiles.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:PROPERTIES:
:header-args: :noweb tangle :comments noweb :exports both
:PRJ-DIR: ../../nixos/homeProfiles
:ID: 6bb7d46d-7358-4110-a848-f68fffda5b4d
:END:
#+TITLE: homeProfiles
#+AUTHOR: GuangTao Zhang
#+EMAIL: gtrunsec@hardenedlinux.org
#+DATE: 2023-10-08 Sun 21:22

- tags :: [[id:84d2da32-5e9d-4bf0-9bec-7192415d8fe5][homeModules]]

** Suites
*** shell

#+begin_src nix :tangle (concat (org-entry-get nil "PRJ-DIR" t) "/shell.nix")
{ root }:
let
presets = root.presets;
in
with presets; {
default = [
zoxide
fzf
direnv
dircolors
];

fileManager = [ yazi ];

modernTools = [
pls
# eza
];
}
#+end_src

*** audio
:PROPERTIES:
:ID: 28ab95ad-1c3f-4bab-b23c-c9c6e18beacc
:END:

- https://github.com/musnix/musnix

* presets
:PROPERTIES:
:ID: 8cb3750b-c465-4674-8d38-7a3b4cf6d1dc
:END:

9 changes: 9 additions & 0 deletions docs/org/nixosProfiles.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:PROPERTIES:
:ID: 55e5de92-922e-4e91-aa8c-c8121545aac8
:END:
#+TITLE: nixosProfiles
#+AUTHOR: GuangTao Zhang
#+EMAIL: gtrunsec@hardenedlinux.org
#+DATE: 2023-10-08 Sun 22:00

- tags :: [[id:50ab7f73-4fae-481b-8987-6e206a9d8f95][homeProfiles]]
9 changes: 9 additions & 0 deletions nixos/homeProfiles/presets/yazi.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
programs.yazi = {
enable = true;
enableBashIntegration = lib.mkIf config.programs.bash.enable true;
enableZshIntegration = lib.mkIf config.programs.zsh.enable true;
enableFishIntegration = lib.mkIf config.programs.fish.enable true;
enableNushellIntegration = lib.mkIf config.programs.nushell.enable true;
};
}
20 changes: 15 additions & 5 deletions nixos/homeProfiles/shell.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
# [[file:../../docs/org/homeProfiles.org::*shell][shell:1]]
{ root }:
let
presets = root.presets;
in
{
with presets; {
default = [
presets.zoxide
presets.fzf
presets.direnv
presets.dircolors
zoxide
fzf
direnv
dircolors
];

fileManager = [ yazi ];

modernTools = [
pls
# eza
];
}
# shell:1 ends here
23 changes: 15 additions & 8 deletions tests/nixos/__fixture/pops/nixosModules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@
{ selfModule' }:
selfModule' (
m:
dmerge m {
config.boot.contents = update [ 0 ] [ {
content = {
loader.timeout.content = 10;
# loader.efi.canTouchEfiVariables = false;
};
} ];
}
dmerge
(lib.removeAttrs m
[
# popup the imports, so that we can use own nixosModule
# "imports"
]
)
{
config.boot.contents = update [ 0 ] [ {
content = {
loader.timeout.content = 10;
# loader.efi.canTouchEfiVariables = false;
};
} ];
}
);
path = [ "boot" ];
}) ];
Expand Down

0 comments on commit 2bd36be

Please sign in to comment.