From 9fad1743b26d071f56faa27369fcbb3935ae9e78 Mon Sep 17 00:00:00 2001 From: Kristian Krsnik Date: Sun, 7 Apr 2024 19:34:18 +0200 Subject: [PATCH] initial commit --- .gitignore | 2 + README.md | 10 ++++ flake.lock | 27 ++++++++++ flake.nix | 27 ++++++++-- template/.envrc | 1 + template/.gitignore | 1 + template/README.md | 26 +++++++++ template/flake.nix | 50 +++++++++++++++++ template/libs/default.nix | 90 +++++++++++++++++++++++++++++++ template/system/configuration.nix | 49 +++++++++++++++++ template/system/default.nix | 8 +++ template/system/disko.nix | 6 +++ template/system/impermanence.nix | 0 13 files changed, 292 insertions(+), 5 deletions(-) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 flake.lock create mode 100644 template/.envrc create mode 100644 template/.gitignore create mode 100644 template/README.md create mode 100644 template/flake.nix create mode 100644 template/libs/default.nix create mode 100644 template/system/configuration.nix create mode 100644 template/system/default.nix create mode 100644 template/system/disko.nix create mode 100644 template/system/impermanence.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..54a1768 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/.direnv/ +*.iso diff --git a/README.md b/README.md new file mode 100644 index 0000000..2b22eae --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# Impermanence Talk + +## Start a NixOS setup with Impermanence + +1. Create the configuration with the template + `nix flake init --template https://github.com/Krezzlu/impermanence-talk#default --extra-experimental-features "nix-command flakes"` +2. Change the template to your liking. + Specifically the `disko.nix` file. +3. `nix develop --extra-experimental-features "nix-command flakes"` +4. `sudo disko --mode disko ./systems/desktop//disko.nix` diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..f2bbffc --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1712437997, + "narHash": "sha256-g0whLLwRvgO2FsyhY8fNk+TWenS3jg5UdlWL4uqgFeo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e38d7cb66ea4f7a0eb6681920615dfcc30fc2920", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index c7a9a1c..ec2d4e9 100644 --- a/flake.nix +++ b/flake.nix @@ -1,15 +1,32 @@ { - description = "A very basic flake"; + description = "Material for a talk about NixOS Impermanence"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; }; - outputs = { self, nixpkgs }: { + outputs = { + self, + nixpkgs, + ... + } @ inputs: let + supportedSystems = ["x86_64-linux"]; + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system}); + in { + # Typst PDF + # programs = throw "TODO"; # slides - packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello; + # For sue with `nix flake init --template #