my NixOS and nix-darwin config
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

daedalus setup done

more stuff

we are getting there

+130 -168
+19
.direnv/bin/nix-direnv-reload
··· 1 + #!/usr/bin/env bash 2 + set -e 3 + if [[ ! -d "/Users/suri/Nyx" ]]; then 4 + echo "Cannot find source directory; Did you move it?" 5 + echo "(Looking for "/Users/suri/Nyx")" 6 + echo 'Cannot force reload with this script - use "direnv reload" manually and then try again' 7 + exit 1 8 + fi 9 + 10 + # rebuild the cache forcefully 11 + _nix_direnv_force_reload=1 direnv exec "/Users/suri/Nyx" true 12 + 13 + # Update the mtime for .envrc. 14 + # This will cause direnv to reload again - but without re-building. 15 + touch "/Users/suri/Nyx/.envrc" 16 + 17 + # Also update the timestamp of whatever profile_rc we have. 18 + # This makes sure that we know we are up to date. 19 + touch -r "/Users/suri/Nyx/.envrc" "/Users/suri/Nyx/.direnv"/*.rc
-1
.envrc
··· 1 - use flake
+16 -24
hosts/Daedalus/default.nix
··· 1 - { pkgs, config, outputs, ... }: { 1 + { pkgs, outputs, ... }: { 2 + 3 + imports = [ ../../modules/system/fonts.nix ]; 2 4 3 5 # List packages installed in system profile. To search by name, run: 4 6 # $ nix-env -qaP | grep wget ··· 7 9 8 10 system.primaryUser = "suri"; 9 11 10 - fonts.packages = [ pkgs.monaspace ]; 11 - 12 12 homebrew = { 13 13 enable = true; 14 14 brews = [ 15 15 "sketchybar" 16 16 "mas" 17 - "borders" 17 + # terminal handling stuff 18 18 "libiconv" 19 + # nmcli kinda 19 20 "ifstat" 20 - "libiconv" 21 - # for twizzler 21 + # spicetify stuff 22 + "spicetify-cli" 23 + 24 + # TODO: for twizzler, make a flake for ts 22 25 "qemu" 23 26 "e2fsprogs" 24 - "spicetify-cli" 25 27 "ninja" 26 28 27 29 ]; 28 30 casks = [ 29 31 "ghostty@tip" 30 - "google-chrome" 31 32 "db-browser-for-sqlite" 32 - 33 - "notion" 34 - "orbstack" 35 33 "zen" 36 34 "discord" 37 35 "slack" 38 36 "zulip" 39 37 "raycast" 40 - "blender" 41 - "godot" 42 38 "zoom" 43 39 "soduto" 44 - "font-hack-nerd-font" 45 - "font-sf-pro" 46 - "font-fira-code-nerd-font" 47 40 "spotify" 48 - "obsidian" 49 41 "mac-mouse-fix" 50 42 ]; 51 43 masApps = { "whatsapp" = 310633997; }; ··· 74 66 75 67 nixpkgs.config.allowUnfree = true; 76 68 77 - # Used for backwards compatibility, please read the changelog before changing. 78 - # $ darwin-rebuild changelog 79 - system.stateVersion = 6; 80 - 81 69 security.pam.services.sudo_local.touchIdAuth = true; 82 - 83 - # The platform the configuration will be used on. 84 - nixpkgs.hostPlatform = "aarch64-darwin"; 85 70 86 71 users.users.suri = { 87 72 name = "suri"; 88 73 home = "/Users/suri"; 89 74 }; 75 + 76 + # The platform the configuration will be used on. 77 + nixpkgs.hostPlatform = "aarch64-darwin"; 78 + 79 + # Used for backwards compatibility, please read the changelog before changing. 80 + # $ darwin-rebuild changelog 81 + system.stateVersion = 6; 90 82 }
+5
modules/home/apps/default.nix
··· 1 + { 2 + 3 + imports = [./orbstack.nix]; 4 + 5 + }
+13
modules/home/apps/orbstack.nix
··· 1 + { lib, pkgs, config, ... }: 2 + with lib; 3 + let cfg = config.nyx.orbstack; 4 + in { 5 + options.nyx.orbstack = { enable = mkEnableOption "Orbstack "; }; 6 + 7 + config = mkIf (cfg.enable) { 8 + 9 + home.packages = [ pkgs.orbstack ]; 10 + 11 + }; 12 + 13 + }
+1
modules/home/default.nix
··· 1 1 { 2 2 3 3 imports = [ 4 + ./apps 4 5 ./tools 5 6 ./prompts 6 7 ./shells
+7 -4
modules/home/shells/zsh/default.nix
··· 55 55 56 56 eval "$(zoxide init zsh)" 57 57 # eval "$(starship init zsh)" 58 + # 59 + eval "$(/opt/homebrew/bin/brew shellenv)" 58 60 59 61 function y() { 60 62 local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" ··· 83 85 export PATH="/Users/suri/.cargo/bin:$PATH" 84 86 85 87 if [ "$TERM_PROGRAM" != "Apple_Terminal" ]; then 86 - # eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/di4am0nd.omp.json)" 87 - # eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/pure.omp.json)" 88 - eval "$(oh-my-posh init zsh --config ~/.config/oh-my-posh/theme.toml)" 89 - fi 88 + # WE USE ${pkgs.oh-my-posh} HERE 89 + # This ensures we use the exact binary installed by Nix 90 + eval "$(${pkgs.oh-my-posh}/bin/oh-my-posh init zsh --config ${config.home.homeDirectory}/.config/oh-my-posh/theme.toml)" 91 + fi 92 + 90 93 91 94 ''; 92 95 };
+2 -6
modules/home/term/ghostty/default.nix
··· 4 4 in { 5 5 options.nyx.ghostty = { enable = mkEnableOption "Ghostty Terminal"; }; 6 6 7 - config = mkIf (cfg.enable && pkgs.stdenv.isDarwin) { 8 - home.packages = [ pkgs.ghostty-bin ]; 9 - 7 + config = mkIf (cfg.enable) { 10 8 home.file = { 11 - # REMEMBER to lift the config file out, and refacts this after kenric puts his config 12 - # on the public internet, study and refactor my dotfiles! 13 9 14 10 "${config.home.homeDirectory}/.config/ghostty".source = 15 11 config.lib.file.mkOutOfStoreSymlink 16 - "${config.home.homeDirectory}/Nyx/ghostty"; 12 + "${config.home.homeDirectory}/Nyx/modules/home/term/ghostty/ghostty"; 17 13 18 14 }; 19 15 };
-6
modules/home/term/ghostty/ghostty/config
··· 16 16 # custom-shader = ./shaders/glow.glsl 17 17 # custom-shader = ./shaders/tunnel.glsl 18 18 19 - 20 - 21 - 22 - 23 - 24 - 25 19 # custom-shader-animation = always 26 20 27 21 font-family = ""
+3 -6
modules/home/tools/default.nix
··· 1 1 { pkgs, lib, ... }: { 2 2 3 - imports = [ ./helix ./zellij ]; 3 + imports = [ ./helix ./zellij ./git.nix ./btop.nix ]; 4 4 5 5 home.sessionVariables.LIBRARY_PATH = 6 6 "${lib.makeLibraryPath [ pkgs.libiconv ]}\${LIBRARY_PATH:+:$LIBRARY_PATH}"; 7 7 8 8 home.packages = with pkgs; [ 9 9 10 + ripgrep 11 + bat 10 12 fastfetch 11 - zoxide 12 13 zstd 13 14 coreutils-prefixed 14 - lazygit 15 - docker 16 15 yazi 17 16 fzf 18 17 github-cli ··· 21 20 just 22 21 typst 23 22 tokei 24 - ripgrep 25 - bat 26 23 27 24 ]; 28 25
+2 -2
modules/home/tools/git.nix
··· 1 - { 1 + { pkgs, ... }: { 2 2 programs.git = { 3 3 enable = true; 4 4 settings.user = { ··· 6 6 email = "suri312006@gmail.com"; 7 7 8 8 }; 9 - 10 9 lfs = { enable = true; }; 11 10 }; 11 + home.packages = [ pkgs.lazygit ]; 12 12 }
+1 -1
modules/home/tools/helix/config.toml modules/home/tools/helix/helix/config.toml
··· 1 - theme = "theme-trans" 1 + theme = "nyx" 2 2 3 3 [editor] 4 4 line-number = "relative"
+33 -57
modules/home/tools/helix/default.nix
··· 1 - { pkgs, config, ... }: { 1 + { lib, pkgs, config, ... }: 2 + with lib; 3 + let cfg = config.nyx.helix; 4 + in { 2 5 3 - home.file.".config/helix/ignore".text = '' 4 - !.notes/ 5 - !.gitignore 6 - !.gitmodules 7 - !.github/ 8 - !.devcontainer/ 9 - !.env* 10 - !.sqlx/ 11 - !.cargo/ 12 - !.config/ 13 - !puzzles/* 14 - !examples/* 15 - !inputs/* 16 - target/ 17 - ''; 6 + options.nyx.helix = { enable = mkEnableOption "Helix text editor"; }; 18 7 19 - # ignore file 20 - "${config.home.homeDirectory}/.config/helix/ignore".source = 21 - config.lib.file.mkOutOfStoreSymLink 22 - "${config.home.homeDirectory}/Nyx/modules/tools/helix/ignore"; 8 + config = mkIf (cfg.enable) { 23 9 24 - # theme file 25 - "${config.home.homeDirectory}/.config/helix/nyx-theme.toml".source = 26 - config.lib.file.mkOutOfStoreSymLink 27 - "${config.home.homeDirectory}/Nyx/modules/tools/helix/nyx-theme.toml"; 28 - 29 - # config.toml 30 - "${config.home.homeDirectory}/.config/helix/config.toml".source = 31 - config.lib.file.mkOutOfStoreSymLink 32 - "${config.home.homeDirectory}/Nyx/modules/tools/helix/config.toml"; 10 + # symlink files 11 + home.file.".config/helix".source = config.lib.file.mkOutOfStoreSymlink 12 + "${config.home.homeDirectory}/Nyx/modules/home/tools/helix/helix"; 33 13 34 - # languages.toml 35 - "${config.home.homeDirectory}/.config/helix/languages.toml".source = 36 - config.lib.file.mkOutOfStoreSymLink 37 - "${config.home.homeDirectory}/Nyx/modules/tools/helix/languages.toml"; 38 - 39 - programs.helix = { 40 - enable = true; 41 - defaultEditor = true; 42 - extraPackages = with pkgs; [ 43 - # markdown-oxide 44 - gopls 45 - nil 46 - texlab 47 - taplo 48 - lua-language-server 49 - haskell-language-server 50 - python312Packages.python-lsp-server 51 - typescript-language-server 52 - svelte-language-server 53 - tailwindcss-language-server 54 - tinymist 55 - ltex-ls 56 - nixd 57 - nil 58 - codebook 59 - markdown-oxide 60 - ruff 61 - ]; 14 + programs.helix = { 15 + enable = true; 16 + defaultEditor = true; 17 + extraPackages = with pkgs; [ 18 + # markdown-oxide 19 + gopls 20 + nil 21 + texlab 22 + taplo 23 + lua-language-server 24 + haskell-language-server 25 + python312Packages.python-lsp-server 26 + typescript-language-server 27 + svelte-language-server 28 + tailwindcss-language-server 29 + tinymist 30 + ltex-ls 31 + nixd 32 + nil 33 + codebook 34 + markdown-oxide 35 + ruff 36 + ]; 62 37 38 + }; 63 39 }; 64 40 }
modules/home/tools/helix/ignore modules/home/tools/helix/helix/ignore
modules/home/tools/helix/languages.toml modules/home/tools/helix/helix/languages.toml
modules/home/tools/helix/theme.toml modules/home/tools/helix/helix/themes/nyx.toml
+14 -28
modules/home/tools/zellij/default.nix
··· 1 - { pkgs, ... }: 2 - # let 3 - # suri_zellij_session_helper = 4 - # pkgs.writeShellScriptBin "suri_zellij_session_helper" '' 5 - 6 - # ZELLIJ_SESSIONS=$(zellij ls | sed 's/\x1b\[[0-9;]*m//g' | cut -d ' ' -f 1) 7 - # NUM_SESSIONS=$(echo "''${ZELLIJ_SESSIONS}" | wc -l ) 8 - 9 - # if [ "''${NUM_SESSIONS}" -ge 1 ]; then 10 - # SESSION="$(echo "''${ZELLIJ_SESSIONS}" | fzf)" 11 - 12 - # zellij a ''${SESSION} 13 - 14 - # else 15 - # zellij attach -c 16 - # fi 17 - 18 - # ''; 19 - # in { 20 - 21 - # home = { 22 - # packages = [ pkgs.zellij suri_zellij_session_helper ]; 23 - # file.".config/zellij/config.kdl".source = ./config.kdl; 24 - # }; 25 - # } 1 + { lib, pkgs, config, ... }: 26 2 3 + with lib; 27 4 let 5 + cfg = config.nyx.zellij; 6 + 28 7 suri_zellij_session_helper = 29 8 pkgs.writeShellScriptBin "suri_zellij_session_helper" '' 30 9 ZELLIJ_SESSIONS=$(${pkgs.zellij}/bin/zellij ls | sed 's/\x1b\[[0-9;]*m//g' | cut -d ' ' -f 1) ··· 37 16 fi 38 17 ''; 39 18 in { 40 - home = { 41 - packages = [ pkgs.zellij pkgs.fzf suri_zellij_session_helper ]; 42 - file.".config/zellij/config.kdl".source = ./config.kdl; 19 + 20 + options.nyx.zellij = { enable = mkEnableOption "Zellij"; }; 21 + 22 + config = mkIf (cfg.enable) { 23 + home.file.".config/zellij/config.kdl".source = 24 + config.lib.file.mkOutOfStoreSymlink 25 + "${config.home.homeDirectory}/Nyx/modules/home/tools/zellij/config.kdl"; 26 + home = { packages = [ pkgs.zellij pkgs.fzf suri_zellij_session_helper ]; }; 27 + 43 28 }; 29 + 44 30 }
+1 -1
modules/home/wm/aerospace/aerospace.toml
··· 309 309 run = ['move-node-to-workspace 3'] 310 310 311 311 [[on-window-detected]] 312 - if.app-id = 'com.hnc.Discord' 312 + if.window-title-regex-substring = 'Discord' 313 313 run = ['move-node-to-workspace 7'] 314 314 315 315 [[on-window-detected]]
+1 -3
modules/home/wm/aerospace/default.nix
··· 5 5 options.nyx.aerospace = { 6 6 enable = mkEnableOption "AeroSpace window manager"; 7 7 }; 8 - 9 8 config = mkIf (cfg.enable && pkgs.stdenv.isDarwin) { 10 9 home.packages = [ pkgs.aerospace ]; 11 10 12 - "${config.home.homeDirectory}/.aerospace.toml".source = 13 - 11 + home.file.".aerospace.toml".source = 14 12 config.lib.file.mkOutOfStoreSymlink 15 13 "${config.home.homeDirectory}/Nyx/modules/home/wm/aerospace/aerospace.toml"; 16 14
+1
modules/system/fonts.nix
··· 1 + { pkgs, ... }: { fonts.packages = [ pkgs.monaspace ]; }
+5 -3
users/suri/Daedalus.nix
··· 1 1 { 2 2 3 - imports = [ ./common.nix ../../modules/home/wm/aerospace ]; 3 + imports = [ ./common.nix ]; 4 4 5 5 nyx.aerospace.enable = true; 6 6 nyx.ghostty.enable = true; 7 - nyx.oh-my-posh.enable = true; 8 - nyx.zsh.enable = true; 7 + nyx.helix.enable = true; 8 + nyx.zellij.enable = true; 9 + nyx.orbstack.enable = true; 10 + 9 11 10 12 }
+6 -26
users/suri/common.nix
··· 1 - { config, ... }: 2 - let 3 - 4 - OOS = path: config.lib.file.mkOutOfStoreSymlink path; 5 - 6 - in { 7 - 8 - # imports = [ ./apps ]; 9 - # 10 - imports = [ 11 - 12 - ../../modules/home 1 + { ... }: 2 + { 13 3 14 - ../../modules/home/prompts/oh-my-posh 15 - ../../modules/home/shells/zsh 16 - ../../modules/home/term/ghostty 17 - ../../modules/home/tools 4 + imports = [ ../../modules/home ]; 18 5 19 - ]; 6 + nyx.oh-my-posh.enable = true; 7 + nyx.zsh.enable = true; 8 + nyx.zellij.enable = true; 20 9 21 10 programs.direnv = { 22 11 enable = true; ··· 24 13 nix-direnv.enable = true; 25 14 }; 26 15 27 - home.file = { 28 - # REMEMBER to lift the config file out, and refacts this after kenric puts his config 29 - # on the public internet, study and refactor my dotfiles! 30 - "Library/Application Support/com.mitchellh.ghostty".source = 31 - OOS "${config.home.homeDirectory}/dev/dots/apps/ghostty"; 32 - 33 - }; 34 - 35 16 # The state version is required and should stay at the version you 36 17 # originally installed. 37 18 home.stateVersion = "25.05"; 38 19 } 39 -