diff --git a/flake.lock b/flake.lock index 00b77f0..5a102b8 100644 --- a/flake.lock +++ b/flake.lock @@ -2002,12 +2002,28 @@ "nixpkgs-unstable": "nixpkgs-unstable", "nixvim": "nixvim", "pre-commit-hooks": "pre-commit-hooks_3", + "secrets": "secrets", "sops-nix": "sops-nix", "stylix": "stylix", "superfile": "superfile", "zen-browser": "zen-browser" } }, + "secrets": { + "locked": { + "lastModified": 1742622103, + "narHash": "sha256-eYKgwqm7jkoxzaSuvLSQq78L4ks4gtEQF8BkTt9an7k=", + "ref": "refs/heads/main", + "rev": "13c13466e8aa371bf8cb53f0f36fb0e086294f45", + "revCount": 2, + "type": "git", + "url": "ssh://git@github.com/gwg313/nixos-secrets.git" + }, + "original": { + "type": "git", + "url": "ssh://git@github.com/gwg313/nixos-secrets.git" + } + }, "sops-nix": { "inputs": { "nixpkgs": "nixpkgs_12" diff --git a/flake.nix b/flake.nix index 85caa5f..97574da 100644 --- a/flake.nix +++ b/flake.nix @@ -9,6 +9,7 @@ # at the same time. Here's an working example: nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; # Also see the 'unstable-packages' overlay at 'overlays/default.nix'. + secrets.url = "git+ssh://git@github.com/gwg313/nixos-secrets.git"; hyprpolkitagent.url = "github:hyprwm/hyprpolkitagent"; hyprpanel.url = "github:Jas-SinghFSU/HyprPanel"; hyprspace = { diff --git a/home-manager/modules/common-gui.nix b/home-manager/modules/common-gui.nix index 30827d7..4056623 100644 --- a/home-manager/modules/common-gui.nix +++ b/home-manager/modules/common-gui.nix @@ -9,6 +9,7 @@ ./thunar.nix ./zen.nix ./xdg.nix + ./mime.nix ]; fonts.fontconfig.enable = true; diff --git a/home-manager/modules/mime.nix b/home-manager/modules/mime.nix new file mode 100644 index 0000000..5fd1842 --- /dev/null +++ b/home-manager/modules/mime.nix @@ -0,0 +1,39 @@ +{ + xdg.mimeApps = { + enable = true; + defaultApplications = { + "text/markdown" = "nvim.desktop"; + "text/plain" = "nvim.desktop"; + "text/x-shellscript" = "nvim.desktop"; + "text/x-python" = "nvim.desktop"; + "text/x-go" = "nvim.desktop"; + "text/css" = "nvim.desktop"; + "text/javascript" = "nvim.desktop"; + "text/x-c" = "nvim.desktop"; + "text/x-c++" = "nvim.desktop"; + "text/x-java" = "nvim.desktop"; + "text/x-rust" = "nvim.desktop"; + "text/x-yaml" = "nvim.desktop"; + "text/x-toml" = "nvim.desktop"; + "text/x-dockerfile" = "nvim.desktop"; + "text/x-xml" = "nvim.desktop"; + "text/x-php" = "nvim.desktop"; + "image/jpeg" = "imv.desktop"; + "image/jpg" = "imv.desktop"; + "image/webp" = "imv.desktop"; + "image/gif" = "zen.desktop"; + "x-scheme-handler/http" = "zen.desktop"; + "x-scheme-handler/https" = "zen.desktop"; + "text/html" = "zen.desktop"; + "application/pdf" = "zathura.desktop"; + "image/png" = "imv-dir.desktop"; + "x-scheme-handler/chrome" = "zen.desktop"; + "application/x-extension-htm" = "zen.desktop"; + "application/x-extension-html" = "zen.desktop"; + "application/x-extension-shtml" = "zen.desktop"; + "application/xhtml+xml" = "zen.desktop"; + "application/x-extension-xhtml" = "zen.desktop"; + "application/x-extension-xht" = "zen.desktop"; + }; + }; +} diff --git a/home-manager/modules/neovim/plugins/clangd-extensions.nix b/home-manager/modules/neovim/plugins/clangd-extensions.nix index 9545524..ebf141e 100644 --- a/home-manager/modules/neovim/plugins/clangd-extensions.nix +++ b/home-manager/modules/neovim/plugins/clangd-extensions.nix @@ -1,29 +1,32 @@ -{...}: { +{ ... }: +{ programs.nixvim = { plugins = { clangd-extensions = { enable = true; enableOffsetEncodingWorkaround = true; - - ast = { - roleIcons = { - type = ""; - declaration = ""; - expression = ""; - specifier = ""; - statement = ""; - templateArgument = ""; - }; - kindIcons = { - compound = ""; - recovery = ""; - translationUnit = ""; - packExpansion = ""; - templateTypeParm = ""; - templateTemplateParm = ""; - templateParamObject = ""; + settings = { + ast = { + role_icons = { + type = ""; + declaration = ""; + expression = ""; + specifier = ""; + statement = ""; + templateArgument = ""; + }; + kind_icons = { + compound = ""; + recovery = ""; + translationUnit = ""; + packExpansion = ""; + templateTypeParm = ""; + templateTemplateParm = ""; + templateParamObject = ""; + }; }; }; + }; }; }; diff --git a/home-manager/modules/neovim/plugins/conform.nix b/home-manager/modules/neovim/plugins/conform.nix index e8c1184..ed28ff2 100644 --- a/home-manager/modules/neovim/plugins/conform.nix +++ b/home-manager/modules/neovim/plugins/conform.nix @@ -82,6 +82,143 @@ return { lsp_fallback = true } end ''; + + formattersByFt = { + bash = [ + "shellcheck" + "shellharden" + "shfmt" + ]; + bicep = [ "bicep" ]; + c = [ "clang_format" ]; + cmake = [ "cmake-format" ]; + cpp = [ "clang_format" ]; + cs = [ "csharpier" ]; + css = [ "stylelint" ]; + fish = [ "fish_indent" ]; + fsharp = [ "fantomas" ]; + go = [ "gofmt" ]; + haskell = [ "ormolu" ]; + javascript = [ + [ + "prettierd" + "prettier" + ] + ]; + json = [ "jq" ]; + lua = [ "stylua" ]; + markdown = [ "deno_fmt" ]; + nix = [ "nixfmt" ]; + python = [ + "isort" + "black" + ]; + rust = [ "rustfmt" ]; + sh = [ + "shellcheck" + "shellharden" + "shfmt" + ]; + sql = [ "sqlfluff" ]; + swift = [ "swift_format" ]; + terraform = [ "terraform_fmt" ]; + toml = [ "taplo" ]; + typescript = [ + [ + "prettierd" + "prettier" + ] + ]; + xml = [ + "xmlformat" + "xmllint" + ]; + yaml = [ "yamlfmt" ]; + zig = [ "zigfmt" ]; + "_" = [ + "squeeze_blanks" + "trim_whitespace" + "trim_newlines" + ]; + }; + + formatters = { + black = { + command = lib.getExe pkgs.black; + }; + bicep = { + command = lib.getExe pkgs.bicep; + }; + cmake-format = { + command = lib.getExe pkgs.cmake-format; + }; + csharpier = { + command = lib.getExe pkgs.csharpier; + }; + deno_fmt = { + command = lib.getExe pkgs.deno; + }; + isort = { + command = lib.getExe pkgs.isort; + }; + fantomas = { + command = lib.getExe pkgs.fantomas; + }; + ormolu = { + command = lib.getExe pkgs.ormolu; + }; + jq = { + command = lib.getExe pkgs.jq; + }; + nixfmt = { + command = lib.getExe pkgs.nixfmt-rfc-style; + }; + prettierd = { + command = lib.getExe pkgs.prettierd; + }; + rustfmt = { + command = lib.getExe pkgs.rustfmt; + }; + shellcheck = { + command = lib.getExe pkgs.shellcheck; + }; + shfmt = { + command = lib.getExe pkgs.shfmt; + }; + shellharden = { + command = lib.getExe pkgs.shellharden; + }; + sqlfluff = { + command = lib.getExe pkgs.sqlfluff; + }; + squeeze_blanks = { + comamnd = lib.getExe' pkgs.coreutils "cat"; + }; + stylelint = { + command = lib.getExe pkgs.stylelint; + }; + stylua = { + command = lib.getExe pkgs.stylua; + }; + swift_format = { + command = lib.getExe pkgs.swift-format; + }; + taplo = { + command = lib.getExe pkgs.taplo; + }; + terraform_fmt = { + command = lib.getExe pkgs.terraform; + }; + xmlformat = { + command = lib.getExe pkgs.xmlformat; + }; + yamlfmt = { + command = lib.getExe pkgs.yamlfmt; + }; + zigfmt = { + command = lib.getExe pkgs.zig; + }; + }; }; # NOTE: @@ -92,142 +229,7 @@ # Use the "*" filetype to run formatters on all filetypes. # Use the "_" filetype to run formatters on filetypes that don't # have other formatters configured. - formattersByFt = { - bash = [ - "shellcheck" - "shellharden" - "shfmt" - ]; - bicep = [ "bicep" ]; - c = [ "clang_format" ]; - cmake = [ "cmake-format" ]; - cpp = [ "clang_format" ]; - cs = [ "csharpier" ]; - css = [ "stylelint" ]; - fish = [ "fish_indent" ]; - fsharp = [ "fantomas" ]; - go = [ "gofmt" ]; - haskell = [ "ormolu" ]; - javascript = [ - [ - "prettierd" - "prettier" - ] - ]; - json = [ "jq" ]; - lua = [ "stylua" ]; - markdown = [ "deno_fmt" ]; - nix = [ "nixfmt" ]; - python = [ - "isort" - "black" - ]; - rust = [ "rustfmt" ]; - sh = [ - "shellcheck" - "shellharden" - "shfmt" - ]; - sql = [ "sqlfluff" ]; - swift = [ "swift_format" ]; - terraform = [ "terraform_fmt" ]; - toml = [ "taplo" ]; - typescript = [ - [ - "prettierd" - "prettier" - ] - ]; - xml = [ - "xmlformat" - "xmllint" - ]; - yaml = [ "yamlfmt" ]; - zig = [ "zigfmt" ]; - "_" = [ - "squeeze_blanks" - "trim_whitespace" - "trim_newlines" - ]; - }; - formatters = { - black = { - command = lib.getExe pkgs.black; - }; - bicep = { - command = lib.getExe pkgs.bicep; - }; - cmake-format = { - command = lib.getExe pkgs.cmake-format; - }; - csharpier = { - command = lib.getExe pkgs.csharpier; - }; - deno_fmt = { - command = lib.getExe pkgs.deno; - }; - isort = { - command = lib.getExe pkgs.isort; - }; - fantomas = { - command = lib.getExe pkgs.fantomas; - }; - ormolu = { - command = lib.getExe pkgs.ormolu; - }; - jq = { - command = lib.getExe pkgs.jq; - }; - nixfmt = { - command = lib.getExe pkgs.nixfmt-rfc-style; - }; - prettierd = { - command = lib.getExe pkgs.prettierd; - }; - rustfmt = { - command = lib.getExe pkgs.rustfmt; - }; - shellcheck = { - command = lib.getExe pkgs.shellcheck; - }; - shfmt = { - command = lib.getExe pkgs.shfmt; - }; - shellharden = { - command = lib.getExe pkgs.shellharden; - }; - sqlfluff = { - command = lib.getExe pkgs.sqlfluff; - }; - squeeze_blanks = { - comamnd = lib.getExe' pkgs.coreutils "cat"; - }; - stylelint = { - command = lib.getExe pkgs.stylelint; - }; - stylua = { - command = lib.getExe pkgs.stylua; - }; - swift_format = { - command = lib.getExe pkgs.swift-format; - }; - taplo = { - command = lib.getExe pkgs.taplo; - }; - terraform_fmt = { - command = lib.getExe pkgs.terraform; - }; - xmlformat = { - command = lib.getExe pkgs.xmlformat; - }; - yamlfmt = { - command = lib.getExe pkgs.yamlfmt; - }; - zigfmt = { - command = lib.getExe pkgs.zig; - }; - }; }; }; }; diff --git a/home-manager/modules/neovim/plugins/default.nix b/home-manager/modules/neovim/plugins/default.nix index ac05116..9886bb7 100644 --- a/home-manager/modules/neovim/plugins/default.nix +++ b/home-manager/modules/neovim/plugins/default.nix @@ -36,7 +36,8 @@ _: { ./noice.nix ./notify.nix ./precognition.nix - ./spectre.nix + # ./spectre.nix + ./grug-far.nix ./snacks.nix ./refactoring.nix ./render-markdown.nix diff --git a/home-manager/modules/neovim/plugins/grug-far.nix b/home-manager/modules/neovim/plugins/grug-far.nix new file mode 100644 index 0000000..fe410cd --- /dev/null +++ b/home-manager/modules/neovim/plugins/grug-far.nix @@ -0,0 +1,25 @@ +{ ... }: +{ + programs.nixvim = { + plugins = { + grug-far = { + enable = true; + settings = { + cmd = "GrugFar"; + }; + }; + }; + + keymaps = [ + { + mode = "n"; + key = "rs"; + action = "GrugFar"; + options = { + desc = "GrugFar toggle"; + silent = true; + }; + } + ]; + }; +} diff --git a/home-manager/modules/neovim/plugins/lean.nix b/home-manager/modules/neovim/plugins/lean.nix index 6ccf0f4..733be76 100644 --- a/home-manager/modules/neovim/plugins/lean.nix +++ b/home-manager/modules/neovim/plugins/lean.nix @@ -1,9 +1,12 @@ -{...}: { +{ ... }: +{ programs.nixvim = { plugins.lean = { enable = true; - lsp.enable = false; - abbreviations.enable = false; + settings = { + abbreviations.enable = false; + lsp.enable = false; + }; }; }; } diff --git a/home-manager/modules/neovim/plugins/lsp.nix b/home-manager/modules/neovim/plugins/lsp.nix index c7b9554..b0b9310 100644 --- a/home-manager/modules/neovim/plugins/lsp.nix +++ b/home-manager/modules/neovim/plugins/lsp.nix @@ -62,7 +62,7 @@ }; }; servers = { - nil-ls = { + nil_ls = { enable = true; filetypes = [ "nix" ]; settings = { diff --git a/home-manager/modules/neovim/plugins/navic.nix b/home-manager/modules/neovim/plugins/navic.nix index 1586597..312cffd 100644 --- a/home-manager/modules/neovim/plugins/navic.nix +++ b/home-manager/modules/neovim/plugins/navic.nix @@ -1,8 +1,11 @@ -{...}: { +{ ... }: +{ programs.nixvim = { plugins.navic = { enable = true; - lsp.autoAttach = true; + settings = { + lsp.autoAttach = true; + }; }; }; } diff --git a/home-manager/modules/neovim/plugins/noice.nix b/home-manager/modules/neovim/plugins/noice.nix index 0b2c510..fce0d77 100644 --- a/home-manager/modules/neovim/plugins/noice.nix +++ b/home-manager/modules/neovim/plugins/noice.nix @@ -5,136 +5,140 @@ enable = true; # Hides the title above noice boxes - cmdline = { - format = { - cmdline = { - pattern = "^:"; - icon = ""; - lang = "vim"; - opts = { - border = { - text = { - top = "Cmd"; - }; - }; - }; - }; - search_down = { - kind = "search"; - pattern = "^/"; - icon = " "; - lang = "regex"; - }; - search_up = { - kind = "search"; - pattern = "^%?"; - icon = " "; - lang = "regex"; - }; - filter = { - pattern = "^:%s*!"; - icon = ""; - lang = "bash"; - opts = { - border = { - text = { - top = "Bash"; - }; - }; - }; - }; - lua = { - pattern = "^:%s*lua%s+"; - icon = ""; - lang = "lua"; - }; - help = { - pattern = "^:%s*he?l?p?%s+"; - icon = "󰋖"; - }; - input = { }; - }; - }; - messages = { - view = "mini"; - viewError = "mini"; - viewWarn = "mini"; - }; - - lsp = { - override = { - "vim.lsp.util.convert_input_to_markdown_lines" = true; - "vim.lsp.util.stylize_markdown" = true; - "cmp.entry.get_documentation" = true; - }; - - progress.enabled = true; - signature.enabled = true; - }; - - popupmenu.backend = "nui"; # Doesn't support the standard cmdline completions # popupmenu.backend = "cmp"; - presets = { - bottom_search = false; - command_palette = true; - long_message_to_split = true; - inc_rename = true; - lsp_doc_border = true; - }; + settings = { + popupmenu.backend = "nui"; + routes = [ + { + filter = { + event = "msg_show"; + kind = "search_count"; + }; + opts = { + skip = true; + }; + } + { + # skip progress messages from noisy servers + filter = { + event = "lsp"; + kind = "progress"; + cond.__raw = '' + function(message) + local client = vim.tbl_get(message.opts, 'progress', 'client') + local servers = { 'jdtls' } - routes = [ - { - filter = { - event = "msg_show"; - kind = "search_count"; - }; - opts = { - skip = true; - }; - } - { - # skip progress messages from noisy servers - filter = { - event = "lsp"; - kind = "progress"; - cond.__raw = '' - function(message) - local client = vim.tbl_get(message.opts, 'progress', 'client') - local servers = { 'jdtls' } - - for index, value in ipairs(servers) do - if value == client then - return true + for index, value in ipairs(servers) do + if value == client then + return true + end end end - end - ''; - }; - opts = { - skip = true; - }; - } - ]; + ''; + }; + opts = { + skip = true; + }; + } + ]; - views = { - cmdline_popup = { - border = { - style = "single"; + views = { + cmdline_popup = { + border = { + style = "single"; + }; }; - }; - confirm = { - border = { - style = "single"; - text = { - top = ""; + confirm = { + border = { + style = "single"; + text = { + top = ""; + }; }; }; }; + + presets = { + bottom_search = false; + command_palette = true; + long_message_to_split = true; + inc_rename = true; + lsp_doc_border = true; + }; + + lsp = { + override = { + "vim.lsp.util.convert_input_to_markdown_lines" = true; + "vim.lsp.util.stylize_markdown" = true; + "cmp.entry.get_documentation" = true; + }; + + progress.enabled = true; + signature.enabled = true; + }; + + messages = { + view = "mini"; + viewError = "mini"; + viewWarn = "mini"; + }; + + cmdline = { + format = { + cmdline = { + pattern = "^:"; + icon = ""; + lang = "vim"; + opts = { + border = { + text = { + top = "Cmd"; + }; + }; + }; + }; + search_down = { + kind = "search"; + pattern = "^/"; + icon = " "; + lang = "regex"; + }; + search_up = { + kind = "search"; + pattern = "^%?"; + icon = " "; + lang = "regex"; + }; + filter = { + pattern = "^:%s*!"; + icon = ""; + lang = "bash"; + opts = { + border = { + text = { + top = "Bash"; + }; + }; + }; + }; + lua = { + pattern = "^:%s*lua%s+"; + icon = ""; + lang = "lua"; + }; + help = { + pattern = "^:%s*he?l?p?%s+"; + icon = "󰋖"; + }; + input = { }; + }; + }; }; + }; }; } diff --git a/home-manager/modules/neovim/plugins/todo-comments.nix b/home-manager/modules/neovim/plugins/todo-comments.nix index 49d3e16..71b5b8c 100644 --- a/home-manager/modules/neovim/plugins/todo-comments.nix +++ b/home-manager/modules/neovim/plugins/todo-comments.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ programs.nixvim = { plugins.todo-comments = { enable = true; @@ -9,54 +10,56 @@ keywords = "TODO,FIX,HACK"; }; }; - keywords = { - FIX = { - alt = [ - "FIXME" - "BUG" - "FIXIT" - "ISSUE" - ]; - color = "error"; - icon = " "; - }; - HACK = { - color = "warning"; - icon = " "; - }; - NOTE = { - alt = ["INFO"]; - color = "hint"; - icon = " "; - }; - PERF = { - alt = [ - "OPTIM" - "PERFORMANCE" - "OPTIMIZE" - ]; - icon = " "; - }; - TEST = { - alt = [ - "TESTING" - "PASSED" - "FAILED" - ]; - color = "test"; - icon = "⏲ "; - }; - TODO = { - color = "info"; - icon = " "; - }; - WARN = { - alt = [ - "WARNING" - "XXX" - ]; - color = "warning"; - icon = " "; + settings = { + keywords = { + FIX = { + alt = [ + "FIXME" + "BUG" + "FIXIT" + "ISSUE" + ]; + color = "error"; + icon = " "; + }; + HACK = { + color = "warning"; + icon = " "; + }; + NOTE = { + alt = [ "INFO" ]; + color = "hint"; + icon = " "; + }; + PERF = { + alt = [ + "OPTIM" + "PERFORMANCE" + "OPTIMIZE" + ]; + icon = " "; + }; + TEST = { + alt = [ + "TESTING" + "PASSED" + "FAILED" + ]; + color = "test"; + icon = "⏲ "; + }; + TODO = { + color = "info"; + icon = " "; + }; + WARN = { + alt = [ + "WARNING" + "XXX" + ]; + color = "warning"; + icon = " "; + }; }; }; }; diff --git a/home-manager/modules/ssh.nix b/home-manager/modules/ssh.nix index 8a9fb0e..baf1b18 100644 --- a/home-manager/modules/ssh.nix +++ b/home-manager/modules/ssh.nix @@ -1,5 +1,6 @@ # A modern replacement for 'ls'. -{...}: { +{ ... }: +{ programs.ssh = { enable = true; hashKnownHosts = true; @@ -48,6 +49,18 @@ user = "gwg313"; identityFile = "/home/gwg313/.ssh/home/id_ed25519"; }; + "onedev.local" = { + hostname = "git.local.gwg313.xyz"; + user = "gwg313"; + identityFile = "/home/gwg313/.ssh/onedev/id_ed25519"; + port = 2222; + }; + "onedev" = { + hostname = "git.gwg313.xyz"; + user = "gwg313"; + identityFile = "/home/gwg313/.ssh/onedev/id_ed25519"; + port = 2222; + }; }; }; } diff --git a/home-manager/modules/zen.nix b/home-manager/modules/zen.nix index 9f316bb..02cc268 100644 --- a/home-manager/modules/zen.nix +++ b/home-manager/modules/zen.nix @@ -4,7 +4,84 @@ inputs, ... }: +let + accent = "#${config.lib.stylix.colors.base0D}"; + background = "#${config.lib.stylix.colors.base00}"; + foreground = "#${config.lib.stylix.colors.base05}"; + muted = "#${config.lib.stylix.colors.base03}"; + + settings = '' + { + "config": { + "title" : "Welcome Home", + "openLinksInNewTab": false, + "locale": "en-US", + "colors": { + "primary": "${accent}", + "background": "${background}", + "foreground": "${foreground}", + "muted": "#${muted}" + }, + "folders": [ + { + "name": "Bookmarks", + "links": [ + {"title": "MyNixOs", "url": "https://mynixos.com", "icon": "󱄅"}, + {"title": "Github", "url": "https://github.com", "icon": ""}, + {"title": "Proton", "url": "https://mail.proton.me/u/0/inbox", "icon": ""}, + {"title": "Chat GPT", "url": "https://chat.openai.com/", "icon": "󰭹"}, + {"title": "Nixvim", "url": "https://nix-community.github.io/nixvim/", "icon": ""}, + {"title": "Hyprland Wiki", "url": "https://wiki.hyprland.org/", "icon": "󰖬"}, + {"title": "Youtube", "url": "https://youtube.com", "icon": "󰗃"} + ] + }, + { + "name": "Uni", + "links": [ + {"title": "Outlook", "url": "https://outlook.office.com/mail/", "icon": "󰴢"}, + {"title": "Office", "url": "https://www.office.com/?auth=2", "icon": "󰏆"}, + {"title": "Teams", "url": "https://teams.microsoft.com/_", "icon": "󰊻"}, + {"title": "Brightspace", "url": "https://carleton.ca/brightspace/_", "icon": "󱨡"} + ] + } + ] + } + } + ''; + + homepage = pkgs.buildNpmPackage { + pname = "homepage"; + version = "0.0.0"; + + src = pkgs.fetchFromGitHub { + owner = "gwg313"; + repo = "homepage"; + rev = "b77d35ed3596eb451bd2ec78063d7cc6e73c773d"; + hash = "sha256-j/40922kfAh6zqJ4IRYpr66YXNNYsxuXwZ0aiJFJea0="; + }; + + # npmDepsHash = lib.fakeHash; + npmDepsHash = "sha256-bG+CHTq2Rst3JMxsjAC81KhK+G7WwsTVD1eyP87g0z4="; + + buildPhase = '' + npm install + cp ${pkgs.writeText "src/routes/config.json" settings} src/routes/config.json + npm run build + mkdir $out + mv build $out + ''; + + meta = { + description = "homepage"; + homepage = "https://github.com/gwg313/homepage"; + }; + }; +in { + home.file.".config/homepage" = { + source = "${homepage}/build"; + recursive = true; + }; home.packages = with pkgs; [ inputs.zen-browser.packages."${system}".default ]; } diff --git a/hosts/candlekeep/configuration.nix b/hosts/candlekeep/configuration.nix index f256e52..7e493a3 100644 --- a/hosts/candlekeep/configuration.nix +++ b/hosts/candlekeep/configuration.nix @@ -26,7 +26,7 @@ ../../common/gui ../../common/virtualization - ./auditd.nix + # ./auditd.nix ./kernel.nix ./sysctl.nix ./earlyoom.nix diff --git a/hosts/candlekeep/syncthing.nix b/hosts/candlekeep/syncthing.nix index 4a8f2c4..e1eaca3 100644 --- a/hosts/candlekeep/syncthing.nix +++ b/hosts/candlekeep/syncthing.nix @@ -1,10 +1,10 @@ { config, user, + inputs, ... }: { - services.syncthing = { enable = true; dataDir = "/home/gwg313"; @@ -16,11 +16,14 @@ overrideDevices = true; overrideFolders = true; - settings = { + gui = { + user = inputs.secrets.syncthing.gui_user; + password = inputs.secrets.syncthing.gui_password; + }; devices = { "grymforge" = { - id = "MYJZ7YS-WWHZDW7-KMADKI7-WZNEV3V-AZP2J6Z-4AJOYHZ-G3HLEDO-KTVZPAF"; + id = inputs.secrets.syncthing.grymforge_id; }; }; @@ -47,17 +50,6 @@ }; }; }; - "obsidian" = { - path = "/home/gwg313/vault"; - devices = [ "grymforge" ]; - versioning = { - type = "staggered"; - params = { - cleanInterval = "3600"; - maxAge = "15768000"; - }; - }; - }; }; }; }; diff --git a/hosts/grymforge/configuration.nix b/hosts/grymforge/configuration.nix index b4634ae..14267d9 100644 --- a/hosts/grymforge/configuration.nix +++ b/hosts/grymforge/configuration.nix @@ -28,7 +28,7 @@ ../../common/gui ./syncthing.nix - ./auditd.nix + # ./auditd.nix ./kernel.nix ./sysctl.nix ./earlyoom.nix diff --git a/hosts/grymforge/syncthing.nix b/hosts/grymforge/syncthing.nix index c13ac48..def9c86 100644 --- a/hosts/grymforge/syncthing.nix +++ b/hosts/grymforge/syncthing.nix @@ -1,6 +1,7 @@ { config, user, + inputs, ... }: { @@ -17,9 +18,13 @@ overrideFolders = true; settings = { + gui = { + user = inputs.secrets.syncthing.gui_user; + password = inputs.secrets.syncthing.gui_password; + }; devices = { "candlekeep" = { - id = "OREQCG7-JQMPCU4-HWFEQVM-7C6VYSC-A25I3PD-BYQ6RSU-7FQGDFX-SJDPGQY"; + id = inputs.secrets.syncthing.candlekeep_id; }; }; @@ -46,17 +51,6 @@ }; }; }; - "obsidian" = { - path = "/home/gwg313/vault"; - devices = [ "candlekeep" ]; - versioning = { - type = "staggered"; - params = { - cleanInterval = "3600"; - maxAge = "15768000"; - }; - }; - }; }; }; }; diff --git a/secrets/secrets.yaml b/secrets/secrets.yaml index f0e3195..b23c50d 100644 --- a/secrets/secrets.yaml +++ b/secrets/secrets.yaml @@ -15,8 +15,8 @@ sops: US9oa0pORXRVWWlyYlZZTGhXdTdOaWsKClqIK/YNJIIGFqOO0t4oni8dRTTXQniG ioIwAOdEgE/n0vcYhHXxLxWlTeqGZF076g7EFfIqiSNqrDtacRnazg== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-02-16T03:03:41Z" - mac: ENC[AES256_GCM,data:ni4W1SkocmHwVSzkoUj3vFBZKWhF4ImPOIzLxvpLiG8Cwz8YvSca0Ca1T30zjyS1RS7IrkTB+2RmpTs4isJc9lcTf30PJq1bgm9mGt5FXmGoNz6L0cJtWPLktGj1MTkMX/DylaBOnqTYdAWW9Ix072jtCLiECwkjeiHMHvFdJmQ=,iv:m0yrwnN6wcD+EAQvGgQVoWEcXfiKK0JhBpCXutiZN98=,tag:BLytc4Zr9elxVS/YlExcxg==,type:str] + lastmodified: "2025-03-22T17:04:45Z" + mac: ENC[AES256_GCM,data:bUudvCi32CKQ0d5pZVMADnbtokMqS3sWW5aLFMP8JOAJWo4Yg2D05TDKpSO3/3nskrWH3i745fsMkVk8kWYRYpqtXu443k1avtDnEwIbJHTM7bluB4LX6xc9h4wiPHflc+H9nQwRPchZb8LBO0xTKswoptSUxhAsFW+KpzlbCN4=,iv:xJuG1BsVMRJcV8fiv2C1a5/ltT75eV52/xXdSexP7YY=,tag:QyE4TC8KKG1tobXjK37moA==,type:str] pgp: [] unencrypted_suffix: _unencrypted - version: 3.9.2 + version: 3.9.4