add a minimal flake exapmle
This commit is contained in:
parent
478d111f7f
commit
24bba3e309
@ -51,4 +51,39 @@ nix why-depends
|
|||||||
# Jak pouzit flakes na system configuraci?
|
# Jak pouzit flakes na system configuraci?
|
||||||
* Flake je jen cast zbytek je v normalnich nix filech
|
* Flake je jen cast zbytek je v normalnich nix filech
|
||||||
* Zbytek konfigurace bere inputy z flaky.
|
* Zbytek konfigurace bere inputy z flaky.
|
||||||
* Neprijdeme o nic jen mame lock file a moznost flake jako inputu
|
* Neprijdeme o nic jen mame lock file a moznost flake jako inputu
|
||||||
|
---
|
||||||
|
# Flake example
|
||||||
|
```
|
||||||
|
{
|
||||||
|
description = "NixOS configuration";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
zen-browser.url = "github:0xc000022070/zen-browser-flake";
|
||||||
|
};
|
||||||
|
outputs = inputs @ {
|
||||||
|
nixpkgs,
|
||||||
|
home-manager,
|
||||||
|
zen-browser,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
nixosConfigurations = {
|
||||||
|
laptop = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./laptop/configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = false;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.extraSpecialArgs = {inherit zen-browser;};
|
||||||
|
home-manager.users.albert = import ./modules/home.nix;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
Loading…
Reference in New Issue
Block a user