mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-30 12:10:43 -06:00
Compare commits
18 commits
4808169e87
...
fa1253baa5
Author | SHA1 | Date | |
---|---|---|---|
|
fa1253baa5 | ||
ad24ee33d9 | |||
a9235fef86 | |||
9b686cc202 | |||
00550108b1 | |||
13401e38f4 | |||
409fb6a016 | |||
92bc73b255 | |||
b33633cd3c | |||
6ad1950f5e | |||
c26350a67f | |||
dfb825e72d | |||
7bd5e95612 | |||
38d3219ad4 | |||
a67cd9d0ed | |||
8ceae1884b | |||
ba0c40c2f5 | |||
2240cc0af4 |
18 changed files with 154 additions and 161 deletions
101
flake.lock
101
flake.lock
|
@ -18,6 +18,7 @@
|
|||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixpkgs-wayland",
|
||||
"nix-eval-jobs",
|
||||
"nixpkgs"
|
||||
]
|
||||
|
@ -41,11 +42,11 @@
|
|||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709126324,
|
||||
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -67,11 +68,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709942067,
|
||||
"narHash": "sha256-DGU4zQDwIx6pXM6oHdA+89UU/QjqE05HiXOvigECJjI=",
|
||||
"lastModified": 1710257359,
|
||||
"narHash": "sha256-43re5pzE/cswFAgw92/ugsB3+d5ufDaCcLtl9ztKfBo=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprcursor",
|
||||
"rev": "a2233d4a2a58233457712acfd88d10a2a8a85711",
|
||||
"rev": "1761f6cefd77f4fcd2039d930c88d6716ddc4974",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -93,11 +94,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710026388,
|
||||
"narHash": "sha256-Z/ReJhaauOe+uThHB1LJ/3tJOnNxdYybS72Z8gkRWT8=",
|
||||
"lastModified": 1710634512,
|
||||
"narHash": "sha256-dqYzqSsGB9PhwxG2H3oVRpqAMWziVuQ7k+02ASku8T4=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "335506d5557b91a0baf974750c353443841e691b",
|
||||
"rev": "0387528c56c4d9faf93946cbc9426973de6ef61b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -114,11 +115,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709391291,
|
||||
"narHash": "sha256-NJwAgXRKLVuO3YLkGxXIanLvTKN+cJsYwbLoWOa7ODk=",
|
||||
"lastModified": 1710415616,
|
||||
"narHash": "sha256-1qVByzzCcKoCmP8ReUSAjKU5V9pfTLHQIM4WI1tvQ9E=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "contrib",
|
||||
"rev": "2d4ece4a008feefddc194bde785b1d39f987b5a7",
|
||||
"rev": "75420d09f93346d9d23d5a1e26b42699f6b66cd6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -206,11 +207,11 @@
|
|||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709467759,
|
||||
"narHash": "sha256-ojIpNROGKk56wyvpMAlBVor3CvPez3pFMORrocxW4io=",
|
||||
"lastModified": 1710184940,
|
||||
"narHash": "sha256-FzYm4td3FJfzOAuEkCXt3KdUgZuA072OAQXqIq+IAMo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "lib-aggregate",
|
||||
"rev": "206e40afdc468d0658e30e1644e2473dc6285cf2",
|
||||
"rev": "45b75bf534592c0c1c881a1c447f7fdb37a87eaf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -223,9 +224,7 @@
|
|||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nix-github-actions": "nix-github-actions",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -245,6 +244,7 @@
|
|||
"nix-github-actions": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs-wayland",
|
||||
"nix-eval-jobs",
|
||||
"nixpkgs"
|
||||
]
|
||||
|
@ -270,11 +270,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709906691,
|
||||
"narHash": "sha256-206XMy1NGW42bnHukJl5W2F90yHNoJc7+H3i+/8i2Pg=",
|
||||
"lastModified": 1710120787,
|
||||
"narHash": "sha256-tlLuB73OCOKtU2j83bQzSYFyzjJo3rjpITZE5MoofG8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "2ad5ebce1e1be47a8cf330d85265ac09ffa15178",
|
||||
"rev": "e76ff2df6bfd2abe06abd8e7b9f217df941c1b07",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -285,11 +285,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1709968316,
|
||||
"narHash": "sha256-4rZEtEDT6jcgRaqxsatBeds7x1PoEiEjb6QNGb4mNrk=",
|
||||
"lastModified": 1710534455,
|
||||
"narHash": "sha256-huQT4Xs0y4EeFKn2BTBVYgEwJSv8SDlm82uWgMnCMmI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0e7f98a5f30166cbed344569426850b21e4091d4",
|
||||
"rev": "9af9c1c87ed3e3ed271934cb896e0cdd33dae212",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -301,11 +301,11 @@
|
|||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1709426687,
|
||||
"narHash": "sha256-jLBZmwXf0WYHzLkmEMq33bqhX55YtT5edvluFr0RcSA=",
|
||||
"lastModified": 1710031547,
|
||||
"narHash": "sha256-pkUg3hOKuGWMGF9WEMPPN/G4pqqdbNGJQ54yhyQYDVY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "7873d84a89ae6e4841528ff7f5697ddcb5bdfe6c",
|
||||
"rev": "630ebdc047ca96d8126e16bb664c7730dc52f6e6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -318,19 +318,17 @@
|
|||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"lib-aggregate": "lib-aggregate",
|
||||
"nix-eval-jobs": [
|
||||
"nix-eval-jobs"
|
||||
],
|
||||
"nix-eval-jobs": "nix-eval-jobs",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709990107,
|
||||
"narHash": "sha256-fuAqFR/lGwKOxMw7wCK7xzUv/JhS8v9bdNQJ9KCE5HQ=",
|
||||
"lastModified": 1710631003,
|
||||
"narHash": "sha256-6bOCj2BUwOYDO1Lq3DgwIfrdUiieKkm1fCHFQRkLK4Y=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs-wayland",
|
||||
"rev": "c737af27135864461e68214f7bbe9222f7d859fb",
|
||||
"rev": "bce941770aa96005f08c7b60851037352bf76156",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -339,6 +337,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1703134684,
|
||||
"narHash": "sha256-SQmng1EnBFLzS7WSRyPM9HgmZP2kLJcPAz+Ug/nug6o=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d6863cbcbbb80e71cecfc03356db1cda38919523",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pinix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -363,11 +377,27 @@
|
|||
"inputs": {
|
||||
"hyprland": "hyprland",
|
||||
"hyprland-contrib": "hyprland-contrib",
|
||||
"nix-eval-jobs": "nix-eval-jobs",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-wayland": "nixpkgs-wayland",
|
||||
"pinix": "pinix"
|
||||
"pinix": "pinix",
|
||||
"stable": "stable"
|
||||
}
|
||||
},
|
||||
"stable": {
|
||||
"locked": {
|
||||
"lastModified": 1710420202,
|
||||
"narHash": "sha256-MvFKESbq4rUWuaf2RKPNYENaSZEw/jaCLo2gU6oREcM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "878ef7d9721bee9f81f8a80819f9211ad1f993da",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
@ -418,6 +448,7 @@
|
|||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs-wayland",
|
||||
"nix-eval-jobs",
|
||||
"nixpkgs"
|
||||
]
|
||||
|
|
13
flake.nix
13
flake.nix
|
@ -9,21 +9,14 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
|
||||
hyprland.url = "github:hyprwm/Hyprland/main";
|
||||
hyprland.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
hyprland-contrib.url = "github:hyprwm/contrib";
|
||||
hyprland-contrib.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nixpkgs-wayland = {
|
||||
url = "github:nix-community/nixpkgs-wayland";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nix-eval-jobs.follows = "nix-eval-jobs";
|
||||
};
|
||||
|
||||
nix-eval-jobs.url = "github:nix-community/nix-eval-jobs";
|
||||
nix-eval-jobs.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
||||
nixpkgs-wayland.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
pinix.url = "github:remi-dupre/pinix";
|
||||
pinix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
}: {
|
||||
imports = with self.nixosModules; [
|
||||
nix-ld
|
||||
virtualbox
|
||||
restic
|
||||
docker
|
||||
];
|
||||
|
||||
oizys = {
|
||||
vbox.enable = true;
|
||||
desktop.enable = true;
|
||||
vpn.enable = true;
|
||||
languages = [
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot.consoleMode = "max";
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
lib = nixpkgs.lib.extend (import ./extended.nix);
|
||||
|
||||
inherit (builtins) concatLists attrValues mapAttrs elemAt match readDir filter listToAttrs;
|
||||
inherit (lib) hasSuffix nixosSystem genAttrs isNixFile;
|
||||
inherit (lib) nixosSystem genAttrs isNixFile;
|
||||
inherit (lib.filesystem) listFilesRecursive;
|
||||
|
||||
#supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
||||
|
|
|
@ -2,7 +2,6 @@ final: prev: let
|
|||
inherit (final) hasSuffix;
|
||||
runes = import ../modules/runes;
|
||||
in {
|
||||
|
||||
isNixFile = path: hasSuffix ".nix" path;
|
||||
mkIfIn = name: list: prev.mkIf (builtins.elem name list);
|
||||
mkRune = {
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
qtile
|
||||
hyprland
|
||||
|
||||
virtualbox
|
||||
|
||||
gui
|
||||
|
||||
languages
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
vim
|
||||
neovim
|
||||
|
||||
nixd
|
||||
# nixd
|
||||
tree-sitter
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOption types literalExpression mdDoc;
|
||||
cfg = config.oizys.languages;
|
||||
in {
|
||||
imports = [./nim.nix ./tex.nix ./misc.nix ./node.nix ./python.nix];
|
||||
options.oizys.languages = mkOption {
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
}: let
|
||||
inherit (lib) mkIfIn;
|
||||
cfg = config.oizys.languages;
|
||||
pixi = pkgs.callPackage ../../pkgs/pixi.nix {};
|
||||
in {
|
||||
config = mkIfIn "python" cfg {
|
||||
environment.systemPackages = let
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkIfIn;
|
||||
inherit (lib) mkIfIn;
|
||||
cfg = config.oizys.languages;
|
||||
in {
|
||||
config = mkIfIn "tex" cfg {
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nil
|
||||
alejandra
|
||||
|
||||
self.packages.${pkgs.system}.oizys
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
{...}: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.oizys.vbox;
|
||||
in {
|
||||
options.oizys.vbox.enable = mkEnableOption "enable virtualbox host";
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation.virtualbox = {
|
||||
host.enable = true;
|
||||
# guest.enable = true;
|
||||
};
|
||||
users.extraGroups.vboxusers.members = ["daylin"];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,23 +1,38 @@
|
|||
import std/[os, osproc, parseopt, times, strutils, terminal]
|
||||
import std/[macros, os, osproc, parseopt, times, strformat, strutils, terminal]
|
||||
from std/nativesockets import getHostname
|
||||
|
||||
let summaryFile = getEnv("GITHUB_STEP_SUMMARY")
|
||||
|
||||
proc info(args: varargs[string, `$`]) =
|
||||
macro doc(procedure: typed): untyped =
|
||||
## extract documenatation comments from procedure
|
||||
procedure.expectKind(nnkSym)
|
||||
if procedure.symKind != nskProc:
|
||||
error("procedure expected", procedure)
|
||||
let
|
||||
impl = procedure.getImpl
|
||||
docs = impl.body.extractDocCommentsAndRunnables
|
||||
var doc: string
|
||||
for element in docs:
|
||||
if element.kind == nnkCommentStmt:
|
||||
doc.addSep("\n", startLen = 1)
|
||||
doc.add($element)
|
||||
result = newLit(doc)
|
||||
|
||||
proc logInfo(args: varargs[string, `$`]) =
|
||||
stdout.styledWriteLine(
|
||||
fgCyan, "oizys", resetStyle, "|",
|
||||
styleDim, "INFO", resetStyle, "| ",
|
||||
args.join("")
|
||||
)
|
||||
|
||||
proc error(args: varargs[string, `$`]) =
|
||||
proc logErr(args: varargs[string, `$`]) =
|
||||
stdout.styledWriteLine(
|
||||
fgCyan, "oizys", resetStyle, "|",
|
||||
fgRed, "ERROR", resetStyle, "| ",
|
||||
args.join("")
|
||||
)
|
||||
|
||||
proc warn(args: varargs[string, `$`]) =
|
||||
proc logWarn(args: varargs[string, `$`]) =
|
||||
stdout.styledWriteLine(
|
||||
fgCyan, "oizys", resetStyle, "|",
|
||||
fgYellow, "WARN", resetStyle, "| ",
|
||||
|
@ -34,7 +49,7 @@ type
|
|||
|
||||
proc execQuit(c: OizysContext, args: varargs[string]) =
|
||||
let cmd = (@args & c.extraArgs).join(" ")
|
||||
info "exec: ", cmd
|
||||
logInfo "exec: ", cmd
|
||||
quit (execCmd cmd)
|
||||
|
||||
proc newCtx(): OizysContext =
|
||||
|
@ -44,11 +59,11 @@ proc newCtx(): OizysContext =
|
|||
|
||||
proc check(c: OizysContext) =
|
||||
if not dirExists c.flake:
|
||||
error c.flake, " does not exist"
|
||||
error "please use -f/--flake or $FLAKE_PATH"
|
||||
logErr c.flake, "does not exist"
|
||||
logErr "please use -f/--flake or $FLAKE_PATH"
|
||||
quit 1
|
||||
info "flake: ", c.flake
|
||||
info "host: ", c.host
|
||||
logInfo "flake:", c.flake
|
||||
logInfo "host:", c.host
|
||||
|
||||
proc cmd(c: OizysContext): string {.inline.} =
|
||||
let pixExists = findExe("pix") != ""
|
||||
|
@ -56,7 +71,7 @@ proc cmd(c: OizysContext): string {.inline.} =
|
|||
if pixExists:
|
||||
return "pix"
|
||||
else:
|
||||
warn "pinix not found, falling back to nix"
|
||||
logWarn "pinix not found, falling back to nix"
|
||||
return "nix"
|
||||
|
||||
proc systemFlakePath(c: OizysContext): string =
|
||||
|
@ -71,6 +86,7 @@ proc dry(c: OizysContext) =
|
|||
execQuit c, c.cmd, "build", c.systemFlakePath, "--dry-run"
|
||||
|
||||
proc cache(c: OizysContext) =
|
||||
## build and push to cachix
|
||||
let start = now()
|
||||
let code = execCmd """
|
||||
cachix watch-exec """ & c.cache & """ \
|
||||
|
@ -79,16 +95,18 @@ proc cache(c: OizysContext) =
|
|||
--print-build-logs \
|
||||
--accept-flake-config
|
||||
"""
|
||||
|
||||
let duration = (now() - start)
|
||||
if code != 0:
|
||||
error "faile to build configuration for: ", c.host
|
||||
logErr "failed to build configuration for: ", c.host
|
||||
quit code
|
||||
|
||||
if summaryFile != "":
|
||||
writeFile(
|
||||
summaryFile,
|
||||
"Built host: " & c.host & " in " & $duration & " seconds"
|
||||
)
|
||||
info "Built host: " & c.host & " in " & $duration & " seconds"
|
||||
logInfo "Built host: " & c.host & " in " & $duration & " seconds"
|
||||
|
||||
|
||||
proc nixosRebuild(c: OizysContext, subcmd: string) =
|
||||
|
@ -103,15 +121,20 @@ proc switch(c: OizysContext) =
|
|||
## nixos rebuild switch
|
||||
nixosRebuild c, "switch"
|
||||
|
||||
const usage = """
|
||||
proc path(c: OizysContext) =
|
||||
## print nix flake output
|
||||
echo c.systemFlakePath
|
||||
|
||||
const usage = fmt"""
|
||||
oizys <cmd> [opts]
|
||||
|
||||
commands:
|
||||
dry poor man's nix flake check
|
||||
boot nixos-rebuild boot
|
||||
switch nixos-rebuild switch
|
||||
cache build and push to cachix
|
||||
build build system flake
|
||||
dry {dry.doc}
|
||||
boot {boot.doc}
|
||||
switch {switch.doc}
|
||||
cache {cache.doc}
|
||||
build {build.doc}
|
||||
path {path.doc}
|
||||
|
||||
options:
|
||||
-h|--help show this help
|
||||
|
@ -129,8 +152,9 @@ proc runCmd(c: OizysContext, cmd: string) =
|
|||
of "boot": boot c
|
||||
of "cache": cache c
|
||||
of "build": build c
|
||||
of "path": path c
|
||||
else:
|
||||
error "unknown command: ", cmd
|
||||
logErr "unknown command: ", cmd
|
||||
echo usage
|
||||
quit 1
|
||||
|
||||
|
@ -159,11 +183,9 @@ when isMainModule:
|
|||
for kind, key, val in p.getopt():
|
||||
case kind
|
||||
of cmdArgument:
|
||||
echo key
|
||||
subcmd = key
|
||||
of cmdLongOption, cmdShortOption:
|
||||
if key == "":
|
||||
break
|
||||
if key == "": break
|
||||
parseFlag c, kind, key, val
|
||||
of cmdEnd:
|
||||
discard
|
||||
|
|
|
@ -10,5 +10,16 @@
|
|||
(f: f != "default.nix")
|
||||
(builtins.attrNames (builtins.readDir ./.)));
|
||||
in {
|
||||
nixpkgs.overlays = defaultOverlays;
|
||||
nixpkgs.overlays =
|
||||
defaultOverlays
|
||||
++ [
|
||||
(
|
||||
final: _prev: {
|
||||
stable = import inputs.stable {
|
||||
system = final.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
{...}: (final: prev: {
|
||||
nimble = prev.nimble.overrideNimAttrs {
|
||||
version = "0.14.2-f74bf2";
|
||||
version = "0.14.2-5e7901760e89108476a4e21976a0ef783403e8fe";
|
||||
requiredNimVersion = 2;
|
||||
buildInputs = [prev.pkgs.openssl];
|
||||
|
||||
src = final.fetchFromGitHub {
|
||||
owner = "nim-lang";
|
||||
repo = "nimble";
|
||||
# more recent commit
|
||||
rev = "f74bf2bc388f7a0154104b4bcaa093a499d3f0f7";
|
||||
|
||||
# most recent commit 2024-03-11
|
||||
rev = "5e7901760e89108476a4e21976a0ef783403e8fe";
|
||||
hash = "sha256-8b5yKvEl7c7wA/8cpdaN2CSvawQJzuRce6mULj3z/mI=";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, openssl
|
||||
, installShellFiles
|
||||
, darwin
|
||||
, testers
|
||||
, pixi
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "pixi";
|
||||
version = "0.15.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "prefix-dev";
|
||||
repo = "pixi";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-bh8Uu6Q2AND50Qzivc6k1Z8JWudkHC2i4YW1Hxa69SM=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-yMIcPwnuN7F2ZrOtJw8T+nxeSzLsYn+iC34bYeWpi/w=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
]
|
||||
++ lib.optionals stdenv.isDarwin (
|
||||
with darwin.apple_sdk_11_0.frameworks; [ CoreFoundation IOKit SystemConfiguration Security ]
|
||||
);
|
||||
|
||||
# There are some CI failures with Rattler. Tests on Aarch64 has been skipped.
|
||||
# See https://github.com/prefix-dev/pixi/pull/241.
|
||||
doCheck = !stdenv.isAarch64;
|
||||
|
||||
preCheck = ''
|
||||
export HOME="$(mktemp -d)"
|
||||
'';
|
||||
|
||||
checkFlags = [
|
||||
# Skip tests requiring network
|
||||
"--skip=add_channel"
|
||||
"--skip=add_functionality"
|
||||
"--skip=add_functionality_os"
|
||||
"--skip=add_functionality_union"
|
||||
"--skip=add_pypi_functionality"
|
||||
"--skip=test_alias"
|
||||
"--skip=test_cwd"
|
||||
"--skip=test_incremental_lock_file"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd pix \
|
||||
--bash <($out/bin/pixi completion --shell bash) \
|
||||
--fish <($out/bin/pixi completion --shell fish) \
|
||||
--zsh <($out/bin/pixi completion --shell zsh)
|
||||
'';
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = pixi;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Package management made easy";
|
||||
homepage = "https://pixi.sh/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ aaronjheng edmundmiller ];
|
||||
mainProgram = "pixi";
|
||||
};
|
||||
}
|
3
todo.md
3
todo.md
|
@ -4,4 +4,7 @@
|
|||
- [ ] trackdown wezterm bug... (try building from flake?)
|
||||
> https://github.com/wez/wezterm/issues/5067
|
||||
|
||||
- [ ] Check if vivaldi-ffmpeg-codecs are out of date
|
||||
https://forum.vivaldi.net/topic/88884/page-crash-due-to-read-out-of-range-on-nixos/12
|
||||
|
||||
<!-- generated with <3 by daylinmorgan/todo -->
|
||||
|
|
Loading…
Reference in a new issue