nixos-config/config/config.nix

93 lines
2.8 KiB
Nix
Raw Normal View History

2023-01-07 22:44:17 -05:00
{ config, pkgs, lib, username, fullname, ... }:
let
2023-01-07 20:54:12 -05:00
inherit (config) platform;
isMobile = platform == "mobile";
hashedPassword =
if platform == "desktop" then
"$6$HYibiGhDN.JgLtw6$cecU7NjfumTUJSkFNFQG4uVgdd3tTPLGxK0zHAwYn3un/V43IUlyVBNKoRMLCQk65RckbD/.AjsLFVFKUUHVA/"
else if platform == "laptop" then
"$6$y3eb1phxFWnParRT$w1LNfxJ2ByHoiBa5ywh4STGuIK/r4Tnyxx2Xe/nlovrE6LuuLAVdKRFAroUTtUI/d2BNGI9ErjZ2z2Dl7w/t00"
2023-05-15 10:48:08 -04:00
else # if platform == "mobile"
"$6$vmmMT7pEY1W0Bj9R$Kb6nuwdg/KzCrGcUPkEo2jJ6a2NJRikiOeN8/I8ObU1K6rVYvgYqPVgPg9NkLaUScdh1PWcabuvaHCFLMw14A0";
in
2022-01-16 23:05:12 -05:00
{
2022-01-06 21:14:02 -05:00
nix.package = pkgs.nixFlakes;
2023-05-15 10:48:08 -04:00
nix.settings.auto-optimise-store = true;
2022-01-06 21:14:02 -05:00
nix.extraOptions = ''
experimental-features = nix-command flakes
restrict-eval = false
'';
nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = !isMobile;
boot.loader.efi.canTouchEfiVariables = !isMobile;
2022-01-06 21:14:02 -05:00
networking.hostName = "kiana-${platform}";
2022-06-23 14:35:01 -04:00
networking.wireless.enable = false;
networking.networkmanager.enable = true;
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;
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
hardware.opengl.enable = true;
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;
2023-01-07 20:54:12 -05:00
extraGroups = [ "wheel" "networkmanager" ]
++ lib.optionals isMobile [ "dialout" "feedbackd" "video" ];
2022-01-06 21:14:02 -05:00
shell = pkgs.fish;
inherit hashedPassword;
2022-01-06 21:14:02 -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; [
2022-01-06 21:14:02 -05:00
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
(nerdfonts.override { fonts = [ "UbuntuMono" "JetBrainsMono" ]; })
2023-08-09 20:31:38 -04:00
font-awesome
2023-07-25 00:33:48 -04:00
emacs-all-the-icons-fonts
2022-04-20 23:30:16 -04:00
victor-mono
2022-09-23 23:33:11 -04:00
ubuntu_font_family
2023-05-15 10:48:08 -04:00
source-sans-pro
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;
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. Its 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?
}