niksos/hosts/del/configuration.nix

206 lines
6 KiB
Nix
Raw Normal View History

2024-02-19 17:06:47 +01:00
{
config,
2024-04-30 11:57:45 +02:00
inputs,
2024-04-01 21:50:57 +02:00
lib,
2024-02-19 17:06:47 +01:00
pkgs,
...
}: let
2024-07-24 18:47:53 +02:00
inherit (lib.meta) getExe getExe';
inherit (lib.modules) mkForce;
2024-07-19 21:04:44 +02:00
2024-07-15 23:18:25 +02:00
inherit (config.poz.other.system) username;
in {
nix.settings = {
max-jobs = 2;
cores = 3;
2024-02-19 17:06:47 +01:00
};
2024-06-05 12:31:28 +02:00
swapDevices = [
{
device = "/var/lib/swapfile";
size = 48 * 1024;
}
];
2024-05-03 18:20:56 +02:00
programs = {
kdeconnect.enable = true;
};
2024-02-19 17:06:47 +01:00
security.polkit.enable = true;
hardware = {
2024-02-21 19:03:55 +01:00
sensor.iio.enable = true;
# ipu6 = {
# enable = true;
# platform = "ipu6";
# };
2024-02-19 17:06:47 +01:00
};
services = {
pcscd.enable = true;
udisks2.enable = true;
fwupd = {
enable = true;
};
ratbagd.enable = true;
2024-08-25 18:23:49 +02:00
fprintd = {
enable = true;
tod = {
enable = true;
driver = pkgs.libfprint-2-tod1-goodix;
};
};
smartd.enable = true;
flatpak.enable = true;
2024-02-19 17:06:47 +01:00
};
# this makes usb devices autosuspend
#powerManagement.powertop.enable = true;
2024-04-01 21:50:57 +02:00
# https://github.com/NixOS/nixpkgs/issues/270809
systemd.services.ModemManager = {
2024-07-24 18:47:53 +02:00
enable = mkForce true;
2024-04-01 21:50:57 +02:00
path = [ pkgs.libqmi ];
wantedBy = [ "multi-user.target" "network.target" ];
};
networking.networkmanager = {
enable = true;
ensureProfiles.profiles = {
sim = {
connection = {
id = "sim";
uuid = "91d0e582-a24a-4835-baa9-98709b7793f9";
type = "gsm";
autoconnect = false;
permissions = "user:jacek:;";
};
gsm = {
apn = "internet";
username = "internet";
password = "internet";
};
ipv4.method = "auto";
ipv6 = {
addr-gen-mode = "default";
method = "auto";
};
};
};
};
2024-07-15 23:18:25 +02:00
poz = {
other = {
home-manager = {
enable = true;
enableDirenv = true;
};
networking.enable = true;
2024-02-19 17:06:47 +01:00
};
programs = {
2024-05-08 20:49:06 +02:00
nh = let
home = config.home-manager.users.${username}.home.homeDirectory;
in {
enable = true;
flake = "${home}/niksos";
};
2024-02-19 17:06:47 +01:00
zsh = {
enable = true;
extraAliases = {
2024-05-08 21:12:27 +02:00
u = "nh os switch -H del";
2024-02-19 17:06:47 +01:00
us = "NIX_SSHOPTS='-t' nixos-rebuild switch --flake \"/home/jacek/niksos#chmura\" -L --use-remote-sudo --target-host chmura";
2024-05-08 21:12:27 +02:00
# TODO use this when nh supports it
#us = "NIX_SSHOPTS='-t' nh os switch -H chmura -- --store ssh-ng://chmura";
2024-02-19 17:06:47 +01:00
};
profiling = false;
};
anyrun.enable = true;
vesktop.enable = true;
foot.enable = true;
mpv.enable = true;
neovim = {
enable = true;
enableLsp = true;
};
2024-10-02 18:23:22 +02:00
zathura = {
enable = true;
themeFile = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha";
hash = "sha256-POxMpm77Pd0qywy/jYzZBXF/uAKHSQ0hwtXD4wl8S2Q=";
};
};
2024-03-19 23:45:26 +01:00
hypr = {
land = {
enable = true;
2024-04-30 11:57:45 +02:00
extraSettings = let
hmCfg = config.home-manager.users.${username};
2024-08-05 19:00:16 +02:00
swww = getExe pkgs.swww;
2024-09-18 22:08:56 +02:00
# https://www.reddit.com/r/NixOS/comments/166r8n7/anime_nix_wallpaper_i_created/
2024-04-30 11:57:45 +02:00
nix_wallpaper = pkgs.fetchurl {
url = "https://i.ibb.co/vZ5JF95/nix-Wallpaper.png";
hash = "sha256-BqOBvRFXFrX/QLI70OLAIcpbbiUH/jUMK97yqCfY+mI=";
};
poz_layer = ./poz.png;
out_dir = "${hmCfg.xdg.dataHome}/hypr";
out_path = "${out_dir}/nix.png";
2024-05-23 21:33:46 +02:00
iio-hyprland = getExe inputs.iio-hyprland.packages.${pkgs.system}.default;
mkdir = getExe' pkgs.coreutils-full "mkdir";
sleep = getExe' pkgs.coreutils-full "sleep";
2024-07-15 20:16:34 +02:00
wvkbd = getExe pkgs.wvkbd;
imagemagick = getExe pkgs.imagemagick;
2024-04-30 11:57:45 +02:00
in {
exec-once = [
"${iio-hyprland}"
2024-07-15 20:16:34 +02:00
"${wvkbd} --hidden -L 500"
2024-04-30 11:57:45 +02:00
"${mkdir} -p ${out_dir}"
2024-07-15 20:16:34 +02:00
"${imagemagick} ${nix_wallpaper} ${poz_layer} -layers flatten ${out_path}"
2024-04-30 11:57:45 +02:00
];
exec = [
# wait a bit then set the wallpapers
"${sleep} 0.5 && ${swww} img -o eDP-1 ${out_path}"
];
};
};
2024-03-19 23:45:26 +01:00
lock.enable = true;
2024-06-09 15:54:49 +02:00
idle.enable = true;
2024-02-19 17:06:47 +01:00
};
newsboat.enable = true;
quickshell = {
enable = true;
enabledConfigs = [
"powermenu"
"poz"
];
};
2024-02-19 17:06:47 +01:00
};
services = {
dunst.enable = true;
greetd = {
enable = true;
greeter = "gtkgreet";
launchOptions = [
"Hyprland"
"sway"
"zsh"
"reboot"
"shutdown now"
];
};
pipewire.enable = true;
syncthing.enable = true;
2024-02-19 17:06:47 +01:00
};
};
system.stateVersion = "23.11";
}