Compare commits

..

No commits in common. "afac7e637b71541e101dc9c9393bf67baf83d53d" and "ea0f6262a861b196c66af875637e2ad5805b6dc8" have entirely different histories.

11 changed files with 135 additions and 131 deletions

View file

@ -41,13 +41,11 @@ runs:
$(non_manifest_packages) # > /dev/null
fi
GLOBIGNORE="/usr/share/git-core/**/*"
sudo rm -rf \
/var/lib/docker/ \
"$AGENT_TOOLSDIRECTORY" \
/opt \
/usr/{local,share} &
sudo rm -rf /opt &
sudo rm -rf "$AGENT_TOOLSDIRECTORY" &
sudo rm -rf /var/lib/docker &
sudo rm -rf /usr/{local,share} &
{
sudo swapoff -a
sudo rm -f /mnt/swapfile

View file

@ -8,10 +8,6 @@ on:
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-minimal:
runs-on: ubuntu-latest

View file

@ -215,11 +215,11 @@
"systems": "systems_6"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
@ -246,6 +246,24 @@
"type": "github"
}
},
"flake-utils_7": {
"inputs": {
"systems": "systems_8"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flakey-profile": {
"locked": {
"lastModified": 1712898590,
@ -323,11 +341,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1723224800,
"narHash": "sha256-2b+cECwR+3FL/ikuZnXE94H8bXdlnYUbhmi1KNpD/tc=",
"lastModified": 1723143710,
"narHash": "sha256-qbjodK+UgnQ2YdtKmuI1XEG84SZlid39rQo6Ap9NTqI=",
"ref": "refs/heads/main",
"rev": "8b37e81374928856d8fd859b95a62c8bf4211901",
"revCount": 5073,
"rev": "4b4971c06fb02df00a2bd20b6b47b5d0e7d799a7",
"revCount": 5071,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland/"
@ -516,11 +534,11 @@
"lix": {
"flake": false,
"locked": {
"lastModified": 1723213513,
"narHash": "sha256-XbtSx3sxE6rf/D31fBX9d28CuXnokkbHW6tzOEMVfxw=",
"rev": "346e340cbfe450df3709cf5d51e26ba247a2c1ad",
"lastModified": 1723140921,
"narHash": "sha256-WRt4kYvg6cpnatF5zUCIUeurU67M7b4dk3oYdZ0cu9M=",
"rev": "e03cd8b3a6f70c60f359fd683c2b25f8eba4da0d",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/346e340cbfe450df3709cf5d51e26ba247a2c1ad.tar.gz"
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/e03cd8b3a6f70c60f359fd683c2b25f8eba4da0d.tar.gz"
},
"original": {
"type": "tarball",
@ -697,11 +715,11 @@
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1723206805,
"narHash": "sha256-C75q+dsWnjObUKukRsFj2VKNRtULvZw/XszfGu97PyY=",
"lastModified": 1723137378,
"narHash": "sha256-+MkYW9iZwi0D0hLeS5S1Ov3VNJ3twdTlHW7dRKeiCBY=",
"owner": "nix-community",
"repo": "nixpkgs-wayland",
"rev": "f9b6659b7a856ad5c470ce224a0d69696c6f8c73",
"rev": "b412353cee03010813974408d5ae63f7422b176d",
"type": "github"
},
"original": {
@ -744,11 +762,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1723151389,
"narHash": "sha256-9AVY0ReCmSGXHrlx78+1RrqcDgVSRhHUKDVV1LLBy28=",
"lastModified": 1723019560,
"narHash": "sha256-O/kxmybNecC3Efr6ITOdtCzFv90/B2Iiedavj5aRWt0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "13fe00cb6c75461901f072ae62b5805baef9f8b2",
"rev": "f5129fb42b9c262318130a97b47516946da3e7d7",
"type": "github"
},
"original": {
@ -798,11 +816,11 @@
"pixi-source": "pixi-source"
},
"locked": {
"lastModified": 1723219928,
"narHash": "sha256-QtO96opBSkBNNOdyWhBVIu447rkUqOZAwrYoOy/Jczw=",
"lastModified": 1723049033,
"narHash": "sha256-JMVvLQX+oJ5Gfck419poXJCIKOxWsZGRC23ize6hT6Y=",
"owner": "daylinmorgan",
"repo": "pixi-flake",
"rev": "df14d187eb1cb453f0d6b83c9cdf8441017b9c20",
"rev": "7a3e2a90d0f35170c1a95cc194a3ba81acd5b63d",
"type": "github"
},
"original": {
@ -814,16 +832,16 @@
"pixi-source": {
"flake": false,
"locked": {
"lastModified": 1723208538,
"narHash": "sha256-37zVmPKAWCw58xA5lUb+WVAW8rRwPF7DZVXUZ8bwP5E=",
"lastModified": 1723023748,
"narHash": "sha256-m1qlDxZBEDUMNV+gRX2bbEdvBRp4lJv7C2ZZlEUA5Dg=",
"owner": "prefix-dev",
"repo": "pixi",
"rev": "55741aede8e87f176fd6d99eb26bfd3d026c2b7e",
"rev": "608a65d977b9d87bae71c747f77989ad01c76ada",
"type": "github"
},
"original": {
"owner": "prefix-dev",
"ref": "v0.27.1",
"ref": "v0.27.0",
"repo": "pixi",
"type": "github"
}
@ -868,7 +886,7 @@
"roc": "roc",
"stable": "stable",
"tsm": "tsm",
"zig-overlay": "zig-overlay",
"zig2nix": "zig2nix",
"zls": "zls"
}
},
@ -1018,6 +1036,21 @@
"type": "github"
}
},
"systems_8": {
"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": [
@ -1095,22 +1128,44 @@
"zig-overlay": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_7",
"nixpkgs": [
"zls",
"nixpkgs"
]
},
"locked": {
"lastModified": 1722600600,
"narHash": "sha256-bRpvmyAvt4OFbQJlmAURyW1To8nlRjNcQJdbOyI1MLE=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "4c95bb8378ca31cc06eba0a9ee0c04851221c193",
"type": "github"
},
"original": {
"owner": "mitchellh",
"repo": "zig-overlay",
"type": "github"
}
},
"zig2nix": {
"inputs": {
"flake-utils": "flake-utils_5",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1723205416,
"narHash": "sha256-VF5o0Ogk2PyQSs22aQijjqIC0U3Z4mzjTcrsnhSfQ9U=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "f4d2e3b5855a66a763e49d8030edbb6b852c4b1a",
"lastModified": 1723080195,
"narHash": "sha256-0g2ljOHZZtEZZG9GKusKiNx1+VKm+MEKzCOL2KdkLRg=",
"owner": "Cloudef",
"repo": "zig2nix",
"rev": "7320da37a4d45afb0aa94d22861a0fe07152c038",
"type": "github"
},
"original": {
"owner": "mitchellh",
"repo": "zig-overlay",
"owner": "Cloudef",
"repo": "zig2nix",
"type": "github"
}
},
@ -1122,9 +1177,7 @@
"nixpkgs": [
"nixpkgs"
],
"zig-overlay": [
"zig-overlay"
]
"zig-overlay": "zig-overlay"
},
"locked": {
"lastModified": 1722987529,

View file

@ -21,7 +21,7 @@
hyprland.url = "git+https://github.com/hyprwm/Hyprland/?submodules=1";
hyprland-contrib.url = "github:hyprwm/contrib";
roc.url = "github:roc-lang/roc";
zig-overlay.url = "github:mitchellh/zig-overlay";
zig2nix.url = "github:Cloudef/zig2nix";
zls.url = "github:zigtools/zls";
pixi.url = "github:daylinmorgan/pixi-flake";
@ -36,8 +36,7 @@
roc.inputs.nixpkgs.follows = "nixpkgs";
tsm.inputs.nixpkgs.follows = "nixpkgs";
zls.inputs.nixpkgs.follows = "nixpkgs";
zls.inputs.zig-overlay.follows = "zig-overlay";
zig-overlay.inputs.nixpkgs.follows = "nixpkgs";
zig2nix.inputs.nixpkgs.follows = "nixpkgs";
};
nixConfig = {

View file

@ -2,10 +2,10 @@
inputs,
system,
lib,
self,
}:
let
inherit (lib) flakeFromSystem attrValues;
inherit (builtins) map;
inherit (lib) flakeFromSystem;
flake = flakeFromSystem system;
pkgs = import inputs.nixpkgs {
@ -16,33 +16,35 @@ let
(flake.overlay "nixpkgs-wayland")
];
};
myPackages = map [
"tsm"
"hyprman"
"zls"
] flake.pkg;
hyprPackages = with (flake.pkgs "hyprland"); [
default
xdg-desktop-portal-hyprland
];
# TODO: start using pipes once support lands in nixd
# selfPackages = self.packages.${pkgs.system} |> attrValues;
selfPackages = (attrValues self.packages.${pkgs.system});
in
{
makePackages =
pkgs.runCommandLocal "build-third-party"
{
src = ./.;
nativeBuildInputs =
# packages from overlays
(with pkgs; [
pixi
swww
# nixVersions.git
nixVersions.stable
])
++ [
(flake.pkgs "roc").full
(flake.pkgs "zig-overlay").master
(flake.pkg "zls")
(flake.pkgs "zig2nix").zig.master.bin
]
++ hyprPackages
++ selfPackages;
++ myPackages
++ hyprPackages;
}
''
mkdir "$out"

View file

@ -3,40 +3,22 @@ let
lib = nixpkgs.lib.extend (import ./extended.nix inputs);
inherit (builtins) mapAttrs readDir listToAttrs;
inherit (lib) genAttrs pkgFromSystem pkgsFromSystem;
inherit (lib) genAttrs;
inherit (import ./find-modules.nix { inherit lib; }) findModulesList;
inherit (import ./generators.nix { inherit lib self inputs; }) mkIso mkSystem;
#supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
supportedSystems = [ "x86_64-linux" ];
forAllSystems = f: genAttrs supportedSystems (system: f (import nixpkgs { inherit system; }));
inheritFlakePkgs =
pkgs: flakes:
listToAttrs (
map (name: {
inherit name;
value = pkgFromSystem pkgs.system name;
}) flakes
);
oizysFlake = {
nixosModules = listToAttrs (findModulesList ../modules);
nixosConfigurations = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
packages = forAllSystems (
pkgs:
rec {
default = oizys-cli;
oizys-cli = pkgs.callPackage ../pkgs/oizys { };
iso = mkIso.config.system.build.isoImage;
roc = (pkgsFromSystem pkgs.system "roc").full;
}
// (inheritFlakePkgs pkgs [
"pixi"
"f1multiviewer"
"tsm"
])
);
packages = forAllSystems (pkgs: rec {
iso = mkIso.config.system.build.isoImage;
oizys-go = pkgs.callPackage ../pkgs/oizys { };
default = oizys-go;
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
@ -48,7 +30,7 @@ let
checks = forAllSystems (
pkgs:
import ./checks.nix {
inherit inputs lib self;
inherit inputs lib;
system = pkgs.system;
}
);

View file

@ -9,5 +9,9 @@ let
cfg = config.oizys.languages;
in
{
config = mkIfIn "nushell" cfg { environment.systemPackages = with pkgs; [ nushell ]; };
config = mkIfIn "nushell" cfg {
environment.systemPackages = with pkgs; [
nushell
];
};
}

View file

@ -7,12 +7,14 @@
let
inherit (lib) mkIfIn;
cfg = config.oizys.languages;
zig = (flake.pkgs "zig2nix").zig.master.bin;
zls = (flake.pkg "zls").overrideAttrs { nativeBuildInputs = [ zig ]; };
in
{
config = mkIfIn "zig" cfg {
environment.systemPackages = [
(flake.pkgs "zig-overlay").master
(flake.pkg "zls")
zig
zls
];
};
}

View file

@ -3,7 +3,7 @@
pkgs,
lib,
enabled,
self,
flake,
...
}:
let
@ -15,10 +15,10 @@ in
nixpkgs.config.allowUnfree = true;
# nix.package = pkgs.nixVersions.latest;
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" "pipe-operator"];
use-xdg-base-directories = true;
};
extraOptions = ''
experimental-features = nix-command flakes
use-xdg-base-directories = true
'';
optimise.automatic = true;
gc = {
@ -42,7 +42,7 @@ in
pkgs.nixfmt-rfc-style
pkgs.nix-output-monitor
self.packages.${pkgs.system}.default
(flake.pkg "self")
];
programs.nix-index-database.comma = enabled;

View file

@ -24,7 +24,5 @@ buildGoModule {
installShellCompletion --cmd oizys \
--zsh <(OIZYS_SKIP_CHECK=true $out/bin/oizys completion zsh)
'';
meta = {
description = "nix begat oizys";
};
}

View file

@ -56,10 +56,7 @@ func New() *Oizys {
o.flake = oizysDir
}
o.githubSummary = os.Getenv("GITHUB_STEP_SUMMARY")
if o.githubSummary != "" {
o.inCI = true
log.Debug("running oizys in CI mode")
}
o.inCI = o.githubSummary != ""
o.githubToken = os.Getenv("GITHUB_TOKEN")
o.repo = git.NewRepo(o.flake)
return o
@ -247,35 +244,6 @@ func NixosRebuild(subcmd string, rest ...string) {
e.ExitWithCommand(cmd)
}
func splitDrv(drv string) (string, string) {
s := strings.SplitN(drv, "-", 2)
ss := strings.Split(s[0], "/")
hash := ss[len(ss)-1]
drvName := strings.Replace(s[1], ".drv^*", "", 1)
return drvName, hash
}
func writeDervationsToStepSummary(drvs []string) {
tableRows := make([]string, len(drvs))
for i, drv := range drvs {
name, hash := splitDrv(drv)
tableRows[i] = fmt.Sprintf(
"| %s | %s |",
name, hash,
)
}
o.writeToGithubStepSummary(
fmt.Sprintf(`# Building Derivations
| derivation | hash |
|---|---|
%s
`,
strings.Join(tableRows, "\n"),
),
)
}
func NixBuild(minimal bool, rest ...string) {
cmd := exec.Command("nix", "build")
if o.resetCache {
@ -289,7 +257,9 @@ func NixBuild(minimal bool, rest ...string) {
os.Exit(0)
}
if o.inCI {
writeDervationsToStepSummary(drvs)
o.writeToGithubStepSummary("# Building Derivations:\n")
// TODO: write as a markdown table with hash + name (without .drv)
o.writeToGithubStepSummary(strings.Join(drvs, "\n"))
}
cmd.Args = append(cmd.Args, append(drvs, "--no-link")...)
}