niksos/hosts/del/configuration.nix

327 lines
11 KiB
Nix
Raw Normal View History

2024-02-19 17:06:47 +01:00
{
config,
pkgs,
...
}: {
2024-02-29 01:28:20 +01:00
nixpkgs.config.allowUnfree = true;
2024-02-19 17:06:47 +01:00
boot = {
kernelPackages = pkgs.linuxPackages_xanmod_latest;
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
kernelModules = [ "v4l2loopback" ];
kernelParams = [
"video=eDP-1:2560x1440@165"
];
};
time.timeZone = "Europe/Warsaw";
nix = {
settings = {
2024-02-29 01:31:22 +01:00
max-jobs = 2;
cores = 3;
2024-02-19 17:06:47 +01:00
substituters = [
"https://nix-community.cachix.org"
"https://nixpkgs-wayland.cachix.org"
"https://viperml.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"viperml.cachix.org-1:qZhKBMTfmcLL+OG6fj/hzsMEedgKvZVFRRAhq7j8Vh8="
];
};
};
programs.dconf.enable = true;
security.sudo.package = pkgs.sudo.override { withInsults = true; };
security.polkit.enable = true;
users.users.${config.myOptions.other.system.username} = {
2024-02-29 01:41:04 +01:00
extraGroups = [ "video" ];
2024-02-19 17:06:47 +01:00
};
2024-02-29 00:48:40 +01:00
environment.sessionVariables = {
CHROME_EXECUTABLE = "${pkgs.ungoogled-chromium}/bin/chromium";
2024-02-19 17:06:47 +01:00
};
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
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
mesa
libdrm
libva
vaapiVdpau
libvdpau-va-gl
];
extraPackages32 = with pkgs; [
driversi686Linux.mesa
driversi686Linux.vaapiVdpau
driversi686Linux.libvdpau-va-gl
];
};
};
services = {
pcscd.enable = true;
udisks2.enable = true;
dbus.enable = true;
fwupd = {
enable = true;
};
ratbagd.enable = true;
fprintd = {
enable = true;
tod = {
enable = true;
driver = pkgs.libfprint-2-tod1-goodix;
};
};
};
programs.gnupg.agent = {
enable = true;
pinentryFlavor = "qt";
enableSSHSupport = true;
};
services.btrfs = {
autoScrub = {
enable = true;
interval = "weekly";
};
};
services.journald = {
extraConfig = ''
SystemMaxUse=100M
'';
};
services.udev = {
packages = with pkgs; [
yubikey-personalization
];
};
# this makes usb devices autosuspend
#powerManagement.powertop.enable = true;
programs.kdeconnect.enable = true;
programs.noisetorch.enable = true;
myOptions = {
other = {
system = {
hostname = "del";
username = "jacek";
};
2024-02-19 17:06:47 +01:00
home-manager = {
enable = true;
enableDirenv = true;
};
};
programs = {
git = {
enable = true;
userName = "jacekpoz";
userEmail = "jacekpoz@cock.li";
signingKey = "0EEE6B0C9A8CC06820E59C3894E812A8B12AAE3C";
defaultBranch = "master";
};
starship.enable = true;
zsh = {
enable = true;
extraAliases = {
#u = "nh os switch \"/home/jacek/niksos\" -H niks -- --use-remote-sudo";
#us = "NIX_SSHOPTS='-t' nh os switch \"/home/jacek/niksos\" -H chmura -- --use-remote-sudo --target-host chmura";
u = "nixos-rebuild switch --flake \"/home/jacek/niksos#del\" -L --use-remote-sudo";
us = "NIX_SSHOPTS='-t' nixos-rebuild switch --flake \"/home/jacek/niksos#chmura\" -L --use-remote-sudo --target-host chmura";
};
profiling = false;
};
anyrun.enable = true;
armcord.enable = true;
vesktop.enable = true;
btop.enable = true;
firefox = {
enable = true;
defaultSearchEngine = "NotASearx";
searchEngines = {
"NotASearx" = {
url = "https://search.notashelf.dev/search?q={searchTerms}";
faviconUrl = "https://search.notashelf.dev/favicon.ico";
aliases = [ "!sx" ];
};
"NixOS Packages" = {
url = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
faviconPath = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
aliases = [ "!np" ];
};
"NixOS Options" = {
url = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";
faviconPath = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
aliases = [ "!no" ];
};
"NixOS Wiki" = {
url = "https://nixos.wiki/index.php?search={searchTerms}";
faviconPath = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
aliases = [ "!nw" ];
};
"Home Manger Option Search" = {
url = "https://mipmip.github.io/home-manager-option-search?query={searchTerms}";
faviconPath = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
aliases = [ "!hm" ];
};
"Arch Wiki" = {
url = "https://wiki.archlinux.org/index.php?search={searchTerms}";
faviconUrl = "https://archlinux.org/favicon.ico";
aliases = [ "!aw" ];
};
"Gentoo Wiki" = {
url = "https://wiki.gentoo.org/index.php?search={searchTerms}";
faviconUrl = "https://www.gentoo.org/favicon.ico";
aliases = [ "!gw" ];
};
"Debian Wiki" = {
url = "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}";
faviconUrl = "https://www.debian.org/favicon.ico";
aliases = [ "!dw" ];
};
};
};
foot.enable = true;
mpv.enable = true;
osu = {
enable = false;
enableStable = false;
};
neovim.enable = true;
swaylock.enable = true;
waybar.enable = true;
zathura.enable = true;
hyprland = {
enable = true;
startupSound = ./mathis.m4a;
};
helix.enable = false;
newsboat.enable = true;
};
themes = {
cursor = {
enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 24;
};
gtk = {
enable = true;
package = pkgs.catppuccin-gtk;
name = "Catppuccin-Mocha-Standard-Green-Dark";
variant = "mocha";
accentColour = "green";
iconTheme = {
name = "Papirus-Dark";
package = pkgs.catppuccin-papirus-folders;
};
};
qt = {
enable = true;
package = pkgs.catppuccin-kde;
name = "Catppuccin-Mocha-Dark";
variant = "mocha";
accentColour = "green";
};
};
services = {
dunst.enable = true;
mpd.enable = true;
greetd = {
enable = true;
greeter = "gtkgreet";
launchOptions = [
"Hyprland"
"sway"
"zsh"
"reboot"
"shutdown now"
];
};
ssh = {
daemon.enable = false;
agent = {
enable = true;
hostAliases = let
username = config.myOptions.other.system.username;
2024-03-01 00:39:36 +01:00
hmCfg = config.home-manager.users.${username};
in {
2024-02-19 17:06:47 +01:00
"github" = {
hostName = "github.com";
2024-03-01 00:39:36 +01:00
identityFile = "${hmCfg.home.homeDirectory}/.ssh/githubkey";
2024-02-19 17:06:47 +01:00
};
"git.dupa.edu.pl" = {
hostName = "git.dupa.edu.pl";
2024-03-01 00:39:36 +01:00
identityFile = "${hmCfg.home.homeDirectory}/.ssh/gitdupaedupl";
2024-02-19 17:06:47 +01:00
};
"codeberg" = {
hostName = "codeberg.org";
2024-03-01 00:39:36 +01:00
identityFile = "${hmCfg.home.homeDirectory}/.ssh/codeberg";
2024-02-19 17:06:47 +01:00
};
"gitlab" = {
hostName = "gitlab.com";
2024-03-01 00:39:36 +01:00
identityFile = "${hmCfg.home.homeDirectory}/.ssh/gitlab";
2024-02-19 17:06:47 +01:00
};
"aur" = {
hostName = "aur.archlinux.org";
user = "aur";
2024-03-01 00:39:36 +01:00
identityFile = "${hmCfg.home.homeDirectory}/.ssh/aur";
2024-02-19 17:06:47 +01:00
};
"jacekpoz" = {
hostName = "git.jacekpoz.pl";
user = "forgejo";
2024-03-01 00:39:36 +01:00
identityFile = "${hmCfg.home.homeDirectory}/.ssh/jacekpoz";
2024-02-19 17:06:47 +01:00
};
"chmura" = {
hostName = "192.168.15.2";
user = "chmura";
2024-03-01 00:39:36 +01:00
identityFile = "${hmCfg.home.homeDirectory}/.ssh/chmura";
2024-02-19 17:06:47 +01:00
};
"chmura2" = {
hostName = "jacekpoz.pl";
user = "chmura";
2024-03-01 00:39:36 +01:00
identityFile = "${hmCfg.home.homeDirectory}/.ssh/chmura";
2024-02-19 17:06:47 +01:00
};
"malina" = {
hostName = "192.168.15.3";
user = "malina";
2024-03-01 00:39:36 +01:00
identityFile = "${hmCfg.home.homeDirectory}/.ssh/malina";
2024-02-19 17:06:47 +01:00
};
"outfoxxed" = {
hostName = "git.outfoxxed.me";
2024-03-01 00:39:36 +01:00
identityFile = "${hmCfg.home.homeDirectory}/.ssh/outfoxxed";
2024-02-19 17:06:47 +01:00
};
};
};
};
pipewire.enable = true;
};
};
system.stateVersion = "23.11";
}