2023-12-15 12:40:04 +05:00
|
|
|
{
|
2024-07-08 15:07:24 +05:00
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
system.stateVersion = "23.11";
|
|
|
|
|
|
|
|
imports = [./hardware.nix ./users.nix];
|
|
|
|
|
|
|
|
# Nix settings
|
|
|
|
nix = {
|
|
|
|
settings = {
|
|
|
|
experimental-features = ["nix-command" "flakes" "repl-flake"];
|
|
|
|
trusted-users = ["l-nafaryus"];
|
|
|
|
allowed-users = ["l-nafaryus"];
|
2024-07-18 15:49:05 +05:00
|
|
|
substituters = [
|
|
|
|
"https://cache.elnafo.ru"
|
|
|
|
"https://bonfire.cachix.org"
|
|
|
|
"https://nix-community.cachix.org"
|
|
|
|
];
|
|
|
|
trusted-public-keys = [
|
|
|
|
"cache.elnafo.ru:j3VD+Hn+is2Qk3lPXDSdPwHJQSatizk7V82iJ2RP1yo="
|
|
|
|
"bonfire.cachix.org-1:mzAGBy/Crdf8NhKail5ciK7ZrGRbPJJobW6TwFb7WYM="
|
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
|
|
];
|
2024-07-08 15:07:24 +05:00
|
|
|
auto-optimise-store = true;
|
2023-12-15 12:40:04 +05:00
|
|
|
};
|
2024-07-08 15:07:24 +05:00
|
|
|
gc = {
|
|
|
|
automatic = lib.mkDefault true;
|
|
|
|
dates = lib.mkDefault "weekly";
|
|
|
|
options = lib.mkDefault "--delete-older-than 7d";
|
2023-12-15 12:40:04 +05:00
|
|
|
};
|
2024-07-08 15:07:24 +05:00
|
|
|
};
|
|
|
|
|
|
|
|
# Nix packages
|
|
|
|
nixpkgs = {
|
|
|
|
hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
config.allowUnfree = true;
|
|
|
|
config.cudaSupport = false;
|
|
|
|
|
|
|
|
overlays = [
|
|
|
|
(final: prev: {
|
|
|
|
blender = prev.blender.override {cudaSupport = true;};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
# Services
|
|
|
|
services.xserver = {
|
|
|
|
enable = true;
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
xkb = {
|
|
|
|
layout = "us";
|
|
|
|
variant = "";
|
2024-06-20 00:16:28 +05:00
|
|
|
};
|
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
videoDrivers = ["nvidia"];
|
2024-06-20 00:16:28 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
#displayManager.gdm = {
|
|
|
|
# enable = true;
|
|
|
|
# autoSuspend = false;
|
|
|
|
# wayland = true;
|
|
|
|
#};
|
|
|
|
#desktopManager.gnome.enable = true;
|
|
|
|
#windowManager.awesome.enable = true;
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
wacom.enable = true;
|
|
|
|
};
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
services.greetd = let
|
|
|
|
hyprConfig = pkgs.writeText "greetd-hyprland-config" ''
|
|
|
|
exec-once = ${lib.getExe pkgs.greetd.regreet}; hyprctl dispatch exit
|
|
|
|
'';
|
|
|
|
in {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
default_session = {
|
|
|
|
command = "${lib.getExe config.programs.hyprland.package} --config ${hyprConfig}";
|
|
|
|
user = "greeter";
|
|
|
|
};
|
2023-12-15 12:40:04 +05:00
|
|
|
};
|
2024-07-08 15:07:24 +05:00
|
|
|
};
|
|
|
|
|
|
|
|
programs.regreet = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
GTK = {
|
|
|
|
application_prefer_dark_theme = true;
|
|
|
|
# TODO: provide gtk themes
|
|
|
|
# theme_name = "Catppuccin-Macchiato-Standard-Green-Dark";
|
|
|
|
# icon_theme_name = "Catppuccin-Macchiato-Green-Cursors";
|
|
|
|
# cursor_theme_name = "Papirus-Dark";
|
|
|
|
# font_name = "";
|
|
|
|
};
|
|
|
|
appearance = {
|
|
|
|
greeting_msg = "Hey, you. You're finally awake.";
|
|
|
|
};
|
2023-12-26 15:17:02 +05:00
|
|
|
};
|
2024-07-08 15:07:24 +05:00
|
|
|
};
|
|
|
|
|
|
|
|
programs.hyprland = {
|
|
|
|
enable = true;
|
|
|
|
xwayland.enable = true;
|
|
|
|
};
|
|
|
|
services.dbus.enable = true;
|
|
|
|
|
2024-07-24 11:39:18 +05:00
|
|
|
services.printing = {
|
|
|
|
enable = true;
|
|
|
|
drivers = [pkgs.hplip];
|
|
|
|
};
|
|
|
|
|
|
|
|
services.avahi = {
|
|
|
|
enable = true;
|
|
|
|
nssmdns4 = true;
|
|
|
|
openFirewall = true;
|
|
|
|
};
|
2024-07-08 15:07:24 +05:00
|
|
|
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
jack.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
startWhenNeeded = true;
|
|
|
|
settings.PasswordAuthentication = false;
|
|
|
|
settings.KbdInteractiveAuthentication = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.udev = {
|
|
|
|
packages = with pkgs; [gnome.gnome-settings-daemon];
|
|
|
|
extraRules = ''
|
|
|
|
KERNEL=="rtc0", GROUP="audio"
|
|
|
|
KERNEL=="hpet", GROUP="audio"
|
|
|
|
'';
|
|
|
|
};
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
services.blueman.enable = true;
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
services.btrfs.autoScrub = {
|
|
|
|
enable = true;
|
|
|
|
interval = "monthly";
|
|
|
|
fileSystems = ["/"];
|
|
|
|
};
|
2024-04-24 14:26:24 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
# Packages
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
wget
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
parted
|
|
|
|
ntfs3g
|
|
|
|
sshfs
|
|
|
|
exfat
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
lm_sensors
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
git
|
|
|
|
git-lfs
|
|
|
|
ripgrep
|
|
|
|
fd
|
|
|
|
lazygit
|
|
|
|
unzip
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
gnumake
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
fishPlugins.fzf-fish
|
|
|
|
fishPlugins.tide
|
|
|
|
fishPlugins.grc
|
|
|
|
fishPlugins.hydro
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
nnn
|
|
|
|
fzf
|
|
|
|
grc
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
gcc
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
cachix
|
|
|
|
];
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
programs = {
|
|
|
|
fish.enable = true;
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
neovim = {
|
|
|
|
enable = true;
|
|
|
|
defaultEditor = true;
|
2023-12-15 12:40:04 +05:00
|
|
|
};
|
2024-07-08 15:07:24 +05:00
|
|
|
};
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
programs.ssh.extraConfig = ''
|
|
|
|
Host astora
|
|
|
|
HostName 192.168.156.101
|
|
|
|
Port 22
|
|
|
|
User l-nafaryus
|
2024-01-10 22:32:33 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
Host catarina
|
|
|
|
HostName 192.168.156.102
|
|
|
|
Port 22
|
|
|
|
User l-nafaryus
|
|
|
|
'';
|
2024-01-10 22:32:33 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
programs.direnv.enable = true;
|
2023-12-15 19:49:42 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
fonts.packages = with pkgs; [nerdfonts];
|
2023-12-15 12:40:04 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
programs.steam.enable = true;
|
|
|
|
systemd.extraConfig = "DefaultLimitNOFILE=1048576";
|
2024-05-03 23:10:55 +05:00
|
|
|
|
2024-07-08 15:07:24 +05:00
|
|
|
virtualisation = {
|
|
|
|
containers.enable = true;
|
|
|
|
podman = {
|
|
|
|
enable = true;
|
|
|
|
dockerCompat = true;
|
|
|
|
defaultNetwork.settings.dns_enabled = true;
|
2024-05-03 23:10:55 +05:00
|
|
|
};
|
2024-07-08 15:07:24 +05:00
|
|
|
libvirtd.enable = true;
|
|
|
|
};
|
2023-12-15 12:40:04 +05:00
|
|
|
}
|