1
0
localhost/configuration.nix

70 lines
1.7 KiB
Nix
Raw Normal View History

2019-05-31 00:02:30 +00:00
# nix-channel --add https://nixos.org/channels/nixos-19.03 nixos
# nix-channel --add https://nixos.org/channels/nixos-unstable unstable
# nix-channel --update
#
{ config, pkgs, ... }:
let
unstable = import <unstable> {};
in {
imports =
[ <nixpkgs/nixos/modules/profiles/hardened.nix>
./hardware-configuration.nix
./packages.nix
./networking.nix
./desktop.nix
./security.nix
./hacks.nix
./docker.nix
2019-07-18 17:29:22 +00:00
./home-manager.nix
2019-08-22 22:11:33 +00:00
./thinkpad.nix
2019-05-31 00:02:30 +00:00
];
time.timeZone = "UTC";
boot.kernelPackages = unstable.linuxPackages_latest;
boot.blacklistedKernelModules = [ "nouveau" ];
2019-08-22 22:11:33 +00:00
boot.earlyVconsoleSetup = true;
hardware.cpu.intel.updateMicrocode = true;
hardware.enableRedistributableFirmware = true;
2019-05-31 00:02:30 +00:00
i18n = {
consoleFont = "latarcyrheb-sun32";
consoleKeyMap = "us";
defaultLocale = "en_US.UTF-8";
};
swapDevices = [
{ device = "/var/swapfile";
size = 32768; # MiB
}
];
2019-07-21 20:00:08 +00:00
users.users.root.shell = pkgs.zsh;
2019-05-31 00:02:30 +00:00
users.users.user = {
2019-07-21 14:22:27 +00:00
initialPassword = "user";
2019-05-31 00:02:30 +00:00
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = [ "wheel" "audio" "libvirtd" ];
};
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.tmpOnTmpfs = true;
# force update all channels
systemd.services.nixos-upgrade.serviceConfig.ExecStartPre =
2019-08-12 16:34:29 +00:00
"/bin/sh -c '${pkgs.nix}/bin/nix-channel --update'";
systemd.timers.nixos-upgrade.timerConfig.OnBootSec = "30m";
2019-08-09 08:27:21 +00:00
systemd.timers.nixos-upgrade.timerConfig.Persistent = true;
2019-05-31 00:02:30 +00:00
system.stateVersion = "19.03";
system.autoUpgrade.enable = true;
nix.optimise.automatic = true;
nix.gc.automatic = true;
nix.gc.options = "--delete-older-than 7d";
}