niksos/hosts/work/configuration.nix
2024-08-30 20:14:52 +02:00

187 lines
4.4 KiB
Nix

{
config,
inputs,
lib,
pkgs,
...
}: let
inherit (lib.attrsets) attrValues;
inherit (lib.meta) getExe;
inherit (config.poz.other.system) username;
in {
nixpkgs.config = {
permittedInsecurePackages = [
"olm-3.2.16"
];
allowUnfree = true;
};
nix.settings = {
max-jobs = 2;
cores = 3;
};
# swapDevices = [
# {
# device = "/var/lib/swapfile";
# size = 48 * 1024;
# }
# ];
programs = {
dconf.enable = true;
kdeconnect.enable = true;
noisetorch.enable = true;
};
security.sudo.package = pkgs.sudo.override { withInsults = true; };
security.polkit.enable = true;
users.users.${username} = {
extraGroups = [ "video" "docker" ];
};
environment.sessionVariables = {
CHROME_EXECUTABLE = getExe pkgs.ungoogled-chromium;
};
hardware = {
sensor.iio.enable = true;
# ipu6 = {
# enable = true;
# platform = "ipu6";
# };
graphics = {
enable = true;
enable32Bit = true;
extraPackages = attrValues {
inherit (pkgs)
mesa
libdrm
libva
vaapiVdpau
libvdpau-va-gl
;
};
extraPackages32 = attrValues {
inherit (pkgs.driversi686Linux)
mesa
libvdpau-va-gl
;
};
};
};
services = {
pcscd.enable = true;
udisks2.enable = true;
dbus.enable = true;
fwupd = {
enable = true;
};
ratbagd.enable = true;
# TODO build failure
# fprintd = {
# enable = true;
# tod = {
# enable = true;
# driver = pkgs.libfprint-2-tod1-goodix;
# };
# };
smartd.enable = true;
flatpak.enable = true;
};
services.journald = {
extraConfig = ''
SystemMaxUse=100M
'';
};
networking.proxy = {
inherit (inputs.work-secrets.proxy) default noProxy;
};
# for vpn-slice
environment.etc.hosts.mode = "0644";
poz = {
other = {
home-manager = {
enable = true;
enableDirenv = true;
};
networking = {
enable = true;
plugins = [ pkgs.networkmanager-openconnect ];
};
};
programs = {
agenix.enable = true;
nh = let
home = config.home-manager.users.${username}.home.homeDirectory;
in {
enable = true;
flake = "${home}/niksos";
};
starship.enable = true;
zsh = {
enable = true;
extraAliases = {
u = "nh os switch -H ${inputs.work-secrets.hostname}";
};
profiling = false;
};
zoxide.enable = true;
anyrun.enable = true;
btop.enable = true;
foot.enable = true;
mpv.enable = true;
neovim = {
enable = true;
enableLsp = true;
};
zathura.enable = true;
hypr = {
land = {
enable = true;
extraPlugins = [
inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces
];
};
lock.enable = true;
idle.enable = true;
};
quickshell = {
enable = true;
enabledConfigs = [
"powermenu"
"poz"
];
};
};
services = {
dunst.enable = true;
greetd = {
enable = true;
greeter = "gtkgreet";
launchOptions = [
"Hyprland"
"sway"
"zsh"
"reboot"
"shutdown now"
];
};
pipewire.enable = true;
};
};
system.stateVersion = "23.11";
}