Compare commits

..

12 commits

14 changed files with 256 additions and 150 deletions

View file

@ -41,4 +41,3 @@ runs:
- name: "Show Nix Info"
shell: bash
run: nix run "nixpkgs#nix-info" -- -m

View file

@ -54,6 +54,21 @@
"type": "github"
}
},
"crane": {
"locked": {
"lastModified": 1736898272,
"narHash": "sha256-D10wlrU/HCpSRcb3a7yk+bU3ggpMD1kGbseKtO+7teo=",
"owner": "ipetkov",
"repo": "crane",
"rev": "6a589f034202a7c6e10bce6c5d1d392d7bc0f340",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"f1multiviewer": {
"inputs": {
"nixpkgs": [
@ -74,18 +89,24 @@
"type": "github"
}
},
"flake-compat": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"lix-attic",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"lastModified": 1736143030,
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
@ -107,24 +128,6 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
},
"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"
}
},
"flakey-profile": {
"locked": {
"lastModified": 1712898590,
@ -437,9 +440,7 @@
"flake-utils": [
"flake-utils"
],
"nixpkgs-lib": [
"nixpkgs-lib"
]
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1736684024,
@ -458,38 +459,69 @@
"lix": {
"flake": false,
"locked": {
"lastModified": 1737086202,
"narHash": "sha256-33tcNERQt1R7tr/W7pvQj8R6NJktyTOKMIfY16RHLK8=",
"rev": "0d14c2b67a407825e3427bf079b31de069d9653a",
"lastModified": 1737234286,
"narHash": "sha256-CCKIAE84dzkrnlxJCKFyffAxP3yfsOAbdvydUGqq24g=",
"rev": "2837da71ec1588c1187d2e554719b15904a46c8b",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/0d14c2b67a407825e3427bf079b31de069d9653a.tar.gz?rev=0d14c2b67a407825e3427bf079b31de069d9653a"
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/2837da71ec1588c1187d2e554719b15904a46c8b.tar.gz?rev=2837da71ec1588c1187d2e554719b15904a46c8b"
},
"original": {
"type": "tarball",
"url": "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"
"url": "https://git.lix.systems/lix-project/lix/archive/2.92.0.tar.gz"
}
},
"lix-attic": {
"inputs": {
"crane": "crane",
"flake-parts": "flake-parts",
"lix": [
"lix-module",
"lix"
],
"lix-module": [
"lix-module"
],
"nix-github-actions": [],
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1736969694,
"narHash": "sha256-4OKeL5HbDNDKl1JgRH97HCe/QQjhLGB4pjxxYr5PTFc=",
"ref": "refs/heads/main",
"rev": "d413a74fa132cf5f421732dc7dd5cadda96fb874",
"revCount": 361,
"type": "git",
"url": "https://git.lix.systems/nrabulinski/attic.git"
},
"original": {
"type": "git",
"url": "https://git.lix.systems/nrabulinski/attic.git"
}
},
"lix-module": {
"inputs": {
"flake-utils": "flake-utils_2",
"flakey-profile": "flakey-profile",
"lix": [
"lix"
"flake-utils": [
"flake-utils"
],
"flakey-profile": "flakey-profile",
"lix": "lix",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1733522213,
"narHash": "sha256-H+Pk19MzvI/TAbXWimUPZAoKkD56OSyxJBm8lVIA5n0=",
"rev": "c374ebf5548c7b6d4bf884369a5b6879cfc916ea",
"lastModified": 1737237494,
"narHash": "sha256-YMLrcBpf0TR5r/eaqm8lxzFPap2TxCor0ZGcK3a7+b8=",
"rev": "b90bf629bbd835e61f1317b99e12f8c831017006",
"type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/c374ebf5548c7b6d4bf884369a5b6879cfc916ea.tar.gz?rev=c374ebf5548c7b6d4bf884369a5b6879cfc916ea"
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/b90bf629bbd835e61f1317b99e12f8c831017006.tar.gz?rev=b90bf629bbd835e61f1317b99e12f8c831017006"
},
"original": {
"type": "tarball",
"url": "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz"
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0.tar.gz"
}
},
"my-nixpkgs": {
@ -550,9 +582,7 @@
},
"nixos-wsl": {
"inputs": {
"flake-compat": [
"flake-compat"
],
"flake-compat": [],
"nixpkgs": [
"nixpkgs"
]
@ -573,21 +603,36 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1736012469,
"narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=",
"lastModified": 1736883708,
"narHash": "sha256-uQ+NQ0/xYU0N1CnXsa2zghgNaOPxWpMJXSUJJ9W7140=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d",
"rev": "eb62e6aa39ea67e0b8018ba8ea077efe65807dc8",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1737248590,
"narHash": "sha256-6SWtDeYJS3bS7QyJrGKyd6FpROEN0JCMgakSX8yPbyA=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "977f49fd8cf854416f82987696784717acd6e817",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-lib_2": {
"locked": {
"lastModified": 1736643958,
"narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=",
@ -602,6 +647,22 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1735563628,
"narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-wayland": {
"inputs": {
"flake-compat": [],
@ -651,21 +712,20 @@
"inputs": {
"NixVirt": "NixVirt",
"f1multiviewer": "f1multiviewer",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"hyprland": "hyprland",
"hyprland-contrib": "hyprland-contrib",
"hyprman": "hyprman",
"jj": "jj",
"lib-aggregate": "lib-aggregate",
"lix": "lix",
"lix-attic": "lix-attic",
"lix-module": "lix-module",
"my-nixpkgs": "my-nixpkgs",
"nim2nix": "nim2nix",
"nix-index-database": "nix-index-database",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs",
"nixpkgs-lib": "nixpkgs-lib",
"nixpkgs-lib": "nixpkgs-lib_2",
"nixpkgs-wayland": "nixpkgs-wayland",
"pixi": "pixi",
"sops-nix": "sops-nix",
@ -762,21 +822,6 @@
"type": "github"
}
},
"systems_3": {
"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": [

View file

@ -4,28 +4,26 @@
outputs = inputs: (import ./lib inputs).oizysFlake;
inputs = {
# nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/8f3e1f807051e32d8c95cd12b9b421623850a34d";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
stable.url = "github:nixos/nixpkgs/nixos-24.05";
my-nixpkgs.url = "github:daylinmorgan/nixpkgs/nixos-unstable";
lix = {
url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
flake = false;
};
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
inputs.lix.follows = "lix";
};
# lix is failing to build only on GHA?
# keep for when lix breaks :/
# lix-module = {
# url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-1.tar.gz";
# inputs.nixpkgs.follows = "nixpkgs";
# inputs.flake-utils.follows = "flake-utils";
# lix = {
# url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
# flake = false;
# };
# lix-module = {
# url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
# inputs.nixpkgs.follows = "nixpkgs";
# inputs.lix.follows = "lix";
# };
#
# keep for when lix breaks :/
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
sops-nix = {
url = "github:Mic92/sops-nix";
@ -45,15 +43,13 @@
nixos-wsl = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-compat.follows = "flake-compat";
};
hyprland = {
url = "git+https://github.com/hyprwm/Hyprland/?submodules=1";
inputs.nixpkgs.follows = "nixpkgs";
# inputs.systems.follows = "systems";
inputs.pre-commit-hooks.follows = "";
};
hyprland-contrib = {
url = "github:hyprwm/contrib";
inputs.nixpkgs.follows = "nixpkgs";
@ -61,11 +57,7 @@
nixpkgs-wayland = {
url = "github:nix-community/nixpkgs-wayland";
# breaks their cache...
inputs.nixpkgs.follows = "nixpkgs";
inputs.lib-aggregate.follows = "lib-aggregate";
inputs.nix-eval-jobs.follows = "";
inputs.flake-compat.follows = "";
};
f1multiviewer = {
@ -105,7 +97,6 @@
jj = {
url = "github:martinvonz/jj/v0.25.0";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
NixVirt = {
@ -114,21 +105,14 @@
inputs.nixpkgs.follows = "nixpkgs";
};
# included to reduce flake.lock size
flake-utils = {
url = "github:numtide/flake-utils";
lix-attic = {
url = "git+https://git.lix.systems/nrabulinski/attic.git";
inputs.nixpkgs.follows = "nixpkgs";
inputs.lix-module.follows = "lix-module";
# make lix-module source of truth
inputs.lix.follows = "lix-module/lix";
};
flake-compat = {
url = "github:edolstra/flake-compat";
};
lib-aggregate = {
url = "github:nix-community/lib-aggregate";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs-lib.follows = "nixpkgs-lib";
};
nixpkgs-lib.url = "github:nix-community/nixpkgs.lib";
# roc = {
# url = "github:roc-lang/roc";
# inputs.nixpkgs.follows = "nixpkgs";
@ -139,6 +123,30 @@
# zls.url = "github:zigtools/zls";
# zls.inputs.nixpkgs.follows = "nixpkgs";
# zls.inputs.zig-overlay.follows = "zig-overlay";
# further flake.lock minimization shenanigans
flake-utils.url = "github:numtide/flake-utils";
jj.inputs.flake-utils.follows = "flake-utils";
lib-aggregate.inputs.flake-utils.follows = "flake-utils";
lib-aggregate.url = "github:nix-community/lib-aggregate";
nixpkgs-wayland.inputs.lib-aggregate.follows = "lib-aggregate";
nixpkgs-lib.url = "github:nix-community/nixpkgs.lib";
# nil inputs
hyprland.inputs.pre-commit-hooks.follows = "";
nixos-wsl.inputs.flake-compat.follows = "";
nixpkgs-wayland.inputs = {
flake-compat.follows = "";
nix-eval-jobs.follows = "";
};
lix-attic.inputs = {
nix-github-actions.follows = "";
};
};
nixConfig = {

View file

@ -2,14 +2,6 @@ links.dayl.in {
reverse_proxy http://localhost:9090
}
elizabeth-and-daylin.com {
reverse_proxy http://localhost:4321
}
elizabeth.dayl.in, www.elizabeth-and-daylin.com {
redir https://elizabeth-and-daylin.com{uri} permanent
}
git.dayl.in {
reverse_proxy http://localhost:3000
}
@ -26,6 +18,19 @@ gts.dayl.in {
}
}
daylin.bsky.dayl.in, bsky.dayl.in {
reverse_proxy http://localhost:6555
}
elizabeth-and-daylin.com {
reverse_proxy http://localhost:4321
}
elizabeth.dayl.in, www.elizabeth-and-daylin.com {
redir https://elizabeth-and-daylin.com{uri} permanent
}
# not currently a running service on algiz
# (caddy-common) {
# encode gzip

View file

@ -27,6 +27,7 @@
"/home/daylin/services/gotosocial/"
"/home/daylin/services/caddy/"
"/home/daylin/services/wedding-website/"
"/home/daylin/services/bsky-pds/"
];
};

View file

@ -1,4 +1,9 @@
{ pkgs, enabled, ... }:
{
pkgs,
enabled,
flake,
...
}:
let
atticPort = "5656";
static = pkgs.runCommandLocal "static-files" { } ''
@ -26,8 +31,10 @@ in
# https://discourse.nixos.org/t/docker-container-not-resolving-to-host/30259/6
# networking.firewall.extraCommands = "iptables -A INPUT -p tcp --destination-port ${atticPort} -s 172.16.0.0/12 -j ACCEPT";
services.atticd = enabled // {
package = (flake.pkgs "lix-attic").attic-server;
# Replace with absolute path to your credentials file
# TODO: replace with sops-secret!
environmentFile = "/etc/atticd.env";
settings = {

View file

@ -1,6 +1,7 @@
{
enabled,
config,
enabled,
flake,
...
}:
{
@ -26,4 +27,9 @@
group = config.users.users.daylin.group;
};
};
environment.systemPackages = [
(flake.pkgs "lix-attic").attic-client
];
}

View file

@ -1,7 +1,6 @@
flake:utils
ghostty
sops
attic-client
distrobox
firefox
zk

View file

@ -10,7 +10,6 @@ let
inherit (builtins) mapAttrs readDir listToAttrs;
inherit (lib)
genAttrs
pkgFromSystem
loadOverlays
listify
enableAttrs
@ -33,15 +32,6 @@ let
)
);
inheritFlakePkgs =
pkgs: flakes:
listToAttrs (
map (name: {
inherit name;
value = pkgFromSystem pkgs.system name;
}) flakes
);
evalTreeFmt =
pkgs:
(treefmt-nix.lib.evalModule pkgs (
@ -75,14 +65,10 @@ let
default = oizys;
oizys = pkgs.callPackage ../pkgs/oizys { };
iso = mkIso.config.system.build.isoImage;
lix = pkgFromSystem pkgs.system "lix-module";
# nimlangserver = pkgs.callPackage ../pkgs/nim/nimlangserver { };
}
// (inheritFlakePkgs pkgs [
"pixi"
"f1multiviewer"
"tsm"
])
// (import ../pkgs { inherit pkgs; })
// (import ../pkgs { inherit pkgs lib; })
);
devShells = forAllSystems (pkgs: {

View file

@ -104,6 +104,16 @@ let
# listNixFilesRecursive = dir: filterNotDefaultNixFile (listFilesRecursive dir);
listNixFilesRecursive = dir: dir |> listFilesRecursive |> filterNotDefaultNixFile;
## convert a list of flakes to { name = packageAttr; }
flakesToPackagesAttrs =
system: flakes:
listToAttrs (
map (name: {
inherit name;
value = pkgFromSystem system name;
}) flakes
);
# defaultLinuxPackage = flake: flake.packages.x86_64-linux.default;
# defaultPackageGeneric = system: flake: "${flake}.packages.${system}.default";
pkgsFromSystem = system: flake: inputs."${flake}".packages."${system}";
@ -115,6 +125,7 @@ let
module = nixosModuleFrom;
pkgs = pkgsFromSystem system;
pkg = pkgFromSystem system;
toPackageAttrs = flakesToPackagesAttrs system;
};
loadOverlays =

View file

@ -1,4 +1,12 @@
{ pkgs, ... }:
{
pkgs,
lib,
...
}:
let
inherit (lib) flakeFromSystem;
flake = flakeFromSystem pkgs.system;
in
{
nimlangserver = pkgs.callPackage ./nim/nimlangserver { };
procs = pkgs.callPackage ./nim/procs { };
@ -7,4 +15,13 @@
distrobox = pkgs.callPackage ./distrobox { };
llm-with-plugins = pkgs.callPackage ./llm/llm-with-plugins { };
attic-client = (flake.pkgs "lix-attic").attic-client;
attic-server = (flake.pkgs "lix-attic").attic-server;
lix = (flake.pkgs "lix-module").default;
}
// (flake.toPackageAttrs [
"pixi"
"f1multiviewer"
"tsm"
])

View file

@ -5,7 +5,7 @@
}:
buildNimblePackage {
name = "oizys";
verions = "unstable";
version = "unstable";
src = lib.cleanSource ./.;
nativeBuildInputs = [ openssl ];
nimbleDepsHash = "sha256-dFJw/m7D5UFUrHH7exsyHknt8WHIK1QIQATNd5l7FZA=";

View file

@ -56,6 +56,28 @@ proc runCmdCapt*(
close p
proc formatStdoutStderr(stdout: string, stderr: string): string =
template addLine =
# TODO: make -> red after hwylterm update
result.add "-> "
result.add line
result.add "\n"
result.add "stdout:\n"
for line in stdout.splitLines():
addLine
# result.add bb"[red]->[/]"
# result.add "-> "
# result.add line
# result.add "\n"
result.add "stdout:\n"
for line in stderr.splitLines():
addLine
result.add "-> "
result.add line
result.add "\n"
proc runCmdCaptWithSpinner*(
cmd: string,
msg: string = "",
@ -67,8 +89,7 @@ proc runCmdCaptWithSpinner*(
with(Dots2, msg):
(output, err, code) = runCmdCapt(cmd, capture)
if code != 0:
stderr.writeLine("stdout\n" & output)
stderr.writeLine("stderr\n" & err)
stderr.write(formatStdoutStderr(output,err))
error fmt"{cmd} had non zero exit"
quit code
return (output, err)

View file

@ -389,16 +389,17 @@ proc nixBuildWithCache*(name: string, rest:seq[string], service: string, jobs: i
if isCi():
reportResults(results)
# TODO: push after build not at once?
var cmd = service
cmd.addArg "push"
cmd.addArg name
cmd.addArg "--jobs"
cmd.addArg $jobs
cmd.addArgs outs
let pushErr = runCmd(cmd)
if pushErr != 0:
errorQuit "failed to push build to cache"
if outs.len > 0:
# TODO: push after build not at once?
var cmd = service
cmd.addArg "push"
cmd.addArg name
cmd.addArg "--jobs"
cmd.addArg $jobs
cmd.addArgs outs
let pushErr = runCmd(cmd)
if pushErr != 0:
errorQuit "failed to push build to cache"
proc getUpdatedLockFile() =
info "getting updated flake.lock as updated.lock"