add iso
This commit is contained in:
parent
0ba436a11a
commit
487416faaf
8 changed files with 90 additions and 3 deletions
22
.github/workflows/nixos.yml
vendored
22
.github/workflows/nixos.yml
vendored
|
@ -5,6 +5,28 @@ on:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build-iso:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2.3.2
|
||||||
|
|
||||||
|
- name: "Install Nix ❄️"
|
||||||
|
uses: cachix/install-nix-action@v15
|
||||||
|
|
||||||
|
- name: "Install Cachix ❄️"
|
||||||
|
uses: cachix/cachix-action@v10
|
||||||
|
with:
|
||||||
|
name: 0x76-infra
|
||||||
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||||
|
|
||||||
|
- name: "Check NixOS Flake ❄️"
|
||||||
|
run: |
|
||||||
|
nix build '.#iso'
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: nixos-iso
|
||||||
|
retention-days: 3
|
||||||
|
path: result/iso/*.iso
|
||||||
build-null:
|
build-null:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
37
flake.lock
generated
37
flake.lock
generated
|
@ -665,6 +665,42 @@
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixlib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1636849918,
|
||||||
|
"narHash": "sha256-nzUK6dPcTmNVrgTAC1EOybSMsrcx+QrVPyqRdyKLkjA=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"rev": "28a5b0557f14124608db68d3ee1f77e9329e9dd5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixos-generators": {
|
||||||
|
"inputs": {
|
||||||
|
"nixlib": "nixlib",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1660727616,
|
||||||
|
"narHash": "sha256-zYTIvdPMYMx/EYqXODAwIIU30RiEHqNHdgarIHuEYZc=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixos-generators",
|
||||||
|
"rev": "adccd191a0e83039d537e021f19495b7bad546a1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixos-generators",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1664989420,
|
"lastModified": 1664989420,
|
||||||
|
@ -848,6 +884,7 @@
|
||||||
"hyprpaper": "hyprpaper",
|
"hyprpaper": "hyprpaper",
|
||||||
"mailserver": "mailserver",
|
"mailserver": "mailserver",
|
||||||
"minecraft-servers": "minecraft-servers",
|
"minecraft-servers": "minecraft-servers",
|
||||||
|
"nixos-generators": "nixos-generators",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"riff": "riff",
|
"riff": "riff",
|
||||||
"serokell-nix": "serokell-nix",
|
"serokell-nix": "serokell-nix",
|
||||||
|
|
16
flake.nix
16
flake.nix
|
@ -37,6 +37,11 @@
|
||||||
|
|
||||||
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
|
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
|
||||||
mailserver.inputs.nixpkgs.follows = "nixpkgs";
|
mailserver.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
nixos-generators = {
|
||||||
|
url = "github:nix-community/nixos-generators";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
|
@ -49,13 +54,14 @@
|
||||||
, home-manager
|
, home-manager
|
||||||
, hyprpaper
|
, hyprpaper
|
||||||
, hyprland
|
, hyprland
|
||||||
|
, nixos-generators
|
||||||
, ...
|
, ...
|
||||||
} @ inputs:
|
} @ inputs:
|
||||||
let
|
let
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
inherit (builtins) mapAttrs;
|
inherit (builtins) mapAttrs;
|
||||||
|
|
||||||
util = import ./util.nix inputs;
|
util = import ./nixos/util.nix inputs;
|
||||||
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
# import and add realm to list of tags
|
# import and add realm to list of tags
|
||||||
|
@ -103,6 +109,14 @@
|
||||||
packages.${system} = {
|
packages.${system} = {
|
||||||
default = colmena.packages.${system}.colmena;
|
default = colmena.packages.${system}.colmena;
|
||||||
apply-local = apply-local;
|
apply-local = apply-local;
|
||||||
|
|
||||||
|
iso = nixos-generators.nixosGenerate {
|
||||||
|
inherit system pkgs;
|
||||||
|
format = "iso";
|
||||||
|
modules = [
|
||||||
|
(import ./nixos/iso.nix)
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use by running `nix develop`
|
# Use by running `nix develop`
|
||||||
|
|
1
nixos/.gitignore
vendored
1
nixos/.gitignore
vendored
|
@ -1 +0,0 @@
|
||||||
result/
|
|
|
@ -88,6 +88,8 @@ in {
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
|
||||||
fileSystems."/".options = [ "compress=zstd" ];
|
fileSystems."/".options = [ "compress=zstd" ];
|
||||||
|
fileSystems."/home".options = [ "compress=zstd" ];
|
||||||
|
|
||||||
# Filesystem dedup
|
# Filesystem dedup
|
||||||
services.beesd.filesystems = {
|
services.beesd.filesystems = {
|
||||||
root = {
|
root = {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "rtsx_pci_sdmmc" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
@ -31,8 +31,10 @@
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wg0.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|
11
nixos/iso.nix
Normal file
11
nixos/iso.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ pkgs, modulesPath, lib, ... }: {
|
||||||
|
imports = [
|
||||||
|
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
||||||
|
];
|
||||||
|
|
||||||
|
# use the latest Linux kernel
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
# Needed for https://github.com/NixOS/nixpkgs/issues/58959
|
||||||
|
boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue