From 6d5436bbaa354111fac18222459bc3eb691c92ae Mon Sep 17 00:00:00 2001 From: xinyangli Date: Wed, 20 Nov 2024 10:28:31 +0800 Subject: [PATCH 1/4] calcite,dolomite: minor fixes --- flake.lock | 12 +- home/xin/calcite.nix | 2 + machines/calcite/configuration.nix | 6 +- machines/dolomite/default.nix | 27 +-- modules/home-manager/gui/niri.nix | 8 +- modules/home-manager/xdg-autostart.nix | 96 ++++++++++ modules/home-manager/zellij.nix | 3 +- .../nixos/common-settings/proxy-server.nix | 165 ++++++++++++++++++ 8 files changed, 282 insertions(+), 37 deletions(-) create mode 100644 modules/home-manager/xdg-autostart.nix create mode 100644 modules/nixos/common-settings/proxy-server.nix diff --git a/flake.lock b/flake.lock index 4240a48..50dd949 100644 --- a/flake.lock +++ b/flake.lock @@ -513,11 +513,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1731815985, - "narHash": "sha256-PgX3UFz1YESfEeGmp2HYYBc/3Vp59bPbBLtNN4VMIgI=", + "lastModified": 1731819057, + "narHash": "sha256-nfqKsQhFCakM+eIKGf/JWu/g56rOPoGny10EZN8q7R0=", "owner": "xinyangli", "repo": "nixpkgs", - "rev": "5ddf4ef59567ff1e43adacde9f677f2cbd958287", + "rev": "b2644ed7258502987ad4a70cf8959bf5a26ce26d", "type": "github" }, "original": { @@ -555,11 +555,11 @@ }, "nur": { "locked": { - "lastModified": 1731815686, - "narHash": "sha256-6HPZVrwQOZzeaW5QseyXnghK76a3aDnRoQf+L+cpNms=", + "lastModified": 1731819675, + "narHash": "sha256-GGp/rEfxRdi1BD9TlHoXxp2g9IuKDp0Jk7wYh1LacP8=", "owner": "nix-community", "repo": "NUR", - "rev": "4cde5b2ea07d8c05570d7305738a9870b1a14700", + "rev": "59740d792bea5caa547c9bc7ce366802ecfafb7f", "type": "github" }, "original": { diff --git a/home/xin/calcite.nix b/home/xin/calcite.nix index 3b3c4ea..11dd9ed 100644 --- a/home/xin/calcite.nix +++ b/home/xin/calcite.nix @@ -38,6 +38,8 @@ in remmina qq wechat-uos + wpsoffice + ttf-wps-fonts ]; # Theme diff --git a/machines/calcite/configuration.nix b/machines/calcite/configuration.nix index 60480c1..8d0100c 100644 --- a/machines/calcite/configuration.nix +++ b/machines/calcite/configuration.nix @@ -16,6 +16,7 @@ in ]; commonSettings = { + auth.enable = true; nix = { enableMirrors = true; signing.enable = true; @@ -114,13 +115,15 @@ in xdg.portal = { enable = true; extraPortals = [ - pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gnome + pkgs.xdg-desktop-portal-gtk ]; configPackages = [ pkgs.niri ]; }; systemd.user.services.xdg-desktop-portal-gtk.after = [ "graphical-session.target" ]; + systemd.user.services.xdg-desktop-portal-gnome.after = [ "graphical-session.target" ]; + systemd.user.services.xdg-desktop-portal-gnome.wantedBy = [ "graphical-session.target" ]; services.greetd = let @@ -281,7 +284,6 @@ in # Writting zotero # onlyoffice-bin - wpsoffice config.nur.repos.linyinfeng.wemeet diff --git a/machines/dolomite/default.nix b/machines/dolomite/default.nix index 32e2425..e3bb640 100644 --- a/machines/dolomite/default.nix +++ b/machines/dolomite/default.nix @@ -58,31 +58,8 @@ in exporters.blackbox.enable = true; }; - custom.kanidm-client = { - enable = true; - uri = "https://auth.xinyang.life/"; - asSSHAuth = { - enable = true; - allowedGroups = [ "linux_users" ]; - }; - sudoers = [ "xin@auth.xinyang.life" ]; - }; - - services.openssh = { - settings = { - PasswordAuthentication = false; - KbdInteractiveAuthentication = false; - PermitRootLogin = lib.mkForce "no"; - GSSAPIAuthentication = "no"; - KerberosAuthentication = "no"; - }; - }; - services.fail2ban.enable = true; - programs.mosh.enable = true; - - security.sudo = { - execWheelOnly = true; - wheelNeedsPassword = false; + custom.commonSettings = { + auth.enable = true; }; services.sing-box = diff --git a/modules/home-manager/gui/niri.nix b/modules/home-manager/gui/niri.nix index 8eb07b6..d26bf93 100644 --- a/modules/home-manager/gui/niri.nix +++ b/modules/home-manager/gui/niri.nix @@ -84,8 +84,12 @@ in enable = true; timeouts = [ { - timeout = 900; - command = "/run/current-system/systemd/bin/systemctl suspend"; + timeout = 600; + command = ''[ "$(${pkgs.tlp}/bin/tlp-stat -m)" == "battery" ] && /run/current-system/systemd/bin/systemctl suspend''; + } + { + timeout = 1200; + command = ''${getExe pkgs.niri} msg action power-off-monitors''; } ]; events = [ diff --git a/modules/home-manager/xdg-autostart.nix b/modules/home-manager/xdg-autostart.nix new file mode 100644 index 0000000..d2127ae --- /dev/null +++ b/modules/home-manager/xdg-autostart.nix @@ -0,0 +1,96 @@ +{ + config, + pkgs, + lib, + ... +}: +let + cfg = config.xdg.autoStart; + inherit (lib) hm types; +in +{ + + options.xdg.autoStart = { + + packages = lib.mkOption { + description = '' + List of packages which should be autostarted. + + This module tries to select the package’s default desktop file, + which is either described by its .desktopItem attribute + or by its first entry of its .desktopItems attribute. + + Users who want to specifically select a certain desktop file + or who want to write their own + can make use of the {option}`xdg.autoStart.desktopItems` option. + ''; + + type = types.listOf types.package; + default = [ ]; + example = lib.literalExpression '' + with pkgs; [ + pkgs.trilium-desktop + ] + ''; + }; + + desktopItems = lib.mkOption { + description = '' + List of desktop files which should be autostarted. + + Users should prefer to use {option}`xdg.autoStart.packages` + and only use this option in case + they want to specifically + select a package’s desktop item + or want to create their own desktop item. + + Be warned, this may shadow entries of {option}`xdg.autoStart.packages`. + ''; + + type = types.attrsOf (types.unspecified); # TODO replace unspecified + default = { }; + # TODO improve example, take one where it would make sense to use this option + example = lib.literalExpression '' + { + discord = pkgs.discord.desktopItem + firefox-custom = makeDesktopItem { + exec = "firefox -P custom"; + }; + } + ''; + }; + + }; + + config = + let + # helpers + retrieveDesktopItem = ( + pkg: + if pkg ? desktopItem then + pkg.desktopItem + else if pkg ? desktopItems && pkg.desktopItems != [ ] then + builtins.head pkg.desktopItems + else + abort "package '${pkg.pname}' is missing a desktop file" + ); + emulateDesktopItem = (pkg: lib.nameValuePair pkg.pname (retrieveDesktopItem pkg)); + embedDesktopItem = ( + name: deskItem: + lib.nameValuePair "autostart/${name}.desktop" { + source = "${deskItem}/share/applications/${deskItem.name}"; + } + ); + # parse opts + desktopItemsPackages = builtins.listToAttrs (map emulateDesktopItem cfg.packages); + desktopItems = desktopItemsPackages // cfg.desktopItems; + in + { + assertions = [ + (hm.assertions.assertPlatform "xdg.autoStart" pkgs lib.platforms.linux) + ]; + + xdg.configFile = lib.attrsets.mapAttrs' embedDesktopItem desktopItems; + }; + +} diff --git a/modules/home-manager/zellij.nix b/modules/home-manager/zellij.nix index d925365..fcb8f04 100644 --- a/modules/home-manager/zellij.nix +++ b/modules/home-manager/zellij.nix @@ -26,10 +26,9 @@ in bind "Ctrl l" { MoveFocusOrTab "Right"; } bind "Ctrl j" { MoveFocus "Down"; } bind "Ctrl k" { MoveFocus "Up"; } - unbind "Alt h" "Alt l" "Alt j" "Alt k" + unbind "Alt h" "Alt l" "Alt j" "Alt k" "Alt f" } unbind "Ctrl p" "Ctrl n" - unbind "Alt f" } ''; }; diff --git a/modules/nixos/common-settings/proxy-server.nix b/modules/nixos/common-settings/proxy-server.nix new file mode 100644 index 0000000..a6b5af9 --- /dev/null +++ b/modules/nixos/common-settings/proxy-server.nix @@ -0,0 +1,165 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + inherit (lib) + mkIf + mkEnableOption + mkOption + types + ; + + cfg = config.commonSettings.proxyServer; + + singTls = { + enabled = true; + server_name = config.deployment.targetHost; + key_path = config.security.acme.certs.${config.deployment.targetHost}.directory + "/key.pem"; + certificate_path = + config.security.acme.certs.${config.deployment.targetHost}.directory + "/cert.pem"; + }; + + mkSingConfig = + { uuid, password, ... }: + { + inbounds = + [ + { + tag = "sg0"; + type = "trojan"; + listen = "::"; + listen_port = 8080; + users = [ + { + name = "proxy"; + password = password; + } + ]; + tls = singTls; + } + ] + ++ lib.forEach (lib.range 6311 6314) (port: { + tag = "sg" + toString (port - 6310); + type = "tuic"; + listen = "::"; + listen_port = port; + congestion_control = "bbr"; + users = [ + { + name = "proxy"; + uuid = uuid; + password = password; + } + ]; + tls = singTls; + }); + outbounds = [ + { + type = "wireguard"; + tag = "wg-out"; + private_key = { + _secret = config.sops.secrets.wg_private_key.path; + }; + local_address = [ + "172.16.0.2/32" + { _secret = config.sops.secrets.wg_ipv6_local_addr.path; } + ]; + peers = [ + { + public_key = "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo="; + allowed_ips = [ + "0.0.0.0/0" + "::/0" + ]; + server = "162.159.192.1"; + server_port = 500; + } + ]; + } + { + type = "direct"; + tag = "direct"; + } + ]; + route = { + rules = [ + { + inbound = "sg0"; + outbound = "direct"; + } + { + inbound = "sg4"; + outbound = "direct"; + } + ]; + }; + }; +in +{ + options.commonSettings.proxyServer = { + enable = mkEnableOption "sing-box as a server"; + uuidFile = mkOption { + type = types.path; + }; + passwordFile = mkOption { + type = types.path; + }; + }; + + config = mkIf cfg.enable { + boot.kernel.sysctl = { + "net.core.default_qdisc" = "fq"; + "net.ipv4.tcp_congestion_control" = "bbr"; + }; + + networking.firewall.trustedInterfaces = [ "tun0" ]; + + sops = { + secrets = { + wg_private_key = { + owner = "root"; + sopsFile = ./secrets + "/${config.networking.hostName}.yaml"; + }; + wg_ipv6_local_addr = { + owner = "root"; + sopsFile = ./secrets + "/${config.networking.hostName}.yaml"; + }; + }; + }; + + security.acme = { + acceptTerms = true; + certs.${config.deployment.targetHost} = { + email = "me@namely.icu"; + # Avoid port conflict + listenHTTP = if config.services.caddy.enable then ":30310" else ":80"; + }; + }; + services.caddy.virtualHosts."http://${config.deployment.targetHost}:80".extraConfig = '' + reverse_proxy 127.0.0.1:30310 + ''; + + networking.firewall.allowedTCPPorts = [ + 80 + 8080 + ]; + networking.firewall.allowedUDPPorts = [ ] ++ (lib.range 6311 6314); + + custom.prometheus = { + enable = true; + exporters.blackbox.enable = true; + }; + + services.sing-box = { + enable = true; + settings = mkSingConfig { + uuid = cfg.uuidFile; + password = cfg.passwordFile; + }; + }; + }; +} From 69cf719b651916c4b19033e8d763d7c105858993 Mon Sep 17 00:00:00 2001 From: xinyangli Date: Fri, 22 Nov 2024 12:07:10 +0800 Subject: [PATCH 2/4] weilite: add jackett and derper --- machines/weilite/default.nix | 13 +++++++++++++ machines/weilite/services/default.nix | 1 + machines/weilite/services/media-download.nix | 6 ++++++ 3 files changed, 20 insertions(+) create mode 100644 machines/weilite/services/media-download.nix diff --git a/machines/weilite/default.nix b/machines/weilite/default.nix index 2fdacc1..96f2f2d 100644 --- a/machines/weilite/default.nix +++ b/machines/weilite/default.nix @@ -2,6 +2,7 @@ inputs, config, pkgs, + lib, modulesPath, ... }: @@ -150,6 +151,15 @@ permitCertUid = "caddy"; }; + services.tailscale.derper = { + enable = true; + domain = "derper00.namely.icu"; + openFirewall = true; + verifyClients = true; + }; + # tailscale derper module use nginx for reverse proxy + services.nginx.enable = lib.mkForce false; + services.caddy = { enable = true; package = pkgs.caddy.withPlugins { @@ -165,6 +175,9 @@ ]; vendorHash = "sha256-OhOeU2+JiJyIW9WdCYq98OKckXQZ9Fn5zULz0aLsXMI="; }; + virtualHosts."derper00.namely.icu:8443".extraConfig = '' + reverse_proxy 127.0.0.1:${toString config.services.tailscale.derper.port} + ''; virtualHosts."weilite.coho-tet.ts.net:8080".extraConfig = '' reverse_proxy 127.0.0.1:${toString config.services.immich.port} ''; diff --git a/machines/weilite/services/default.nix b/machines/weilite/services/default.nix index 031018b..d70e175 100644 --- a/machines/weilite/services/default.nix +++ b/machines/weilite/services/default.nix @@ -2,5 +2,6 @@ imports = [ ./ocis.nix ./restic.nix + ./media-download.nix ]; } diff --git a/machines/weilite/services/media-download.nix b/machines/weilite/services/media-download.nix new file mode 100644 index 0000000..36ae424 --- /dev/null +++ b/machines/weilite/services/media-download.nix @@ -0,0 +1,6 @@ +{ + services.jackett = { + enable = true; + openFirewall = false; + }; +} From f0bee7364a644306f2a10af1484c2b9dbaa879ec Mon Sep 17 00:00:00 2001 From: xinyangli Date: Fri, 22 Nov 2024 12:08:06 +0800 Subject: [PATCH 3/4] calcite: handle mouse keys with keyd --- machines/calcite/configuration.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/machines/calcite/configuration.nix b/machines/calcite/configuration.nix index 8d0100c..dec6e8b 100644 --- a/machines/calcite/configuration.nix +++ b/machines/calcite/configuration.nix @@ -36,6 +36,11 @@ in boot.supportedFilesystems = [ "ntfs" ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + documentation = { + nixos.enable = false; + man.enable = false; + }; + security.tpm2 = { enable = true; # expose /run/current-system/sw/lib/libtpm2_pkcs11.so @@ -159,6 +164,15 @@ in }; }; }; + "logiM720" = { + ids = [ "046d:b015" ]; + settings = { + main = { + mouse2 = "leftmeta"; + # leftalt = "mouse1"; + }; + }; + }; }; }; From 9bf25972e90a10a10c18daf0f63a4938d06e5d21 Mon Sep 17 00:00:00 2001 From: xinyangli Date: Fri, 22 Nov 2024 13:13:54 +0800 Subject: [PATCH 4/4] chore: clean up flake.nix, remove inputs from specialArgs --- flake.nix | 114 ++++++++++++++++------------- machines/calcite/configuration.nix | 1 + machines/massicot/default.nix | 2 - machines/massicot/services.nix | 1 - machines/sops.nix | 2 - machines/weilite/default.nix | 2 - modules/home-manager/vscode.nix | 28 +++---- overlays/add-pkgs.nix | 8 +- 8 files changed, 84 insertions(+), 74 deletions(-) diff --git a/flake.nix b/flake.nix index 12522d4..1000f83 100644 --- a/flake.nix +++ b/flake.nix @@ -58,35 +58,56 @@ home-manager, nixpkgs, nixos-hardware, + sops-nix, flake-utils, nur, catppuccin, my-nixvim, + nix-vscode-extensions, + colmena, + nix-index-database, ... - }@inputs: + }: let - nixvimOverlay = (final: prev: { nixvim = self.packages.${prev.stdenv.system}.nixvim; }); + editorOverlay = ( + final: prev: { + inherit (nix-vscode-extensions.extensions.${prev.stdenv.system}) vscode-marketplace; + inherit (self.packages.${prev.stdenv.system}) nixvim; + } + ); overlayModule = { ... }: { nixpkgs.overlays = [ - nixvimOverlay + editorOverlay (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 + self.homeManagerModules.default + sops-nix.homeManagerModules.sops + nix-index-database.hmModules.nix-index catppuccin.homeManagerModules.catppuccin - self.homeManagerModules ]; + sharedNixosModules = [ + self.nixosModules.default + sops-nix.nixosModules.sops + ]; + nodeNixosModules = { + calcite = [ + nixos-hardware.nixosModules.asus-zephyrus-ga401 + nur.nixosModules.nur + catppuccin.nixosModules.catppuccin + machines/calcite/configuration.nix + (mkHome "xin" "calcite") + ]; + }; + sharedColmenaModules = [ + deploymentModule + ] ++ sharedNixosModules; mkHome = user: host: { ... }: @@ -98,43 +119,29 @@ sharedModules = sharedHmModules; useGlobalPkgs = true; useUserPackages = true; - extraSpecialArgs = { - inherit inputs; - }; }; home-manager.users.${user} = (import ./home).${user}.${host}; } ]; }; - mkHomeConfiguration = user: host: { - name = user; - value = home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { system = "x86_64-linux"; }; - modules = [ - (import ./home).${user}.${host} - overlayModule - ] ++ sharedHmModules; - extraSpecialArgs = { - inherit inputs; - }; - }; - }; mkNixos = { - system, - modules, - specialArgs ? { }, + hostname, + system ? null, }: nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = specialArgs // { - inherit inputs system; + modules = sharedNixosModules ++ nodeNixosModules.${hostname}; + }; + # TODO: + mkColmenaHive = + { + hostname, + }: + colmena.lib.makeHive { + meta = { + # FIXME: + nixpkgs = import nixpkgs { system = "x86_64-linux"; }; }; - modules = [ - self.nixosModules.default - nur.nixosModules.nur - catppuccin.nixosModules.catppuccin - ] ++ modules; }; in { @@ -145,16 +152,12 @@ overlayModule ]; }; - homeManagerModules = import ./modules/home-manager; + homeManagerModules.default = import ./modules/home-manager; - homeConfigurations = builtins.listToAttrs [ (mkHomeConfiguration "xin" "calcite") ]; - - colmenaHive = inputs.colmena.lib.makeHive { + colmenaHive = colmena.lib.makeHive { meta = { + # FIXME: nixpkgs = import nixpkgs { system = "x86_64-linux"; }; - specialArgs = { - inherit inputs; - }; }; massicot = @@ -241,12 +244,7 @@ nixosConfigurations = { calcite = mkNixos { - system = "x86_64-linux"; - modules = [ - nixos-hardware.nixosModules.asus-zephyrus-ga401 - machines/calcite/configuration.nix - (mkHome "xin" "calcite") - ]; + hostname = "calcite"; }; } // self.colmenaHive.nodes; @@ -255,6 +253,17 @@ system: let pkgs = nixpkgs.legacyPackages.${system}; + + mkHomeConfiguration = user: host: { + name = user; + value = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + modules = [ + (import ./home).${user}.${host} + overlayModule + ] ++ sharedHmModules; + }; + }; in { devShells = { @@ -262,16 +271,19 @@ packages = with pkgs; [ nix git - inputs.colmena.packages.${system}.colmena + colmena.packages.${system}.colmena sops nix-output-monitor nil nvd nh + (python3.withPackages (ps: with ps; [ requests ])) ]; }; }; + homeConfigurations = builtins.listToAttrs [ (mkHomeConfiguration "xin" "calcite") ]; + packages = { nixvim = my-nixvim.packages.${system}.default; }; diff --git a/machines/calcite/configuration.nix b/machines/calcite/configuration.nix index dec6e8b..8ad5348 100644 --- a/machines/calcite/configuration.nix +++ b/machines/calcite/configuration.nix @@ -219,6 +219,7 @@ in services.smartd.enable = true; # Allow unfree packages + nixpkgs.system = "x86_64-linux"; nixpkgs.config.allowUnfree = true; nixpkgs.config.permittedInsecurePackages = [ "openssl-1.1.1w" diff --git a/machines/massicot/default.nix b/machines/massicot/default.nix index 611b30d..e461039 100644 --- a/machines/massicot/default.nix +++ b/machines/massicot/default.nix @@ -1,12 +1,10 @@ { - inputs, pkgs, ... }: { imports = [ - inputs.sops-nix.nixosModules.sops ./hardware-configuration.nix ./networking.nix ./services.nix diff --git a/machines/massicot/services.nix b/machines/massicot/services.nix index 4be75c5..6a43aa3 100644 --- a/machines/massicot/services.nix +++ b/machines/massicot/services.nix @@ -101,7 +101,6 @@ in services.matrix-conduit = { enable = true; - # package = inputs.conduit.packages.${pkgs.system}.default; package = pkgs.matrix-conduit; settings.global = { server_name = "xinyang.life"; diff --git a/machines/sops.nix b/machines/sops.nix index aeb99d9..3f56687 100644 --- a/machines/sops.nix +++ b/machines/sops.nix @@ -1,11 +1,9 @@ { - inputs, config, lib, ... }: { - imports = [ inputs.sops-nix.nixosModules.sops ]; config = { sops = { defaultSopsFile = ./secrets.yaml; diff --git a/machines/weilite/default.nix b/machines/weilite/default.nix index 96f2f2d..8a58896 100644 --- a/machines/weilite/default.nix +++ b/machines/weilite/default.nix @@ -1,5 +1,4 @@ { - inputs, config, pkgs, lib, @@ -9,7 +8,6 @@ { imports = [ - inputs.sops-nix.nixosModules.sops (modulesPath + "/profiles/qemu-guest.nix") ./services ]; diff --git a/modules/home-manager/vscode.nix b/modules/home-manager/vscode.nix index 9af7fdd..a34febe 100644 --- a/modules/home-manager/vscode.nix +++ b/modules/home-manager/vscode.nix @@ -1,5 +1,4 @@ { - inputs, config, lib, pkgs, @@ -16,7 +15,7 @@ let nixd nixpkgs-fmt ]; - extension = with inputs.nix-vscode-extensions.extensions.${pkgs.system}.vscode-marketplace; [ + extension = with pkgs.vscode-marketplace; [ jnoortheen.nix-ide ]; settings = { @@ -30,13 +29,16 @@ let clang-tools cmake-format ]; - extension = with inputs.nix-vscode-extensions.extensions.${pkgs.system}.vscode-marketplace; [ - llvm-vs-code-extensions.vscode-clangd - (ms-vscode.cmake-tools.overrideAttrs (_: { - sourceRoot = "extension"; - })) - twxs.cmake - ] ++ (with pkgs.vscode-extensions; [ ms-vscode.cpptools ]); + extension = + with pkgs.vscode-marketplace; + [ + llvm-vs-code-extensions.vscode-clangd + (ms-vscode.cmake-tools.overrideAttrs (_: { + sourceRoot = "extension"; + })) + twxs.cmake + ] + ++ (with pkgs.vscode-extensions; [ ms-vscode.cpptools ]); settings = { "cmake.configureOnEdit" = false; "cmake.showOptionsMovedNotification" = false; @@ -50,7 +52,7 @@ let }; pythonPackages = { systemPackages = with pkgs; [ ]; - extension = with inputs.nix-vscode-extensions.extensions.${pkgs.system}.vscode-marketplace; [ + extension = with pkgs.vscode-marketplace; [ ms-python.python ]; settings = { }; @@ -60,7 +62,7 @@ let coursier metals ]; - extension = with inputs.nix-vscode-extensions.extensions.${pkgs.system}.vscode-marketplace; [ + extension = with pkgs.vscode-marketplace; [ scala-lang.scala scalameta.metals ]; @@ -68,7 +70,7 @@ let }; latexPackages = { systemPackages = with pkgs; [ texliveSmall ]; - extension = with inputs.nix-vscode-extensions.extensions.${pkgs.system}.vscode-marketplace; [ + extension = with pkgs.vscode-marketplace; [ james-yu.latex-workshop ]; settings = { @@ -184,7 +186,7 @@ in mutableExtensionsDir = false; extensions = lib.mkMerge ( [ - (with inputs.nix-vscode-extensions.extensions.${pkgs.system}.vscode-marketplace; [ + (with pkgs.vscode-marketplace; [ mkhl.direnv ms-azuretools.vscode-docker diff --git a/overlays/add-pkgs.nix b/overlays/add-pkgs.nix index 35b6981..135a2cb 100644 --- a/overlays/add-pkgs.nix +++ b/overlays/add-pkgs.nix @@ -1,3 +1,5 @@ -(final: prev: { - oidc-agent = prev.callPackage ./pkgs/oidc-agent { }; -}) +( + final: prev: + { + } +)