2023-01-07 22:44:17 -05:00
|
|
|
|
{ config, pkgs, lib, username, fullname, ... }:
|
2023-01-03 21:17:49 -05:00
|
|
|
|
let
|
2024-10-15 03:25:56 -04:00
|
|
|
|
inherit (config) machine;
|
|
|
|
|
isMobile = machine == "air";
|
2023-01-03 21:17:49 -05:00
|
|
|
|
|
|
|
|
|
hashedPassword =
|
2024-10-15 03:25:56 -04:00
|
|
|
|
if machine == "earth" then
|
|
|
|
|
"$y$j9T$rpQs/Fnsxh4DNw4qDSvTu.$nzA1EskOnWrYM.Iba7q73O.QPEn3DFWrX2.KY8mKza."
|
|
|
|
|
else if machine == "fire" then
|
|
|
|
|
"$y$j9T$EXc0TFu9LQhQ9YGrOkb7u0$LpwNG0XpUIVSltLqUw7CAOLSsI2rZr1RTBnJai5dkM7"
|
|
|
|
|
else # if machine == "air"
|
|
|
|
|
"$y$j9T$zF34p.W/HFKrWde5Rb1nq/$1Q5IN9IT.IQ6SLg8InUZM5L27.jQV.cRtNENnUPp0ZC";
|
2023-01-03 21:17:49 -05:00
|
|
|
|
in
|
2022-01-16 23:05:12 -05:00
|
|
|
|
{
|
2024-10-23 17:05:19 -04:00
|
|
|
|
nix.package = pkgs.nixVersions.latest;
|
2023-05-15 10:48:08 -04:00
|
|
|
|
nix.settings.auto-optimise-store = true;
|
2022-01-06 21:14:02 -05:00
|
|
|
|
nix.extraOptions = ''
|
2024-01-16 22:14:48 -05:00
|
|
|
|
experimental-features = nix-command flakes ca-derivations
|
2022-01-06 21:14:02 -05:00
|
|
|
|
restrict-eval = false
|
|
|
|
|
'';
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
2023-01-14 21:09:16 -05:00
|
|
|
|
boot.loader.systemd-boot.enable = !isMobile;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = !isMobile;
|
2022-01-06 21:14:02 -05:00
|
|
|
|
|
2024-10-15 03:25:56 -04:00
|
|
|
|
networking.hostName = "toki-${machine}";
|
2022-06-23 14:35:01 -04:00
|
|
|
|
networking.wireless.enable = false;
|
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
|
2023-09-21 23:42:40 -04:00
|
|
|
|
# Power button settings
|
|
|
|
|
services.logind = {
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
HandlePowerKey=ignore
|
|
|
|
|
HandlePowerKeyLongPress=poweroff
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
2022-01-06 21:14:02 -05:00
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "America/New_York";
|
|
|
|
|
|
|
|
|
|
# Enable CUPS to print documents.
|
|
|
|
|
# services.printing.enable = true;
|
|
|
|
|
|
2024-02-09 18:27:17 -05:00
|
|
|
|
services.pipewire.enable = true;
|
|
|
|
|
services.pipewire.pulse.enable = true;
|
|
|
|
|
services.pipewire.wireplumber.enable = true;
|
2022-01-06 21:14:02 -05:00
|
|
|
|
|
2024-08-03 09:52:20 -04:00
|
|
|
|
hardware.graphics.enable = true;
|
2022-01-06 21:14:02 -05:00
|
|
|
|
|
|
|
|
|
users.mutableUsers = false;
|
2022-10-26 15:54:00 -04:00
|
|
|
|
users.users.${username} = {
|
2022-01-06 21:14:02 -05:00
|
|
|
|
isNormalUser = true;
|
2022-10-26 15:54:00 -04:00
|
|
|
|
description = fullname;
|
2024-06-18 22:20:22 -04:00
|
|
|
|
extraGroups = [ "wheel" "networkmanager" "video" ]
|
|
|
|
|
++ lib.optionals isMobile [ "dialout" "feedbackd" ];
|
2022-01-06 21:14:02 -05:00
|
|
|
|
shell = pkgs.fish;
|
2023-01-03 21:17:49 -05:00
|
|
|
|
inherit hashedPassword;
|
2022-01-06 21:14:02 -05:00
|
|
|
|
};
|
|
|
|
|
|
2023-01-03 21:17:49 -05:00
|
|
|
|
users.users.root = { inherit hashedPassword; };
|
|
|
|
|
|
2022-01-06 21:14:02 -05:00
|
|
|
|
|
|
|
|
|
fonts = {
|
2023-08-09 19:19:37 -04:00
|
|
|
|
enableDefaultPackages = true;
|
|
|
|
|
packages = with pkgs; [
|
2024-05-11 19:17:30 -04:00
|
|
|
|
# Monospace
|
2023-08-31 16:16:35 -04:00
|
|
|
|
victor-mono
|
2023-09-21 23:33:36 -04:00
|
|
|
|
jetbrains-mono
|
2024-03-30 19:36:20 -04:00
|
|
|
|
(nerdfonts.override {
|
|
|
|
|
fonts = [
|
|
|
|
|
"VictorMono"
|
|
|
|
|
"JetBrainsMono"
|
|
|
|
|
"NerdFontsSymbolsOnly"
|
|
|
|
|
];
|
|
|
|
|
})
|
2023-08-09 20:31:38 -04:00
|
|
|
|
font-awesome
|
2024-05-11 19:17:30 -04:00
|
|
|
|
|
|
|
|
|
# Regular
|
|
|
|
|
noto-fonts
|
2024-10-23 17:05:19 -04:00
|
|
|
|
noto-fonts-cjk-sans
|
|
|
|
|
noto-fonts-color-emoji
|
2023-05-15 10:48:08 -04:00
|
|
|
|
source-sans-pro
|
2024-05-11 19:17:30 -04:00
|
|
|
|
|
|
|
|
|
# Display
|
|
|
|
|
quicksand
|
|
|
|
|
|
|
|
|
|
# Unicode
|
|
|
|
|
symbola
|
2022-01-06 21:14:02 -05:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
fontconfig = {
|
|
|
|
|
enable = true;
|
|
|
|
|
defaultFonts = {
|
2023-01-07 20:54:12 -05:00
|
|
|
|
serif = lib.optional (!isMobile) "Noto Serif";
|
|
|
|
|
sansSerif = lib.optional (!isMobile) "Noto Sans";
|
2022-10-08 21:31:02 -04:00
|
|
|
|
monospace = [ "VictorMono" ];
|
2022-01-06 21:14:02 -05:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
environment.sessionVariables.GTK_THEME = "Adwaita:dark";
|
|
|
|
|
|
2022-04-28 13:17:06 -04:00
|
|
|
|
services.openssh.enable = true;
|
|
|
|
|
|
2024-02-27 14:46:57 -05:00
|
|
|
|
programs.gnupg.agent = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableSSHSupport = true;
|
2024-05-12 19:04:06 -04:00
|
|
|
|
pinentryPackage = pkgs.pinentry-gnome3;
|
2024-02-27 14:46:57 -05:00
|
|
|
|
};
|
2022-01-06 21:14:02 -05:00
|
|
|
|
|
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
|
system.stateVersion = "21.11"; # Did you read the comment?
|
|
|
|
|
}
|