Compare commits

..

No commits in common. "6ec76eb866b6beb49d5f4a17bca5a49e44ef07d4" and "7cb80e2643397b67f8cc2885489063180b65e2f5" have entirely different histories.

12 changed files with 39 additions and 208 deletions

View file

@ -1,55 +0,0 @@
name: 'Maximize build disk space'
description: 'Maximize the available disk space by removing unneeded software'
runs:
using: "composite"
steps:
- name: Disk space report before modification
shell: bash
run: |
echo "==> Available space before cleanup"
echo
df -h
# sudo du /usr/local -h --max-depth=1 | sort -rh || true
- name: Maximize build disk space
shell: bash
run: |
set -euo pipefail
echo "Removing unwanted software... "
# sudo docker image prune --all --force > /dev/null &
{
sudo apt-get remove -y \
'^aspnetcore-.*' '^dotnet-.*' '^llvm-.*' \
'php.*' '^mongodb-.*' '^mysql-.*' '^google-cloud-*' \
azure-cli google-chrome-stable firefox \
powershell mono-devel libgl1-mesa-dri \
--fix-missing \
> /dev/null
sudo apt-get remove -y docker > /dev/null
sudo apt-get autoremove -y > /dev/null
sudo apt-get clean > /dev/null
} &
wait
df -h
sudo rm -rf /var/lib/docker
df -h
sudo swapoff -a
sudo rm -f /mnt/swapfile &
sudo rm -rf /usr/{local,share} &
sudo rm -rf /opt &
sudo rm -rf "$AGENT_TOOLSDIRECTORY" &
wait
echo "... done"
- name: Disk space report after modification
shell: bash
run: |
echo "==> Available space after cleanup"
echo
df -h

View file

@ -1,10 +0,0 @@
# Set update schedule for GitHub Actions
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"

View file

@ -29,45 +29,26 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
# # The default disk size of these runners is ~14GB
# # Cleanup the disk, see upstream discussion https://github.com/actions/runner-images/issues/2840.
# - name: Cleanup Disk Space
# run: |
# echo "Before removing files:"
# df -h
# sudo rm -rf "$AGENT_TOOLSDIRECTORY"
# sudo rm -rf /opt
# sudo rm -rf /usr/share/dotnet
# sudo rm -rf /usr/local/{lib/android,share/boost}
# sudo docker image prune --all --force
# echo "After removing files:"
# df -h
- name: Maximize build space
uses: AdityaGarg8/remove-unwanted-software@v3
with:
remove-android: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
remove-large-packages: 'true'
remove-cached-tools: 'true'
remove-swapfile: 'true'
- name: Checkout
uses: actions/checkout@v4
- name: Build
# The default disk size of these runners is ~14GB
# Cleanup the disk, see upstream discussion https://github.com/actions/runner-images/issues/2840.
- name: Cleanup Disk Space
run: |
echo "Free space:"
echo "Before removing files:"
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /opt
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
echo "After removing files:"
df -h
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@v7
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: cachix/cachix-action@v15
- uses: cachix/cachix-action@v14
with:
name: daylin
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

View file

@ -1,52 +0,0 @@
name: Run Nix Flake Checks
on:
workflow_call:
workflow_dispatch:
inputs:
lockFile:
description: 'flake.lock file'
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
# The default disk size of these runners is ~14GB
# Cleanup the disk, see upstream discussion https://github.com/actions/runner-images/issues/2840.
# - name: Cleanup Disk Space
# run: |
# echo "Before removing files:"
# df -h
# sudo rm -rf /usr/share/dotnet
# sudo rm -rf /opt/ghc
# sudo rm -rf /opt
# sudo rm -rf "/usr/local/share/boost"
# sudo rm -rf "$AGENT_TOOLSDIRECTORY"
# echo "After removing files:"
# df -h
- uses: actions/checkout@v4
- uses: ./.github/actions/clean-disk
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@v7
- uses: cachix/cachix-action@v15
with:
name: daylin
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: write lock file
if: "${{ inputs.lockFile != '' }}"
run: |
echo '${{ inputs.lockFile }}' > flake.lock
git diff
- name: Build
run: |
cachix watch-exec daylin -- nix build --accept-flake-config '.#checks.x86_64-linux.packageCheck'

View file

@ -9,12 +9,7 @@ on:
- main
jobs:
checks:
uses: ./.github/workflows/checks.yml
secrets: inherit
build:
needs: checks
strategy:
max-parallel: 1
matrix:

View file

@ -305,11 +305,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1718376341,
"narHash": "sha256-Xm8EyYgn752O61QHBera4ygQc/izCLyzhwIqYXqUOdA=",
"lastModified": 1718292752,
"narHash": "sha256-NFioPAqyQIOuQMPcDezGCpngCP5ShrudUHfFCfN0d7o=",
"ref": "refs/heads/main",
"rev": "a357fa3e0a60b4f96a1924e0d9753d23001ab00e",
"revCount": 4826,
"rev": "5de273a14427cb4a4cad9ac57a22b418bcd4248d",
"revCount": 4821,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland/"
@ -682,11 +682,11 @@
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1718371238,
"narHash": "sha256-ntSxtwrYlEVsERaC9X7yFGvNVzbz5H5XuiqkdIc4k/4=",
"lastModified": 1718263016,
"narHash": "sha256-tLaeDJLvwUmAt2Nd5F6ET87RehB6Krt7M3wnS6TMcTM=",
"owner": "nix-community",
"repo": "nixpkgs-wayland",
"rev": "77f8f21e3475cdf26eeb68ff6711e6861c9d5dc5",
"rev": "8def778b26e7d7f7596633350d739ceebba35ef8",
"type": "github"
},
"original": {
@ -761,11 +761,11 @@
},
"nixpkgs_6": {
"locked": {
"lastModified": 1718276985,
"narHash": "sha256-u1fA0DYQYdeG+5kDm1bOoGcHtX0rtC7qs2YA2N1X++I=",
"lastModified": 1718149104,
"narHash": "sha256-Ds1QpobBX2yoUDx9ZruqVGJ/uQPgcXoYuobBguyKEh8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3f84a279f1a6290ce154c5531378acc827836fbb",
"rev": "e913ae340076bbb73d9f4d3d065c2bca7caafb16",
"type": "github"
},
"original": {
@ -1169,11 +1169,11 @@
]
},
"locked": {
"lastModified": 1718327908,
"narHash": "sha256-E3/3urkZTEIaV2afNDniC9Z7Ksxyn6AaVRnrrxxMPZE=",
"lastModified": 1718241525,
"narHash": "sha256-0Z5pRERV7fgkJsLLuXQfFT+DKFM5DnqjncAKH+7/+bE=",
"owner": "Cloudef",
"repo": "zig2nix",
"rev": "d846577330acb4571e837d5c631beeb555988dd0",
"rev": "30cffd333f1b732cc83b2f3c49bef28c1fbb58f9",
"type": "github"
},
"original": {

View file

@ -16,6 +16,8 @@
nixos-wsl.url = "github:nix-community/NixOS-WSL";
# see todo.md
# hyprland.url = "git+https://github.com/hyprwm/Hyprland/?submodules=1&rev=4cdddcfe466cb21db81af0ac39e51cc15f574da9";
hyprland.url = "git+https://github.com/hyprwm/Hyprland/?submodules=1";
hyprland-contrib.url = "github:hyprwm/contrib";

View file

@ -24,7 +24,6 @@
environment.systemPackages = with pkgs; [
zk
quarto
cachix
];
services.restic.backups.gdrive = {

View file

@ -28,17 +28,6 @@ rec {
nixosModules = listToAttrs (findModulesList ../modules);
mkPackageCheck =
{ packages, pkgs }:
pkgs.runCommandLocal "build-third-party"
{
src = ./.;
nativeBuildInputs = [ packages ];
}
''
mkdir "$out"
'';
mkSystem =
hostName:
nixosSystem {
@ -85,24 +74,5 @@ rec {
packages = oizysPkg;
devShells = devShells;
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
checks = forAllSystems (pkgs: {
packageCheck = mkPackageCheck {
inherit pkgs;
# make sure lix is in this?
packages = [
pkgs.pixi
pkgs.swww
inputs.tsm.packages.${pkgs.system}.default
inputs.hyprman.packages.${pkgs.system}.default
inputs.roc.packages.${pkgs.system}.full
inputs.roc.packages.${pkgs.system}.lang-server
inputs.zls.outputs.packages.${pkgs.system}.default
inputs.zig2nix.outputs.packages.${pkgs.system}.zig.master.bin
];
};
});
};
}

View file

@ -1,6 +1,7 @@
{ lib, ... }:
let
inherit (builtins) filter;
inherit (builtins)
filter;
inherit (lib)
isNixFile
mkOption
@ -8,7 +9,8 @@ let
literalExpression
mdDoc
;
inherit (lib.filesystem) listFilesRecursive;
inherit (lib.filesystem)
listFilesRecursive;
in
{
imports = filter (f: (f != ./default.nix) && (isNixFile f)) (listFilesRecursive ./.);

View file

@ -34,7 +34,7 @@
# I'm getting errors related to a non-existent nix-index?
programs.nix-index.enableZshIntegration = false;
programs.nix-index.enableBashIntegration = false;
programs.nix-index.enableBashIntegration =false;
programs.nix-index.enableFishIntegration = false;
nix.settings = {

11
todo.md
View file

@ -1,5 +1,10 @@
# oizys todo's
## nix expr
- [ ] find out why pixi on GHA is different from local (possibly from the fetch git step?)
## software
- [ ] lid closed does not engage hyprlock?
@ -12,10 +17,4 @@
> kernel: ucsi_acpi USBC000:00: possible UCSI driver bug 2
> kernel: ucsi_acpi USBC000:00: error -EINVAL: PPM init failed
GHA is running out of space to build `othalan`.
I really just want the CI to pre-compile a subset of the packages.
Currently, it just burns resources downloading packages over and over again.
Maybe I could use nix flake checks to accomplish this?
<!-- generated with <3 by daylinmorgan/todo -->