forked from pub-solar/os
Merge branch 'main' into teutat3s
This commit is contained in:
commit
aa65a39eff
15
.drone.yml
15
.drone.yml
|
@ -98,7 +98,14 @@ steps:
|
||||||
- |
|
- |
|
||||||
nix $$NIX_FLAGS build \
|
nix $$NIX_FLAGS build \
|
||||||
'.#nixosConfigurations.bootstrap.config.system.build.isoImage'
|
'.#nixosConfigurations.bootstrap.config.system.build.isoImage'
|
||||||
- cp $(readlink -f result)/iso/*.iso /var/nix/iso-cache/
|
- cp $(readlink -f result)/iso/PubSolarOS*.iso /var/nix/iso-cache/
|
||||||
|
- nix shell nixpkgs#findutils
|
||||||
|
- cd /var/nix/iso-cache/
|
||||||
|
- export ISO_NAME=$(find . -name '*.iso' -printf "%f\n")
|
||||||
|
- sha256sum $ISO_NAME > $ISO_NAME.sha256
|
||||||
|
- ln -s $ISO_NAME PubSolarOS-latest.iso
|
||||||
|
- cp $ISO_NAME.sha256 PubSolarOS-latest.iso.sha256
|
||||||
|
- nix run nixpkgs#gnused -- --in-place "s/$ISO_NAME/PubSolarOS-latest.iso/" PubSolarOS-latest.iso.sha256
|
||||||
|
|
||||||
- name: "Publish ISO"
|
- name: "Publish ISO"
|
||||||
image: appleboy/drone-scp
|
image: appleboy/drone-scp
|
||||||
|
@ -114,9 +121,11 @@ steps:
|
||||||
from_secret: iso_web_ssh_port
|
from_secret: iso_web_ssh_port
|
||||||
key:
|
key:
|
||||||
from_secret: iso_web_ssh_key
|
from_secret: iso_web_ssh_key
|
||||||
target: /srv/os
|
target: /srv/os/download
|
||||||
source:
|
source:
|
||||||
- /var/nix/iso-cache/*.iso
|
- /var/nix/iso-cache/*.iso
|
||||||
|
- /var/nix/iso-cache/*.iso.sha256
|
||||||
|
overwrite: true
|
||||||
strip_components: 3
|
strip_components: 3
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -134,6 +143,6 @@ volumes:
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 2b930bb5fe02006203b7c2fae8af75814749e8cec5f976ec0d6e64eae1b0c5db
|
hmac: 8823c7103f6a075bb291a497c7ab5d5db47a91f9bc7d8ef95329b5620c9cf91d
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
|
@ -1,4 +1,18 @@
|
||||||
{ profiles, ... }:
|
{ config, lib, pkgs, profiles, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
# Gets hostname of host to be bundled inside iso
|
||||||
|
# Copied from https://github.com/divnix/digga/blob/30ffa0b02272dc56c94fd3c7d8a5a0f07ca197bf/modules/bootstrap-iso.nix#L3-L11
|
||||||
|
getFqdn = config:
|
||||||
|
let
|
||||||
|
net = config.networking;
|
||||||
|
fqdn =
|
||||||
|
if (net ? domain) && (net.domain != null)
|
||||||
|
then "${net.hostName}.${net.domain}"
|
||||||
|
else net.hostName;
|
||||||
|
in
|
||||||
|
fqdn;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# build with: `nix build ".#nixosConfigurations.bootstrap.config.system.build.isoImage"`
|
# build with: `nix build ".#nixosConfigurations.bootstrap.config.system.build.isoImage"`
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -10,16 +24,28 @@
|
||||||
profiles.pub-solar-iso
|
profiles.pub-solar-iso
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
config = {
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
|
||||||
# will be overridden by the bootstrapIso instrumentation
|
# will be overridden by the bootstrapIso instrumentation
|
||||||
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
system.nixos.label = "PubSolarOS-" + config.system.nixos.version;
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# mkForce because a similar transformation gets double applied otherwise
|
||||||
# this value at the release version of the first install of this system.
|
# https://github.com/divnix/digga/blob/30ffa0b02272dc56c94fd3c7d8a5a0f07ca197bf/modules/bootstrap-iso.nix#L17
|
||||||
# Before changing this value read the documentation for this option
|
# https://github.com/NixOS/nixpkgs/blob/aecd4d8349b94f9bd5718c74a5b789f233f67326/nixos/modules/installer/cd-dvd/installation-cd-base.nix#L21-L22
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
isoImage = {
|
||||||
system.stateVersion = "21.05"; # Did you read the comment?
|
isoBaseName = mkForce (getFqdn config);
|
||||||
|
isoName = mkForce "${config.system.nixos.label}-${config.isoImage.isoBaseName}-${pkgs.stdenv.hostPlatform.system}.iso";
|
||||||
|
};
|
||||||
|
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
# this value at the release version of the first install of this system.
|
||||||
|
# Before changing this value read the documentation for this option
|
||||||
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
|
system.stateVersion = "21.05"; # Did you read the comment?
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
psCfg = config.pub-solar;
|
|
||||||
cfg = config.pub-solar.core;
|
cfg = config.pub-solar.core;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -29,12 +28,12 @@ in
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
pub-solar = {
|
pub-solar = {
|
||||||
audio.enable = lib.mkIf (!cfg.lite) (lib.mkDefault true);
|
audio.enable = mkIf (!cfg.lite) (mkDefault true);
|
||||||
crypto.enable = lib.mkIf (!cfg.lite) (lib.mkDefault true);
|
crypto.enable = mkIf (!cfg.lite) (mkDefault true);
|
||||||
devops.enable = lib.mkIf (!cfg.lite) (lib.mkDefault true);
|
devops.enable = mkIf (!cfg.lite) (mkDefault true);
|
||||||
|
|
||||||
terminal-life = {
|
terminal-life = {
|
||||||
enable = lib.mkDefault true;
|
enable = mkDefault true;
|
||||||
lite = cfg.lite;
|
lite = cfg.lite;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue