Rok Garbas, @garbas
systemd conf 2016
Building a package A
Filesystem /usr
Packaging instructions
Filesystem /usr with package A
Building a package B
Filesystem /usr with package A
Packaging instructions
Filesystem /usr with package
A and B
Building a package B
Packaging instructions
Filesystem
/nix/store/
<hash>-packageB/...
Building a package A
Packaging instructions
Filesystem
/nix/store/
<hash>-packageA/...
Disk State
Time
Actual
Target
Disk State
Actual
Target
Time
Disk State
Time
Actual
Target
Building a
config A
Filesystem /etc
configuration options
Filesystem /etc with config A
Building a
config B
Filesystem /etc with config A
configuration options
Filesystem /etc with config
A and B
{
boot.loader.grub.device = "/dev/sda";
fileSystem."/".device = "/dev/sda1";
networking.hostname = "webserver";
networking.firewall.allowedTCPPorts = [ 80 443 ];
environment.systemPackages = with pkgs; [ htop vim ];
services.openssh.enable = true
services.nginx =
{ enable = true;
virtualHosts."service.example.com" =
{ forceSSL = true;
enableACME = true;
location."/".proxyPass = "....";
};
};
...
}
{
...
services.xserver.displayManager.kdm.enable = true;
services.xserver.desktopManager.kde4.enable = true;
#services.xserver.desktopManager.kde5.enable = true;
networking.networkmanager.enable = true
...
}
{
...
systemd.services."hello" = {
description = "Hello";
serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = true;
wantedBy = [ "multi-user.target" ];
script = ''
echo "hello"
'';
};
...
}
{
...
# lenovo t410
boot = {
kernelParams = [
# Kernel GPU Savings Options (NOTE i915 chipset only)
"drm.debug=0" "drm.vblankoffdelay=1" "i915.semaphores=1" "i915.modeset=1"
"i915.use_mmio_flip=1" "i915.powersave=1" "i915.enable_ips=1"
"i915.disable_power_well=1" "i915.enable_hangcheck=1"
"i915.enable_cmd_parser=1" "i915.fastboot=0" "i915.enable_ppgtt=1"
"i915.reset=0" "i915.lvds_use_ssc=0" "i915.enable_psr=0" "vblank_mode=0"
"i915.i915_enable_rc6=1"
];
blacklistedKernelModules = [
# Kernel GPU Savings Options (NOTE i915 chipset only)
"sierra_net" "cdc_mbim" "cdc_ncm" "btusb"
];
};
hardware.cpu.intel.updateMicrocode = true;
...
}
https://github.com/NixOS/nixos-hardware
{
...
containers.database =
{ config =
{ config, pkgs, ... }:
{ services.postgresql.enable = true;
services.postgresql.package = pkgs.postgresql92;
};
};
...
}