nix/system/configuration.nix

111 lines
2.3 KiB
Nix

{
inputs,
outputs,
lib,
config,
pkgs,
nix-rice,
nix-std,
...
}: {
# these settings propagate to home-manager's nixpkgs
nixpkgs = {
overlays = [
inputs.nur.overlay
outputs.overlays.additions
outputs.overlays.pkg-sets
inputs.nix-rice.overlays.default
outputs.overlays.rice
inputs.helix.overlays.default
inputs.nixd.overlays.default
inputs.nix-ld-rs.overlays.default
];
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
};
nix = {
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
settings = {
trusted-users = ["bolt" "plank"];
experimental-features = "nix-command flakes";
substitute = true;
};
extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 3d";
};
optimise.automatic = true;
};
imports = [
./modules/network.nix
./modules/term.nix
./modules/cosmic.nix
./modules/systemdboot.nix
./modules/sound.nix
./modules/sydney.nix
./modules/docs.nix
./modules/nix-meta.nix
];
# hm should have sorted this out
# qt = {
# enable = true;
# style = "adwaita-dark";
# };
hardware.enableRedistributableFirmware = true;
hardware.enableAllFirmware = true;
boot.tmp.useTmpfs = true;
services.libinput.enable = true;
hardware.opengl.enable = true;
hardware.opengl.driSupport32Bit = true;
services.udisks2.enable = true;
services.flatpak.enable = true;
security.polkit.enable = true;
xdg.autostart.enable = true;
xdg.portal.enable = true;
# services.tailscale.enable = true;
environment.systemPackages = with pkgs; [
curl
eza
git
];
services.atuin.enable = true;
programs.nix-index-database.comma.enable = true;
programs.nix-index.enableZshIntegration = false;
programs.nix-index.enableBashIntegration = false;
# gnome/freedesktop compat stuff
programs.dconf.enable = true;
services.gvfs.enable = true;
programs.nix-ld = {
enable = true;
package = pkgs.nix-ld-rs;
};
# give cpuset to user
systemd.services."user@".serviceConfig.Delegate = "memory pids cpu cpuset";
system.stateVersion = "22.11"; # Did you read the comment?
}