aboutsummaryrefslogtreecommitdiff
path: root/macos.local/.flake/home/programs
diff options
context:
space:
mode:
authorJacob Janzen <jacob.a.s.janzen@gmail.com>2024-12-16 23:28:56 -0600
committerJacob Janzen <jacob.a.s.janzen@gmail.com>2024-12-16 23:28:56 -0600
commit26dd014860c0edd89a859d2d8c6dff10275acbad (patch)
treebe704eafeb9458cf202240dc0108f13501ae4272 /macos.local/.flake/home/programs
parent530ee85037375106652e51a23cf05deb2a5ad1d9 (diff)
system changes
Diffstat (limited to 'macos.local/.flake/home/programs')
-rw-r--r--macos.local/.flake/home/programs/core.nix.org1
-rw-r--r--macos.local/.flake/home/programs/emacs/core.nix.org87
-rw-r--r--macos.local/.flake/home/programs/ssh.nix.org31
3 files changed, 76 insertions, 43 deletions
diff --git a/macos.local/.flake/home/programs/core.nix.org b/macos.local/.flake/home/programs/core.nix.org
index 59dd331..96302e9 100644
--- a/macos.local/.flake/home/programs/core.nix.org
+++ b/macos.local/.flake/home/programs/core.nix.org
@@ -1,5 +1,6 @@
#+title: Core Program Configuration
+Import configurations for programs and install programs with no configuration.
#+begin_src nix
{ config, pkgs, ... }:
diff --git a/macos.local/.flake/home/programs/emacs/core.nix.org b/macos.local/.flake/home/programs/emacs/core.nix.org
index 599dd54..4630b0f 100644
--- a/macos.local/.flake/home/programs/emacs/core.nix.org
+++ b/macos.local/.flake/home/programs/emacs/core.nix.org
@@ -1,5 +1,6 @@
#+title: Emacs Configuration
+Here is my Emacs configuration. Define configuration files that should exist.
#+begin_src nix
{ config, pkgs, ... }:
@@ -12,43 +13,61 @@
"./.config/emacs/user-interface.el".source = ./user-interface.el;
"./.config/emacs/tools.el".source = ./tools.el;
"./.config/emacs/languages.el".source = ./languages.el;
- "./Applications/Emacs.app/Contents/MacOS/Emacs" = {
- executable = true;
- text = ''
- #!/bin/sh
- emacsclient -c & disown
- '';
- };
+#+end_src
+
+Define a macOS application wrapper for =emacsclient=.
+#+begin_src nix
+ "./Applications/Emacs.app/Contents/MacOS/Emacs" = {
+ executable = true;
+ text = ''
+#+end_src
+
+Run =emacsclient= and disown the process before closing.
+#+begin_src sh
+ #!/bin/sh
+ emacsclient -c & disown
+#+end_src
+
+Close the block.
+#+begin_src nix
+ '';
};
+ };
+#+end_src
- nixpkgs.overlays = [
- (final: prev:
- {
- emacs29-pgtk = prev.emacs29-pgtk.overrideAttrs (old: {
- patches =
- (old.patches or [])
- ++ [
- # Fix OS window role (needed for window managers like yabai)
- (prev.fetchpatch {
- url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-28/fix-window-role.patch";
- sha256 = "sha256-+z/KfsBm1lvZTZNiMbxzXQGRTjkCFO4QPlEK35upjsE=";
- })
- # Enable rounded window with no decoration
- (prev.fetchpatch {
- url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-29/round-undecorated-frame.patch";
- sha256 = "sha256-uYIxNTyfbprx5mCqMNFVrBcLeo+8e21qmBE3lpcnd+4=";
- })
- # Make Emacs aware of OS-level light/dark mode
- (prev.fetchpatch {
- url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-28/system-appearance.patch";
- sha256 = "sha256-oM6fXdXCWVcBnNrzXmF0ZMdp8j0pzkLE66WteeCutv8=";
- })
- ];
- });
- }
- )
- ];
+Apply patches from =d12frosted/emacs-plus= Homebrew package for Emacs:
+- Fix OS window role (=yabai= needs this to tile Emacs)
+- Enable rounded window with no decoration (I don't really use this)
+- Make Emacs aware of OS-level light/dark mode
+#+begin_src nix
+ nixpkgs.overlays = [
+ (final: prev:
+ {
+ emacs29-pgtk = prev.emacs29-pgtk.overrideAttrs (old: {
+ patches =
+ (old.patches or [])
+ ++ [
+ (prev.fetchpatch {
+ url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-28/fix-window-role.patch";
+ sha256 = "sha256-+z/KfsBm1lvZTZNiMbxzXQGRTjkCFO4QPlEK35upjsE=";
+ })
+ (prev.fetchpatch {
+ url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-29/round-undecorated-frame.patch";
+ sha256 = "sha256-uYIxNTyfbprx5mCqMNFVrBcLeo+8e21qmBE3lpcnd+4=";
+ })
+ (prev.fetchpatch {
+ url = "https://raw.githubusercontent.com/d12frosted/homebrew-emacs-plus/master/patches/emacs-28/system-appearance.patch";
+ sha256 = "sha256-oM6fXdXCWVcBnNrzXmF0ZMdp8j0pzkLE66WteeCutv8=";
+ })
+ ];
+ });
+ }
+ )
+ ];
+#+end_src
+Install Emacs program and service.
+#+begin_src nix
programs.emacs = {
enable = true;
package = pkgs.emacs29-pgtk;
diff --git a/macos.local/.flake/home/programs/ssh.nix.org b/macos.local/.flake/home/programs/ssh.nix.org
index 09eb34f..e9cf7ad 100644
--- a/macos.local/.flake/home/programs/ssh.nix.org
+++ b/macos.local/.flake/home/programs/ssh.nix.org
@@ -1,5 +1,6 @@
#+title: SSH Configuration
+Configure SSH. Keys should be added to the SSH agent. Specify the key file and use the system keychain.
#+begin_src nix
{ config, pkgs, ... }:
{
@@ -13,15 +14,27 @@
"UseKeychain" = "yes";
};
};
- "aviary" = {
- hostname = "aviary.cs.umanitoba.ca";
- user = "janzenj2";
- };
- "jjanzen.ca" = {
- setEnv = {
- "TERM" = "xterm";
- };
- };
+#+end_src
+
+Here is my University of Manitoba computer science SSH server. My account is =janzenj2=.
+#+begin_src nix
+ "aviary" = {
+ hostname = "aviary.cs.umanitoba.ca";
+ user = "janzenj2";
+ };
+#+end_src
+
+Here is my web server at =jjanzen.ca=. Set the =$TERM= variable to =xterm=.
+#+begin_src nix
+ "jjanzen.ca" = {
+ setEnv = {
+ "TERM" = "xterm";
+ };
+ };
+#+end_src
+
+Here is my oracle cloud instance login. Use the =opc= user and a provided key file. Set the =$TERM= variable to =xterm=.
+#+begin_src nix
"oracle" = {
setEnv = {
"TERM" = "xterm";