add nixos-generators module

Signed-off-by: cy <cy@cy7.sh>
This commit is contained in:
cy 2025-01-24 12:23:03 -05:00
parent 2d0c49f55b
commit cbbb66099d
4 changed files with 51 additions and 4 deletions

View file

@ -23,10 +23,11 @@ jobs:
steps: steps:
- name: Install Nix - name: Install Nix
uses: cachix/install-nix-action@v30 uses: cachix/install-nix-action@v30
with:
install_url: https://releases.nixos.org/nix/nix-2.25.4/install
extra_nix_config: 'accept-flake-config = true'
- name: Sync repository - name: Sync repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
persist-credentials: false
- uses: cachix/cachix-action@v14 - uses: cachix/cachix-action@v14
with: with:
name: cything name: cything
@ -57,3 +58,7 @@ jobs:
# always save the cache # always save the cache
save-always: true save-always: true
- run: nix build -L ${{ matrix.package }} - run: nix build -L ${{ matrix.package }}
- uses: actions/upload-artifact@v4
with:
name: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', 'flake.lock') }}
path: result/

37
flake.lock generated
View file

@ -899,6 +899,42 @@
"type": "github" "type": "github"
} }
}, },
"nixlib": {
"locked": {
"lastModified": 1736643958,
"narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixos-generators": {
"inputs": {
"nixlib": "nixlib",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1737057290,
"narHash": "sha256-3Pe0yKlCc7EOeq1X/aJVDH0CtNL+tIBm49vpepwL1MQ=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "d002ce9b6e7eb467cd1c6bb9aef9c35d191b5453",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-generators",
"type": "github"
}
},
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1737590910, "lastModified": 1737590910,
@ -1238,6 +1274,7 @@
"lix": "lix", "lix": "lix",
"lix-module": "lix-module", "lix-module": "lix-module",
"niri": "niri", "niri": "niri",
"nixos-generators": "nixos-generators",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nixpkgs-garage": "nixpkgs-garage", "nixpkgs-garage": "nixpkgs-garage",

View file

@ -69,8 +69,12 @@
inputs.flake-compat.follows = "flake-compat"; inputs.flake-compat.follows = "flake-compat";
}; };
nixos-hardware.url = "github:nixos/nixos-hardware"; nixos-hardware.url = "github:nixos/nixos-hardware";
nixpkgs-rpi.url = "github:nixos/nixpkgs/d4e529a24b66b0341f2b866c5abe3ad8a96be2d7"; nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs-rpi.url = "github:nixos/nixpkgs/d4e529a24b66b0341f2b866c5abe3ad8a96be2d7";
nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR
nvim-github-theme = { nvim-github-theme = {
@ -212,6 +216,7 @@
nixpkgs.pkgs = pkgsFor "aarch64-linux"; nixpkgs.pkgs = pkgsFor "aarch64-linux";
} }
inputs.nixos-hardware.nixosModules.raspberry-pi-3 inputs.nixos-hardware.nixosModules.raspberry-pi-3
inputs.nixos-generators.nixosModules.all-formats
./hosts/pancake ./hosts/pancake
./modules ./modules
]; ];

View file

@ -1,6 +1,6 @@
{ config, ... }: { { config, ... }: {
services.tailscale = { services.tailscale = {
enable = true; enable = false;
authKeyFile = config.sops.secrets."tailscale/auth".path; authKeyFile = config.sops.secrets."tailscale/auth".path;
openFirewall = true; openFirewall = true;
useRoutingFeatures = "client"; useRoutingFeatures = "client";