2020-01-12 15:17:17 -08:00
|
|
|
# ...
|
2019-08-06 10:56:54 -07:00
|
|
|
|
2020-01-12 15:17:17 -08:00
|
|
|
device:
|
|
|
|
{ pkgs, options, lib, config, ... }:
|
2019-08-06 10:56:54 -07:00
|
|
|
{
|
2020-01-13 16:56:39 -08:00
|
|
|
networking.hostName = lib.mkDefault device;
|
2020-01-12 15:28:02 -08:00
|
|
|
|
2019-08-06 10:56:54 -07:00
|
|
|
imports = [
|
|
|
|
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
2020-01-12 15:17:17 -08:00
|
|
|
/etc/nixos/hardware-configuration.nix
|
|
|
|
|
|
|
|
./options/my.nix
|
|
|
|
./options/secrets.nix
|
|
|
|
./secrets.nix
|
|
|
|
"${./machines}/${device}.nix"
|
2019-08-06 10:56:54 -07:00
|
|
|
];
|
|
|
|
|
2020-01-12 15:17:17 -08:00
|
|
|
###
|
2019-09-06 21:28:52 -07:00
|
|
|
nix = {
|
|
|
|
nixPath = options.nix.nixPath.default ++ [
|
2020-01-12 15:17:17 -08:00
|
|
|
"my=/etc/dotfiles"
|
2019-09-06 21:28:52 -07:00
|
|
|
];
|
|
|
|
autoOptimiseStore = true;
|
2020-01-12 15:17:17 -08:00
|
|
|
trustedUsers = [ "root" ];
|
2019-09-06 21:28:52 -07:00
|
|
|
};
|
2019-12-13 00:04:57 -08:00
|
|
|
|
2020-01-12 15:17:17 -08:00
|
|
|
nixpkgs.config = {
|
|
|
|
allowUnfree = true; # forgive me Stallman senpai
|
|
|
|
# Occasionally, "stable" packages are broken or incomplete, so access to the
|
|
|
|
# bleeding edge is necessary, as a last resort.
|
2019-12-13 00:04:57 -08:00
|
|
|
packageOverrides = pkgs: {
|
|
|
|
unstable = import <nixpkgs-unstable> {
|
|
|
|
config = config.nixpkgs.config;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2019-08-06 10:56:54 -07:00
|
|
|
|
2020-01-13 14:29:00 -08:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
# cached-nix-shell, for instant nix-shell scripts
|
2020-01-13 15:03:35 -08:00
|
|
|
(callPackage
|
|
|
|
(builtins.fetchTarball
|
|
|
|
https://github.com/xzfc/cached-nix-shell/archive/master.tar.gz) {})
|
2020-01-13 14:29:00 -08:00
|
|
|
];
|
|
|
|
|
2019-08-06 10:56:54 -07:00
|
|
|
# This value determines the NixOS release with which your system is to be
|
|
|
|
# compatible, in order to avoid breaking some software such as database
|
|
|
|
# servers. You should change this only after NixOS release notes say you
|
|
|
|
# should.
|
2019-10-17 16:57:00 -07:00
|
|
|
system.stateVersion = "19.09"; # Did you read the comment?
|
2019-08-06 10:56:54 -07:00
|
|
|
}
|