Update NOTES.md

This commit is contained in:
Tristan D. 2023-11-08 03:45:46 +01:00
parent 2b5d6ffda2
commit 1c13bb531b
Signed by: tristan
SSH key fingerprint: SHA256:3RU4RLOoM8oAjFU19f1W6t8uouZbA7GWkaSW6rjp1k8

View file

@ -1,30 +1,65 @@
# ToDo's
- find a good abstraction for systems that allows setting nixpkgs.localSystem per systems
- e.g. build utility function with a module based interface to set things like march and hostname
- https://nixos.wiki/wiki/Binary_Cache
- build a good abstraction for systems
- allows setting nixpkgs.localSystem per systems
- should yield a `nixosConfiguration.${hostname} = nixpkgs.lib.nixosSystem {...}`
- set localSystem per system like this:
```nix
# to allow building
nix.extraOptions = ''
system-features = system-features = gccarch-znver2
'';
# to actually build (after rebuilding with the feature before)
localSystem = {
inherit system;
gcc = {
arch = "znver2";
tune = "znver2";
- example module abstraction
```nix
# TODO think about partitions/hardware/system specific conf
# TODO think about hardware.nix like things
{ config,
inputs,
lib,
...
}: {
home_conf = {
# ...
};
os_conf = {
# ...
};
}
- example mkSystem abstraction
```nix
let opts = {
hostname = "test";
opt = "znver2";
users = {
{ name = "tristand", groups=[..] },
{ name = "tester", groups=[..] },
};
modules = [
./my_module.nix
];
};
};
pkgs-args = {
inherit localSystem;
inherit overlays;
config = {
# ....
in {
mylib.mkSystem opts? #
# take a path? just let the user call import ?
}
```
- example localSystem conf
```nix
# to allow building
nix.extraOptions = ''
system-features = system-features = gccarch-znver2
'';
# to actually build (after rebuilding with the feature before)
localSystem = {
inherit system;
gcc = {
arch = "znver2";
tune = "znver2";
};
};
};
pkgs = import nixpkgs pkgs-args;
nixpkgs.pkgs = pkgs;
```
pkgs-args = {
inherit localSystem;
inherit overlays;
config = {
# ....
};
};
pkgs = import nixpkgs pkgs-args;
nixpkgs.pkgs = pkgs;
```
- switch from security.sudo.* to security.sudo-rs.*