diff --git a/a.log b/a.log deleted file mode 100644 index e69de29bb..000000000 diff --git a/dump.rdb b/dump.rdb new file mode 100644 index 000000000..82598933e Binary files /dev/null and b/dump.rdb differ diff --git a/flake.lock b/flake.lock index 18ac02919..762e1e788 100644 --- a/flake.lock +++ b/flake.lock @@ -188,6 +188,25 @@ "type": "github" } }, + "devshell_2": { + "inputs": { + "flake-utils": "flake-utils_9", + "nixpkgs": "nixpkgs_10" + }, + "locked": { + "lastModified": 1713532798, + "narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=", + "owner": "numtide", + "repo": "devshell", + "rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "disko": { "inputs": { "nixpkgs": [ @@ -195,11 +214,11 @@ ] }, "locked": { - "lastModified": 1715070411, - "narHash": "sha256-5CNvkH0Nf7yMwgKhjUNg/lUK40C7DXB4zKOuA2jVO90=", + "lastModified": 1715445235, + "narHash": "sha256-SUu+oIWn+xqQIOlwfwNfS9Sek4i1HKsrLJchsDReXwA=", "owner": "nix-community", "repo": "disko", - "rev": "4677f6c53482a8b01ee93957e3bdd569d51261d6", + "rev": "159d87ea5b95bbdea46f0288a33c5e1570272725", "type": "github" }, "original": { @@ -256,6 +275,22 @@ "type": "github" } }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -355,6 +390,24 @@ "type": "github" } }, + "flake-parts_6": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_3" + }, + "locked": { + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -373,6 +426,24 @@ "type": "github" } }, + "flake-utils_10": { + "inputs": { + "systems": "systems_12" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "flake-utils_2": { "inputs": { "systems": "systems_3" @@ -499,6 +570,24 @@ "type": "github" } }, + "flake-utils_9": { + "inputs": { + "systems": "systems_11" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -565,6 +654,27 @@ "type": "github" } }, + "gitignore_4": { + "inputs": { + "nixpkgs": [ + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "haumea": { "inputs": { "nixpkgs": [ @@ -615,11 +725,11 @@ ] }, "locked": { - "lastModified": 1714981474, - "narHash": "sha256-b3/U21CJjCjJKmA9WqUbZGZgCvospO3ArOUTgJugkOY=", + "lastModified": 1715380449, + "narHash": "sha256-716+f9Rj3wjSyD1xitCv2FcYbgPz1WIVDj+ZBclH99Y=", "owner": "nix-community", "repo": "home-manager", - "rev": "6ebe7be2e67be7b9b54d61ce5704f6fb466c536f", + "rev": "d7682620185f213df384c363288093b486b2883f", "type": "github" }, "original": { @@ -629,6 +739,27 @@ "type": "github" } }, + "home-manager_3": { + "inputs": { + "nixpkgs": [ + "nvimdots", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1714377222, + "narHash": "sha256-UsDsjWCKlWn8vbXi8Zza9Hkq3xyk8fpvFNo2VM5S74E=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "2af7c78b7bb9cf18406a193eba13ef9f99388f49", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "hyprcursor": { "inputs": { "hyprlang": [ @@ -670,11 +801,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1715062806, - "narHash": "sha256-9n2yei4ioLYXl6G/otpIZorGgwBBVb3XZV7IDMkzqsE=", + "lastModified": 1715468612, + "narHash": "sha256-pA0lpLJ3a+EhOCpEdksx5UlzXTcOaZzISppKKLYwAeg=", "ref": "refs/heads/main", - "rev": "57e76f91d9a388a41223e5ac0f13863d4b663bcd", - "revCount": 4622, + "rev": "33a7b7bb6b307d6e4a093f75ffdda0419cd7ffaf", + "revCount": 4671, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -699,11 +830,11 @@ ] }, "locked": { - "lastModified": 1714869498, - "narHash": "sha256-vbLVOWvQqo4n1yvkg/Q70VTlPbMmTiCQfNTgcWDCfJM=", + "lastModified": 1691753796, + "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "e06482e0e611130cd1929f75e8c1cf679e57d161", + "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", "type": "github" }, "original": { @@ -749,11 +880,11 @@ ] }, "locked": { - "lastModified": 1714755542, - "narHash": "sha256-D0pg+ZRwrt4lavZ97Ca8clsgbPA3duLj8iEM7riaIFY=", + "lastModified": 1715287423, + "narHash": "sha256-B7AJIjOyWgVMKhu7DlOnWa0VprdhywUVHuB/j+EwSxM=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "1270ebaa539e56d61b708c24b072b09cbbd3a828", + "rev": "e2fc1c0eb8b392110588f478cce644348ead7271", "type": "github" }, "original": { @@ -829,10 +960,10 @@ "mysecrets": { "flake": false, "locked": { - "lastModified": 1715010709, - "narHash": "sha256-TWJyD+LhIPpO9gu0O2SW4VPGLUgJ086yFFl+gPsQmyM=", + "lastModified": 1715399465, + "narHash": "sha256-PaQmH15vB0k0sSPG1VZ0j2hSYV8TtEHjU25AfLHf4LE=", "ref": "refs/heads/main", - "rev": "859b53e814d434896ebc734b537851d1b3e5ff11", + "rev": "75d1cd163b5a607012aec75b1e423403e9cb09d5", "shallow": true, "type": "git", "url": "ssh://git@github.com/QixYuanmeng/nix-secrets.git" @@ -890,11 +1021,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1714872073, - "narHash": "sha256-Gybo6MqJ2tva9vMaSxOgie8uVObiP0LxD2FMokiR0X4=", + "lastModified": 1715476621, + "narHash": "sha256-tsvjakds3dmU0L+hFk35JwihQAd40d5AoVZmq62IaHU=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "b85b9c3afa1bfee0150580eb76c52e572a85a6a9", + "rev": "78c0a23969771a7fe1a0dc51b23dc8bc07a6c555", "type": "github" }, "original": { @@ -1000,11 +1131,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1715010655, - "narHash": "sha256-FmdhvR/hgBkPDvIv/HOEIQsSMaVXh8wvTrnep8dF3Jc=", + "lastModified": 1715148395, + "narHash": "sha256-lRxjTxY3103LGMjWdVqntKZHhlmMX12QUjeFrQMmGaE=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "d1659c9eb8af718118fb4bbe2c86797c8b8623eb", + "rev": "a4e2b7909fc1bdf30c30ef21d388fde0b5cdde4a", "type": "github" }, "original": { @@ -1071,11 +1202,11 @@ }, "nixpkgs-darwin": { "locked": { - "lastModified": 1715038196, - "narHash": "sha256-2dzpswiPExTUGQOA+PItfAt0rGKh7PMFhHfP9xhUpWY=", + "lastModified": 1715443657, + "narHash": "sha256-TSXxKuso+HwEkLzrFUOnGhjnD9TT4ypgjyOMEW8tRmw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "478fb785fbbb9282ab562ede277b30bb780a8275", + "rev": "564052918454a8a255df77c07352d5e72aa71463", "type": "github" }, "original": { @@ -1115,6 +1246,24 @@ "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" } }, + "nixpkgs-lib_3": { + "locked": { + "dir": "lib", + "lastModified": 1711703276, + "narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1704874635, @@ -1149,11 +1298,11 @@ }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1714971268, - "narHash": "sha256-IKwMSwHj9+ec660l+I4tki/1NRoeGpyA2GdtdYpAgEw=", + "lastModified": 1715395895, + "narHash": "sha256-DreMqi6+qa21ffLQqhMQL2XRUkAGt3N7iVB5FhJKie4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "27c13997bf450a01219899f5a83bd6ffbfc70d3c", + "rev": "71bae31b7dbc335528ca7e96f479ec93462323ff", "type": "github" }, "original": { @@ -1163,13 +1312,29 @@ "type": "github" } }, + "nixpkgs-stable_4": { + "locked": { + "lastModified": 1710695816, + "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "614b4613980a522ba49f0d194531beddbb7220d3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-unstable": { "locked": { - "lastModified": 1714906307, - "narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=", + "lastModified": 1715266358, + "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "25865a40d14b3f9cf19f19b924e2ab4069b09588", + "rev": "f1010e0469db743d14519a1efd37e23f8513d714", "type": "github" }, "original": { @@ -1179,6 +1344,22 @@ "type": "github" } }, + "nixpkgs_10": { + "locked": { + "lastModified": 1704161960, + "narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "63143ac2c9186be6d9da6035fa22620018c85932", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1703134684, @@ -1213,11 +1394,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1714809261, - "narHash": "sha256-hfBmnYFyz9I1mdrC3tX1A+dF9cOUcds5PIMPxrT+cRk=", + "lastModified": 1715413075, + "narHash": "sha256-FCi3R1MeS5bVp0M0xTheveP6hhcCYfW/aghSTPebYL4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d32560238207b8e26d88b265207b216ee46b8450", + "rev": "e4e7a43a9db7e22613accfeb1005cca1b2b1ee0d", "type": "github" }, "original": { @@ -1261,11 +1442,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1714906307, - "narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=", + "lastModified": 1715266358, + "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "25865a40d14b3f9cf19f19b924e2ab4069b09588", + "rev": "f1010e0469db743d14519a1efd37e23f8513d714", "type": "github" }, "original": { @@ -1324,6 +1505,21 @@ "type": "github" } }, + "nur": { + "locked": { + "lastModified": 1715492953, + "narHash": "sha256-hEn/tkAbs42Gmm7WK3IhnzQG6X7ICMxhwBqAF9GvoM4=", + "owner": "nix-community", + "repo": "NUR", + "rev": "7d021b60cd4dd8af0e0d8b4ee1f8cdca91f4514c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "nur-ryan4yin": { "inputs": { "nixpkgs": "nixpkgs_9" @@ -1342,6 +1538,29 @@ "type": "github" } }, + "nvimdots": { + "inputs": { + "devshell": "devshell_2", + "flake-parts": "flake-parts_6", + "home-manager": "home-manager_3", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1715219302, + "narHash": "sha256-aZGeMWLwudao+kIBcJzF7wR5HPXHSs/xvOILHTju+fk=", + "owner": "ayamir", + "repo": "nvimdots", + "rev": "e3e5797d1694026ed6babfdad6cc89b22c5cbe2c", + "type": "github" + }, + "original": { + "owner": "ayamir", + "repo": "nvimdots", + "type": "github" + } + }, "pnpm2nix": { "inputs": { "flake-utils": "flake-utils_3", @@ -1469,6 +1688,30 @@ "type": "github" } }, + "pre-commit-hooks_3": { + "inputs": { + "flake-compat": "flake-compat_3", + "flake-utils": "flake-utils_10", + "gitignore": "gitignore_4", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable_4" + }, + "locked": { + "lastModified": 1714478972, + "narHash": "sha256-q//cgb52vv81uOuwz1LaXElp3XAe1TqrABXODAEF6Sk=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "2849da033884f54822af194400f8dff435ada242", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "root": { "inputs": { "agenix": "agenix", @@ -1494,8 +1737,11 @@ "nixpkgs-stable": "nixpkgs-stable_3", "nixpkgs-unstable": "nixpkgs-unstable", "nuenv": "nuenv", + "nur": "nur", "nur-ryan4yin": "nur-ryan4yin", + "nvimdots": "nvimdots", "polybar-themes": "polybar-themes", + "pre-commit-hooks": "pre-commit-hooks_3", "wallpapers": "wallpapers" } }, @@ -1617,6 +1863,36 @@ "type": "github" } }, + "systems_11": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_12": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "systems_2": { "locked": { "lastModified": 1681028828, @@ -1792,11 +2068,11 @@ ] }, "locked": { - "lastModified": 1714060055, - "narHash": "sha256-j43TS9wv9luaAlpxcxw0sjxkbcc2mGANVR2RYgo3RCw=", + "lastModified": 1714662532, + "narHash": "sha256-Pj2xGSYhapYbXL7sk7TTlOtCZcTfPQoL3fPbZeg7L4Y=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "0fe840441e43da12cd7865ed9aa8cdc35a8da85a", + "rev": "1f228ba2f1f254195c0b571302b37482861abee3", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 1226f9671..631e49a6d 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,9 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11"; + + nur.url = "github:nix-community/NUR"; + # for macos nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-23.11-darwin"; @@ -101,10 +104,10 @@ }; # add git hooks to format nix code before commit - # pre-commit-hooks = { - # url = "github:cachix/pre-commit-hooks.nix"; - # inputs.nixpkgs.follows = "nixpkgs"; - # }; + pre-commit-hooks = { + url = "github:cachix/pre-commit-hooks.nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; nuenv.url = "github:DeterminateSystems/nuenv"; @@ -160,5 +163,10 @@ # aarch64 SBCs nixos-rk3588.url = "github:ryan4yin/nixos-rk3588"; + + nvimdots = { + url = "github:ayamir/nvimdots"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; } diff --git a/home/base/core/git.nix b/home/base/core/git.nix index a7670d349..1f3128d50 100644 --- a/home/base/core/git.nix +++ b/home/base/core/git.nix @@ -38,8 +38,8 @@ # replace https with ssh url = { - "ssh://git@github.com/ryan4yin" = { - insteadOf = "https://github.com/ryan4yin"; + "ssh://git@github.com/QixYuanmeng" = { + insteadOf = "https://github.com/QixYuanmeng"; }; # "ssh://git@gitlab.com/" = { # insteadOf = "https://gitlab.com/"; diff --git a/home/base/tui/dev-tools.nix b/home/base/tui/dev-tools.nix index 06db7f1c3..9d37fe7b9 100644 --- a/home/base/tui/dev-tools.nix +++ b/home/base/tui/dev-tools.nix @@ -15,6 +15,7 @@ ############################################################# home.packages = with pkgs; [ + colmena # nixos's remote deployment tool # db related mycli diff --git a/home/base/tui/editors/neovim/default.nix b/home/base/tui/editors/neovim/default.nix index 5e5353b22..1ae1de1e3 100644 --- a/home/base/tui/editors/neovim/default.nix +++ b/home/base/tui/editors/neovim/default.nix @@ -15,6 +15,7 @@ let vdiff = "nvim -d"; }; in { + home.activation.installAstroNvim = lib.hm.dag.entryAfter ["writeBoundary"] '' ${pkgs.rsync}/bin/rsync -avz --chmod=D2755,F744 ${./nvim}/ ${config.xdg.configHome}/nvim/ ''; diff --git a/home/base/tui/editors/neovim/nvim/lua/plugins/astrolsp.lua b/home/base/tui/editors/neovim/nvim/lua/plugins/astrolsp.lua index ad0fa1d82..f60852e42 100644 --- a/home/base/tui/editors/neovim/nvim/lua/plugins/astrolsp.lua +++ b/home/base/tui/editors/neovim/nvim/lua/plugins/astrolsp.lua @@ -76,6 +76,7 @@ return { "terraformls", -- terraform hcl "nushell", -- nushell language server "scheme_langserver", -- scheme language server + "slint_lsp", }, -- customize language server configuration options passed to `lspconfig` ---@diagnostic disable: missing-fields diff --git a/home/base/tui/editors/neovim/nvim/lua/plugins/copilot.lua b/home/base/tui/editors/neovim/nvim/lua/plugins/copilot.lua index 7215945f2..13fd4174d 100644 --- a/home/base/tui/editors/neovim/nvim/lua/plugins/copilot.lua +++ b/home/base/tui/editors/neovim/nvim/lua/plugins/copilot.lua @@ -5,6 +5,7 @@ return { opts.filetypes = { yaml = true, markdown = true, + rust = true, } end, } diff --git a/home/base/tui/editors/packages.nix b/home/base/tui/editors/packages.nix index 2245f0290..2e0aa70a1 100644 --- a/home/base/tui/editors/packages.nix +++ b/home/base/tui/editors/packages.nix @@ -42,6 +42,7 @@ setuptools paramiko rapidfuzz + devtools ] )) @@ -50,6 +51,9 @@ cargo # rust package manager rustfmt + #-- slint + slint-lsp + #-- nix nil # rnix-lsp diff --git a/home/base/tui/zellij/default.nix b/home/base/tui/zellij/default.nix index a2a0430c9..e073dcbfd 100644 --- a/home/base/tui/zellij/default.nix +++ b/home/base/tui/zellij/default.nix @@ -7,7 +7,7 @@ in { enable = true; }; # auto start zellij in nushell - /* + programs.nushell.extraConfig = '' # auto start zellij # except when in emacs or zellij itself @@ -25,7 +25,7 @@ in { } } ''; - */ + # only works in bash/zsh, not nushell home.shellAliases = shellAliases; programs.nushell.shellAliases = shellAliases; diff --git a/home/linux/base/shell.nix b/home/linux/base/shell.nix index b96b006c3..fbab3eeaa 100644 --- a/home/linux/base/shell.nix +++ b/home/linux/base/shell.nix @@ -1,6 +1,7 @@ { config, myvars, + pkgs, ... }: let d = config.xdg.dataHome; @@ -26,5 +27,8 @@ in rec { # enable scrolling in git diff DELTA_PAGER = "less -R"; + + #:w + #VK_DRIVER_FILES = "/run/opengl-driver/share/vulkan/icd.d/intel_icd.x86_64.json;/run/opengl-driver/share/vulkan/icd.d/nvidia_icd.x86_64.json;"; }; } diff --git a/home/linux/base/tools.nix b/home/linux/base/tools.nix index f319e713d..6f41d1dbb 100644 --- a/home/linux/base/tools.nix +++ b/home/linux/base/tools.nix @@ -4,7 +4,6 @@ # misc libnotify wireguard-tools # manage wireguard vpn manually, via wg-quick - clash-verge-rev ventoy # create bootable usb virt-viewer # vnc connect to VM, used by kubevirt ]; diff --git a/home/linux/gui/base/misc.nix b/home/linux/gui/base/misc.nix index 5f841eaed..e17cd4294 100644 --- a/home/linux/gui/base/misc.nix +++ b/home/linux/gui/base/misc.nix @@ -21,6 +21,10 @@ # misc flameshot ventoy # multi-boot usb creator + + pkgs.nur.repos.linyinfeng.wemeet + + wpsoffice-cn ]; # GitHub CLI tool diff --git a/home/linux/gui/base/wine.nix b/home/linux/gui/base/wine.nix new file mode 100644 index 000000000..8e72ce47c --- /dev/null +++ b/home/linux/gui/base/wine.nix @@ -0,0 +1,10 @@ +{ + pkgs, + pkgs-unstable, + ... +}: { + home.packages = with pkgs; [ + # native wayland support (unstable) + wineWowPackages.waylandFull + ]; +} diff --git a/home/linux/gui/base/xdg.nix b/home/linux/gui/base/xdg.nix index ff171b3d0..b27dcc836 100644 --- a/home/linux/gui/base/xdg.nix +++ b/home/linux/gui/base/xdg.nix @@ -32,7 +32,7 @@ enable = true; # let `xdg-open` to open the url with the correct application. defaultApplications = let - browser = ["google-chrome-stable.desktop"]; + browser = ["google-chrome.desktop"]; editor = ["nvim.desktop" "Helix.desktop" "code.desktop" "code-insiders.desktop"]; in { "application/json" = browser; diff --git a/hosts/idols-ai/impermanence.nix b/hosts/idols-ai/impermanence.nix index a3a731fb2..5ba0c54a8 100644 --- a/hosts/idols-ai/impermanence.nix +++ b/hosts/idols-ai/impermanence.nix @@ -122,11 +122,16 @@ ".local/share" ".local/state" + ".cache/JetBrains" + # language package managers ".npm" ".conda" # generated by `conda-shell` "go" + + ".config/QQ" + # neovim plugins(wakatime & copilot) ".wakatime" ".config/github-copilot" @@ -134,6 +139,7 @@ files = [ ".wakatime.cfg" ".config/nushell/history.txt" + ".cache/rofi.druncache" ]; }; }; diff --git a/lib/nixosSystem.nix b/lib/nixosSystem.nix index 6203e1491..4536ede49 100644 --- a/lib/nixosSystem.nix +++ b/lib/nixosSystem.nix @@ -14,6 +14,10 @@ in nixpkgs.lib.nixosSystem { inherit system specialArgs; modules = + [ + { nixpkgs.overlays = [ inputs.nur.overlay ]; } + inputs.nur.nixosModules.nur + ] ++ nixos-modules ++ [ nixos-generators.nixosModules.all-formats @@ -25,7 +29,6 @@ in { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = specialArgs; home-manager.users."${myvars.username}".imports = home-modules; } diff --git a/modules/nixos/base/db.nix b/modules/nixos/base/db.nix new file mode 100644 index 000000000..4f3610d41 --- /dev/null +++ b/modules/nixos/base/db.nix @@ -0,0 +1,12 @@ +{ pkgs, config, inputs, lib, ... }:{ + + services.mysql = { + enable = true; + package = pkgs.mysql80; + }; + + + services.redis.servers."redis" = { + enable = true; + }; +} \ No newline at end of file diff --git a/modules/nixos/base/nix.nix b/modules/nixos/base/nix.nix index 12f5dad0e..f955add37 100644 --- a/modules/nixos/base/nix.nix +++ b/modules/nixos/base/nix.nix @@ -5,6 +5,9 @@ }: { # to install chrome, you need to enable unfree packages nixpkgs.config.allowUnfree = lib.mkForce true; + nixpkgs.config.permittedInsecurePackages = [ + "openssl-1.1.1w" + ]; # do garbage collection weekly to keep disk usage low nix.gc = { @@ -16,6 +19,7 @@ # Manual optimise storage: nix-store --optimise # https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store nix.settings.auto-optimise-store = true; + programs.nix-ld.enable = true; nix.channel.enable = false; # remove nix-channel related tools & configs, we use flakes instead. } diff --git a/modules/nixos/base/packages.nix b/modules/nixos/base/packages.nix index 9c5f2bdce..f176745de 100644 --- a/modules/nixos/base/packages.nix +++ b/modules/nixos/base/packages.nix @@ -29,6 +29,9 @@ hdparm # for disk performance, command dmidecode # a tool that reads information about your system's hardware from the BIOS according to the SMBIOS/DMI standard parted + pkg-config + mysql2pgsql + unrar ]; # replace default editor with neovim diff --git a/modules/nixos/base/user-group.nix b/modules/nixos/base/user-group.nix index 4884b3c95..eba2d7432 100644 --- a/modules/nixos/base/user-group.nix +++ b/modules/nixos/base/user-group.nix @@ -34,6 +34,8 @@ "wireshark" "adbusers" "libvirtd" + "mysql" + "redis" ]; }; diff --git a/nix-secrets b/nix-secrets index 859b53e81..75d1cd163 160000 --- a/nix-secrets +++ b/nix-secrets @@ -1 +1 @@ -Subproject commit 859b53e814d434896ebc734b537851d1b3e5ff11 +Subproject commit 75d1cd163b5a607012aec75b1e423403e9cb09d5 diff --git a/outputs/default.nix b/outputs/default.nix index a22fa3d1d..6d1cdada7 100644 --- a/outputs/default.nix +++ b/outputs/default.nix @@ -1,6 +1,7 @@ { self, nixpkgs, + pre-commit-hooks, ... } @ inputs: let inherit (inputs.nixpkgs) lib; @@ -89,36 +90,36 @@ in { # Eval Tests for all NixOS & darwin systems. # evalTests = lib.lists.all (it: it.evalTests == {}) allSystemValues; - # checks = forAllSystems ( - # system: { - # # eval-tests per system - # eval-tests = allSystems.${system}.evalTests == {}; + checks = forAllSystems ( + system: { + # eval-tests per system + eval-tests = allSystems.${system}.evalTests == {}; - # pre-commit-check = pre-commit-hooks.lib.${system}.run { - # src = mylib.relativeToRoot "."; - # hooks = { - # alejandra.enable = true; # formatter - # # Source code spell checker - # typos = { - # enable = true; - # settings = { - # write = true; # Automatically fix typos - # configPath = "./.typos.toml"; # relative to the flake root - # }; - # }; - # prettier = { - # enable = true; - # settings = { - # write = true; # Automatically format files - # configPath = "./.prettierrc.yaml"; # relative to the flake root - # }; - # }; - # # deadnix.enable = true; # detect unused variable bindings in `*.nix` - # # statix.enable = true; # lints and suggestions for Nix code(auto suggestions) - # }; - # }; - # } - # ); + pre-commit-check = pre-commit-hooks.lib.${system}.run { + src = mylib.relativeToRoot "."; + hooks = { + alejandra.enable = true; # formatter + # Source code spell checker + typos = { + enable = true; + settings = { + write = true; # Automatically fix typos + configPath = "./.typos.toml"; # relative to the flake root + }; + }; + prettier = { + enable = true; + settings = { + write = true; # Automatically format files + configPath = "./.prettierrc.yaml"; # relative to the flake root + }; + }; + deadnix.enable = true; # detect unused variable bindings in `*.nix` + statix.enable = true; # lints and suggestions for Nix code(auto suggestions) + }; + }; + } + ); # Development Shells devShells = forAllSystems ( @@ -149,8 +150,8 @@ in { ); # Format the nix code in this flake - # formatter = forAllSystems ( - # # alejandra is a nix formatter with a beautiful output - # system: nixpkgs.legacyPackages.${system}.alejandra - # ); + formatter = forAllSystems ( + # alejandra is a nix formatter with a beautiful output + system: nixpkgs.legacyPackages.${system}.alejandra + ); } diff --git a/secrets/darwin.nix.bak b/secrets/darwin.nix.bak deleted file mode 100644 index b986d40cc..000000000 --- a/secrets/darwin.nix.bak +++ /dev/null @@ -1,139 +0,0 @@ -{ - config, - pkgs, - agenix, - mysecrets, - myvars, - ... -}: { - imports = [ - agenix.darwinModules.default - ]; - - environment.systemPackages = [ - agenix.packages."${pkgs.system}".default - ]; - - # if you changed this key, you need to regenerate all encrypt files from the decrypt contents! - age.identityPaths = [ - # Generate manually via `sudo ssh-keygen -A` - "/etc/ssh/ssh_host_ed25519_key" # macOS, using the host key for decryption - ]; - - age.secrets = let - noaccess = { - mode = "0000"; - owner = "root"; - }; - high_security = { - mode = "0500"; - owner = "root"; - }; - user_readable = { - mode = "0500"; - owner = myvars.username; - }; - in { - # --------------------------------------------- - # no one can read/write this file, even root. - # --------------------------------------------- - - # .age means the decrypted file is still encrypted by age(via a passphrase) - /* - "ryan4yin-gpg-subkeys.priv.age" = - { - file = "${mysecrets}/ryan4yin-gpg-subkeys-2024-01-27.priv.age.age"; - } - // noaccess; - - # --------------------------------------------- - # only root can read this file. - # --------------------------------------------- - - "wg-business.conf" = - { - file = "${mysecrets}/wg-business.conf.age"; - } - // high_security; - - "rclone.conf" = - { - file = "${mysecrets}/rclone.conf.age"; - } - // high_security; - - "nix-access-tokens" = - { - file = "${mysecrets}/nix-access-tokens.age"; - } - // high_security; - - # --------------------------------------------- - # user can read this file. - # --------------------------------------------- - - "ssh-key-romantic" = - { - file = "${mysecrets}/ssh-key-romantic.age"; - } - // user_readable; - - # alias-for-work - "alias-for-work.nushell" = - { - file = "${mysecrets}/alias-for-work.nushell.age"; - } - // user_readable; - - "alias-for-work.bash" = - { - file = "${mysecrets}/alias-for-work.bash.age"; - } - // user_readable; - */ - }; - - # place secrets in /etc/ - environment.etc = { - # wireguard config used with `wg-quick up wg-business` - # Fix DNS for WireGuard on macOS: https://github.com/ryan4yin/nix-config/issues/5 - /* - "wireguard/wg-business.conf" = { - source = config.age.secrets."wg-business.conf".path; - }; - - "agenix/rclone.conf" = { - source = config.age.secrets."rclone.conf".path; - }; - - "agenix/ssh-key-romantic" = { - source = config.age.secrets."ssh-key-romantic".path; - }; - - "agenix/ryan4yin-gpg-subkeys.priv.age" = { - source = config.age.secrets."ryan4yin-gpg-subkeys.priv.age".path; - }; - - # The following secrets are used by home-manager modules - # But nix-darwin doesn't support environment.etc..mode - # So we need to change its mode manually - "agenix/alias-for-work.nushell" = { - source = config.age.secrets."alias-for-work.nushell".path; - }; - "agenix/alias-for-work.bash" = { - source = config.age.secrets."alias-for-work.bash".path; - }; - */ - }; - - # both the original file and the symlink should be readable and executable by the user - # - # activationScripts are executed every time you run `nixos-rebuild` / `darwin-rebuild` or boot your system - system.activationScripts.postActivation.text = '' - ${pkgs.nushell}/bin/nu -c ' - if (ls /etc/agenix/ | length) > 0 { - sudo chown ${myvars.username} /etc/agenix/* - } - ' - ''; -}