2024-08-06 04:58:20 +05:30
|
|
|
{ inputs, config, pkgs, lib, ... }:
|
2024-08-05 02:13:48 +05:30
|
|
|
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;
|
2024-08-16 04:14:46 +05:30
|
|
|
services.tailscale.enable = true;
|
2024-08-05 02:13:48 +05:30
|
|
|
|
|
|
|
|
2024-08-07 23:32:33 +05:30
|
|
|
# Router shared filesystem
|
|
|
|
fileSystems."/home/andrey/Public" = {
|
2024-08-17 20:11:50 +05:30
|
|
|
device = "root@192.168.0.3:/mnt/sda1";
|
2024-08-07 23:32:33 +05:30
|
|
|
fsType = "sshfs";
|
|
|
|
options = [
|
|
|
|
"nodev"
|
|
|
|
"noatime"
|
|
|
|
"allow_other"
|
|
|
|
"reconnect"
|
|
|
|
"IdentityFile=/home/andrey/.ssh/id_ed25519"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2024-08-05 02:13:48 +05:30
|
|
|
# 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 = {
|
2024-08-16 04:33:02 +05:30
|
|
|
trusted-users = [ "andrey" ];
|
2024-08-05 02:13:48 +05:30
|
|
|
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";
|
2024-08-15 03:01:46 +05:30
|
|
|
extraGroups = [ "wheel" "cdrom" "networkmanager" "audio" "dialout" "scanner" "lp" ];
|
2024-08-05 02:13:48 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
security.sudo.execWheelOnly = true;
|
|
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
|
2024-08-15 03:01:46 +05:30
|
|
|
|
|
|
|
# Printers and scanners
|
|
|
|
hardware.sane.enable = true;
|
|
|
|
services.printing.enable = true;
|
|
|
|
services.printing.drivers = [ pkgs.cnijfilter2 ];
|
|
|
|
programs.system-config-printer.enable = true;
|
2024-08-05 02:13:48 +05:30
|
|
|
|
2024-08-17 20:11:03 +05:30
|
|
|
services.avahi = {
|
|
|
|
enable = true;
|
|
|
|
nssmdns4 = true;
|
|
|
|
openFirewall = true;
|
|
|
|
};
|
|
|
|
|
2024-08-16 04:14:46 +05:30
|
|
|
|
2024-08-06 04:58:20 +05:30
|
|
|
# Programs
|
|
|
|
programs = {
|
|
|
|
git = {
|
|
|
|
enable = true;
|
|
|
|
config = {
|
|
|
|
init.defaultBranch = "master";
|
|
|
|
url."https://github.com/".insteadOf = [ "gh:" "github:" ];
|
|
|
|
url."https://git.psf.lt/".insteadOf = [ "psf:" "gitea:" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2024-08-05 02:13:48 +05:30
|
|
|
# Packages
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
alsa-utils
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
# 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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|