This commit is contained in:
Jana Dönszelmann 2026-01-05 14:41:17 +01:00
parent 29ffaf7359
commit 39f102602d
No known key found for this signature in database
3 changed files with 117 additions and 46 deletions

83
flake.lock generated
View file

@ -389,6 +389,24 @@
"inputs": { "inputs": {
"systems": "systems_10" "systems": "systems_10"
}, },
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_8": {
"inputs": {
"systems": "systems_11"
},
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
@ -403,9 +421,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_8": { "flake-utils_9": {
"inputs": { "inputs": {
"systems": "systems_11" "systems": "systems_12"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1710146030,
@ -837,6 +855,22 @@
} }
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": {
"lastModified": 1767379071,
"narHash": "sha256-EgE0pxsrW9jp9YFMkHL9JMXxcqi/OoumPJYwf+Okucw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fb7944c166a3b630f177938e478f0378e64ce108",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1722062969, "lastModified": 1722062969,
"narHash": "sha256-QOS0ykELUmPbrrUGmegAUlpmUFznDQeR4q7rFhl8eQg=", "narHash": "sha256-QOS0ykELUmPbrrUGmegAUlpmUFznDQeR4q7rFhl8eQg=",
@ -852,7 +886,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_6": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1710377395, "lastModified": 1710377395,
"narHash": "sha256-KMubsUWtVr7L55pXMBibBDBdmk3xrjbBPduc0E8z28c=", "narHash": "sha256-KMubsUWtVr7L55pXMBibBDBdmk3xrjbBPduc0E8z28c=",
@ -967,6 +1001,25 @@
"type": "github" "type": "github"
} }
}, },
"pipethon": {
"inputs": {
"flake-utils": "flake-utils_7",
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1767620081,
"narHash": "sha256-dUV88Imqgv0qsLbHUoDinzm+JAfSNKxfkozwBO8BqsQ=",
"ref": "refs/heads/main",
"rev": "290582a3463260181697a1e9f7cf9e490f8e8ed6",
"revCount": 2,
"type": "git",
"url": "ssh://forgejo@git.donsz.nl/jana/pipethon.git"
},
"original": {
"type": "git",
"url": "ssh://forgejo@git.donsz.nl/jana/pipethon.git"
}
},
"ragenix": { "ragenix": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
@ -1030,12 +1083,12 @@
"inputs": { "inputs": {
"agenix": "agenix_2", "agenix": "agenix_2",
"darwin": "darwin_2", "darwin": "darwin_2",
"flake-utils": "flake-utils_7", "flake-utils": "flake-utils_8",
"home-manager": "home-manager_4", "home-manager": "home-manager_4",
"impermanence": "impermanence", "impermanence": "impermanence",
"nix-index-database": "nix-index-database_2", "nix-index-database": "nix-index-database_2",
"nixos-hardware": "nixos-hardware_2", "nixos-hardware": "nixos-hardware_2",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_6",
"ragenix": "ragenix_2" "ragenix": "ragenix_2"
}, },
"locked": { "locked": {
@ -1064,6 +1117,7 @@
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"nixvim": "nixvim", "nixvim": "nixvim",
"p1n3appl3": "p1n3appl3", "p1n3appl3": "p1n3appl3",
"pipethon": "pipethon",
"rahul-config": "rahul-config", "rahul-config": "rahul-config",
"t": "t" "t": "t"
} }
@ -1211,6 +1265,21 @@
"type": "github" "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": { "systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@ -1333,8 +1402,8 @@
}, },
"t": { "t": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_8", "flake-utils": "flake-utils_9",
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_7"
}, },
"locked": { "locked": {
"lastModified": 1710410762, "lastModified": 1710410762,

View file

@ -42,19 +42,22 @@
}; };
nixgl.url = "github:nix-community/nixGL"; nixgl.url = "github:nix-community/nixGL";
pipethon.url = "git+ssh://forgejo@git.donsz.nl/jana/pipethon.git";
}; };
outputs = outputs =
{ home-manager {
, nixpkgs home-manager,
, flake-utils nixpkgs,
, nixvim flake-utils,
, t nixvim,
, dumpasm t,
, jujutsu dumpasm,
, nixgl jujutsu,
, cosmic-manager nixgl,
, ... cosmic-manager,
pipethon,
...
}@inputs: }@inputs:
let let
homeManagerModules = [ nixvim.homeManagerModules.nixvim ]; homeManagerModules = [ nixvim.homeManagerModules.nixvim ];
@ -71,6 +74,7 @@
t = t.packages.${system}.default; t = t.packages.${system}.default;
inherit (dumpasm.packages.${system}) dumpasm; inherit (dumpasm.packages.${system}) dumpasm;
inherit (jujutsu.packages.${system}) jujutsu; inherit (jujutsu.packages.${system}) jujutsu;
pipethon = pipethon.packages.${system}.python;
}; };
p1n3appl3 = inputs.p1n3appl3.packages.${system}; p1n3appl3 = inputs.p1n3appl3.packages.${system};
}) })
@ -80,13 +84,12 @@
root: args: root: args:
home-manager.lib.homeManagerConfiguration ( home-manager.lib.homeManagerConfiguration (
{ {
modules = modules = [
[ cosmic-manager.homeManagerModules.cosmic-manager
cosmic-manager.homeManagerModules.cosmic-manager root
root ]
] ++ homeManagerModules
++ homeManagerModules ++ (args.modules or [ ]);
++ (args.modules or [ ]);
pkgs = pkgsForSystem (args.system or "x86_64-linux"); pkgs = pkgsForSystem (args.system or "x86_64-linux");
} }
// { // {
@ -94,29 +97,28 @@
} }
); );
in in
flake-utils.lib.eachDefaultSystem flake-utils.lib.eachDefaultSystem (system: rec {
(system: rec { formatter = legacyPackages.nixfmt-classic;
formatter = legacyPackages.nixfmt-classic; legacyPackages = pkgsForSystem system;
legacyPackages = pkgsForSystem system; pkgs = legacyPackages;
pkgs = legacyPackages; devShells.default = pkgs.mkShell {
devShells.default = pkgs.mkShell { buildInputs = with pkgs; [
buildInputs = with pkgs; [ (pkgs.writeShellScriptBin "fast-repl" ''
(pkgs.writeShellScriptBin "fast-repl" '' source /etc/set-environment
source /etc/set-environment nix repl --file "${./.}/repl.nix" $@
nix repl --file "${./.}/repl.nix" $@ '')
'')
(pkgs.writeShellScriptBin "apply-home" '' (pkgs.writeShellScriptBin "apply-home" ''
export NIX_BUILD_CORES=$(($(nproc) * 2)) export NIX_BUILD_CORES=$(($(nproc) * 2))
nix run .#home-manager -- switch --flake .#$@ -j $(nproc) --cores $(nproc) nix run .#home-manager -- switch --flake .#$@ -j $(nproc) --cores $(nproc)
'') '')
(pkgs.writeShellScriptBin "apply" '' (pkgs.writeShellScriptBin "apply" ''
apply-home $(hostname -f) apply-home $(hostname -f)
'') '')
]; ];
}; };
}) })
// { // {
homeConfigurations = { homeConfigurations = {

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
calc = "${pkgs.python313}/bin/python -i ${pkgs.writeText "init.py" '' calc = "${pkgs.custom.pipethon}/bin/python -i ${pkgs.writeText "init.py" ''
import sys import sys
sys.path.append("${../../scriptlib}") sys.path.append("${../../scriptlib}")
sys.path.append("${pkgs.python313Packages.numpy}/lib/python3.13/site-packages/") sys.path.append("${pkgs.python313Packages.numpy}/lib/python3.13/site-packages/")