helm/default.nix
Henrik Lissner 1f8b956499 Bump
emacs-overlay: 5df3462 -> 9fbb5e4
home-manager: 0e6c61a -> ac319fd
nixos-hardware: c4399b9 -> 4177578
nixpkgs-unstable: 84aa237 -> f930ea2
nixpkgs: ea7d4aa -> 3a8d795

And remove old hacks
2021-07-28 00:31:38 -04:00

68 lines
2.1 KiB
Nix

{ inputs, config, lib, pkgs, ... }:
with lib;
with lib.my;
{
imports =
# I use home-manager to deploy files to $HOME; little else
[ inputs.home-manager.nixosModules.home-manager ]
# All my personal modules
++ (mapModulesRec' (toString ./modules) import);
# Common config for all nixos machines; and to ensure the flake operates
# soundly
environment.variables.DOTFILES = config.dotfiles.dir;
environment.variables.DOTFILES_BIN = config.dotfiles.binDir;
# Configure nix and nixpkgs
environment.variables.NIXPKGS_ALLOW_UNFREE = "1";
nix =
let filteredInputs = filterAttrs (n: _: n != "self") inputs;
nixPathInputs = mapAttrsToList (n: v: "${n}=${v}") filteredInputs;
registryInputs = mapAttrs (_: v: { flake = v; }) filteredInputs;
in {
package = pkgs.nixFlakes;
extraOptions = "experimental-features = nix-command flakes";
nixPath = nixPathInputs ++ [
"nixpkgs-overlays=${config.dotfiles.dir}/overlays"
"dotfiles=${config.dotfiles.dir}"
];
binaryCaches = [
"https://nix-community.cachix.org"
];
binaryCachePublicKeys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
registry = registryInputs // { dotfiles.flake = inputs.self; };
autoOptimiseStore = true;
};
system.configurationRevision = with inputs; mkIf (self ? rev) self.rev;
system.stateVersion = "21.05";
## Some reasonable, global defaults
# This is here to appease 'nix flake check' for generic hosts with no
# hardware-configuration.nix or fileSystem config.
fileSystems."/".device = mkDefault "/dev/disk/by-label/nixos";
# Use the latest kernel
boot = {
kernelPackages = mkDefault pkgs.linuxPackages_5_12;
loader = {
efi.canTouchEfiVariables = mkDefault true;
systemd-boot.configurationLimit = 10;
systemd-boot.enable = mkDefault true;
};
};
# Just the bear necessities...
environment.systemPackages = with pkgs; [
bind
cached-nix-shell
git
vim
wget
gnumake
unzip
];
}