2022-09-24 14:36:34 +00:00
|
|
|
# nix-channel --add https://nixos.org/channels/nixos-22.05 nixos
|
|
|
|
# nix-channel --add https://nixos.org/channels/nixos-22.05-small nixos-small
|
|
|
|
# nix-channel --add https://nixos.org/channels/nixos-unstable unstable
|
2019-05-31 00:02:30 +00:00
|
|
|
# nix-channel --update
|
|
|
|
#
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
2020-06-27 17:37:08 +00:00
|
|
|
nixos-small = import <nixos-small> {};
|
2019-05-31 00:02:30 +00:00
|
|
|
in {
|
|
|
|
imports =
|
2021-01-27 21:21:05 +00:00
|
|
|
[ ./hardware-configuration.nix
|
2019-05-31 00:02:30 +00:00
|
|
|
./packages.nix
|
|
|
|
./networking.nix
|
|
|
|
./desktop.nix
|
|
|
|
./security.nix
|
|
|
|
./hacks.nix
|
2019-07-05 19:43:28 +00:00
|
|
|
./docker.nix
|
2019-07-18 17:29:22 +00:00
|
|
|
./home-manager.nix
|
2019-08-22 22:11:33 +00:00
|
|
|
./thinkpad.nix
|
2020-01-03 09:25:01 +00:00
|
|
|
./auto-update.nix
|
2019-05-31 00:02:30 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
time.timeZone = "UTC";
|
|
|
|
|
2022-05-11 14:07:29 +00:00
|
|
|
services.logind.extraConfig = ''
|
|
|
|
LidSwitchIgnoreInhibited=no
|
|
|
|
'';
|
|
|
|
|
2021-10-07 15:25:51 +00:00
|
|
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
2020-03-19 08:35:08 +00:00
|
|
|
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
|
|
|
|
console.font = "latarcyrheb-sun32";
|
|
|
|
console.keyMap = "us";
|
|
|
|
console.earlySetup = true;
|
2019-07-25 07:17:03 +00:00
|
|
|
|
|
|
|
hardware.cpu.intel.updateMicrocode = true;
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
2019-05-31 00:02:30 +00:00
|
|
|
|
2022-05-11 14:08:21 +00:00
|
|
|
services.fwupd.enable = true;
|
|
|
|
|
2019-05-31 00:02:30 +00:00
|
|
|
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;
|
2021-05-05 09:19:19 +00:00
|
|
|
boot.supportedFilesystems = [ "ntfs" ];
|
2019-05-31 00:02:30 +00:00
|
|
|
|
2020-11-20 18:44:01 +00:00
|
|
|
system.stateVersion = "20.09";
|
2019-05-31 00:02:30 +00:00
|
|
|
|
2020-09-08 23:02:29 +00:00
|
|
|
nix = {
|
|
|
|
trustedUsers = [ "root" "user" ];
|
|
|
|
optimise.automatic = true;
|
|
|
|
gc = {
|
|
|
|
automatic = true;
|
|
|
|
options = "--delete-older-than 7d";
|
|
|
|
};
|
|
|
|
};
|
2019-05-31 00:02:30 +00:00
|
|
|
}
|