2022-05-05 23:01:56 -04:00
|
|
|
{ config, lib, pkgs, ... }: {
|
2022-05-01 23:39:50 -04:00
|
|
|
|
2022-06-13 23:43:49 -04:00
|
|
|
imports = [ ../modules/shell ../modules/editor ../modules/mail/himalaya.nix ];
|
2022-05-01 23:39:50 -04:00
|
|
|
|
2022-05-29 13:44:45 -04:00
|
|
|
options = with lib; {
|
|
|
|
dotfilesPath = mkOption {
|
|
|
|
type = types.path;
|
|
|
|
description = "Path of dotfiles repository.";
|
|
|
|
default = builtins.toPath "/home/${config.user}/dev/personal/dotfiles";
|
|
|
|
};
|
2022-06-04 10:29:36 -04:00
|
|
|
dotfilesRepo = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
description = "Link to dotfiles repository.";
|
|
|
|
};
|
2022-06-04 21:08:09 -04:00
|
|
|
unfreePackages = mkOption {
|
|
|
|
type = types.listOf types.str;
|
|
|
|
description = "List of unfree packages to allow.";
|
|
|
|
default = [ ];
|
|
|
|
};
|
2022-05-29 13:44:45 -04:00
|
|
|
};
|
|
|
|
|
2022-05-22 19:43:46 -04:00
|
|
|
config = {
|
2022-05-01 23:39:50 -04:00
|
|
|
|
2022-05-29 13:44:45 -04:00
|
|
|
# Enable features in Nix commands
|
2022-05-22 19:43:46 -04:00
|
|
|
nix.extraOptions = "experimental-features = nix-command flakes";
|
|
|
|
|
2022-06-05 08:32:23 -04:00
|
|
|
# Pin a state version to prevent warnings
|
2022-06-18 13:17:11 -04:00
|
|
|
# system.stateVersion = "22.11";
|
2022-06-05 08:32:23 -04:00
|
|
|
|
2022-05-29 13:44:45 -04:00
|
|
|
# Basic common system packages for all devices
|
|
|
|
environment.systemPackages = with pkgs; [ git vim wget curl ];
|
|
|
|
|
|
|
|
# Use the system-level nixpkgs instead of Home Manager's
|
2022-05-22 19:43:46 -04:00
|
|
|
home-manager.useGlobalPkgs = true;
|
2022-05-29 13:44:45 -04:00
|
|
|
|
|
|
|
# Install packages to /etc/profiles instead of ~/.nix-profile, useful when
|
2022-06-04 21:08:09 -04:00
|
|
|
# using multiple profiles for one user
|
2022-05-22 19:43:46 -04:00
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
|
2022-06-04 21:08:09 -04:00
|
|
|
# Allow specified unfree packages (identified elsewhere)
|
|
|
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
|
|
|
builtins.elem (lib.getName pkg) config.unfreePackages;
|
|
|
|
|
2022-05-29 13:44:45 -04:00
|
|
|
# Set a variable for dotfiles repo, not necessary but convenient
|
|
|
|
home-manager.users.${config.user} = {
|
|
|
|
home.sessionVariables = { DOTS = config.dotfilesPath; };
|
|
|
|
};
|
2022-05-22 19:43:46 -04:00
|
|
|
|
|
|
|
};
|
2022-05-01 23:39:50 -04:00
|
|
|
|
|
|
|
}
|