-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
37 changed files
with
126 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#+Title: Advanced Concepts | Day 3 | ||
#+Author: Katharina Fey | ||
#+SETUPFILE: ../../html.setup | ||
|
||
[[../../README.org][Back to Index]] | ||
|
||
Today we will cover a few different advanced concepts around Nix. | ||
|
||
+ What is ~nixpkgs~ and how does it work? | ||
+ Exploring and understanding Nix ecosystems | ||
+ Source pinning and management | ||
+ Cross compilation with Nix | ||
|
||
** Slides | ||
|
||
1. [[./70-nixpkgs.org][Nixpkgs]] | ||
2. [[./80-overlays-and-flakes.org][Overlays]] | ||
3. [[file:85-flakes.org][Flakes]] | ||
4. [[./90-development.org][Nix for developers]] | ||
5. Cross Compilation | ||
1. [[./10-what-is.org][What even _is_ cross compilation??]] | ||
2. [[./20-basic-usage.org][Basic cross-compilation]] | ||
3. [[./30-build-inputs.org][Build inputs and other weirdnesses]] | ||
|
||
** Homework | ||
|
||
1. [[./71-nixpkgs-exercise.org][Nixpkgs excercises]] | ||
2. [[file:40-aarch64-example.org][Cross compilation: aarch64]] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#+Title: home-manager | ||
#+SETUPFILE: ../../reveal.setup | ||
|
||
|
||
** Collection of userspace modules | ||
|
||
** | ||
|
||
** home-manager | ||
|
||
\\ | ||
|
||
+ https://github.com/nix-community/home-manager | ||
+ ~nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager~ | ||
+ ~nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.05.tar.gz home-manager~ | ||
+ ~nix-shell '<home-manager>' -A install~ |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 0 additions & 9 deletions
9
...es/day-05-modules/70-exercise-modules.org → ...es/day-04-modules/70-exercise-modules.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ pkgs, ... }: | ||
let | ||
cowFile = pkgs.runCommand "cowfile-gen" {} '' | ||
mkdir $out | ||
echo "Hello" | ${pkgs.cowsay}/bin/cowsay > $out/cow.txt | ||
''; | ||
in | ||
{ | ||
imports = [ ./gen-config.nix ]; | ||
|
||
fileSystems."/" = { | ||
device = "zpool/root"; | ||
fsType = "ext4"; | ||
}; | ||
|
||
services.my-config-generator.default = { | ||
type = "something"; | ||
}; | ||
|
||
boot.loader.grub.device = "/dev/fake"; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ lib, config, ... }: | ||
with lib; | ||
let cg = config.services.my-config-generator; | ||
in | ||
{ | ||
options.services.my-config-generator = { | ||
enable = mkEnableOption "Enable config generator"; | ||
|
||
etcName = mkOption { type = types.path; }; | ||
|
||
default = { | ||
type = types.listOf (submodule { | ||
options = { | ||
type = lib.mkOption { type = lib.str; }; | ||
}; | ||
}); | ||
}; | ||
|
||
config = lib.mkIf cg.enable { | ||
environment.etc."${cg.etcName}".text = lib.generators.toJSON { | ||
default = "${cg.default}"; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
{ pkgs, ... }: | ||
{ config, pkgs, ... }: | ||
let | ||
cowFile = pkgs.runCommand "cowfile-gen" {} '' | ||
mkdir $out | ||
echo "Hello" | ${pkgs.cowsay}/bin/cowsay > $out/cow.txt | ||
''; | ||
in | ||
{ | ||
networking.firewall.allowedTCPPorts = [ 80 ]; | ||
|
||
services.nginx = { | ||
enable = true; | ||
virtualHosts."main" = { | ||
default = true; | ||
locations."/" = { | ||
root = cowFile; | ||
}; | ||
}; | ||
fileSystems."/" = { | ||
device = "zpool/root"; | ||
fsType = "ext4"; | ||
}; | ||
|
||
users.users.root.password = "aoesunth"; | ||
boot.loader.grub.device = "/dev/fake"; | ||
|
||
environment.etc."foo".text = "bar"; | ||
|
||
users.users.root.password = "1234"; | ||
users.mutableUsers = false; | ||
} |
Binary file not shown.