2022-01-10 19:25:34 +01:00
|
|
|
|
# Global config
|
|
|
|
|
|
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
2022-01-12 00:20:57 +01:00
|
|
|
|
with lib; with types;
|
|
|
|
|
let named = submodule {
|
|
|
|
|
options = {
|
|
|
|
|
normal = mkOption { type = str; };
|
|
|
|
|
bright = mkOption { type = str; };
|
|
|
|
|
pastel = mkOption { type = str; };
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
special = submodule {
|
|
|
|
|
options = {
|
|
|
|
|
primary = mkOption { type = str; };
|
|
|
|
|
normal = mkOption { type = str; };
|
|
|
|
|
slight = mkOption { type = str; };
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
themeType = submodule {
|
|
|
|
|
options = {
|
|
|
|
|
foreground = mkOption { type = special; };
|
|
|
|
|
background = mkOption { type = special; };
|
|
|
|
|
grayscales = mkOption { type = listOf str; };
|
|
|
|
|
red = mkOption { type = named; };
|
|
|
|
|
green = mkOption { type = named; };
|
|
|
|
|
blue = mkOption { type = named; };
|
|
|
|
|
yellow = mkOption { type = named; };
|
|
|
|
|
purple = mkOption { type = named; };
|
|
|
|
|
cyan = mkOption { type = named; };
|
|
|
|
|
pink = mkOption { type = named; };
|
|
|
|
|
orange = mkOption { type = named; };
|
|
|
|
|
misc = mkOption { type = attrsOf str; };
|
|
|
|
|
hex = mkOption { type = themeType; };
|
|
|
|
|
};
|
|
|
|
|
}; in
|
2022-01-10 19:25:34 +01:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
options.riley = with lib; {
|
|
|
|
|
|
2022-01-12 00:20:57 +01:00
|
|
|
|
theme = mkOption {
|
|
|
|
|
type = themeType;
|
|
|
|
|
description = ''
|
|
|
|
|
The theme used across the installation. Not used if gui is disabled.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
2022-01-10 19:25:34 +01:00
|
|
|
|
};
|
|
|
|
|
|
2022-01-12 00:20:57 +01:00
|
|
|
|
options.devices = mkOption {
|
|
|
|
|
type = with types; submodule {
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
|
|
audio = mkOption {
|
|
|
|
|
type = nullOr (submodule {
|
|
|
|
|
options = {
|
|
|
|
|
speakers = mkOption { type = str; };
|
|
|
|
|
external = mkOption { type = str; };
|
|
|
|
|
headset = mkOption { type = nullOr str; };
|
|
|
|
|
main-mic = mkOption { type = nullOr str; };
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
description = ''
|
|
|
|
|
Known audio devices: outputs & microphones.
|
|
|
|
|
Each string should be a pulseaudio sink or source.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
video = mkOption {
|
|
|
|
|
type = submodule {
|
|
|
|
|
options = {
|
|
|
|
|
displays = let output = submodule {
|
|
|
|
|
options = {
|
|
|
|
|
primary = mkOption {
|
|
|
|
|
type = bool;
|
|
|
|
|
default = false;
|
|
|
|
|
};
|
|
|
|
|
position = mkOption {
|
|
|
|
|
type = nullOr (listOf int);
|
|
|
|
|
default = null;
|
|
|
|
|
};
|
|
|
|
|
rotate = mkOption {
|
|
|
|
|
type = enum [ "normal" "left" "right" "inverted" ];
|
|
|
|
|
default = "normal";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}; in mkOption {
|
|
|
|
|
type = attrsOf output;
|
|
|
|
|
description = ''
|
|
|
|
|
A list of outputs with information on how to place them.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
description = ''
|
|
|
|
|
Define the video devices (just the displays, for now).
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2022-01-10 19:25:34 +01:00
|
|
|
|
imports = [
|
|
|
|
|
|
|
|
|
|
<home-manager/nixos>
|
|
|
|
|
|
2022-01-23 17:03:10 +01:00
|
|
|
|
./kak
|
2022-01-12 00:20:57 +01:00
|
|
|
|
./gui
|
2022-01-10 19:25:34 +01:00
|
|
|
|
|
|
|
|
|
./fonts.nix
|
|
|
|
|
./git.nix
|
2022-01-12 00:20:57 +01:00
|
|
|
|
./ssh.nix
|
2022-01-10 19:25:34 +01:00
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
config = {
|
|
|
|
|
|
2022-01-12 00:20:57 +01:00
|
|
|
|
riley.theme = (import ../colors.nix)."dark";
|
|
|
|
|
|
2022-01-23 17:03:10 +01:00
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
|
|
2022-01-10 19:25:34 +01:00
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
|
|
|
|
|
# Web utils
|
|
|
|
|
|
|
|
|
|
wget
|
|
|
|
|
curl
|
|
|
|
|
git
|
|
|
|
|
|
|
|
|
|
# Coreutils
|
|
|
|
|
|
|
|
|
|
ripgrep
|
|
|
|
|
bottom
|
|
|
|
|
skim
|
|
|
|
|
exa
|
|
|
|
|
bat
|
|
|
|
|
lf
|
|
|
|
|
fd
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
|
loader.systemd-boot = {
|
|
|
|
|
enable = true;
|
|
|
|
|
editor = false;
|
|
|
|
|
configurationLimit = 10;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
loader.efi = {
|
|
|
|
|
canTouchEfiVariables = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
cleanTmpDir = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
|
firewall.enable = false;
|
|
|
|
|
useDHCP = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2022-01-23 16:03:31 +01:00
|
|
|
|
security.rtkit.enable = true;
|
2022-01-10 19:25:34 +01:00
|
|
|
|
|
|
|
|
|
users.users."riley" = {
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
}
|