diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000000000000000000000000000000000000..86cc929ac8eb7d898915998e44f64260bdfa92e0 --- /dev/null +++ b/.mailmap @@ -0,0 +1,3 @@ +# To learn more about git's mailmap: https://ntietz.com/blog/git-mailmap-for-name-changes +clover caruso +Natalie Marks diff --git a/flake.nix b/flake.nix index 8f40bd9ed49461870591c375968181f6fa8e5448..24e6c7d79ea873ac00f2801c9d9e13a37620da4a 100644 --- a/flake.nix +++ b/flake.nix @@ -97,9 +97,9 @@ packages = forAllSystems ( { system, pkgs, ... }: { - nvim-chloe = mkNeovim "chloe" pkgs; + nvim-clover = mkNeovim "clover" pkgs; + nvim-fish = mkNeovim "fish" pkgs; nvim-natalie = mkNeovim "natalie" pkgs; - nvim-julia = mkNeovim "julia" pkgs; inherit (pkgs) autofmt; } @@ -122,22 +122,22 @@ system = "aarch64-darwin"; }; - # chloe's mac studio "sandwich" + # clover's mac studio "sandwich" darwinConfigurations.sandwich = mkSystem "sandwich" { - user = "chloe"; + user = "clover"; host = "sandwich"; system = "aarch64-darwin"; }; - # chloe's macbook air "paperback" + # clover's macbook air "paperback" darwinConfigurations.paperback = mkSystem "paperback" { - user = "chloe"; + user = "clover"; host = "paperback"; system = "aarch64-darwin"; }; - # julia's cattop + # fish's cattop nixosConfigurations.cattop = mkSystem "cattop" { - user = "julia"; + user = "fish"; host = "cattop"; system = "x86_64-linux"; }; diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 80bd3a11d2307dbb0ea0f5be5c87d650ffb252ab..734dd030eed4694a880def43111531c0e0a9e66f 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -6,8 +6,9 @@ }: { imports = [ - ./options.nix ./formatter.nix + ./keybind.nix + ./options.nix ]; # based on default options from upstream: # https://github.com/NotAShelf/nvf/blob/main/configuration.nix @@ -18,6 +19,10 @@ # override level 999 is used to not conflict with mkDefault as used by nvf. # which allows user configurations to disable/override anything here. config.vim = lib.mkOverride 999 { + extraLuaFiles = [ + ./lib.lua + ]; + theme = { enable = true; }; @@ -60,8 +65,8 @@ listReferences = "gr"; goToType = "gy"; hover = "K"; - nextDiagnostic = "d"; - openDiagnosticFloat = "df"; + nextDiagnostic = null; # ]d + openDiagnosticFloat = "d"; renameSymbol = "rn"; documentHighlight = null; listDocumentSymbols = null; @@ -78,11 +83,9 @@ enable = true; addDefaultGrammars = true; }; - debugger = { - nvim-dap = { - enable = true; - ui.enable = true; - }; + debugger.nvim-dap = { + enable = true; + ui.enable = true; }; languages = { enableFormat = true; @@ -96,36 +99,58 @@ clang.enable = true; css.enable = true; html.enable = true; + lua.enable = true; markdown.enable = true; + nix.enable = true; python.enable = true; rust.crates.enable = true; rust.enable = true; ts.enable = true; zig.enable = true; - lua.enable = true; # sort-lines: off - - nix = { - enable = true; - format.type = "nixfmt"; # looks so much nicer - }; }; - filetree = { - neo-tree = { - enable = false; + filetree.neo-tree = { + enable = true; + setupOpts = { + enable_cursor_hijack = true; + git_status_async = true; }; }; - tabline = { - nvimBufferline.enable = true; + fzf-lua = { + enable = true; + setupOpts = { + fzf_colors = true; + }; }; - autocomplete = { - blink-cmp = { - enable = true; - sourcePlugins = { - ripgrep.enable = true; + autocomplete.blink-cmp = { + enable = true; + mappings = { + close = null; + complete = null; + confirm = null; + next = null; + previous = null; + scrollDocsDown = null; + scrollDocsUp = null; + }; + setupOpts = { + keymap = { + preset = "super-tab"; }; - friendly-snippets.enable = true; + completion = { + ghost_text.enabled = false; + list.selection.preselect = true; + trigger = { + show_in_snippet = true; + }; + accept.auto_brackets.enabled = true; + }; + signature.enabled = true; + }; + sourcePlugins = { + ripgrep.enable = true; }; + friendly-snippets.enable = true; }; statusline = { lualine = { @@ -137,71 +162,6 @@ }; }; }; - - utility = { - snacks-nvim = { - enable = true; - setupOpts = { - bigfile.enable = true; - dashboard = { - preset.keys = [ - { - icon = " "; - key = "n"; - desc = "New File"; - action = ":ene | startinsert"; - } - { - icon = " "; - key = "r"; - desc = "Recent Files"; - action = ":lua Snacks.dashboard.pick('oldfiles')"; - } - ]; - sections = [ - { section = "header"; } - { - section = "keys"; - indent = 2; - padding = 1; - } - { - icon = " "; - title = "Projects"; - section = "projects"; - indent = 2; - padding = 1; - } - { - icon = " "; - title = "Git"; - section = "terminal"; - enabled = lib.options.literalExpression '' - function() - return Snacks.git.get_root() ~= nil - end - ''; - cmd = "git status --short --branch --renames"; - height = 10; - padding = 1; - ttl = 5 * 60; - indent = 3; - } - ]; - }; - image = { - enable = true; - math.enabled = false; - }; - notifier.timeout = 3000; - picker = { - enable = true; - sources = { - }; - }; - }; - }; - }; binds = { whichKey.enable = true; cheatsheet.enable = true; diff --git a/modules/neovim/keybind.nix b/modules/neovim/keybind.nix new file mode 100644 index 0000000000000000000000000000000000000000..f5b2d0f994003d57e0621956b21dec43a05416ed --- /dev/null +++ b/modules/neovim/keybind.nix @@ -0,0 +1,83 @@ +# this file implements a keybind system, which is a higher level system +# to configure vim.keymaps (note the different name bind vs map) +{ + pkgs, + lib, + config, + ... +}: +let + keyRemap = mode: key: action: { inherit mode key action; }; + keyCmd = + mode: key: cmd: + keyRemap mode key ":${cmd}"; +in +{ + # default binds + config.vim.keybinds = { + search-commands = keyCmd "n" "?" "FzfLua keymaps"; + + # user interface + toggle-explorer = keyCmd "n" "e" "Neotree toggle"; + reveal-active-file = keyCmd "n" "E" "Neotree reveal:Neotree focus"; + lazygit = keyCmd "n" "gg" "FullscreenTerm ${pkgs.lazygit}/bin/lazygit"; + + # pickers + pick-file = keyCmd "n" "" "FzfLua files"; + pick-mark = keyCmd "n" "'" "FzfLua marks"; + #pick-buffer = keyCmd "n" "b" "FzfLua buffers"; + pick-grep = keyCmd "n" "ff" "FzfLua grep_project"; + pick-recent-command = keyCmd "n" "fc" "FzfLua command_history"; + pick-other = keyCmd "n" "f?" "FzfLua builtin"; # picker of Fzf pickers + + # lsp + code-action = + keyCmd "n" "ca" + "FzfLua lsp_code_actions winopts.height=15 winopts.backdrop=100 winopts.title=false winopts.preview.title=false winopts.row=1"; + + # subtle nice features + visual-dedent = keyRemap "v" "<" "" ">gv"; # keep selection + clear-search-highlights = keyRemap "n" ""; + }; + + # implementation + options.vim.keybinds = lib.mkOption { + type = lib.types.attrsOf ( + lib.types.nullOr ( + lib.types.submodule { + options = { + mode = lib.mkOption { type = lib.types.str; }; + key = lib.mkOption { type = lib.types.str; }; + action = lib.mkOption { type = lib.types.str; }; + }; + } + ) + ); + default = { }; + }; + config.vim.keymaps = + let + titleCase = + str: + lib.concatStringsSep " " ( + map ( + word: + lib.strings.toUpper (builtins.substring 0 1 word) + + builtins.substring 1 (builtins.stringLength word) word + ) (lib.splitString "-" str) + ); + in + builtins.filter (f: f != null) ( + lib.attrsets.mapAttrsToList ( + desc: bind: + if bind != null then + { + desc = titleCase desc; + inherit (bind) mode key action; + } + else + null + ) config.vim.keybinds + ); +} diff --git a/modules/neovim/lib.lua b/modules/neovim/lib.lua new file mode 100644 index 0000000000000000000000000000000000000000..4daeb6b24689ba466bca4a2f7e56ecf314c1a9f9 --- /dev/null +++ b/modules/neovim/lib.lua @@ -0,0 +1,27 @@ +-- Ported from https://www.reddit.com/r/neovim/comments/vemydn +vim.api.nvim_create_user_command("FullscreenTerm", function(opts) + vim.cmd("tab terminal " .. opts.args) + local laststatus = vim.o.laststatus + local showtabline = vim.o.showtabline + local cmdheight = vim.o.cmdheight + vim.o.laststatus = 0 + vim.o.cmdheight = 0 + vim.o.showtabline = 0 + vim.wo.signcolumn = "no" + vim.wo.relativenumber = false + vim.wo.number = false + vim.cmd( + "autocmd! TermClose " + .. "if !v:event.status" + .. " | exec 'bd! '..expand('')" + .. " | endif" + .. " | checktime" + .. " | set laststatus=" + .. laststatus + .. " | set cmdheight=" + .. cmdheight + .. " | set showtabline=" + .. showtabline + ) + vim.cmd("startinsert") +end, { nargs = "*" }) diff --git a/nvim b/nvim index 417714be8887b7a6f653ffd31474bcb550dbb2ea..9301a343a48c8477771cbaea7b0281277964a5ba 100755 --- a/nvim +++ b/nvim @@ -1,11 +1,11 @@ #!/bin/sh username="$(id -u -n)" if [ "$username" = "clo" ]; then - name="chloe" + name="clover" elif [ "$username" = "nmarks" ]; then name="natalie" elif [ "$username" = "fish" ]; then - name="julia" + name="fish" fi if [ -z "$name" ]; then echo "Configure this wrapper script with your name." >&2 diff --git a/readme.md b/readme.md index 7c7416d44e70df0ed578b1f085592798c93561a1..8a9bd5e518e42d1f5ee2c71a345842dd6bf26540 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ # nix config -this setup allows natalie and chloe to share common configuration between their -machines, but also share useful modules between each other. +this setup allows natalie, clover, and more to share common configuration +between their machines, but also share useful modules between each other. ``` lib/ # reusable functions @@ -12,7 +12,7 @@ modules/ # reusable modules +-- nixos/ # linux configurations +-- shared/ # shared between nixos-rebuild & darwin-rebuild users/ - +-- chloe/ + +-- clover/ | +-- user.nix # info about her | +-- configuration.nix # for all hosts (system) | +-- home.nix # for all hosts (userspace) diff --git a/users/chloe/configuration.nix b/users/chloe/configuration.nix deleted file mode 100644 index aa0b4855f6ea0301a2e97d15bacfbf7ac5456ec4..0000000000000000000000000000000000000000 --- a/users/chloe/configuration.nix +++ /dev/null @@ -1,44 +0,0 @@ -# Configuration applied to all of chloe's machines -{ pkgs, ... }: -{ - # packages for all machines - environment.systemPackages = with pkgs; [ - git - ]; - - services.tailscale.enable = true; - - # configuration for shared modules. - # all custom options in 'shared' for clarity. - shared.darwin = { - macAppStoreApps = [ - "adguard" - "magnet" - ]; - }; - - # system preferences - system.defaults = { - NSGlobalDomain = { - KeyRepeat = 1; - InitialKeyRepeat = 10; - }; - dock = { - show-recents = false; - }; - CustomUserPreferences = { - NSGlobalDomain = { - # TODO: how to change system accent color - AppleHighlightColor = "1.000000 0.874510 0.701961 Orange"; - - # control how the fn keys operate - # 0 = default to media keys, 1 = default to FN1-12 - "com.apple.keyboard.fnState" = 1; - - NSUserKeyEquivalents = { - Minimize = "@~^\\Uf70f"; # set minimize to a stupidly hard key to press - }; - }; - }; - }; -} diff --git a/users/chloe/home.nix b/users/chloe/home.nix deleted file mode 100644 index b46fbf4522864d7a6ccf6977e30fd2bcce7a1f59..0000000000000000000000000000000000000000 --- a/users/chloe/home.nix +++ /dev/null @@ -1,104 +0,0 @@ -{ pkgs, host, ... }: -let - hostServer = false; -in -{ - home = { - stateVersion = "23.05"; # Please read the comment before changing. - packages = - with pkgs; - let - # packages to always install - all = [ - (ffmpeg.override { - withSvtav1 = true; - }) - ripgrep - uv - nh - pkgs.autofmt - ]; - # packages to install for desktop environments (non-server) - desktop = [ - git-town - ]; - # packages to install on all servers - server = [ ]; - # packages to install on macOS desktops - darwin = [ - raycast - ]; - # packages to install on linux desktops - linux = [ - reaper # TODO: why does this break on macOS - ]; - in - all ++ (if host.darwin then darwin else linux) ++ (if hostServer then server else desktop); - }; - programs = { - # sort-lines:start - # bat.enable = true; - btop.enable = true; - fd.enable = true; - hyfetch.enable = true; - # sort-lines:end - - ghostty = { - enable = true; - shader = "cursor-smear-black.glsl"; - package = null; - settings = { - theme = "light:catppuccin-latte,dark:catppuccin-macchiato"; - font-family = "AT Name Mono"; - adjust-cursor-thickness = 1; - minimum-contrast = 1.1; - background-opacity = 0.9; - background-blur = true; - }; - }; - - # zsh is the shell i use - zsh = { - enable = true; - enableCompletion = true; - autosuggestion.enable = true; - syntaxHighlighting.enable = true; - - history.size = 10000; - - shellAliases = { - switch = "nh darwin switch ~/config"; - }; - profileExtra = '' - function python() { - dirname=$(dirname $1 2>/dev/null) - if [ -z "$dirname" ]; then - dirname=$(pwd) - fi - uv run --project "$dirname" "$@" - } - ''; - }; - - # use a git-specific email - git.userEmail = "git@paperclover.net"; - - ssh = { - enable = true; - matchBlocks = rec { - zenith = { - user = "clo"; - port = 222; - }; - "nas.paperclover.net" = zenith; - }; - }; - neovide = { - enable = !hostServer; - settings = { - font.normal = "AT Name Mono"; - font.size = 13; - }; - }; - }; -} diff --git a/users/chloe/paperback/configuration.nix b/users/chloe/paperback/configuration.nix deleted file mode 100644 index 6fc73ce7beb3226fdae02e56d2e1cb4803d09334..0000000000000000000000000000000000000000 --- a/users/chloe/paperback/configuration.nix +++ /dev/null @@ -1,6 +0,0 @@ -_: { - homebrew = { - enable = true; - casks = [ "eloston-chromium" ]; - }; -} diff --git a/users/chloe/paperback/home.nix b/users/chloe/paperback/home.nix deleted file mode 100644 index e2ce2a753fd26f13d6f5990ad6ad7547f9e5c535..0000000000000000000000000000000000000000 --- a/users/chloe/paperback/home.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ pkgs, ... }: -{ - # these programs are not globally installed to reduce distractions. - # most of these are needed for my work environment. - programs = { - bun.enable = true; - zed-editor.enable = true; - zsh.profileExtra = '' - _bun() { - local context state line - _arguments -C '*:file:_files' - } - ''; - }; - home.packages = with pkgs; [ - doppler - nodejs_22 - rustup - typescript - pm2 - pnpm - yt-dlp - spotdl - zig - ssm-session-manager-plugin - awscli - ]; -} diff --git a/users/chloe/sandwich/configuration.nix b/users/chloe/sandwich/configuration.nix deleted file mode 100644 index a9702e92307c9413cb1bce7a6f42c15b9b6a8715..0000000000000000000000000000000000000000 --- a/users/chloe/sandwich/configuration.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ pkgs, ... }: -{ - shared.darwin = { - macAppStoreApps = [ - "final-cut-pro" - "logic-pro" - "motion" - ]; - }; -} diff --git a/users/chloe/user.nix b/users/chloe/user.nix deleted file mode 100644 index 284592d7f6f6a36b7441b3911bafd2298cdd338d..0000000000000000000000000000000000000000 --- a/users/chloe/user.nix +++ /dev/null @@ -1,18 +0,0 @@ -# This definition is used by modules to customize as needed. -{ - username = "clo"; # username - name = "chloe caruso"; - email = "account@paperclover.net"; - timeZone = "America/Los_Angeles"; - - dotfilesDir = "~/config"; # absolute path of the local repo - - # Stylix/Theming - theme = null; - #font - sexuality = "lesbian"; # hyfetch - - # Default terminal command. NOTE: ghostty is not installed for you - term = "ghostty"; # preferred $TERMINAL - editor = "nvim"; # preferred $EDITOR -} diff --git a/users/chloe/vim.nix b/users/chloe/vim.nix deleted file mode 100644 index 4dfae25fd18de645ba52a03c7f6a48d626da3c1a..0000000000000000000000000000000000000000 --- a/users/chloe/vim.nix +++ /dev/null @@ -1,65 +0,0 @@ -_: { - vim = { - options = { - linebreak = true; - }; - git = { - gitsigns.setupOpts = { - current_line_blame = true; - current_line_blame_opts = { - virt_text = true; - virt_text_pos = "right_align"; - delay = 25; - ignore_whitespace = true; - virt_text_priority = 100; - use_focus = true; - }; - }; - }; - autocomplete.blink-cmp = { - enable = true; - mappings = { - close = null; - complete = null; - confirm = null; - next = null; - previous = null; - scrollDocsDown = null; - scrollDocsUp = null; - }; - - setupOpts = { - keymap = { - preset = "super-tab"; - }; - completion = { - ghost_text.enabled = false; - list.selection.preselect = true; - trigger = { - show_in_snippet = true; - }; - accept.auto_brackets.enabled = true; - }; - signature = { - enabled = true; - }; - }; - }; - - keymaps = - let - mkKeymap = mode: key: action: desc: { - inherit mode; - inherit key action desc; - }; - n = mkKeymap "n"; # normal mode - in - [ - # UI - (n "e" ":lua require('snacks').explorer()" "File Explorer") - # Find Files - (n "" ":lua require('snacks').picker.smart()" "Smart Find Files") - (n "f" ":lua require('snacks').picker.grep()" "Grep Files") - ]; - }; -} diff --git a/users/clover/configuration.nix b/users/clover/configuration.nix new file mode 100644 index 0000000000000000000000000000000000000000..103b011a987ed79def16b4bae7aef256192e681d --- /dev/null +++ b/users/clover/configuration.nix @@ -0,0 +1,44 @@ +# Configuration applied to all of clover's machines +{ pkgs, ... }: +{ + # packages for all machines + environment.systemPackages = with pkgs; [ + git + ]; + + services.tailscale.enable = true; + + # configuration for shared modules. + # all custom options in 'shared' for clarity. + shared.darwin = { + macAppStoreApps = [ + "adguard" + "magnet" + ]; + }; + + # system preferences + system.defaults = { + NSGlobalDomain = { + KeyRepeat = 1; + InitialKeyRepeat = 10; + }; + dock = { + show-recents = false; + }; + CustomUserPreferences = { + NSGlobalDomain = { + # TODO: how to change system accent color + AppleHighlightColor = "1.000000 0.874510 0.701961 Orange"; + + # control how the fn keys operate + # 0 = default to media keys, 1 = default to FN1-12 + "com.apple.keyboard.fnState" = 1; + + NSUserKeyEquivalents = { + Minimize = "@~^\\Uf70f"; # set minimize to a stupidly hard key to press + }; + }; + }; + }; +} diff --git a/users/clover/home.nix b/users/clover/home.nix new file mode 100644 index 0000000000000000000000000000000000000000..3fddc2063a6495e1d9f47399a919fab8a7d40728 --- /dev/null +++ b/users/clover/home.nix @@ -0,0 +1,105 @@ +{ pkgs, host, ... }: +let + hostServer = false; +in +{ + home = { + stateVersion = "23.05"; # Please read the comment before changing. + packages = + with pkgs; + let + # packages to always install + all = [ + (ffmpeg.override { + withSvtav1 = true; + }) + ripgrep + uv + nh + pkgs.autofmt + ]; + # packages to install for desktop environments (non-server) + desktop = [ + git-town + lazygit + ]; + # packages to install on all servers + server = [ ]; + # packages to install on macOS desktops + darwin = [ + raycast + ]; + # packages to install on linux desktops + linux = [ + reaper # TODO: why does this break on macOS + ]; + in + all ++ (if host.darwin then darwin else linux) ++ (if hostServer then server else desktop); + }; + programs = { + # sort-lines:start + # bat.enable = true; + btop.enable = true; + fd.enable = true; + hyfetch.enable = true; + # sort-lines:end + + ghostty = { + enable = true; + shader = "cursor-smear-black.glsl"; + package = null; + settings = { + theme = "light:catppuccin-latte,dark:catppuccin-macchiato"; + font-family = "AT Name Mono"; + adjust-cursor-thickness = 1; + minimum-contrast = 1.1; + background-opacity = 0.9; + background-blur = true; + }; + }; + + # zsh is the shell i use + zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + + history.size = 10000; + + shellAliases = { + switch = "nh darwin switch ~/config"; + }; + profileExtra = '' + function python() { + dirname=$(dirname $1 2>/dev/null) + if [ -z "$dirname" ]; then + dirname=$(pwd) + fi + uv run --project "$dirname" "$@" + } + ''; + }; + + # use a git-specific email + git.userEmail = "git@paperclover.net"; + + ssh = { + enable = true; + matchBlocks = rec { + zenith = { + user = "clo"; + port = 222; + }; + "nas.paperclover.net" = zenith; + }; + }; + neovide = { + enable = !hostServer; + settings = { + font.normal = "AT Name Mono"; + font.size = 13; + }; + }; + }; +} diff --git a/users/clover/paperback/configuration.nix b/users/clover/paperback/configuration.nix new file mode 100644 index 0000000000000000000000000000000000000000..3d94126693f8ab3136a138d8b013d6491e67fee4 --- /dev/null +++ b/users/clover/paperback/configuration.nix @@ -0,0 +1,9 @@ +_: { + homebrew = { + enable = true; + casks = [ + "eloston-chromium" + "db-browser-for-sqlite" + ]; + }; +} diff --git a/users/clover/paperback/home.nix b/users/clover/paperback/home.nix new file mode 100644 index 0000000000000000000000000000000000000000..711130f295df837f03f7c41ca2efc7cc64491798 --- /dev/null +++ b/users/clover/paperback/home.nix @@ -0,0 +1,28 @@ +{ pkgs, ... }: +{ + # these programs are not globally installed to reduce distractions. + # most of these are needed for my work environment. + programs = { + bun.enable = true; + zsh.profileExtra = '' + _bun() { + local context state line + _arguments -C '*:file:_files' + } + ''; + }; + home.packages = with pkgs; [ + doppler + deno + nodejs_22 + rustup + typescript + pm2 + pnpm + yt-dlp + spotdl + zig + ssm-session-manager-plugin + awscli + ]; +} diff --git a/users/clover/sandwich/configuration.nix b/users/clover/sandwich/configuration.nix new file mode 100644 index 0000000000000000000000000000000000000000..a9702e92307c9413cb1bce7a6f42c15b9b6a8715 --- /dev/null +++ b/users/clover/sandwich/configuration.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: +{ + shared.darwin = { + macAppStoreApps = [ + "final-cut-pro" + "logic-pro" + "motion" + ]; + }; +} diff --git a/users/clover/user.nix b/users/clover/user.nix new file mode 100644 index 0000000000000000000000000000000000000000..e76aec6abba1dc2ba7c1e2b574aa089ad0057b73 --- /dev/null +++ b/users/clover/user.nix @@ -0,0 +1,11 @@ +# This definition is used by modules to customize as needed. +{ + username = "clo"; # username + name = "clover caruso"; + email = "account@paperclover.net"; + timeZone = "America/Los_Angeles"; + dotfilesDir = "~/config"; # absolute path of the local repo + sexuality = "lesbian"; # hyfetch + term = "ghostty"; # preferred $TERMINAL + editor = "nvim"; # preferred $EDITOR +} diff --git a/users/clover/vim.nix b/users/clover/vim.nix new file mode 100644 index 0000000000000000000000000000000000000000..84bac23ce713af41bcc8bce973f866f8a403b8be --- /dev/null +++ b/users/clover/vim.nix @@ -0,0 +1,20 @@ +_: { + vim = { + options = { + linebreak = true; + }; + git = { + gitsigns.setupOpts = { + current_line_blame = false; + current_line_blame_opts = { + virt_text = true; + virt_text_pos = "right_align"; + delay = 25; + ignore_whitespace = true; + virt_text_priority = 100; + use_focus = true; + }; + }; + }; + }; +} diff --git a/users/fish/cattop/configuration.nix b/users/fish/cattop/configuration.nix new file mode 100644 index 0000000000000000000000000000000000000000..35b2d32f4ccbc4592fdedf71585d0c63f8d18361 --- /dev/null +++ b/users/fish/cattop/configuration.nix @@ -0,0 +1,130 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page, on +# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). + +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Use the systemd-boot EFI boot loader. + boot.loader.efi.canTouchEfiVariables = true; + + # networking.hostName = "nixos"; # Define your hostname. + # Pick only one of the below networking options. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + + # Set your time zone. + # time.timeZone = "Europe/Amsterdam"; + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Select internationalisation properties. + # i18n.defaultLocale = "en_US.UTF-8"; + # console = { + # font = "Lat2-Terminus16"; + # keyMap = "us"; + # useXkbConfig = true; # use xkb.options in tty. + # }; + + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Enable the GNOME Desktop Environment. + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + + # Configure keymap in X11 + # services.xserver.xkb.layout = "us"; + # services.xserver.xkb.options = "eurosign:e,caps:escape"; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + # Enable sound. + # services.pulseaudio.enable = true; + # OR + # services.pipewire = { + # enable = true; + # pulse.enable = true; + # }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.libinput.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.fish = { + isNormalUser = true; + extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + packages = with pkgs; [ + tree + git + nh + vim + fish + ]; + }; + + programs.firefox.enable = true; + + # List packages installed in system profile. + # You can use https://search.nixos.org/ to find more packages (and options). + environment.systemPackages = with pkgs; [ + vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + wget + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + programs.mtr.enable = true; + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # Copy the NixOS configuration file and link it from the resulting system + # (/run/current-system/configuration.nix). This is useful in case you + # accidentally delete configuration.nix. + # system.copySystemConfiguration = true; + + # This option defines the first version of NixOS you have installed on this particular machine, + # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. + # + # Most users should NEVER change this value after the initial install, for any reason, + # even if you've upgraded your system to a new NixOS release. + # + # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, + # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how + # to actually do that. + # + # This value being lower than the current NixOS release does NOT mean your system is + # out of date, out of support, or vulnerable. + # + # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, + # and migrated your data accordingly. + # + # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . + system.stateVersion = "25.05"; # Did you read the comment? +} diff --git a/users/fish/cattop/hardware-configuration.nix b/users/fish/cattop/hardware-configuration.nix new file mode 100644 index 0000000000000000000000000000000000000000..7e98eeb8a81bcaa008732b48c6b2c13496ca1599 --- /dev/null +++ b/users/fish/cattop/hardware-configuration.nix @@ -0,0 +1,54 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ + config, + lib, + pkgs, + modulesPath, + ... +}: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ + "xhci_pci" + "thunderbolt" + "vmd" + "nvme" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/8eb0d6a2-b8cf-4ef2-ba2a-e25a5555b0bc"; + fsType = "ext4"; + }; + + fileSystems."/boot/efi" = { + device = "/dev/disk/by-uuid/3B51-4A1C"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/58ee9d19-292f-49b5-9979-341b42e8e09d"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/users/fish/cattop/home.nix b/users/fish/cattop/home.nix new file mode 100644 index 0000000000000000000000000000000000000000..e9b97ff24584ff1976792b08227949c0b2b4b471 --- /dev/null +++ b/users/fish/cattop/home.nix @@ -0,0 +1,77 @@ +{ + inputs, + config, + pkgs, + lib, + userSettings, + systemSettings, + ... +}: + +{ + home = { + stateVersion = "23.05"; # Don't change this unless upgrading Home Manager versions + + packages = with pkgs; [ + # General applications + ghostty + stremio + julia + qbittorrent + calibre + mpv + signal-desktop + python3 + gh + + # Gaming + bottles + lutris + mangohud + dxvk_2 + steam-run + vulkan-tools + path-of-building + wineWowPackages.stable + winetricks + (prismlauncher.override { gamemodeSupport = true; }) + + # System & desktop tools + wofi + xorg.xauth + kdePackages.dolphin + xdg-desktop-portal-gtk + xclip + pavucontrol + ethtool + grub2 + efibootmgr + distrobox + + # Dev tools + legcord + hyfetch + arduino-cli + rust-bin.stable.latest.default + tytools + inputs.zls.packages.x86_64-linux.zls + platformio + usbutils + teensy-loader-cli + teensyduino + ]; + }; + + programs = { + btop.enable = true; + hyfetch.enable = true; + + gh = { + enable = true; + gitCredentialHelper.enable = true; + }; + + # Uncomment if you want to use MangoHud system-wide + # mangohud.enable = true; + }; +} diff --git a/users/fish/cattop/home.nix.old b/users/fish/cattop/home.nix.old new file mode 100644 index 0000000000000000000000000000000000000000..9565aadd605f93c25ed2ceaeadf4e336914141a7 --- /dev/null +++ b/users/fish/cattop/home.nix.old @@ -0,0 +1,72 @@ +{ + inputs, + config, + pkgs, + lib, + userSettings, + systemSettings, + ... +}: +{ + home = { + stateVersion = "23.05"; # Please read the comment before changing. + + packages = with pkgs; [ + #building macos apps hard :( + ghostty + stremio + julia + qbittorrent + + #gaming + bottles + lutris + mangohud + dxvk_2 + steam-run + vulkan-tools + path-of-building + wineWowPackages.stable + winetricks + (prismlauncher.override { gamemodeSupport = true; }) + + #window manager stuff + wofi + xorg.xauth + #linux tools + legcord + pavucontrol + ethtool + grub2 + efibootmgr + distrobox + xdg-desktop-portal-gtk + xclip + kdePackages.dolphin + hyfetch + arduino-cli + python3 + gh + #broken on macos + calibre + mpv + wireguard-tools + signal-desktop + inputs.zls.packages.x86_64-linux.zls + rust-bin.stable.latest.default + ]; + + # programs.mangohud.enable = true; + programs = { + btop.enable = true; + hyfetch.enable = true; + programs.gh = { + enable = true; + gitCredentialHelper = { + enable = true; + }; + }; + }; + + }; +} diff --git a/users/fish/configuration.nix b/users/fish/configuration.nix new file mode 100644 index 0000000000000000000000000000000000000000..cfdfd29825a3f6e6103d8211c532201bb6f9ef56 --- /dev/null +++ b/users/fish/configuration.nix @@ -0,0 +1,9 @@ +# Applied to all systems +{ + inputs, + pkgs, + host, + ... +}: +{ +} diff --git a/users/fish/user.nix b/users/fish/user.nix new file mode 100644 index 0000000000000000000000000000000000000000..f515195d33940a28ddd793d7a1c121f8987e4e2e --- /dev/null +++ b/users/fish/user.nix @@ -0,0 +1,13 @@ +rec { + username = "fish"; # username + name = "Fish"; # name/identifier + email = "fish@fishcat.fish"; # email (used for certain configurations) + dotfilesDir = "~/config"; # absolute path of the local repo + theme = "catppuccin-mocha"; # name of theme that stylix will use + browser = "firefox"; # Default browser; must select one from ./user/app/browser/ + term = "ghostty"; # Default terminal command; + font = "iosevka"; # Selected font + editor = "neovim"; # Default editor; + timeZone = "America/Los_Angeles"; + sexuality = "transgender"; +} diff --git a/users/fish/vim.nix b/users/fish/vim.nix new file mode 100644 index 0000000000000000000000000000000000000000..52c14b8cbb66a4eb826a85e044e9a453819720d1 --- /dev/null +++ b/users/fish/vim.nix @@ -0,0 +1,3 @@ +{ ... }: +{ +} diff --git a/users/julia/cattop/configuration.nix b/users/julia/cattop/configuration.nix deleted file mode 100644 index 35b2d32f4ccbc4592fdedf71585d0c63f8d18361..0000000000000000000000000000000000000000 --- a/users/julia/cattop/configuration.nix +++ /dev/null @@ -1,130 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - -{ - config, - lib, - pkgs, - ... -}: - -{ - imports = [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; - - # Use the systemd-boot EFI boot loader. - boot.loader.efi.canTouchEfiVariables = true; - - # networking.hostName = "nixos"; # Define your hostname. - # Pick only one of the below networking options. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. - - # Set your time zone. - # time.timeZone = "Europe/Amsterdam"; - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Select internationalisation properties. - # i18n.defaultLocale = "en_US.UTF-8"; - # console = { - # font = "Lat2-Terminus16"; - # keyMap = "us"; - # useXkbConfig = true; # use xkb.options in tty. - # }; - - # Enable the X11 windowing system. - services.xserver.enable = true; - - # Enable the GNOME Desktop Environment. - services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome.enable = true; - - # Configure keymap in X11 - # services.xserver.xkb.layout = "us"; - # services.xserver.xkb.options = "eurosign:e,caps:escape"; - - # Enable CUPS to print documents. - # services.printing.enable = true; - - # Enable sound. - # services.pulseaudio.enable = true; - # OR - # services.pipewire = { - # enable = true; - # pulse.enable = true; - # }; - - # Enable touchpad support (enabled default in most desktopManager). - # services.libinput.enable = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.fish = { - isNormalUser = true; - extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; [ - tree - git - nh - vim - fish - ]; - }; - - programs.firefox.enable = true; - - # List packages installed in system profile. - # You can use https://search.nixos.org/ to find more packages (and options). - environment.systemPackages = with pkgs; [ - vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - wget - ]; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - programs.mtr.enable = true; - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - # services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - - # Copy the NixOS configuration file and link it from the resulting system - # (/run/current-system/configuration.nix). This is useful in case you - # accidentally delete configuration.nix. - # system.copySystemConfiguration = true; - - # This option defines the first version of NixOS you have installed on this particular machine, - # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. - # - # Most users should NEVER change this value after the initial install, for any reason, - # even if you've upgraded your system to a new NixOS release. - # - # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, - # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how - # to actually do that. - # - # This value being lower than the current NixOS release does NOT mean your system is - # out of date, out of support, or vulnerable. - # - # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, - # and migrated your data accordingly. - # - # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . - system.stateVersion = "25.05"; # Did you read the comment? -} diff --git a/users/julia/cattop/hardware-configuration.nix b/users/julia/cattop/hardware-configuration.nix deleted file mode 100644 index 7e98eeb8a81bcaa008732b48c6b2c13496ca1599..0000000000000000000000000000000000000000 --- a/users/julia/cattop/hardware-configuration.nix +++ /dev/null @@ -1,54 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ - config, - lib, - pkgs, - modulesPath, - ... -}: - -{ - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ - "xhci_pci" - "thunderbolt" - "vmd" - "nvme" - ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/8eb0d6a2-b8cf-4ef2-ba2a-e25a5555b0bc"; - fsType = "ext4"; - }; - - fileSystems."/boot/efi" = { - device = "/dev/disk/by-uuid/3B51-4A1C"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/58ee9d19-292f-49b5-9979-341b42e8e09d"; } - ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/users/julia/cattop/home.nix b/users/julia/cattop/home.nix deleted file mode 100644 index e9b97ff24584ff1976792b08227949c0b2b4b471..0000000000000000000000000000000000000000 --- a/users/julia/cattop/home.nix +++ /dev/null @@ -1,77 +0,0 @@ -{ - inputs, - config, - pkgs, - lib, - userSettings, - systemSettings, - ... -}: - -{ - home = { - stateVersion = "23.05"; # Don't change this unless upgrading Home Manager versions - - packages = with pkgs; [ - # General applications - ghostty - stremio - julia - qbittorrent - calibre - mpv - signal-desktop - python3 - gh - - # Gaming - bottles - lutris - mangohud - dxvk_2 - steam-run - vulkan-tools - path-of-building - wineWowPackages.stable - winetricks - (prismlauncher.override { gamemodeSupport = true; }) - - # System & desktop tools - wofi - xorg.xauth - kdePackages.dolphin - xdg-desktop-portal-gtk - xclip - pavucontrol - ethtool - grub2 - efibootmgr - distrobox - - # Dev tools - legcord - hyfetch - arduino-cli - rust-bin.stable.latest.default - tytools - inputs.zls.packages.x86_64-linux.zls - platformio - usbutils - teensy-loader-cli - teensyduino - ]; - }; - - programs = { - btop.enable = true; - hyfetch.enable = true; - - gh = { - enable = true; - gitCredentialHelper.enable = true; - }; - - # Uncomment if you want to use MangoHud system-wide - # mangohud.enable = true; - }; -} diff --git a/users/julia/cattop/home.nix.old b/users/julia/cattop/home.nix.old deleted file mode 100644 index 9565aadd605f93c25ed2ceaeadf4e336914141a7..0000000000000000000000000000000000000000 --- a/users/julia/cattop/home.nix.old +++ /dev/null @@ -1,72 +0,0 @@ -{ - inputs, - config, - pkgs, - lib, - userSettings, - systemSettings, - ... -}: -{ - home = { - stateVersion = "23.05"; # Please read the comment before changing. - - packages = with pkgs; [ - #building macos apps hard :( - ghostty - stremio - julia - qbittorrent - - #gaming - bottles - lutris - mangohud - dxvk_2 - steam-run - vulkan-tools - path-of-building - wineWowPackages.stable - winetricks - (prismlauncher.override { gamemodeSupport = true; }) - - #window manager stuff - wofi - xorg.xauth - #linux tools - legcord - pavucontrol - ethtool - grub2 - efibootmgr - distrobox - xdg-desktop-portal-gtk - xclip - kdePackages.dolphin - hyfetch - arduino-cli - python3 - gh - #broken on macos - calibre - mpv - wireguard-tools - signal-desktop - inputs.zls.packages.x86_64-linux.zls - rust-bin.stable.latest.default - ]; - - # programs.mangohud.enable = true; - programs = { - btop.enable = true; - hyfetch.enable = true; - programs.gh = { - enable = true; - gitCredentialHelper = { - enable = true; - }; - }; - }; - - }; -} diff --git a/users/julia/configuration.nix b/users/julia/configuration.nix deleted file mode 100644 index cfdfd29825a3f6e6103d8211c532201bb6f9ef56..0000000000000000000000000000000000000000 --- a/users/julia/configuration.nix +++ /dev/null @@ -1,9 +0,0 @@ -# Applied to all systems -{ - inputs, - pkgs, - host, - ... -}: -{ -} diff --git a/users/julia/user.nix b/users/julia/user.nix deleted file mode 100644 index edb5aeaa3bf8c240b32728cd167ea92061fb8e42..0000000000000000000000000000000000000000 --- a/users/julia/user.nix +++ /dev/null @@ -1,13 +0,0 @@ -rec { - username = "fish"; # username - name = "Julia"; # name/identifier - email = "fish@fishcat.fish"; # email (used for certain configurations) - dotfilesDir = "~/config"; # absolute path of the local repo - theme = "catppuccin-mocha"; # name of theme that stylix will use - browser = "firefox"; # Default browser; must select one from ./user/app/browser/ - term = "ghostty"; # Default terminal command; - font = "iosevka"; # Selected font - editor = "neovim"; # Default editor; - timeZone = "America/Los_Angeles"; - sexuality = "transgender"; -} diff --git a/users/julia/vim.nix b/users/julia/vim.nix deleted file mode 100644 index 52c14b8cbb66a4eb826a85e044e9a453819720d1..0000000000000000000000000000000000000000 --- a/users/julia/vim.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ ... }: -{ -}