Update NOTES.md
This commit is contained in:
parent
2b5d6ffda2
commit
1c13bb531b
1 changed files with 59 additions and 24 deletions
83
NOTES.md
83
NOTES.md
|
@ -1,30 +1,65 @@
|
||||||
# ToDo's
|
# ToDo's
|
||||||
|
|
||||||
- find a good abstraction for systems that allows setting nixpkgs.localSystem per systems
|
- https://nixos.wiki/wiki/Binary_Cache
|
||||||
- e.g. build utility function with a module based interface to set things like march and hostname
|
- build a good abstraction for systems
|
||||||
|
- allows setting nixpkgs.localSystem per systems
|
||||||
- should yield a `nixosConfiguration.${hostname} = nixpkgs.lib.nixosSystem {...}`
|
- should yield a `nixosConfiguration.${hostname} = nixpkgs.lib.nixosSystem {...}`
|
||||||
- set localSystem per system like this:
|
- example module abstraction
|
||||||
```nix
|
```nix
|
||||||
# to allow building
|
# TODO think about partitions/hardware/system specific conf
|
||||||
nix.extraOptions = ''
|
# TODO think about hardware.nix like things
|
||||||
system-features = system-features = gccarch-znver2
|
{ config,
|
||||||
'';
|
inputs,
|
||||||
# to actually build (after rebuilding with the feature before)
|
lib,
|
||||||
localSystem = {
|
...
|
||||||
inherit system;
|
}: {
|
||||||
gcc = {
|
home_conf = {
|
||||||
arch = "znver2";
|
# ...
|
||||||
tune = "znver2";
|
};
|
||||||
|
os_conf = {
|
||||||
|
# ...
|
||||||
|
};
|
||||||
|
}
|
||||||
|
- example mkSystem abstraction
|
||||||
|
```nix
|
||||||
|
let opts = {
|
||||||
|
hostname = "test";
|
||||||
|
opt = "znver2";
|
||||||
|
users = {
|
||||||
|
{ name = "tristand", groups=[..] },
|
||||||
|
{ name = "tester", groups=[..] },
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
./my_module.nix
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
in {
|
||||||
pkgs-args = {
|
mylib.mkSystem opts? #
|
||||||
inherit localSystem;
|
# take a path? just let the user call import ?
|
||||||
inherit overlays;
|
}
|
||||||
config = {
|
```
|
||||||
# ....
|
- 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-args = {
|
||||||
pkgs = import nixpkgs pkgs-args;
|
inherit localSystem;
|
||||||
nixpkgs.pkgs = pkgs;
|
inherit overlays;
|
||||||
```
|
config = {
|
||||||
|
# ....
|
||||||
|
};
|
||||||
|
};
|
||||||
|
pkgs = import nixpkgs pkgs-args;
|
||||||
|
nixpkgs.pkgs = pkgs;
|
||||||
|
```
|
||||||
- switch from security.sudo.* to security.sudo-rs.*
|
- switch from security.sudo.* to security.sudo-rs.*
|
||||||
|
|
Loading…
Add table
Reference in a new issue