Merge pull request 'init commit' (#1) from add-basic into main
Reviewed-on: #1
This commit is contained in:
commit
14955dca21
6 changed files with 244 additions and 0 deletions
30
.gitea/workflows/build-stable.yml
Normal file
30
.gitea/workflows/build-stable.yml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
name: nix docker build stable
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
|
||||
jobs:
|
||||
amd64:
|
||||
runs-on: [ nix-flakes, amd64-builder ]
|
||||
steps:
|
||||
- name: System Info
|
||||
run: uname -m
|
||||
|
||||
- name: Setup
|
||||
run: |
|
||||
apt update -y
|
||||
apt install -y curl gnupg
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||
apt install -y nodejs
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd stable-with-flakes
|
||||
nix build .#nixos-stable
|
||||
cd ..
|
||||
30
.gitea/workflows/build-unstable.yml
Normal file
30
.gitea/workflows/build-unstable.yml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
name: nix docker build unstable
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
|
||||
jobs:
|
||||
amd64:
|
||||
runs-on: [ nix-flakes, amd64-builder ]
|
||||
steps:
|
||||
- name: System Info
|
||||
run: uname -m
|
||||
|
||||
- name: Setup
|
||||
run: |
|
||||
apt update -y
|
||||
apt install -y curl gnupg
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||
apt install -y nodejs
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd unstable-with-flakes
|
||||
nix build .#nixos-unstable
|
||||
cd ..
|
||||
61
stable-with-flakes/flake.lock
generated
Normal file
61
stable-with-flakes/flake.lock
generated
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1769205177,
|
||||
"narHash": "sha256-pN5H8TLUiUlnEHr/vbR/jTnBPrgEXYYDSrSQZkBm0EU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0a76d26c26ad7d63ac32ae910a5ca15003a4ec80",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
31
stable-with-flakes/flake.nix
Normal file
31
stable-with-flakes/flake.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
description = "Simple Nix Docker image based on a stable release";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/release-25.11";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
packages.nixos-stable = pkgs.dockerTools.buildImage {
|
||||
name = "nixos-stable";
|
||||
tag = "0.1.0";
|
||||
|
||||
config = {
|
||||
Cmd = [
|
||||
"${pkgs.hello}/bin/hello"
|
||||
];
|
||||
Env = [
|
||||
"NIX_CONFIG=extra-experimental-features = nix-command flakes"
|
||||
];
|
||||
};
|
||||
created = "now";
|
||||
};
|
||||
|
||||
devShells.default =
|
||||
pkgs.mkShell { buildInputs = with pkgs; [ hello ]; };
|
||||
});
|
||||
}
|
||||
61
unstable-with-flakes/flake.lock
generated
Normal file
61
unstable-with-flakes/flake.lock
generated
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1769018530,
|
||||
"narHash": "sha256-MJ27Cy2NtBEV5tsK+YraYr2g851f3Fl1LpNHDzDX15c=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "88d3861acdd3d2f0e361767018218e51810df8a1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
31
unstable-with-flakes/flake.nix
Normal file
31
unstable-with-flakes/flake.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
description = "Simple Nix Docker image based on unstable";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
packages.nixos-unstable = pkgs.dockerTools.buildImage {
|
||||
name = "nixos-unstable";
|
||||
tag = "0.1.0";
|
||||
|
||||
config = {
|
||||
Cmd = [
|
||||
"${pkgs.hello}/bin/hello"
|
||||
];
|
||||
Env = [
|
||||
"NIX_CONFIG=extra-experimental-features = nix-command flakes"
|
||||
];
|
||||
};
|
||||
created = "now";
|
||||
};
|
||||
|
||||
devShells.default =
|
||||
pkgs.mkShell { buildInputs = with pkgs; [ hello ]; };
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue