nix/NOTES.md

67 lines
1.5 KiB
Markdown
Raw Normal View History

2023-11-07 23:49:32 +01:00
# ToDo's
2023-11-09 19:33:08 +01:00
- this looks awesome: https://github.com/erictossell/nixflakes/tree/main
2023-11-08 03:45:46 +01:00
- https://nixos.wiki/wiki/Binary_Cache
- build a good abstraction for systems
- allows setting nixpkgs.localSystem per systems
2023-11-07 23:49:32 +01:00
- should yield a `nixosConfiguration.${hostname} = nixpkgs.lib.nixosSystem {...}`
2023-11-08 03:45:46 +01:00
- 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
];
2023-11-07 23:49:32 +01:00
};
2023-11-08 03:45:46 +01:00
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";
};
2023-11-07 23:49:32 +01:00
};
2023-11-08 03:45:46 +01:00
pkgs-args = {
inherit localSystem;
inherit overlays;
config = {
# ....
};
};
pkgs = import nixpkgs pkgs-args;
nixpkgs.pkgs = pkgs;
```
2023-11-07 23:49:32 +01:00
- switch from security.sudo.* to security.sudo-rs.*