diff options
| author | Fuwn <[email protected]> | 2024-10-02 13:44:47 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-10-02 13:48:22 +0000 |
| commit | 56d1c1ccdfa76cd8723f5454c88cca881cda4a57 (patch) | |
| tree | 9b3534f6ad89c80584682f290016f49d6ff69867 | |
| parent | docs(readme): fix flake branch (diff) | |
| download | pia.nix-56d1c1ccdfa76cd8723f5454c88cca881cda4a57.tar.xz pia.nix-56d1c1ccdfa76cd8723f5454c88cca881cda4a57.zip | |
docs(readme): tidy nix examples
| -rw-r--r-- | README.md | 24 |
1 files changed, 11 insertions, 13 deletions
@@ -7,27 +7,25 @@ VPNs to your Nixos system. You'll need to include this module in your `flake.nix` file: -``` +```nix { inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; inputs.pia.url = "github:Fuwn/nixos-pia"; inputs.pia.inputs.nixpkgs.follows = "nixpkgs"; - outputs = { self, nixpkgs, pia }: { - nixosConfigurations.owlhouse = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - pia.nixosModule - ./config.nix - ]; - }; + outputs = { nixpkgs, pia, self }: { + nixosConfigurations.yourConfiguration = nixpkgs.lib.nixosSystem { + modules = [ pia.nixosModules."x86_64-linux".default ]; + }; + }; +} ``` -And you'll need to enable the vpn in another module. For example, you might have the following in your `config.nix` +And you'll need to enable the vpn in another module. For example, you might +have the following in your `config.nix` -``` -{ config, ...}: -{ +```nix +{ config, ... }: { services.pia.enable = true; services.pia.authUserPass.username = "hooty"; services.pia.authUserPass.password = "hunter42"; |