xezo360hye
668c2f17c4
Refactor configuration generation - Inherit lib from nixpkgs - Rename functions (mkHome -> makeHome, merge -> forEachHost - Relocate some variables' definitions into config generator functions - Create separate function to track home-manager modules
88 lines
1.7 KiB
Nix
88 lines
1.7 KiB
Nix
{
|
|
inputs,
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
let flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
|
in
|
|
{
|
|
# Bootloader
|
|
boot.loader.grub.enable = true;
|
|
boot.loader.grub.device = "/dev/sda";
|
|
|
|
|
|
# Networking
|
|
networking.networkmanager.enable = true;
|
|
services.openssh.enable = true;
|
|
|
|
|
|
# l10n and i8n
|
|
time.timeZone = "Europe/Riga";
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
|
|
# Editor
|
|
programs.neovim = {
|
|
enable = true;
|
|
viAlias = true;
|
|
vimAlias = true;
|
|
defaultEditor = true;
|
|
};
|
|
|
|
|
|
# Nix
|
|
nixpkgs.config.allowUnfree = true;
|
|
nix = {
|
|
settings = {
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
flake-registry = "";
|
|
nix-path = config.nix.nixPath;
|
|
};
|
|
|
|
channel.enable = false;
|
|
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
|
|
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
|
};
|
|
|
|
|
|
# Users
|
|
users.mutableUsers = false;
|
|
users.users.andrey = {
|
|
isNormalUser = true;
|
|
initialHashedPassword = "$y$j9T$mGZT4otEkrc94e.Ile.P20$BoxfgxCiacs.tYoEp7S5AjcP.aMUBrsaCJYJkBot635";
|
|
extraGroups = [ "wheel" "cdrom" "networkmanager" "audio" "dialout" ];
|
|
};
|
|
|
|
security.sudo.execWheelOnly = true;
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
|
|
# Packages
|
|
environment.systemPackages = with pkgs; [
|
|
alsa-utils
|
|
mpv
|
|
];
|
|
|
|
|
|
# Xorg
|
|
security.rtkit.enable = true;
|
|
services = {
|
|
xserver.enable = true;
|
|
|
|
pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
alsa.support32Bit = true;
|
|
pulse.enable = true;
|
|
};
|
|
|
|
libinput.touchpad = {
|
|
naturalScrolling = true;
|
|
disableWhileTyping = false;
|
|
tappingDragLock = false;
|
|
};
|
|
};
|
|
}
|