112 lines
2.1 KiB
Nix
112 lines
2.1 KiB
Nix
{
|
|
pkgs,
|
|
inputs,
|
|
lib,
|
|
primaryUser,
|
|
isServer,
|
|
isDarwin,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
./fonts.nix
|
|
./sops.nix
|
|
./locale.nix
|
|
./tailscale.nix
|
|
./ssh.nix
|
|
]
|
|
++ lib.optionals (!isServer) [
|
|
./regreet.nix
|
|
./plymouth.nix
|
|
./audio.nix
|
|
./webcam.nix
|
|
./virt.nix
|
|
./catppuccin.nix
|
|
];
|
|
|
|
nix = {
|
|
settings = {
|
|
experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
];
|
|
max-jobs = "auto";
|
|
cores = 0;
|
|
http-connections = 4;
|
|
download-buffer-size = 268435456;
|
|
substituters = [
|
|
"https://cache.nixos.org"
|
|
"https://hyprland.cachix.org"
|
|
"https://nix-community.cachix.org"
|
|
];
|
|
trusted-public-keys = [
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
];
|
|
};
|
|
gc = {
|
|
automatic = true;
|
|
dates = "weekly";
|
|
options = "--delete-older-than 30d";
|
|
};
|
|
};
|
|
|
|
documentation = {
|
|
enable = true;
|
|
doc.enable = false;
|
|
man.enable = false;
|
|
info.enable = false;
|
|
};
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
programs = {
|
|
fish.enable = true;
|
|
}
|
|
// lib.optionalAttrs (!isServer) {
|
|
dconf.enable = true;
|
|
hyprland = {
|
|
enable = true;
|
|
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
|
};
|
|
steam.enable = true;
|
|
appimage = {
|
|
enable = true;
|
|
binfmt = true;
|
|
};
|
|
};
|
|
|
|
security = lib.mkIf (!isServer) {
|
|
pam.services.swaylock = { };
|
|
polkit.enable = true;
|
|
apparmor.enable = false;
|
|
};
|
|
|
|
services = {
|
|
prometheus.exporters.node = lib.mkIf (!isDarwin) {
|
|
enable = true;
|
|
port = 9002;
|
|
};
|
|
|
|
gnome = lib.mkIf (!isServer) {
|
|
tinysparql.enable = true;
|
|
localsearch.enable = true;
|
|
};
|
|
};
|
|
|
|
users.users.${primaryUser} = {
|
|
home = "/home/${primaryUser}";
|
|
shell = pkgs.fish;
|
|
isNormalUser = true;
|
|
extraGroups = [
|
|
"wheel"
|
|
]
|
|
++ lib.optionals (!isServer) [
|
|
"video"
|
|
"audio"
|
|
"libvirtd"
|
|
];
|
|
};
|
|
}
|