Fix examples in README.

This commit is contained in:
r-vdp 2023-06-12 12:46:45 +02:00
parent 67f99cb63a
commit c9f1177753
No known key found for this signature in database

View file

@ -30,18 +30,15 @@ A basic Nix flake using System Manager would look something like this:
{ {
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
system-manager = { system-manager = {
url = "github:numtide/system-manager"; url = "github:numtide/system-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
}; };
}; };
outputs = { self, flake-utils, nixpkgs, system-manager }: { outputs = { self, flake-utils, nixpkgs, system-manager }: {
systemConfigs.default = self.lib.makeSystemConfig { systemConfigs.default = system-manager.lib.makeSystemConfig {
system = flake-utils.lib.system.x86_64-linux;
modules = [ modules = [
./modules ./modules
]; ];
@ -60,11 +57,14 @@ A simple System Manager module could look something like this:
{ {
config = { config = {
environment.etc = { environment = {
etc = {
"foo.conf".text = '' "foo.conf".text = ''
launch_the_rockets = true launch_the_rockets = true
''; '';
}; };
};
systemd.services = { systemd.services = {
foo = { foo = {
enable = true; enable = true;
@ -72,7 +72,7 @@ A simple System Manager module could look something like this:
Type = "oneshot"; Type = "oneshot";
RemainAfterExit = true; RemainAfterExit = true;
}; };
wantedBy = [ "multi-user.target" ]; wantedBy = [ "system-manager.target" ];
script = '' script = ''
${lib.getBin pkgs.foo}/bin/foo ${lib.getBin pkgs.foo}/bin/foo
echo "We launched the rockets!" echo "We launched the rockets!"