From fad3683ffa1160f94b95dca257428f06e3cf6c99 Mon Sep 17 00:00:00 2001 From: alisceon Date: Thu, 4 Sep 2025 09:30:33 +0200 Subject: [PATCH] we are THIS close now --- flake.lock | 93 +++++++++++++++++++++++++++++- flake.nix | 6 +- hosts/common/base.nix | 129 +++--------------------------------------- 3 files changed, 106 insertions(+), 122 deletions(-) diff --git a/flake.lock b/flake.lock index e90c236..b0c47c9 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,26 @@ { "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -71,12 +92,64 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1756787288, + "narHash": "sha256-rw/PHa1cqiePdBxhF66V7R+WAP8WekQ0mCDG4CFqT8Y=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d0fc30899600b9b3466ddb260fd83deb486c32f1", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1712449641, + "narHash": "sha256-U9DDWMexN6o5Td2DznEgguh8TRIUnIl9levmit43GcI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "600b15aea1b36eeb43833a50b0e96579147099ff", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nur": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1756935808, + "narHash": "sha256-Kozv7P1kPXC8M1k12Y3kmylLKptlk9G+GiJe5F1V4Xo=", + "owner": "nix-community", + "repo": "NUR", + "rev": "0951866da58eb749d4a25eb241ab4df65866db70", + "type": "github" + }, + "original": { + "id": "nur", + "type": "indirect" + } + }, "root": { "inputs": { "flake-utils": "flake-utils", "home-manager": "home-manager", "nixpkgs": "nixpkgs", - "nixpkgs-unstable": "nixpkgs-unstable" + "nixpkgs-unstable": "nixpkgs-unstable", + "nur": "nur", + "xonsh-xontrib": "xonsh-xontrib" } }, "systems": { @@ -93,6 +166,24 @@ "repo": "default", "type": "github" } + }, + "xonsh-xontrib": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1752512286, + "narHash": "sha256-/G535cmjk8nyM/wuOGiqvZxyLet02atFC9QtLUR2HaE=", + "owner": "drmikecrowe", + "repo": "nur-packages", + "rev": "57096c1ad777d00c2bfbc5c2d77a8413bc9b41e2", + "type": "github" + }, + "original": { + "owner": "drmikecrowe", + "repo": "nur-packages", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 7410cd4..595fe4c 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + xonsh-xontrib.url = "github:drmikecrowe/nur-packages"; flake-utils = { url = "github:numtide/flake-utils"; inputs.nixpkgs.follows = "nixpkgs"; @@ -14,7 +15,7 @@ }; }; - outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, home-manager, ... }: + outputs = { self, nixpkgs, nixpkgs-unstable, nur, flake-utils, xonsh-xontrib, home-manager, ... }: let system = "x86_64-linux"; pkgs = import nixpkgs { @@ -26,6 +27,9 @@ inherit system; config.allowUnfree = true; flake.setFlakeRegistry = true; + overlays = [ + xonsh-xontrib.overlays + ]; }; sharedSpecialArgs = { inherit pkgs-unstable; diff --git a/hosts/common/base.nix b/hosts/common/base.nix index c77383c..cb759c3 100644 --- a/hosts/common/base.nix +++ b/hosts/common/base.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, pkgs-unstable, ... }: { boot.kernel.sysctl = { @@ -125,125 +125,14 @@ command-not-found.enable = true; xonsh = { enable = true; - extraPackages = ps: [ - ( - ps.buildPythonPackage - rec { - name = "xonsh-direnv"; - version = "1.6.5"; - src = pkgs.fetchFromGitHub { - owner = "74th"; - repo = "${name}"; - rev = "${version}"; - sha256 = "sha256-huBJ7WknVCk+WgZaXHlL+Y1sqsn6TYqMP29/fsUPSyU="; - }; - meta = { - homepage = "https://github.com/74th/xonsh-direnv"; - description = "direnv for xonsh"; - license = pkgs.lib.licenses.mit; - maintainers = [ ]; - }; - } - ) - ( - ps.buildPythonPackage - rec { - name = "xontrib-fish-completer"; - version = "0.0.1"; - src = pkgs.fetchFromGitHub { - owner = "xonsh"; - repo = "${name}"; - rev = "${version}"; - sha256 = "sha256-PhhdZ3iLPDEIG9uDeR5ctJ9zz2+YORHBhbsiLrJckyA="; - }; - meta = { - homepage = "https://github.com/xonsh/xontrib-fish-completer"; - description = "fish completions for xonsh"; - license = pkgs.lib.licenses.mit; - maintainers = [ ]; - }; - } - ) - ( - ps.buildPythonPackage - rec { - name = "xontrib-fzf-completions"; - version = "v0.0.2"; - format = "pyproject"; - src = pkgs.fetchFromGitHub { - owner = "doronz88"; - repo = "${name}"; - rev = "${version}"; - sha256 = "sha256-1z5xHX4Psevn8686QkwIzv/LOJ5IMJc2nQ5Hg/2svTc="; - }; - meta = { - homepage = "https://github.com/doronz88/xontrib-fzf-completions"; - description = "fuzzy completions for xonsh"; - license = pkgs.lib.licenses.mit; - maintainers = [ ]; - }; - } - ) - ( - ps.buildPythonPackage - rec { - name = "xontrib-clp"; - version = "0.1.7"; - src = pkgs.fetchFromGitHub { - owner = "anki-code"; - repo = "${name}"; - rev = "${version}"; - sha256 = "sha256-1ewWlwG8KY9s6qydErurvP2x+4DIPTFcjSGP1c5y83M="; - }; - meta = { - homepage = "https://github.com/anki-code/xontrib-clp"; - description = "clipboard completions for xonsh"; - license = pkgs.lib.licenses.mit; - maintainers = [ ]; - }; - } - ) - ( - ps.buildPythonPackage - rec { - name = "xontrib-abbrevs"; - version = "v0.1.0"; - format = "pyproject"; - src = pkgs.fetchFromGitHub { - owner = "xonsh"; - repo = "${name}"; - rev = "${version}"; - sha256 = "sha256-JxH5b2ey99tvHXSUreU5r6fS8nko4RrS/1c8psNbJNc="; - }; - meta = { - homepage = "https://github.com/xonsh/xontrib-abbrevs"; - description = "abbreviation completions for xonsh"; - license = pkgs.lib.licenses.mit; - maintainers = [ ]; - }; - } - ) - ( - ps.buildPythonPackage - rec { - name = "xontrib-bashisms"; - version = "0.0.5"; - format = "pyproject"; - src = pkgs.fetchFromGitHub { - owner = "xonsh"; - repo = "${name}"; - rev = "${version}"; - sha256 = "sha256-R1DCGMrRCJLnz/QMk6QB8ai4nx88vvyPdaCKg3od5/I="; - }; - meta = { - homepage = "https://github.com/xonsh/xontrib-bashisms"; - description = "bashisms for xonsh"; - license = pkgs.lib.licenses.mit; - maintainers = [ ]; - }; - } - ) - ]; + extraPackages = ps: with ps; [ + xonsh.xontribs.xonsh-direnv + pkgs-unstable.xonsh-xontrib.xontrib-abbrevs + pkgs-unstable.xonsh-xontrib.xontrib-fzf-completions + pkgs-unstable.xonsh-xontrib.xontrib-fish-completer + pkgs-unstable.xonsh-xontrib.xontrib-clp + pkgs-unstable.xonsh-xontrib.xontrib-bashisms + ]; }; }; } #end file