diff --git a/flake.lock b/flake.lock index 2f78082..18bc38a 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "catppuccin": { "locked": { - "lastModified": 1724156255, - "narHash": "sha256-rpUCeS/QZwQdJmDrvCm0hRi8bFvQNQKAnIMK5ZDBfpM=", + "lastModified": 1722661201, + "narHash": "sha256-2JX3S1hmmUhHuyGyGWnaM4xT0SiaDdVkNzmBrEowwK0=", "owner": "catppuccin", "repo": "nix", - "rev": "8886a68edadb1d93c7101337f995ffce4b410ff2", + "rev": "19a0f144f0204a12a89243363efb6a493b8cfc83", "type": "github" }, "original": { @@ -42,28 +42,6 @@ "type": "github" } }, - "devshell": { - "inputs": { - "nixpkgs": [ - "my-nixvim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1722113426, - "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", - "owner": "numtide", - "repo": "devshell", - "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { @@ -81,20 +59,6 @@ } }, "flake-compat_2": { - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "revCount": 57, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" - } - }, - "flake-compat_3": { "flake": false, "locked": { "lastModified": 1696426674, @@ -110,46 +74,6 @@ "type": "github" } }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "my-nixvim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems" @@ -168,80 +92,6 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "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" - } - }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "my-nixvim", - "nixvim", - "flake-compat" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "my-nixvim", - "nixvim", - "nixpkgs" - ], - "nixpkgs-stable": [ - "my-nixvim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1723803910, - "narHash": "sha256-yezvUuFiEnCFbGuwj/bQcqg7RykIEqudOy/RBrId0pc=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "bfef0ada09e2c8ac55bbcd0831bd0c9d42e651ba", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "my-nixvim", - "nixvim", - "git-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" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -249,11 +99,11 @@ ] }, "locked": { - "lastModified": 1723986931, - "narHash": "sha256-Fy+KEvDQ+Hc8lJAV3t6leXhZJ2ncU5/esxkgt3b8DEY=", + "lastModified": 1722630065, + "narHash": "sha256-QfM/9BMRkCmgWzrPDK+KbgJOUlSJnfX4OvsUupEUZvA=", "owner": "nix-community", "repo": "home-manager", - "rev": "2598861031b78aadb4da7269df7ca9ddfc3e1671", + "rev": "afc892db74d65042031a093adb6010c4c3378422", "type": "github" }, "original": { @@ -262,72 +112,6 @@ "type": "github" } }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "my-nixvim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1723986931, - "narHash": "sha256-Fy+KEvDQ+Hc8lJAV3t6leXhZJ2ncU5/esxkgt3b8DEY=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "2598861031b78aadb4da7269df7ca9ddfc3e1671", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "my-nixvim": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": [ - "nixpkgs" - ], - "nixvim": "nixvim" - }, - "locked": { - "lastModified": 1724158316, - "narHash": "sha256-cz2N0vPfe0jmjxqKWh7dgVecLqmPLHQrvxGJk0atDbg=", - "ref": "refs/heads/master", - "rev": "a5eb7fe89ee8ba654f339d8f75cecb39851743ec", - "revCount": 4, - "type": "git", - "url": "https://git.xinyang.life/xin/nixvim" - }, - "original": { - "type": "git", - "url": "https://git.xinyang.life/xin/nixvim" - } - }, - "nix-darwin": { - "inputs": { - "nixpkgs": [ - "my-nixvim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1723859949, - "narHash": "sha256-kiaGz4deGYKMjJPOji/JVvSP/eTefrIA3rAjOnOpXl4=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "076b9a905af8a52b866c8db068d6da475839d97b", - "type": "github" - }, - "original": { - "owner": "lnl7", - "repo": "nix-darwin", - "type": "github" - } - }, "nix-index-database": { "inputs": { "nixpkgs": [ @@ -335,11 +119,11 @@ ] }, "locked": { - "lastModified": 1723950649, - "narHash": "sha256-dHMkGjwwCGj0c2MKyCjRXVBXq2Sz3TWbbM23AS7/5Hc=", + "lastModified": 1722740924, + "narHash": "sha256-UQPgA5d8azLZuDHZMPmvDszhuKF1Ek89SrTRtqsQ4Ss=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "392828aafbed62a6ea6ccab13728df2e67481805", + "rev": "97ca0a0fca0391de835f57e44f369a283e37890f", "type": "github" }, "original": { @@ -350,7 +134,7 @@ }, "nix-vscode-extensions": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_2", "flake-utils": [ "flake-utils" ], @@ -359,11 +143,11 @@ ] }, "locked": { - "lastModified": 1724117347, - "narHash": "sha256-/nfm6P0owPtCRjT8ktq/8OChtg2HpkrvNaDJGm9N1Lk=", + "lastModified": 1722821408, + "narHash": "sha256-FMCo35ZmMfvAcae+9neKfu6QzXjU3WL6vW2OFMXx6wI=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "2ef60116ef361d988317cbe52a09acfeda7d3416", + "rev": "f25962fbd632afea744dc7e6868f24d2e73ccedb", "type": "github" }, "original": { @@ -374,11 +158,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1724067415, - "narHash": "sha256-WJBAEFXAtA41RMpK8mvw0cQ62CJkNMBtzcEeNIJV7b0=", + "lastModified": 1722332872, + "narHash": "sha256-2xLM4sc5QBfi0U/AANJAW21Bj4ZX479MHPMPkB+eKBU=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "b09c46430ffcf18d575acf5c339b38ac4e1db5d2", + "rev": "14c333162ba53c02853add87a0000cbd7aa230c2", "type": "github" }, "original": { @@ -390,39 +174,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1723991338, - "narHash": "sha256-Grh5PF0+gootJfOJFenTTxDTYPidA3V28dqJ/WV7iis=", - "owner": "NixOS", + "lastModified": 1722578639, + "narHash": "sha256-yge4OI8r8JBFtoajezauguXwYJ7M+Enwb3ZGbJF4YKA=", + "owner": "xinyangli", "repo": "nixpkgs", - "rev": "8a3354191c0d7144db9756a74755672387b702ba", + "rev": "4c71f761584bd9f9a4c4ba090c353c7f3e65c430", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", + "owner": "xinyangli", + "ref": "deploy", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1722555339, - "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" - } - }, "nixpkgs-stable": { "locked": { - "lastModified": 1723938990, - "narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=", + "lastModified": 1722651103, + "narHash": "sha256-IRiJA0NVAoyaZeKZluwfb2DoTpBAj+FLI0KfybBeDU0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890", + "rev": "a633d89c6dc9a2a8aae11813a62d7c58b2c0cc51", "type": "github" }, "original": { @@ -448,55 +220,13 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1723173329, - "narHash": "sha256-r8lB8vNn0dEBD7opds4REPS4eDChcOz6ZWit4DTiSU8=", - "owner": "xinyangli", - "repo": "nixpkgs", - "rev": "e3fa5a239ae55cc330f8a54ed3c0738e1bcfa301", - "type": "github" - }, - "original": { - "owner": "xinyangli", - "ref": "deploy", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixvim": { - "inputs": { - "devshell": "devshell", - "flake-compat": "flake-compat_2", - "flake-parts": "flake-parts_2", - "git-hooks": "git-hooks", - "home-manager": "home-manager_2", - "nix-darwin": "nix-darwin", - "nixpkgs": "nixpkgs", - "nuschtosSearch": "nuschtosSearch", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1724127528, - "narHash": "sha256-fKtsvNQeLhPuz1O53x6Xxkd/yYecpolNXRq7mfvnXQk=", - "owner": "nix-community", - "repo": "nixvim", - "rev": "cb413995e1e101c76d755b7f131ce60c7ea3985d", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixvim", - "type": "github" - } - }, "nur": { "locked": { - "lastModified": 1724150696, - "narHash": "sha256-FXuWhg5wD9uFaG/cBazHjmp1Gmd3rZswjaca8FqHQLU=", + "lastModified": 1722859145, + "narHash": "sha256-Y0X6yzkq5hU/A8MlC9/DfMz1i6mXEauD9539xUkEvo8=", "owner": "nix-community", "repo": "NUR", - "rev": "ea4eb7133060e7f2079f3cc3213c6200eafc7253", + "rev": "ef567c82705d29b0b32d63ffd006c56c92953f4d", "type": "github" }, "original": { @@ -505,40 +235,16 @@ "type": "github" } }, - "nuschtosSearch": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": [ - "my-nixvim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1723969429, - "narHash": "sha256-BuewfNEXEf11MIkJY+uvWsdLu1dIvgJqntWChvNdALg=", - "owner": "NuschtOS", - "repo": "search", - "rev": "a05d1805f2a2bc47d230e5e92aecbf69f784f3d0", - "type": "github" - }, - "original": { - "owner": "NuschtOS", - "repo": "search", - "type": "github" - } - }, "root": { "inputs": { "catppuccin": "catppuccin", "colmena": "colmena", "flake-utils": "flake-utils", "home-manager": "home-manager", - "my-nixvim": "my-nixvim", "nix-index-database": "nix-index-database", "nix-vscode-extensions": "nix-vscode-extensions", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "nixpkgs-stable": "nixpkgs-stable", "nur": "nur", "sops-nix": "sops-nix" @@ -552,11 +258,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1723501126, - "narHash": "sha256-N9IcHgj/p1+2Pvk8P4Zc1bfrMwld5PcosVA0nL6IGdE=", + "lastModified": 1722114803, + "narHash": "sha256-s6YhI8UHwQvO4cIFLwl1wZ1eS5Cuuw7ld2VzUchdFP0=", "owner": "Mic92", "repo": "sops-nix", - "rev": "be0eec2d27563590194a9206f551a6f73d52fa34", + "rev": "eb34eb588132d653e4c4925d862f1e5a227cc2ab", "type": "github" }, "original": { @@ -579,43 +285,6 @@ "repo": "default", "type": "github" } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "my-nixvim", - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1723808491, - "narHash": "sha256-rhis3qNuGmJmYC/okT7Dkc4M8CeUuRCSvW6kC2f3hBc=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "1d07739554fdc4f8481068f1b11d6ab4c1a4167a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 61a65a3..c2ba7c6 100644 --- a/flake.nix +++ b/flake.nix @@ -44,11 +44,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - my-nixvim = { - url = "git+https://git.xinyang.life/xin/nixvim"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - catppuccin.url = "github:catppuccin/nix"; }; @@ -61,25 +56,8 @@ , flake-utils , nur , catppuccin - , my-nixvim , ... }@inputs: let - nixvimOverlay = (final: prev: { - nixvim = self.packages.${prev.stdenv.system}.nixvim; - }); - overlayModule = { ... }: { - nixpkgs.overlays = [ - nixvimOverlay - (import ./overlays/add-pkgs.nix) - ]; - }; - deploymentModule = { - deployment.targetUser = "xin"; - }; - sharedColmenaModules = [ - self.nixosModules.default - deploymentModule - ]; sharedHmModules = [ inputs.sops-nix.homeManagerModules.sops inputs.nix-index-database.hmModules.nix-index @@ -118,17 +96,28 @@ modules = [ self.nixosModules.default nur.nixosModules.nur + ./overlays ] ++ modules; }; in { nixpkgs = nixpkgs; - nixosModules.default = { imports = [ ./modules/nixos overlayModule ]; }; + nixosModules.default = import ./modules/nixos; homeManagerModules = import ./modules/home-manager; homeConfigurations = builtins.listToAttrs [ (mkHomeConfiguration "xin" "calcite") ]; - colmenaHive = inputs.colmena.lib.makeHive { + colmenaHive = + let + deploymentModule = { + deployment.targetUser = "xin"; + }; + sharedColmenaModules = [ + self.nixosModules.default + deploymentModule + ]; + in + inputs.colmena.lib.makeHive { meta = { nixpkgs = import nixpkgs { system = "x86_64-linux"; @@ -221,10 +210,6 @@ packages = with pkgs; [ nix git colmena sops nix-output-monitor nil nvd ]; }; }; - - packages = { - nixvim = my-nixvim.packages.${system}.default; - }; } ); } diff --git a/home/xin/calcite.nix b/home/xin/calcite.nix index 130bd00..b26d5d8 100644 --- a/home/xin/calcite.nix +++ b/home/xin/calcite.nix @@ -51,7 +51,7 @@ fish = { enable = true; }; git = { enable = true; signing.enable = true; }; neovim = { enable = true; }; - vscode = { enable = true; languages = { cxx = true; python = true; scala = true; latex = true; }; llm = true; }; + vscode = { enable = true; languages = { cxx = true; python = true; scala = true; latex = true; }; }; zellij = { enable = true; }; }; @@ -59,19 +59,4 @@ enable = true; flags = [ "--disable-up-arrow" ]; }; - - programs.firefox.enable = true; - - programs.firefox.policies = { - DefaultDownloadDirectory = "/media/data/Downloads"; - }; - - programs.firefox.profiles.default = { - isDefault = true; - userChrome = builtins.readFile "${pkgs.fetchgit { - url = "https://gist.github.com/0ded98af9fe3da35f3688f81364d8c14.git"; - rev = "11bb4f428382052bcbbceb6cc3fef97f3c939481"; - hash = "sha256-J11indzEGdUA0HSW8eFe5AjesOxCL/G05KwkJk9GZSY="; - }}/userChrome.css"; - }; } diff --git a/machines/calcite/configuration.nix b/machines/calcite/configuration.nix index a39d487..03f1801 100644 --- a/machines/calcite/configuration.nix +++ b/machines/calcite/configuration.nix @@ -10,7 +10,6 @@ ]; commonSettings = { - auth.enable = true; nix = { enableMirrors = true; signing.enable = true; @@ -24,7 +23,7 @@ # boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" ]; boot.supportedFilesystems = [ "ntfs" ]; - boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + boot.binfmt.emulatedSystems = ["aarch64-linux"]; security.tpm2 = { enable = true; @@ -50,8 +49,7 @@ programs.oidc-agent.enable = true; programs.oidc-agent.providers = [ - { - issuer = "https://home.xinyang.life:9201"; + { issuer = "https://home.xinyang.life:9201"; pubclient = { client_id = "xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69"; client_secret = "UBntmLjC2yYCeHwsyj73Uwo9TAaecAetRwMw0xYcvNL9yRdLSUi0hUAHfvCHFeFh"; @@ -159,7 +157,6 @@ # Allow unfree packages nixpkgs.config.allowUnfree = true; nixpkgs.config.permittedInsecurePackages = [ - "openssl-1.1.1w" ]; # List packages installed in system profile. To search, run: # $ nix search wget @@ -211,13 +208,13 @@ element-desktop tdesktop qq - wechat-uos feishu # Password manager bitwarden # Browser + firefox (chromium.override { commandLineArgs = [ "--ozone-platform-hint=auto" @@ -256,7 +253,7 @@ owner = "root"; sopsFile = ./secrets.yaml; }; - "gitea/envfile" = { + gitea_env = { owner = "root"; sopsFile = ./secrets.yaml; }; @@ -266,19 +263,13 @@ custom.restic.passwordFile = config.sops.secrets.restic_repo_calcite_password.path; custom.forgejo-actions-runner.enable = true; - custom.forgejo-actions-runner.tokenFile = config.sops.secrets."gitea/envfile".path; + custom.forgejo-actions-runner.tokenFile = config.sops.secrets.gitea_env.path; custom.prometheus = { enable = true; exporters.blackbox.enable = true; }; - services.ollama = { - enable = true; - acceleration = "cuda"; - }; - - # MTP support services.gvfs.enable = true; diff --git a/machines/calcite/network.nix b/machines/calcite/network.nix index 3ed94c5..94a7e71 100644 --- a/machines/calcite/network.nix +++ b/machines/calcite/network.nix @@ -13,9 +13,6 @@ services.resolved = { enable = true; - extraConfig = '' - Cache=no - ''; }; # Enable Tailscale diff --git a/machines/calcite/secrets.yaml b/machines/calcite/secrets.yaml index d0e1b64..780f6cb 100644 --- a/machines/calcite/secrets.yaml +++ b/machines/calcite/secrets.yaml @@ -1,8 +1,7 @@ restic_repo_calcite_password: ENC[AES256_GCM,data:9ALTQULAMyLY4FIxuVztf9r3,iv:fObBBeqpHAVYl8YUopz9fZd3YWB+0sc8l+sR12rmxb4=,tag:l3xDc2/cpQr38X/cd7qMXA==,type:str] restic_repo_calcite: ENC[AES256_GCM,data:+m9cjMXrZoCPg/S+/wV4WFBmg6pbFpqJ7JOdwOX0Z37bgoQXh4wcVPKK3CLd7G/iQjpO8SXaqJ1/d8r4Ydk21Gp1WqkB8g==,iv:DweDUujXp6i5XwwxeFjUsLDOJQJlRIT6GKPPxABNWiY=,tag:hdBHIjAcDQ1Ky/8hIv3+Ow==,type:str] sing_box_url: ENC[AES256_GCM,data:2z2bDKdn51o1eaqhgE0pTg4FWcO8wcLNlnBZ69Q3Jm5GCxkXxsxN7DgqQvRVeakOHvaenQotF+nc6tlhKPsyzdQeG0yl3YYhGb9o3DkmpUjC6lalMSoiw1rSMVyBg4KYCWxmhR9iRurun62+5INGZwwHVqAjgWJhy/9+pdIFtgKyd/t0JhSU,iv:gIGbvRd88vZu3cVW7e4emZmmNO8QcubLrxS1sCwi4Co=,tag:AzLLtcA9jAbeuo6eWU6ilw==,type:str] -gitea: - envfile: ENC[AES256_GCM,data:bO1aMYm0kPTBbyPD5cweVRzNjiDK2WlWDsxz52L3faFg5HSVmBoi5DZC17XBXYw=,iv:lo9XEcwY4FPD/rRbnuiUviioMIiiphS26UgPro56DIU=,tag:0eKfsS0pYw+FPW+Y5dgisg==,type:str] +gitea_env: ENC[AES256_GCM,data:ShKKQWSiIkQ4uaWBhN5uB3xSu/8u8LkDjZeFi3G5BZUj7Vy4hoMweyUXyMf7w9A=,iv:JK6NgIJlU8G7G/LrZtNyGC4K9jblImFXnzhUMdkFbUw=,tag:PYeafqgXaSpDNJ0oIENW4A==,type:str] sops: kms: [] gcp_kms: [] @@ -27,8 +26,8 @@ sops: WGlLdXVoZlp3bEFXZjlMdG1VOUZDNUkKQ2NNTE3OsNUr2pOI7qeNFSCVkUIVRS+g FG5FbJJcFihXqr+Qo0nZkq+xq07vIia7mKoqyoIfkKwweiVzDKyrkQ== -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-08-14T01:46:18Z" - mac: ENC[AES256_GCM,data:+RuyHG1wLykJX792bkHvRXEiW7vDYj7i2tbR0MnZZUuFcr3xQDIuCW0/XnzxeX643k4iq+h/YUer/v7tIbCh75UXTG7oxQpfJhI8zMfaxKcCZBntD+wDhEmpWhgonOR/RwOAPMPz7FntJVvt9BHnpSLVjZC7KqVPohob0DRJs2Q=,iv:p6Lov35M8SN9RIV9I3D+3cO+wi3Kd2pVe08xgWYi/tM=,tag:aOMQauv2FFEsdwaS7WOraQ==,type:str] + lastmodified: "2024-04-05T04:32:32Z" + mac: ENC[AES256_GCM,data:esdTvjxnVP5t721ROLvMCvHMAkcpEFgTzHIQNyEkEaL1DKYDOJKFjufPPXDiEBX8+ni9RGYL4QHuDxlh89p0HAFHb3XCkE639NyHr6MD/DzFHbenaMJXEcWy/RSoWqroyHJA8XL7ymBGeDH7ERqyQaxc3oG653V/Uq5+/a++HQI=,iv:QvSee/Wes5RygpoCOJpVuatj+xij8EPUBayE1yUWM3g=,tag:8Un2qrflqAFB0iWz2Evi5Q==,type:str] pgp: [] unencrypted_suffix: _unencrypted - version: 3.9.0 + version: 3.8.1 diff --git a/machines/dolomite/default.nix b/machines/dolomite/default.nix index 22fc0e8..3a5406f 100644 --- a/machines/dolomite/default.nix +++ b/machines/dolomite/default.nix @@ -95,24 +95,9 @@ in dns = { servers = [ { - tag = "warp"; address = "1.1.1.1"; detour = "wg-out"; } - { - tag = "directdns"; - address = "h3://8.8.8.8/dns-query"; - } - ]; - rules = [ - { - outbound = "wg-out"; - server = "warp"; - } - { - outbound = "direct"; - server = "directdns"; - } ]; }; inbounds = [ diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 14159ce..23f5c24 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -9,4 +9,4 @@ ./vscode.nix ./zellij.nix ]; -} +} \ No newline at end of file diff --git a/modules/home-manager/direnv.nix b/modules/home-manager/direnv.nix index 46297b8..850534d 100644 --- a/modules/home-manager/direnv.nix +++ b/modules/home-manager/direnv.nix @@ -1,30 +1,18 @@ -{ config, lib, ... }: +{ config, lib, ... }: with lib; let cfg = config.custom-hm.direnv; - changeCacheDir = '' - declare -A direnv_layout_dirs - direnv_layout_dir() { - local hash path - echo "''${direnv_layout_dirs[$PWD]:=$( - hash="$(sha1sum - <<< "$PWD" | head -c40)" - path="''${PWD//[^a-zA-Z0-9]/-}" - echo "''${XDG_CACHE_HOME}/direnv/layouts/''${hash}''${path}" - )}" - } - ''; in { options.custom-hm.direnv = { enable = mkEnableOption "direnv"; }; config = { - programs = mkIf cfg.enable { + programs = mkIf config.custom-hm.direnv.enable { direnv = { enable = true; - stdlib = changeCacheDir; }; }; }; -} +} \ No newline at end of file diff --git a/modules/home-manager/vim.nix b/modules/home-manager/vim.nix index f66535f..d818132 100644 --- a/modules/home-manager/vim.nix +++ b/modules/home-manager/vim.nix @@ -1,22 +1,43 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, ... }: + +with lib; + let - inherit (lib) mkIf mkEnableOption getExe; cfg = config.custom-hm.neovim; - tomlFormat = pkgs.formats.toml { }; - neovideConfig = { - neovim-bin = getExe pkgs.nixvim; - fork = true; - }; in { options.custom-hm.neovim = { enable = mkEnableOption "neovim configurations"; }; config = mkIf cfg.enable { - home.packages = with pkgs; [ nixvim neovide ]; - programs.neovim.enable = false; - home.file.".config/neovide/config.toml" = { - source = tomlFormat.generate "neovide-config" neovideConfig; + programs.neovim = { + enable = true; + vimAlias = true; + vimdiffAlias = true; + plugins = with pkgs.vimPlugins; [ + catppuccin-nvim + ]; + extraConfig = '' + set nocompatible + + syntax on + set number + set relativenumber + set shortmess+=I + set laststatus=2 + + set ignorecase + set smartcase + set list + set listchars=tab:→· + set tabstop=4 + set shiftwidth=4 + set expandtab + + set mouse+=a + + colorscheme catppuccin-macchiato + ''; }; }; } diff --git a/modules/home-manager/vscode.nix b/modules/home-manager/vscode.nix index 9017f4c..6042b6a 100644 --- a/modules/home-manager/vscode.nix +++ b/modules/home-manager/vscode.nix @@ -31,7 +31,7 @@ let "cmake.pinnedCommands" = [ "workbench.action.tasks.configureTaskRunner" "workbench.action.tasks.runTask" - ]; + ]; "C_Cpp.intelliSenseEngine" = "Disabled"; }; }; @@ -43,7 +43,7 @@ let settings = { }; }; scalaPackages = { - systemPackages = with pkgs; [ coursier metals ]; + systemPackages = with pkgs; [ coursier ]; extension = with inputs.nix-vscode-extensions.extensions.${pkgs.system}.vscode-marketplace; [ scala-lang.scala scalameta.metals @@ -58,13 +58,11 @@ let settings = { "latex-workshop.latex.autoBuild.run" = "never"; "latex-workshop.latex.tools" = [ - { - "name" = "xelatex"; + { "name" = "xelatex"; "command" = "xelatex"; "args" = [ "-synctex=1" "-interaction=nonstopmode" "-file-line-error" "%DOCFILE%" ]; } - { - "name" = "pdflatex"; + { "name" = "pdflatex"; "command" = "pdflatex"; "args" = [ "-synctex=1" "-interaction=nonstopmode" "-file-line-error" "%DOCFILE%" ]; } @@ -86,7 +84,6 @@ let }; }; }; - llmExtensions = [ pkgs.vscode-extensions.continue.continue ]; languages = [ "nix" "cxx" "python" "scala" "latex" ]; zipAttrsWithLanguageOption = (attr: @@ -106,14 +103,12 @@ in scala = mkEnableOption "Scala"; latex = mkEnableOption "Latex"; }; - llm = mkEnableOption "tab completion with Continue and ollama"; }; config = mkIf cfg.enable { nixpkgs.config.allowUnfree = true; home.packages = lib.mkMerge ([ [ pkgs.clang-tools ] - (mkIf cfg.llm [ pkgs.ollama ]) ] ++ zipAttrsWithLanguageOption "systemPackages"); programs.vscode = { enable = true; @@ -140,51 +135,30 @@ in ms-vscode-remote.remote-ssh-edit mushan.vscode-paste-image ]) - (with pkgs.vscode-extensions; [ waderyan.gitblame catppuccin.catppuccin-vsc # Rust rust-lang.rust-analyzer ]) - - (mkIf cfg.llm llmExtensions) ] ++ zipAttrsWithLanguageOption "extension"); userSettings = lib.mkMerge ([ - { - "workbench.colorTheme" = "Catppuccin Macchiato"; - "terminal.integrated.sendKeybindingsToShell" = true; - "extensions.ignoreRecommendations" = true; - "files.autoSave" = "afterDelay"; - "editor.inlineSuggest.enabled" = true; - "editor.rulers" = [ - 80 - ]; - "editor.mouseWheelZoom" = true; - "git.autofetch" = false; - "window.zoomLevel" = -1; + {"workbench.colorTheme" = "Catppuccin Macchiato"; + "terminal.integrated.sendKeybindingsToShell" = true; + "extensions.ignoreRecommendations" = true; + "files.autoSave" = "afterDelay"; + "editor.inlineSuggest.enabled" = true; + "editor.rulers" = [ + 80 + ]; + "editor.mouseWheelZoom" = true; + "git.autofetch" = false; + "window.zoomLevel" = -1; - "extensions.experimental.affinity" = { - "vscodevim.vim" = 1; - }; - } - ] ++ zipAttrsWithLanguageOption "settings"); - }; - - home.file.".continue/config.json".text = lib.generators.toJSON { } { - models = [ - { - model = "AUTODETECT"; - provider = "ollama"; - title = "Ollama"; - } - ]; - tabAutocompleteModel = { - model ="deepseek-coder:6.7b-base"; - provider = "ollama"; - title = "codegemma"; - }; + "extensions.experimental.affinity" = { + "vscodevim.vim" = 1; + }; + }] ++ zipAttrsWithLanguageOption "settings"); }; }; - } diff --git a/overlays/add-pkgs.nix b/overlays/add-pkgs.nix index 35b6981..ce339b0 100644 --- a/overlays/add-pkgs.nix +++ b/overlays/add-pkgs.nix @@ -1,3 +1,10 @@ -(final: prev: { - oidc-agent = prev.callPackage ./pkgs/oidc-agent { }; -}) +{ config, pkgs, lib, ... }: + +{ + nixpkgs.overlays = [ + (self: super: { + oidc-agent = pkgs.callPackage ./pkgs/oidc-agent { }; + python3 = super.python312; + }) + ]; +} diff --git a/overlays/default.nix b/overlays/default.nix index a94c09a..de8ee08 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1 +1,6 @@ -final: prev: (import ./add-pkgs.nix) +{ config, pkgs, ... }: +{ + imports = [ + ./add-pkgs.nix + ]; +}