mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
update readme
This commit is contained in:
48
README.md
48
README.md
@@ -38,3 +38,51 @@ After that reload the shell
|
|||||||
nix flake update
|
nix flake update
|
||||||
sudo nixos-rebuild switch --flake .#
|
sudo nixos-rebuild switch --flake .#
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Usage in your NixOS config
|
||||||
|
|
||||||
|
`flake.nix`
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
theaninovos = {
|
||||||
|
url = "github:Theaninova/TheaninovOS";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{ nixpkgs, theaninovos, ... }@inputs:
|
||||||
|
let
|
||||||
|
inherit (nixpkgs.lib) genAttrs listToAttrs;
|
||||||
|
eachSystem = genAttrs [ "x86_64-linux" ];
|
||||||
|
legacyPackages = eachSystem (system:
|
||||||
|
import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
allowUnsupportedSystem = true;
|
||||||
|
experimental-features = "nix-command flakes";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
mkHost = { hostname, username, system }:
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
pkgs = legacyPackages.${system};
|
||||||
|
modules = [
|
||||||
|
theaninovos.nixosModules.theaninovos
|
||||||
|
# ... your stuff
|
||||||
|
];
|
||||||
|
specialArgs = inputs;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
nixosConfigurations.MONSTER = mkHost {
|
||||||
|
hostname = "MONSTER";
|
||||||
|
username = "theaninova";
|
||||||
|
system = "x86_64-linux";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user