Extend NixOS: Difference between revisions
imported>Eisfreak7 m The user configuration was introduced, but not used. This replaces the hardcoded username with the configured one. |
imported>Ixxie update pkgs.lib to lib to bring this up to date. |
||
| Line 90: | Line 90: | ||
The <code>irc-client.nix</code> file will, of course, look like this: | The <code>irc-client.nix</code> file will, of course, look like this: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
{config, pkgs, ...}: | {config, pkgs, lib, ...}: | ||
lib.mkIf (config.networking.hostname == "my-server") { | |||
systemd.services.ircSession = { | systemd.services.ircSession = { | ||
wantedBy = [ "multi-user.target" ]; | wantedBy = [ "multi-user.target" ]; | ||
| Line 117: | Line 117: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
{config, pkgs, ...}: | {config, pkgs, lib, ...}: | ||
let | let | ||
| Line 123: | Line 123: | ||
in | in | ||
with | with lib; | ||
{ | { | ||