2024-01-06 18:05:24 +05:00
|
|
|
{ config, pkgs, lib, inputs, ... }:
|
2023-12-15 12:40:04 +05:00
|
|
|
{
|
|
|
|
system.stateVersion = "23.11";
|
|
|
|
|
|
|
|
imports = [ ./hardware.nix ./users.nix ];
|
|
|
|
|
|
|
|
# Nix settings
|
|
|
|
nix = {
|
|
|
|
settings = {
|
2024-04-23 14:28:34 +05:00
|
|
|
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
2024-04-24 14:26:24 +05:00
|
|
|
trusted-users = [ "l-nafaryus" ];
|
|
|
|
allowed-users = [ "l-nafaryus" ];
|
2023-12-15 12:40:04 +05:00
|
|
|
substituters = [ "https://nix-community.cachix.org" ];
|
|
|
|
trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ];
|
|
|
|
auto-optimise-store = true;
|
|
|
|
};
|
|
|
|
gc = {
|
|
|
|
automatic = lib.mkDefault true;
|
|
|
|
dates = lib.mkDefault "weekly";
|
2024-04-23 14:28:34 +05:00
|
|
|
options = lib.mkDefault "--delete-older-than 7d";
|
2023-12-15 12:40:04 +05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Nix packages
|
|
|
|
nixpkgs = {
|
|
|
|
hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
config.allowUnfree = true;
|
2023-12-19 11:50:00 +05:00
|
|
|
config.cudaSupport = false;
|
|
|
|
|
|
|
|
overlays = [
|
|
|
|
(final: prev: {
|
|
|
|
blender = prev.blender.override { cudaSupport = true; };
|
|
|
|
})
|
2024-01-06 18:05:24 +05:00
|
|
|
inputs.nixgl.overlay
|
2023-12-19 11:50:00 +05:00
|
|
|
];
|
2023-12-15 12:40:04 +05:00
|
|
|
};
|
|
|
|
|
|
|
|
# Services
|
|
|
|
services.xserver = {
|
|
|
|
enable = true;
|
|
|
|
|
2024-04-23 14:28:34 +05:00
|
|
|
xkb = {
|
|
|
|
layout = "us";
|
|
|
|
variant = "";
|
|
|
|
};
|
2023-12-15 12:40:04 +05:00
|
|
|
|
|
|
|
videoDrivers = [ "nvidia" ];
|
|
|
|
|
2024-01-07 14:07:56 +05:00
|
|
|
displayManager.gdm = {
|
|
|
|
enable = true;
|
|
|
|
autoSuspend = false;
|
|
|
|
};
|
2023-12-15 12:40:04 +05:00
|
|
|
desktopManager.gnome.enable = true;
|
|
|
|
windowManager.awesome.enable = true;
|
|
|
|
|
|
|
|
wacom.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.printing.enable = true;
|
|
|
|
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
2024-03-11 13:10:54 +05:00
|
|
|
jack.enable = true;
|
2023-12-15 12:40:04 +05:00
|
|
|
};
|
|
|
|
|
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
startWhenNeeded = true;
|
2024-01-16 01:42:31 +05:00
|
|
|
settings.PasswordAuthentication = false;
|
2024-02-09 19:14:20 +05:00
|
|
|
settings.KbdInteractiveAuthentication = false;
|
2023-12-15 12:40:04 +05:00
|
|
|
};
|
|
|
|
|
2023-12-26 15:17:02 +05:00
|
|
|
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
|
|
|
|
|
|
|
services.blueman.enable = true;
|
|
|
|
|
2024-04-24 14:26:24 +05:00
|
|
|
services.btrfs.autoScrub = {
|
|
|
|
enable = true;
|
|
|
|
interval = "monthly";
|
|
|
|
fileSystems = [ "/" ];
|
|
|
|
};
|
|
|
|
|
2023-12-15 12:40:04 +05:00
|
|
|
# Packages
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
wget
|
|
|
|
|
2024-04-24 14:26:24 +05:00
|
|
|
parted
|
2023-12-15 12:40:04 +05:00
|
|
|
ntfs3g
|
|
|
|
sshfs
|
|
|
|
exfat
|
|
|
|
|
|
|
|
lm_sensors
|
|
|
|
|
|
|
|
git
|
2024-03-11 13:10:54 +05:00
|
|
|
git-lfs
|
2023-12-15 12:40:04 +05:00
|
|
|
ripgrep
|
|
|
|
fd
|
|
|
|
lazygit
|
|
|
|
unzip
|
|
|
|
|
|
|
|
gnumake
|
|
|
|
|
|
|
|
fishPlugins.fzf-fish
|
|
|
|
fishPlugins.tide
|
|
|
|
fishPlugins.grc
|
|
|
|
fishPlugins.hydro
|
|
|
|
|
2023-12-19 11:50:00 +05:00
|
|
|
nnn
|
2023-12-15 12:40:04 +05:00
|
|
|
fzf
|
|
|
|
grc
|
|
|
|
|
|
|
|
gcc
|
|
|
|
|
|
|
|
cachix
|
|
|
|
];
|
|
|
|
|
|
|
|
programs = {
|
|
|
|
fish.enable = true;
|
|
|
|
|
|
|
|
neovim = {
|
|
|
|
enable = true;
|
|
|
|
defaultEditor = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-01-10 22:32:33 +05:00
|
|
|
programs.ssh.extraConfig = ''
|
|
|
|
Host astora
|
|
|
|
HostName 192.168.156.101
|
|
|
|
Port 22
|
2024-04-24 14:26:24 +05:00
|
|
|
User l-nafaryus
|
2024-01-10 22:32:33 +05:00
|
|
|
|
|
|
|
Host catarina
|
|
|
|
HostName 192.168.156.102
|
|
|
|
Port 22
|
2024-04-26 17:04:04 +05:00
|
|
|
User l-nafaryus
|
2024-01-10 22:32:33 +05:00
|
|
|
'';
|
|
|
|
|
2023-12-15 19:49:42 +05:00
|
|
|
programs.direnv.enable = true;
|
|
|
|
|
2023-12-15 12:40:04 +05:00
|
|
|
fonts.packages = with pkgs; [ nerdfonts ];
|
|
|
|
|
|
|
|
programs.steam.enable = true;
|
|
|
|
systemd.extraConfig = "DefaultLimitNOFILE=1048576";
|
|
|
|
}
|