Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
86d529fdd0 | ||
|
|
acf2b21f72 | ||
|
|
2e0bc0bae2 | ||
|
|
353e1373b8 | ||
|
|
add16d36f3 | ||
|
|
fde5d13c0a | ||
|
|
02d4f6e68d | ||
|
|
5d811f88ad | ||
|
|
635d6cdeca | ||
|
|
5cf2d8397d | ||
|
|
0a1a5a4e4a | ||
|
|
1666aba15f | ||
|
|
8a88048d04 | ||
|
|
af6a0ca69c | ||
|
|
43d3ceaf41 | ||
|
|
79acda67c6 | ||
|
|
3a1745e620 | ||
|
|
ebe51b2dc6 | ||
|
|
eed6a57885 | ||
|
|
bdf62ceec0 | ||
|
|
ca74f4654b | ||
|
|
bf8698da71 | ||
|
|
dd195b866d | ||
|
|
0540531fb8 | ||
|
|
3be843fd2e | ||
|
|
37c3dac5bb | ||
|
|
f542767018 | ||
|
|
9d1b7596b1 |
26
flake.nix
26
flake.nix
@@ -2,7 +2,7 @@
|
||||
description = "Starter Configuration with secrets (removed) for MacOS and NixOS";
|
||||
inputs = {
|
||||
nixpkgs = {
|
||||
url = "github:nixos/nixpkgs//nixpkgs-25.05-darwin";
|
||||
url = "github:nixos/nixpkgs//nixpkgs-25.11-darwin";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
@@ -11,7 +11,7 @@
|
||||
url = "github:nix-community/nixd";
|
||||
};
|
||||
darwin = {
|
||||
url = "github:nix-darwin/nix-darwin/nix-darwin-25.05";
|
||||
url = "github:nix-darwin/nix-darwin/nix-darwin-25.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-homebrew = {
|
||||
@@ -40,7 +40,14 @@
|
||||
nix-vscode-extensions = {
|
||||
url = "github:nix-community/nix-vscode-extensions";
|
||||
};
|
||||
catppuccin= {
|
||||
url = "github:catppuccin/nix";
|
||||
};
|
||||
|
||||
# mac-app-util doesn't work with OCLP installed on X86
|
||||
# mac-app-util = {
|
||||
# url = "github:hraban/mac-app-util";
|
||||
# };
|
||||
};
|
||||
outputs =
|
||||
{
|
||||
@@ -56,7 +63,8 @@
|
||||
nixd,
|
||||
sops-nix,
|
||||
nix-vscode-extensions,
|
||||
|
||||
catppuccin,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
user = "olaf";
|
||||
@@ -105,18 +113,12 @@
|
||||
mkLinuxApps = system: {
|
||||
"apply" = mkApp "apply" system;
|
||||
"build-switch" = mkApp "build-switch" system;
|
||||
"copy-keys" = mkApp "copy-keys" system;
|
||||
"create-keys" = mkApp "create-keys" system;
|
||||
"check-keys" = mkApp "check-keys" system;
|
||||
"install" = mkApp "install" system;
|
||||
};
|
||||
mkDarwinApps = system: {
|
||||
"apply" = mkApp "apply" system;
|
||||
"build" = mkApp "build" system;
|
||||
"build-switch" = mkApp "build-switch" system;
|
||||
"copy-keys" = mkApp "copy-keys" system;
|
||||
"create-keys" = mkApp "create-keys" system;
|
||||
"check-keys" = mkApp "check-keys" system;
|
||||
"rollback" = mkApp "rollback" system;
|
||||
};
|
||||
in
|
||||
@@ -135,6 +137,7 @@
|
||||
# sops-nix.nixosModules.sops
|
||||
home-manager.darwinModules.home-manager
|
||||
nix-homebrew.darwinModules.nix-homebrew
|
||||
# mac-app-util.darwinModules.default
|
||||
{
|
||||
nix-homebrew = {
|
||||
inherit user;
|
||||
@@ -147,6 +150,11 @@
|
||||
mutableTaps = false;
|
||||
autoMigrate = true;
|
||||
};
|
||||
home-manager.sharedModules = [
|
||||
# mac-app-util.homeManagerModules.default
|
||||
catppuccin.homeModules.catppuccin
|
||||
|
||||
];
|
||||
}
|
||||
./hosts/darwin
|
||||
];
|
||||
|
||||
56
hosts/config/emacs/emacs.el
Normal file
56
hosts/config/emacs/emacs.el
Normal file
@@ -0,0 +1,56 @@
|
||||
(eval-when-compile
|
||||
(require 'use-package))
|
||||
|
||||
;; load some packages
|
||||
|
||||
(use-package company
|
||||
:bind ("<C-tab>" . company-complete)
|
||||
:diminish company-mode
|
||||
:commands (company-mode global-company-mode)
|
||||
:defer 1
|
||||
:config
|
||||
(global-company-mode))
|
||||
|
||||
(use-package counsel
|
||||
:commands (counsel-descbinds)
|
||||
:bind (([remap execute-extended-command] . counsel-M-x)
|
||||
("C-x C-f" . counsel-find-file)
|
||||
("C-c g" . counsel-git)
|
||||
("C-c j" . counsel-git-grep)
|
||||
("C-c k" . counsel-ag)
|
||||
("C-x l" . counsel-locate)
|
||||
("M-y" . counsel-yank-pop)))
|
||||
|
||||
(use-package flycheck
|
||||
:defer 2
|
||||
:config (global-flycheck-mode))
|
||||
|
||||
(use-package ivy
|
||||
:defer 1
|
||||
:bind (("C-c C-r" . ivy-resume)
|
||||
("C-x C-b" . ivy-switch-buffer)
|
||||
:map ivy-minibuffer-map
|
||||
("C-j" . ivy-call))
|
||||
:diminish ivy-mode
|
||||
:commands ivy-mode
|
||||
:config
|
||||
(ivy-mode 1))
|
||||
|
||||
(use-package magit
|
||||
:defer
|
||||
:if (executable-find "git")
|
||||
:bind (("C-x g" . magit-status)
|
||||
("C-x G" . magit-dispatch-popup))
|
||||
:init
|
||||
(setq magit-completing-read-function 'ivy-completing-read))
|
||||
|
||||
(use-package projectile
|
||||
:commands projectile-mode
|
||||
:bind-keymap ("C-c p" . projectile-command-map)
|
||||
:defer 5
|
||||
:config
|
||||
(projectile-global-mode))
|
||||
|
||||
|
||||
|
||||
(global-set-key (kbd "C-.") 'set-mark-command)
|
||||
@@ -57,6 +57,17 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
users.groups= {
|
||||
gidevelopert={
|
||||
description="Git Common Rights";
|
||||
gid=500;
|
||||
name= "gitdeveloper";
|
||||
members = [ "olaf" ] ;
|
||||
};
|
||||
};
|
||||
|
||||
users.knownGroups=["gitdeveloper"];
|
||||
# Turn off NIX_PATH warnings now that we're using flakes
|
||||
system.checks.verifyNixPath = false;
|
||||
|
||||
@@ -64,7 +75,19 @@ in
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
emacs-unstable
|
||||
# Emacs with automatic package management from overlay
|
||||
(emacsWithPackagesFromUsePackage {
|
||||
config = ../config/emacs/emacs.el;
|
||||
defaultInitFile = true;
|
||||
package = emacs-unstable;
|
||||
alwaysEnsure = true;
|
||||
extraEmacsPackages = epkgs: with epkgs; [
|
||||
magit
|
||||
company
|
||||
nix-mode
|
||||
use-package
|
||||
];
|
||||
})
|
||||
]
|
||||
++ (import ../../modules/shared/packages.nix { inherit pkgs; })
|
||||
|
||||
|
||||
@@ -330,10 +330,24 @@ in
|
||||
jetbrains-mono
|
||||
font-awesome
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
noto-fonts-color-emoji
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Emacs with automatic package management from overlay
|
||||
(emacsWithPackagesFromUsePackage {
|
||||
config = ../config/emacs/emacs.el;
|
||||
defaultInitFile = true;
|
||||
package = emacs-unstable;
|
||||
alwaysEnsure = true;
|
||||
extraEmacsPackages =
|
||||
epkgs: with epkgs; [
|
||||
magit
|
||||
company
|
||||
nix-mode
|
||||
use-package
|
||||
];
|
||||
})
|
||||
gitAndTools.gitFull
|
||||
inetutils
|
||||
];
|
||||
|
||||
@@ -2,72 +2,68 @@ _:
|
||||
|
||||
[
|
||||
# Development Tools
|
||||
"homebrew/cask/docker"
|
||||
"arduino-ide"
|
||||
"homebrew/cask/docker-desktop"
|
||||
"iterm2"
|
||||
"oracle-jdk"
|
||||
"arduino-ide"
|
||||
# "visual-studio-code"
|
||||
"visual-studio-code"
|
||||
|
||||
# Creatative tools
|
||||
"spotify"
|
||||
"blender"
|
||||
"gimp"
|
||||
"inkscape"
|
||||
"vcv-rack"
|
||||
"affinity-designer"
|
||||
"affinity-photo"
|
||||
"affinity-publisher"
|
||||
#"affinity-designer"
|
||||
#"affinity-photo"
|
||||
#"affinity-publisher"
|
||||
|
||||
# Communication Tools
|
||||
"adium"
|
||||
"discord"
|
||||
"slack"
|
||||
"signal"
|
||||
"webex"
|
||||
"whatsapp"
|
||||
"zoom"
|
||||
"webex"
|
||||
|
||||
|
||||
# Utility Tools
|
||||
"syncthing"
|
||||
"blackhole-16ch"
|
||||
"blackhole-2ch"
|
||||
"box-drive"
|
||||
"box-tools"
|
||||
"synology-drive"
|
||||
"spamsieve"
|
||||
"keybase"
|
||||
"karabiner-elements"
|
||||
"keybase"
|
||||
"spamsieve"
|
||||
"syncthing-app"
|
||||
"synology-drive"
|
||||
|
||||
# Entertainment Tools
|
||||
"vlc"
|
||||
"qobuz"
|
||||
"steam"
|
||||
"handbrake-app"
|
||||
"jellyfin-media-player"
|
||||
"vimediamanager"
|
||||
"mediaelch"
|
||||
"handbrake"
|
||||
"obs"
|
||||
"vimediamanager"
|
||||
"vlc"
|
||||
|
||||
# Productivity Tools
|
||||
"1Password"
|
||||
"zotero"
|
||||
"gpg-suite"
|
||||
"home-assistant"
|
||||
"Fantastical"
|
||||
"Remarkable"
|
||||
"mailmate"
|
||||
"spamsieve"
|
||||
"libreoffice"
|
||||
"macdown"
|
||||
"calibre"
|
||||
"superslicer"
|
||||
"element"
|
||||
"mqtt-explorer"
|
||||
"virtualbox"
|
||||
"autodesk-fusion"
|
||||
"qmk-toolbox"
|
||||
"dbeaver-community"
|
||||
"sqlitestudio"
|
||||
"element"
|
||||
"gpg-suite"
|
||||
"macdown"
|
||||
"mailmate"
|
||||
"orcaslicer"
|
||||
"qmk-toolbox"
|
||||
"smartsheet"
|
||||
"spamsieve"
|
||||
# "sqlitestudio" # Doesn't work without Rosetta
|
||||
"virtualbox"
|
||||
"copilot-cli"
|
||||
|
||||
"wireshark"
|
||||
# Browsers
|
||||
"google-chrome"
|
||||
"firefox"
|
||||
|
||||
|
||||
]
|
||||
|
||||
@@ -17,6 +17,7 @@ let
|
||||
additionalFiles = import ./files.nix { inherit user config pkgs; };
|
||||
in
|
||||
{
|
||||
|
||||
imports = [
|
||||
./dock
|
||||
];
|
||||
@@ -46,7 +47,23 @@ in
|
||||
# This message is safe to ignore. (https://github.com/dustinlyons/nixos-config/issues/83)
|
||||
|
||||
masApps = {
|
||||
"wireguard" = 1451685025;
|
||||
"1Password for Safari" = 1569813296; # (8.10.82)
|
||||
"Affinity Designer 2" = 1616831348;
|
||||
"Affinity Photo 2: Image Editor" = 1616822987;
|
||||
"Affinity Publisher 2" = 1606941598;
|
||||
"DaisyDisk" = 411643860; # (4.32)
|
||||
"Fantastical - Calendar" = 975937182;
|
||||
"Home Assistant" = 1099568401; # (2025.7.1)
|
||||
"Ice Cubes for Mastodon" = 6444915884; # (1.11.3)
|
||||
"LibreOffice" = 1630474372;
|
||||
"Monal - XMPP Chatting " = 1637078500;
|
||||
"MQTT Explorer" = 1455214828; # (0.3.5)
|
||||
"Night Sky" = 475772902; # 475772902
|
||||
"Native SQLite Manager" = 1416282836; # (1.31.0)
|
||||
"Remarkable Desktop" = 1276493162; # (3.19.0)
|
||||
"Slack for Desktop" = 803453959; # (4.45.60)
|
||||
"WiFi Explorer: Scanner" = 494803304; # (3.5.6)
|
||||
### "1Password: Password Manager" = 1511601750; # (8.11.0) Does not seem to insta
|
||||
};
|
||||
};
|
||||
|
||||
@@ -61,6 +78,7 @@ in
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
home = {
|
||||
enableNixpkgsReleaseCheck = false;
|
||||
packages = pkgs.callPackage ./packages.nix { };
|
||||
@@ -68,11 +86,30 @@ in
|
||||
sharedFiles
|
||||
additionalFiles
|
||||
{ "emacs-launcher.command".source = myEmacsLauncher; }
|
||||
|
||||
];
|
||||
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
programs = { } // import ../shared/home-manager.nix { inherit config pkgs lib; };
|
||||
programs = {
|
||||
} // import ../shared/home-manager.nix { inherit config pkgs lib; };
|
||||
|
||||
catppuccin = {
|
||||
enable = true;
|
||||
flavor = "mocha";
|
||||
};
|
||||
|
||||
services = {
|
||||
gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
extraConfig = ''
|
||||
default-cache-ttl 600
|
||||
max-cache-ttl 7200
|
||||
pinentry-program /Users/olaf/.nix-profile/bin/pinentry-mac
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# Marked broken Oct 20, 2022 check later to remove this
|
||||
# https://github.com/nix-community/home-manager/issues/3344
|
||||
@@ -89,37 +126,49 @@ in
|
||||
{ path = "/System/Applications/Mail.app/"; }
|
||||
{ path = "/Applications/MailMate.app/"; }
|
||||
{ path = "/Applications/1Password.app/"; }
|
||||
{ path = "/Applications/Firefox.app/"; }
|
||||
{ path = "/run/current-system/Applications/Bitwarden.app/"; }
|
||||
{ path = "/Applications/Calendar.app/"; }
|
||||
{ path = "/Applications/Notes.app/"; }
|
||||
{ path = "/run/current-system/Applications/Firefox.app/"; }
|
||||
|
||||
{ path = "/Applications/Slack.app/"; }
|
||||
{
|
||||
path = "/Applications/zoom.us.app/";
|
||||
options = " -l Zooom";
|
||||
options = " -l Zoom";
|
||||
}
|
||||
{ path = "/System/Applications/Messages.app/"; }
|
||||
|
||||
{ path = "/Applications/iTerm.app/"; }
|
||||
{ path = "/Applications/Fantastical.app/"; }
|
||||
# { path = "${pkgs.alacritty}/Applications/Alacritty.app/"; }
|
||||
{ path = "/Applications/Spotify.app/"; }
|
||||
{ path = "${pkgs.alacritty}/Applications/Alacritty.app/"; }
|
||||
# { path = "/Applications/Spotify.app/"; }
|
||||
{ path = "/Applications/Qobuz.app/"; }
|
||||
{ path = "/System/Volumes/Preboot/Cryptexes/App/System/Applications/Safari.app/"; }
|
||||
{
|
||||
path = "/run/current-system/Applications/Brave Browser.app/";
|
||||
options = "-l Brave";
|
||||
}
|
||||
{ path = "/System/Applications/Photos.app/"; }
|
||||
{ path = "/System/Applications/System Settings.app/"; }
|
||||
{ path = "/Applications/Signal.app/"; }
|
||||
{ path = "/Applications/WhatsApp.app/"; }
|
||||
{ path = "/Applications/Ice\ Cubes.app/"; }
|
||||
|
||||
{
|
||||
path = "/Applications/Jellyfin Media Player.app/";
|
||||
options = "-l Jellyfin";
|
||||
}
|
||||
{ path = "/run/current-system/Applications/Visual Studio Code.app/"; }
|
||||
{ path = "/Applications/Visual Studio Code.app/"; }
|
||||
{ path = "/Applications/Home Assistant.app/"; }
|
||||
{ path = "/Applications/reMarkable.app/"; }
|
||||
{ path = "/Applications/LibreOffice.app/"; }
|
||||
{ path = "/Applications/Microsoft Word.app/"; }
|
||||
{ path = "/Applications/Microsoft PowerPoint.app/"; }
|
||||
{ path = "/Applications/Microsoft Teams.app/"; }
|
||||
{ path = "/Applications/Monal.app/"; }
|
||||
{ path = "/System/Applications/Utilities/Screen Sharing.app/"; }
|
||||
{ path = "/run/current-system/Applications/Emacs.app/"; }
|
||||
{ path = "/run/current-system/Applications/Zotero.app"; }
|
||||
{
|
||||
path = "/Applications/";
|
||||
section = "others";
|
||||
|
||||
@@ -1,18 +1,23 @@
|
||||
{ pkgs }:
|
||||
|
||||
with pkgs;
|
||||
let shared-packages = import ../shared/packages.nix { inherit pkgs; }; in
|
||||
shared-packages ++ [
|
||||
let
|
||||
shared-packages = import ../shared/packages.nix { inherit pkgs; };
|
||||
in
|
||||
shared-packages
|
||||
++ [
|
||||
|
||||
# Security and authentication
|
||||
yubikey-agent
|
||||
keepassxc
|
||||
private-internet-access
|
||||
|
||||
# App and package management
|
||||
appimage-run
|
||||
gnumake
|
||||
cmake
|
||||
home-manager
|
||||
ansible
|
||||
|
||||
# Media and design tools
|
||||
vlc
|
||||
@@ -33,6 +38,9 @@ shared-packages ++ [
|
||||
postgresql
|
||||
libtool # for Emacs vterm
|
||||
|
||||
# System
|
||||
istat-menus
|
||||
|
||||
# Screenshot and recording tools
|
||||
flameshot
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,142 +0,0 @@
|
||||
;; -------------------------
|
||||
;; Variable Declarations
|
||||
;; -------------------------
|
||||
(defvar org-config-file "~/.local/share/src/nixos-config/modules/shared/config/emacs/config.org")
|
||||
(defvar default-config-file "~/.emacs.d/default-config.org")
|
||||
(defvar default-config-url "https://git.kolkman.org/olaf/nixos-config_to_rule_them_all/raw/branch/main/modules/shared/config/emacs/config.org")
|
||||
|
||||
;; -------------------------
|
||||
;; Package Manager Setup
|
||||
;; -------------------------
|
||||
(require 'package)
|
||||
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
||||
("gnu" . "http://elpa.gnu.org/packages/")))
|
||||
|
||||
(unless (assoc-default "melpa" package-archives)
|
||||
(message "Warning: MELPA source not found. Adding MELPA to package-archives.")
|
||||
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t))
|
||||
(unless (assoc-default "org" package-archives)
|
||||
(message "Warning: Org source not found. Adding Org to package-archives.")
|
||||
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t))
|
||||
|
||||
(setq package-enable-at-startup nil)
|
||||
|
||||
;; -------------------------
|
||||
;; Use-Package Setup
|
||||
;; -------------------------
|
||||
(unless (package-installed-p 'use-package)
|
||||
(package-initialize)
|
||||
(if (package-install 'use-package)
|
||||
(message "use-package installed successfully.")
|
||||
(error "Error: Failed to install use-package."))
|
||||
(setq use-package-verbose t)
|
||||
(setq use-package-always-ensure t)
|
||||
(require 'use-package))
|
||||
|
||||
;; -------------------------
|
||||
;; Environment Variables Setup
|
||||
;; -------------------------
|
||||
(use-package exec-path-from-shell
|
||||
:if (memq window-system '(mac ns x))
|
||||
:config
|
||||
(setq exec-path-from-shell-variables '("PATH" "GOPATH" "PNPM_HOME"))
|
||||
(if (exec-path-from-shell-initialize)
|
||||
(message "Environment variables initialized successfully.")
|
||||
(error "Error: Failed to initialize environment variables.")))
|
||||
|
||||
(when (daemonp)
|
||||
(exec-path-from-shell-initialize))
|
||||
|
||||
;; -------------------------
|
||||
;; Straight.el Setup
|
||||
;; -------------------------
|
||||
(setq straight-repository-branch "develop")
|
||||
(defvar bootstrap-version)
|
||||
(let ((bootstrap-file
|
||||
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
||||
(bootstrap-version 6))
|
||||
(unless (file-exists-p bootstrap-file)
|
||||
(with-current-buffer
|
||||
(url-retrieve-synchronously
|
||||
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
|
||||
'silent 'inhibit-cookies)
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp)))
|
||||
(if (load bootstrap-file nil 'nomessage)
|
||||
(message "Straight.el loaded successfully.")
|
||||
(error "Error: Failed to load Straight.el.")))
|
||||
|
||||
(setq straight-use-package-by-default t)
|
||||
(package-initialize)
|
||||
|
||||
;; -------------------------
|
||||
;; Window and UI Setup
|
||||
;; -------------------------
|
||||
(defun dl/window-setup ()
|
||||
(condition-case nil
|
||||
(progn
|
||||
(column-number-mode)
|
||||
(scroll-bar-mode 0)
|
||||
(menu-bar-mode -1)
|
||||
(tool-bar-mode 0)
|
||||
(winner-mode 1)
|
||||
(add-to-list 'default-frame-alist '(ns-transparent-titlebar . t))
|
||||
(add-to-list 'default-frame-alist '(ns-appearance . dark))
|
||||
(setq ns-use-proxy-icon nil)
|
||||
(setq frame-title-format nil)
|
||||
(message "Window and UI setup completed successfully."))
|
||||
(error (message "Error occurred in Window and UI setup."))))
|
||||
(dl/window-setup)
|
||||
|
||||
;; -------------------------
|
||||
;; Org Mode Setup
|
||||
;; -------------------------
|
||||
(defun dl/org-mode-setup ()
|
||||
(condition-case nil
|
||||
(progn
|
||||
(org-indent-mode)
|
||||
(variable-pitch-mode 1)
|
||||
(auto-fill-mode 0)
|
||||
(visual-line-mode 1)
|
||||
(setq evil-auto-indent nil)
|
||||
(message "Org mode setup completed successfully."))
|
||||
(error (message "Error occurred in Org mode setup."))))
|
||||
|
||||
(use-package org
|
||||
:defer t
|
||||
:hook (org-mode . dl/org-mode-setup)
|
||||
:config
|
||||
(setq org-edit-src-content-indentation 2
|
||||
org-ellipsis " ▾"
|
||||
org-hide-emphasis-markers t
|
||||
org-hide-block-startup nil)
|
||||
:bind (("C-c a" . org-agenda)))
|
||||
|
||||
;; -------------------------
|
||||
;; Default Config Download
|
||||
;; -------------------------
|
||||
(defun dl/download-default-config ()
|
||||
(condition-case nil
|
||||
(progn
|
||||
(unless (file-exists-p default-config-file)
|
||||
(url-retrieve default-config-url
|
||||
(lambda (_status)
|
||||
;; delete-region removes the HTTP headers from the downloaded content.
|
||||
(delete-region (point-min) (1+ url-http-end-of-headers))
|
||||
;; save the contents of the buffer to the file.
|
||||
(write-file default-config-file)))
|
||||
(message "Default configuration downloaded successfully.")))
|
||||
(error (message "Error occurred while downloading the default configuration."))))
|
||||
|
||||
;; -------------------------
|
||||
;; Load Org Config or Default
|
||||
;; -------------------------
|
||||
(condition-case nil
|
||||
(progn
|
||||
(unless (file-exists-p org-config-file)
|
||||
(dl/download-default-config))
|
||||
(if (file-exists-p org-config-file)
|
||||
(org-babel-load-file org-config-file)
|
||||
(org-babel-load-file default-config-file))
|
||||
(message "Configuration loaded successfully."))
|
||||
(error (message "Error occurred while loading the configuration.")))
|
||||
@@ -1,7 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
emacsOverlaySha256 = "06413w510jmld20i4lik9b36cfafm501864yq8k4vxl5r4hn0j0h";
|
||||
emacsOverlaySha256 = "11p1c1l04zrn8dd5w8zyzlv172z05dwi9avbckav4d5fk043m754";
|
||||
in
|
||||
{
|
||||
home-manager.backupFileExtension = "nix-backup";
|
||||
|
||||
@@ -9,8 +9,4 @@
|
||||
# text = githubPublicKey;
|
||||
# };
|
||||
|
||||
# Initializes Emacs with org-mode so we can tangle the main config
|
||||
".emacs.d/init.el" = {
|
||||
text = builtins.readFile ../shared/config/emacs/init.el;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,6 +11,16 @@ let
|
||||
in
|
||||
{
|
||||
|
||||
gpg = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default-key = "01B157D574FEDBB2" ;
|
||||
no-emit-version = true;
|
||||
auto-key-retrieve = true;
|
||||
personal-digest-preferences= "SHA512 SHA384 SHA256 SHA224";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# Shared shell configuration
|
||||
zsh = {
|
||||
@@ -34,6 +44,10 @@ in
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix.sh
|
||||
fi
|
||||
|
||||
|
||||
# GPGAgent for SSH
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
|
||||
# Define variables for directories
|
||||
export PATH=$HOME/.pnpm-packages/bin:$HOME/.pnpm-packages:$PATH
|
||||
export PATH=$HOME/.npm-packages/bin:$HOME/bin:$PATH
|
||||
@@ -88,12 +102,11 @@ in
|
||||
git = {
|
||||
enable = true;
|
||||
ignores = [ "*.swp" ];
|
||||
userName = name;
|
||||
userEmail = email;
|
||||
|
||||
lfs = {
|
||||
enable = true;
|
||||
};
|
||||
extraConfig = {
|
||||
settings = {
|
||||
init.defaultBranch = "main";
|
||||
core = {
|
||||
editor = "vim";
|
||||
@@ -102,6 +115,15 @@ in
|
||||
commit.gpgsign = false;
|
||||
pull.rebase = true;
|
||||
rebase.autoStash = true;
|
||||
user = {
|
||||
name = name;
|
||||
email = email;
|
||||
};
|
||||
};
|
||||
signing = {
|
||||
format = "openpgp";
|
||||
key = null;
|
||||
signByDefault = true;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -289,21 +311,25 @@ in
|
||||
|
||||
ssh = {
|
||||
enable = true;
|
||||
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks."*" = {
|
||||
forwardAgent = false;
|
||||
addKeysToAgent = "no";
|
||||
compression = false;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
controlMaster = "no";
|
||||
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||
controlPersist = "no";
|
||||
};
|
||||
includes = [
|
||||
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux "/home/${user}/.ssh/config_external")
|
||||
(lib.mkIf pkgs.stdenv.hostPlatform.isDarwin "/Users/${user}/.ssh/config_external")
|
||||
];
|
||||
matchBlocks = {
|
||||
"Host *" = {
|
||||
identityAgent = "\"~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock\"";
|
||||
};
|
||||
"github.com" = {
|
||||
identitiesOnly = true;
|
||||
identityFile = [
|
||||
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux "/home/${user}/.ssh/id_github")
|
||||
(lib.mkIf pkgs.stdenv.hostPlatform.isDarwin "/Users/${user}/.ssh/id_github")
|
||||
];
|
||||
};
|
||||
"moonunit.kolkman.org" = {
|
||||
hostname = "moonunit.kolkman.org";
|
||||
user = "root";
|
||||
@@ -395,4 +421,7 @@ in
|
||||
bind-key -T copy-mode-vi 'C-\' select-pane -l
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
39
modules/shared/packages-scratch
Normal file
39
modules/shared/packages-scratch
Normal file
@@ -0,0 +1,39 @@
|
||||
(vscode-with-extensions.override {
|
||||
vscodeExtensions =
|
||||
with vscode-extensions;
|
||||
[
|
||||
#bbenoist.nix
|
||||
jnoortheen.nix-ide
|
||||
ms-python.python
|
||||
ms-azuretools.vscode-docker
|
||||
# ms-vscode-remote.remote-ssh
|
||||
# ms-vscode.cpptools
|
||||
eamodio.gitlens
|
||||
|
||||
]
|
||||
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
# {
|
||||
# name = "remote-ssh-edit";
|
||||
# publisher = "ms-vscode-remote";
|
||||
# version = "0.47.2";
|
||||
# sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
|
||||
# }
|
||||
{
|
||||
name = "cpptools";
|
||||
publisher = "ms-vscode";
|
||||
version = "1.26.1";
|
||||
sha256 = "sha256-uVE7sEO8XN3ArFpElUw25/BKyCOzF1EmZ5nHBkdoL/0=";
|
||||
}
|
||||
# {
|
||||
# name = "minifyall";
|
||||
# publisher = "josee9988";
|
||||
# version = "2.10";
|
||||
# }
|
||||
{
|
||||
name = "platformio-ide";
|
||||
publisher = "platformio";
|
||||
version = "3.3.4";
|
||||
sha256 = "sha256-qfNz4IYjCmCMFLtAkbGTW5xnsVT8iDnFWjrgkmr2Slk=";
|
||||
}
|
||||
];
|
||||
})
|
||||
@@ -4,153 +4,225 @@ with pkgs;
|
||||
[
|
||||
# Nix
|
||||
nixd
|
||||
mas
|
||||
|
||||
# The Web Browsers
|
||||
brave
|
||||
firefox
|
||||
# google-chrome. #stopped working
|
||||
|
||||
# security and some such
|
||||
bitwarden-desktop
|
||||
# bitwarden-cli
|
||||
yubikey-manager # provides ykman
|
||||
pinentry_mac
|
||||
|
||||
# General packages for development and system management
|
||||
#alacritty
|
||||
alacritty
|
||||
ansible
|
||||
aspell
|
||||
aspellDicts.en
|
||||
bash-completion
|
||||
bat
|
||||
btop
|
||||
coreutils
|
||||
difftastic
|
||||
htop
|
||||
killall
|
||||
minicom
|
||||
mtr
|
||||
ncdu
|
||||
neofetch
|
||||
nixfmt-rfc-style
|
||||
openssh
|
||||
postgresql
|
||||
sqlite
|
||||
unrar
|
||||
wget
|
||||
zip
|
||||
htop
|
||||
ncdu
|
||||
mtr
|
||||
nixfmt-rfc-style
|
||||
difftastic
|
||||
|
||||
# Development
|
||||
act
|
||||
autoconf
|
||||
autoconf-archive
|
||||
automake
|
||||
ccache
|
||||
clang-tools
|
||||
cmake
|
||||
dfu-util
|
||||
go
|
||||
jd-diff-patch #json diff patch
|
||||
jq # json tool
|
||||
llvm
|
||||
nasm
|
||||
ninja
|
||||
pkg-config
|
||||
llvm
|
||||
clang-tools
|
||||
dfu-util
|
||||
|
||||
|
||||
# Encryption and security tools
|
||||
age
|
||||
sops
|
||||
gnupg
|
||||
just
|
||||
libfido2
|
||||
sops
|
||||
|
||||
# Cloud-related tools and SDKs
|
||||
docker
|
||||
docker-compose
|
||||
|
||||
# Media-related packages
|
||||
emacs-all-the-icons-fonts
|
||||
dejavu_fonts
|
||||
ffmpeg
|
||||
emacs-all-the-icons-fonts
|
||||
fd
|
||||
ffmpeg
|
||||
font-awesome
|
||||
hack-font
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
meslo-lgs-nf
|
||||
noto-fonts
|
||||
noto-fonts-color-emoji
|
||||
|
||||
# Node.js development tools
|
||||
nodePackages.npm # globally install npm
|
||||
nodePackages.prettier
|
||||
nodejs
|
||||
|
||||
|
||||
# Text and terminal utilities
|
||||
xterm
|
||||
|
||||
htop
|
||||
hunspell
|
||||
iftop
|
||||
# inetutils # includes Telnet
|
||||
jetbrains-mono
|
||||
jq
|
||||
ripgrep
|
||||
tree
|
||||
tmux
|
||||
tree
|
||||
unrar
|
||||
unzip
|
||||
rmapi
|
||||
|
||||
# zsh-powerlevel10k
|
||||
|
||||
# Python packages
|
||||
python3
|
||||
# python3
|
||||
virtualenv
|
||||
|
||||
|
||||
|
||||
(python3.withPackages (python-pkgs: with python-pkgs; [
|
||||
pandas
|
||||
requests
|
||||
tkinter
|
||||
|
||||
]))
|
||||
|
||||
|
||||
# LLM
|
||||
ollama
|
||||
|
||||
# Social
|
||||
pidgin
|
||||
|
||||
# Rust Related
|
||||
rustc
|
||||
cargo
|
||||
platformio-core
|
||||
|
||||
(vscode-with-extensions.override {
|
||||
vscodeExtensions =
|
||||
with vscode-extensions;
|
||||
[
|
||||
#bbenoist.nix
|
||||
jnoortheen.nix-ide
|
||||
ms-python.python
|
||||
ms-azuretools.vscode-docker
|
||||
# ms-vscode-remote.remote-ssh
|
||||
eamodio.gitlens
|
||||
james-yu.latex-workshop
|
||||
ms-vscode.cmake-tools
|
||||
shd101wyy.markdown-preview-enhanced
|
||||
]
|
||||
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
# (vscode-with-extensions.override {
|
||||
# vscodeExtensions =
|
||||
# with vscode-extensions;
|
||||
# [https://github.com/dustinlyons/nixos-config/
|
||||
# #bbenoist.nix
|
||||
# jnoortheen.nix-ide
|
||||
# ms-python.python
|
||||
# ms-azuretools.vscode-docker
|
||||
# # ms-vscode-remote.remote-ssh
|
||||
# eamodio.gitlens
|
||||
# james-yu.latex-workshop
|
||||
# ]
|
||||
# ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
# # {
|
||||
# # name = "remote-ssh-edit";
|
||||
# # publisher = "ms-vscode-remote";
|
||||
# # version = "0.47.2";
|
||||
# # sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
|
||||
# # }
|
||||
# {
|
||||
# name = "remote-ssh-edit";
|
||||
# publisher = "ms-vscode-remote";
|
||||
# version = "0.47.2";
|
||||
# sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
|
||||
# name = "cpptools";
|
||||
# publisher = "ms-vscode";
|
||||
# version = "1.26.1";
|
||||
# sha256 = "sha256-uVE7sEO8XN3ArFpElUw25/BKyCOzF1EmZ5nHBkdoL/0=";
|
||||
# }
|
||||
{
|
||||
name = "cpptools";
|
||||
publisher = "ms-vscode";
|
||||
version = "1.26.1";
|
||||
sha256 = "sha256-uVE7sEO8XN3ArFpElUw25/BKyCOzF1EmZ5nHBkdoL/0=";
|
||||
}
|
||||
{
|
||||
name = "minifyall";
|
||||
publisher = "josee9988";
|
||||
version = "2.10.0";
|
||||
sha256 = "sha256-cH5x8fUN0n+hO1b3lNzau2MnyeYmsD0ZXAYGxCQjT0Y=";
|
||||
}
|
||||
{
|
||||
name = "platformio-ide";
|
||||
publisher = "platformio";
|
||||
version = "3.3.4";
|
||||
sha256 = "sha256-qfNz4IYjCmCMFLtAkbGTW5xnsVT8iDnFWjrgkmr2Slk=";
|
||||
}
|
||||
];
|
||||
})
|
||||
# {
|
||||
# name = "minifyall";
|
||||
# publisher = "josee9988";
|
||||
# version = "2.10.0";
|
||||
# sha256 = "sha256-cH5x8fUN0n+hO1b3lNzau2MnyeYmsD0ZXAYGxCQjT0Y=";
|
||||
# }
|
||||
# {
|
||||
# name = "platformio-ide";
|
||||
# publisher = "platformio";
|
||||
# version = "3.3.4";
|
||||
# sha256 = "sha256-qfNz4IYjCmCMFLtAkbGTW5xnsVT8iDnFWjrgkmr2Slk=";
|
||||
# }
|
||||
# ];
|
||||
# })
|
||||
|
||||
# XML, Tex and LaTex
|
||||
|
||||
# Tex and LaTex
|
||||
pandoc
|
||||
mdbook
|
||||
pandoc
|
||||
rubyPackages_3_4.kramdown-rfc2629
|
||||
tex-fmt
|
||||
xml2rfc
|
||||
zotero
|
||||
|
||||
(texlive.combine {
|
||||
inherit (texlive)
|
||||
apa6
|
||||
apa7
|
||||
apacite
|
||||
biber
|
||||
biblatex
|
||||
biblatex-apa6
|
||||
bibunits
|
||||
catchfile
|
||||
comment
|
||||
courier
|
||||
csquotes
|
||||
draftwatermark
|
||||
endfloat
|
||||
enumitem
|
||||
fancyhdr
|
||||
fontawesome5
|
||||
footmisc
|
||||
footnotehyper
|
||||
geometry
|
||||
ifmtarg
|
||||
latexmk
|
||||
lipsum
|
||||
lualatex-math
|
||||
makecell
|
||||
microtype
|
||||
multirow
|
||||
nowidow
|
||||
parskip
|
||||
ragged2e
|
||||
scalerel
|
||||
scheme-small
|
||||
selnolig
|
||||
sourcesanspro
|
||||
svg
|
||||
tcolorbox
|
||||
texcount
|
||||
threeparttable
|
||||
tikzfill
|
||||
titlesec
|
||||
titling
|
||||
tocloft
|
||||
transparent
|
||||
upquote
|
||||
url
|
||||
xifthen
|
||||
xurl
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user