Compare commits

...

9 commits

Author SHA1 Message Date
cy
42f5f1eff0 what if we build from master 2025-01-19 21:57:50 -05:00
cy
71be5f3545 fmt 2025-01-19 21:45:11 -05:00
cy
bb0da64219 root should own /nix before we install nix 2025-01-19 21:30:43 -05:00
cy
f8018ab702 overprovision lvm and mount to /nix 2025-01-19 21:30:43 -05:00
cy
ec4e66c91a can we get more space 2025-01-19 21:30:43 -05:00
cy
36a8df7aa1 try lanzaboote from master 2025-01-19 21:30:43 -05:00
cy
5933a15cd8 set display variable 2025-01-19 21:30:43 -05:00
cy
32e8d70d6f how about homes 2025-01-19 21:30:43 -05:00
cy
a53a985158 can we build machines 2025-01-19 21:30:43 -05:00
5 changed files with 167 additions and 97 deletions

View file

@ -3,14 +3,14 @@ on:
workflow_dispatch: workflow_dispatch:
push: push:
jobs: jobs:
build: build-packages:
strategy: strategy:
matrix: matrix:
package: package:
- github:cything/nixpkgs/fd06e41125350bc3db5628df49d3b84e4652a59d#lact - github:cything/nixpkgs/fd06e41125350bc3db5628df49d3b84e4652a59d#lact
os: os:
- ubuntu-latest - ubuntu-latest
- macos-latest # - macos-latest
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
continue-on-error: true continue-on-error: true
steps: steps:
@ -25,3 +25,82 @@ jobs:
cache: ${{ vars.ATTIC_CACHE }} cache: ${{ vars.ATTIC_CACHE }}
token: ${{ secrets.ATTIC_TOKEN }} token: ${{ secrets.ATTIC_TOKEN }}
- run: nix build -L '${{ matrix.package }}' - run: nix build -L '${{ matrix.package }}'
build-machines:
strategy:
matrix:
machine:
- chunk
- ytnix
- titan
os:
- ubuntu-latest
# - macos-latest
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
- name: Maximize build disk space
uses: easimon/maximize-build-space@v10
with:
overprovision-lvm: true
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
build-mount-path: /nix
build-mount-path-ownership: 'root:root'
- uses: DeterminateSystems/nix-installer-action@main
with:
logger: pretty
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Setup Attic cache
uses: ryanccn/attic-action@v0
with:
endpoint: ${{ vars.ATTIC_ENDPOINT }}
cache: ${{ vars.ATTIC_CACHE }}
token: ${{ secrets.ATTIC_TOKEN }}
- name: Sync repository
uses: actions/checkout@v4
with:
persist-credentials: false
- run: nix build -L --accept-flake-config .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel
build-homes:
strategy:
matrix:
home:
- yt@ytnix
- yt@chunk
os:
- ubuntu-latest
# - macos-latest
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
- name: Maximize build disk space
uses: easimon/maximize-build-space@v10
with:
overprovision-lvm: true
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
build-mount-path: /nix
build-mount-path-ownership: 'root:root'
- uses: DeterminateSystems/nix-installer-action@main
with:
logger: pretty
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Setup Attic cache
uses: ryanccn/attic-action@v0
with:
endpoint: ${{ vars.ATTIC_ENDPOINT }}
cache: ${{ vars.ATTIC_CACHE }}
token: ${{ secrets.ATTIC_TOKEN }}
- name: Sync repository
uses: actions/checkout@v4
with:
persist-credentials: false
- run: nix build -L --accept-flake-config .#homeConfigurations."${{ matrix.home }}".activationPackage

118
flake.lock generated
View file

@ -1,18 +1,12 @@
{ {
"nodes": { "nodes": {
"crane": { "crane": {
"inputs": {
"nixpkgs": [
"lanzaboote",
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1717535930, "lastModified": 1731098351,
"narHash": "sha256-1hZ/txnbd/RmiBPNUs7i8UQw2N89uAK3UzrGAWdnFfU=", "narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "55e7754ec31dac78980c8be45f8a28e80e370946", "rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -119,11 +113,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717285511, "lastModified": 1730504689,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "rev": "506278e768c2a08bec68eb62932193e341f55c90",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -157,24 +151,6 @@
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
}, },
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
@ -266,11 +242,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1737221749, "lastModified": 1737299337,
"narHash": "sha256-igllW0yG+UbetvhT11jnt9RppSHXYgMykYhZJeqfHs0=", "narHash": "sha256-0NBrY2A7buujKmeCbieopOMSbLxTu8TFcTLqAbTnQDw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "97d7946b5e107dd03cc82f21165251d4e0159655", "rev": "f8ef4541bb8a54a8b52f19b52912119e689529b3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -333,7 +309,6 @@
"crane": "crane", "crane": "crane",
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_2",
"flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
@ -341,16 +316,16 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1718178907, "lastModified": 1737299073,
"narHash": "sha256-eSZyrQ9uoPB9iPQ8Y5H7gAmAgAvCw3InStmU3oEjqsE=", "narHash": "sha256-hOydnO9trHDo3qURqLSDdmE/pHNWDzlhkmyZ/gcBX2s=",
"owner": "nix-community", "owner": "nix-community",
"repo": "lanzaboote", "repo": "lanzaboote",
"rev": "b627ccd97d0159214cee5c7db1412b75e4be6086", "rev": "64d20cb2afaad8b73f4e38de41d27fb30a782bb5",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "v0.4.1", "ref": "master",
"repo": "lanzaboote", "repo": "lanzaboote",
"type": "github" "type": "github"
} }
@ -367,11 +342,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1737231928, "lastModified": 1737325400,
"narHash": "sha256-eOvFTgpFGP8hy6r3O8Ae5jOGc483l4BszwQsPcccbbs=", "narHash": "sha256-B8+1x5rDA9GtzX+LWlceIbLBwncKH5uDrGqEN0EoOQw=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "ca748d585a271a512807cd60e5353a9ddb4d1dee", "rev": "aad9ae8e2b07ed5d37743f3ae87c42528e2d172c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -436,16 +411,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1737241062, "lastModified": 1737341811,
"narHash": "sha256-GM4ZnlsuJWjk+tbespU/DWQsZ2V0u0CS3Hqg0JGMt5M=", "narHash": "sha256-a9UXiYA48ja0cvlHA4bqF0et8+4acJT4YVhLC4/tNag=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b681ff2c9c9163f24ca705d948bb0cee1b3e09f9", "rev": "63dff148c56cc3168d78edefd1087cc5d6fdda16",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-unstable-small", "ref": "master",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -480,27 +455,27 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1710695816, "lastModified": 1730741070,
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "614b4613980a522ba49f0d194531beddbb7220d3", "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-23.11", "ref": "nixos-24.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1737165118, "lastModified": 1737299813,
"narHash": "sha256-s40Kk/OulP3J/1JvC3VT16U4r/Xw6Qdi7SRw3LYkPWs=", "narHash": "sha256-Qw2PwmkXDK8sPQ5YQ/y/icbQ+TYgbxfjhgnkNJyT1X8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6a3ae7a5a12fb8cac2d59d7df7cbd95f9b2f0566", "rev": "107d5ef05c0b1119749e381451389eded30fb0d5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -525,11 +500,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1737200978, "lastModified": 1737308837,
"narHash": "sha256-QTUx/F8HVjrRIHQxHKrr72aPMj+cDk18WTbvBCCBBdI=", "narHash": "sha256-Sro74XNFgGgIIW4uo/YSVGafZhKnZwPLJNBvMsgpl4k=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "cbf960e5659054b2ccf27b67218782e69016bef5", "rev": "8fb2fe22c237b25b8af346870e126fdaeaff688b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -540,7 +515,7 @@
}, },
"nuschtosSearch": { "nuschtosSearch": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils",
"ixx": "ixx", "ixx": "ixx",
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
@ -575,11 +550,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1717664902, "lastModified": 1731363552,
"narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=", "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1", "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -604,21 +579,17 @@
}, },
"rust-overlay": { "rust-overlay": {
"inputs": { "inputs": {
"flake-utils": [
"lanzaboote",
"flake-utils"
],
"nixpkgs": [ "nixpkgs": [
"lanzaboote", "lanzaboote",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1717813066, "lastModified": 1731897198,
"narHash": "sha256-wqbRwq3i7g5EHIui0bIi84mdqZ/It1AXBSLJ5tafD28=", "narHash": "sha256-Ou7vLETSKwmE/HRQz4cImXXJBr/k9gp4J4z/PF8LzTE=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "6dc3e45fe4aee36efeed24d64fc68b1f989d5465", "rev": "0be641045af6d8666c11c2c40e45ffc9667839b5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -662,21 +633,6 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt": { "treefmt": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [

View file

@ -2,7 +2,7 @@
description = "cy's flake"; description = "cy's flake";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; nixpkgs.url = "github:nixos/nixpkgs/master";
sops-nix = { sops-nix = {
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -20,7 +20,7 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
lanzaboote = { lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.1"; url = "github:nix-community/lanzaboote/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixvim = { nixvim = {
@ -89,7 +89,10 @@
programs.typos.enable = true; programs.typos.enable = true;
programs.shellcheck.enable = true; programs.shellcheck.enable = true;
settings.global.excludes = [ "secrets/*" ]; settings.global.excludes = [
"secrets/*"
"**/*.png" # tries to format a png file??
];
}; };
}; };

View file

@ -1,8 +1,17 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
let let
wallpaper = "${./nixos-c-book.png}"; wallpaper = "${./nixos-c-book.png}";
terminal = "foot"; terminal = "foot";
menu = [ "fuzzel" "-w" "100" ]; menu = [
"fuzzel"
"-w"
"100"
];
browser = "librewolf"; browser = "librewolf";
file-manager = "thunar"; file-manager = "thunar";
clipboard = "cliphist list | ${lib.concatStringsSep " " menu} --dmenu | cliphist decode | wl-copy"; clipboard = "cliphist list | ${lib.concatStringsSep " " menu} --dmenu | cliphist decode | wl-copy";
@ -13,7 +22,15 @@ in
input.keyboard.xkb.options = "ctrl:nocaps"; input.keyboard.xkb.options = "ctrl:nocaps";
spawn-at-startup = [ spawn-at-startup = [
{ command = [ "${lib.getExe pkgs.waybar}" ]; } { command = [ "${lib.getExe pkgs.waybar}" ]; }
{ command = [ "${lib.getExe pkgs.swaybg}" "-m" "fill" "-i" wallpaper ]; } {
command = [
"${lib.getExe pkgs.swaybg}"
"-m"
"fill"
"-i"
wallpaper
];
}
{ command = [ "${lib.getExe pkgs.xwayland-satellite}" ]; } { command = [ "${lib.getExe pkgs.xwayland-satellite}" ]; }
]; ];
hotkey-overlay.skip-at-startup = true; hotkey-overlay.skip-at-startup = true;
@ -47,7 +64,10 @@ in
window-rules = [ window-rules = [
{ {
matches = [ matches = [
{ app-id = "anki"; title = "Add"; } {
app-id = "anki";
title = "Add";
}
{ app-id = "mpv"; } { app-id = "mpv"; }
{ app-id = "Bitwarden"; } { app-id = "Bitwarden"; }
]; ];
@ -60,7 +80,10 @@ in
{ {
matches = [ matches = [
{ app-id = "foot"; } { app-id = "foot"; }
{ app-id = "anki"; title = "^Browse"; } {
app-id = "anki";
title = "^Browse";
}
]; ];
default-column-width.proportion = .5; default-column-width.proportion = .5;
} }
@ -118,6 +141,14 @@ in
cooldown-ms = 150; cooldown-ms = 150;
action = focus-column-left; action = focus-column-left;
}; };
"Mod+Shift+WheelScrollDown" = {
cooldown-ms = 150;
action = focus-workspace-down;
};
"Mod+Shift+WheelScrollUp" = {
cooldown-ms = 150;
action = focus-workspace-up;
};
"XF86AudioRaiseVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+"; "XF86AudioRaiseVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+";
"XF86AudioLowerVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-"; "XF86AudioLowerVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-";

View file

@ -42,6 +42,7 @@
home.sessionVariables = { home.sessionVariables = {
ANKI_WAYLAND = "1"; ANKI_WAYLAND = "1";
DISPLAY = ":0";
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [