niksos/hosts/hape/configuration.nix
2024-08-06 17:46:57 +02:00

213 lines
5.6 KiB
Nix

{
config,
pkgs,
...
<<<<<<< HEAD
}: {
nixpkgs.config.allowUnfree = true;
||||||| parent of fa20c0c (replace all `myOptions` with `poz`)
}: let
username = config.myOptions.other.system.username;
in {
nixpkgs = {
config.allowUnfree = true;
overlays = [
inputs.nur.overlay
inputs.neovim-nightly-overlay.overlay
];
};
boot = {
loader = {
systemd-boot = {
enable = true;
memtest86.enable = true;
};
};
kernelPackages = pkgs.linuxPackages_zen;
};
documentation = {
enable = true;
dev.enable = true;
doc.enable = true;
info.enable = true;
man = {
enable = true;
generateCaches = true;
man-db.enable = false;
mandoc.enable = true;
};
nixos = {
includeAllModules = true;
};
};
networking = {
networkmanager.enable = true;
firewall.checkReversePath = "loose";
};
# don't wait for network to boot faster
# https://old.reddit.com/r/NixOS/comments/vdz86j/how_to_remove_boot_dependency_on_network_for_a
systemd = {
targets.network-online.wantedBy = lib.mkForce []; # default is [ "multi-user.target" ]
services.NetworkManager-wait-online.wantedBy = lib.mkForce []; # default is [ "network-online.target" ]
};
=======
}: let
username = config.poz.other.system.username;
in {
nixpkgs = {
config.allowUnfree = true;
overlays = [
inputs.nur.overlay
inputs.neovim-nightly-overlay.overlay
];
};
boot = {
loader = {
systemd-boot = {
enable = true;
memtest86.enable = true;
};
};
kernelPackages = pkgs.linuxPackages_zen;
};
documentation = {
enable = true;
dev.enable = true;
doc.enable = true;
info.enable = true;
man = {
enable = true;
generateCaches = true;
man-db.enable = false;
mandoc.enable = true;
};
nixos = {
includeAllModules = true;
};
};
networking = {
networkmanager.enable = true;
firewall.checkReversePath = "loose";
};
# don't wait for network to boot faster
# https://old.reddit.com/r/NixOS/comments/vdz86j/how_to_remove_boot_dependency_on_network_for_a
systemd = {
targets.network-online.wantedBy = lib.mkForce []; # default is [ "multi-user.target" ]
services.NetworkManager-wait-online.wantedBy = lib.mkForce []; # default is [ "network-online.target" ]
};
>>>>>>> fa20c0c (replace all `myOptions` with `poz`)
systemd.oomd = {
enable = true;
enableUserServices = true;
};
programs.dconf.enable = true;
security.sudo.package = pkgs.sudo.override { withInsults = true; };
programs.zsh.enable = true;
environment.sessionVariables = {
CHROME_EXECUTABLE = "${pkgs.ungoogled-chromium}/bin/chromium";
};
services = {
pcscd.enable = true;
udev.packages = [ pkgs.yubikey-personalization ];
udisks2.enable = true;
dbus.enable = true;
};
hardware.graphics = {
enable = true;
driSupport = true;
enable32Bit = true;
};
services.journald = {
extraConfig = ''
SystemMaxUse=100M
'';
};
<<<<<<< HEAD
myOptions = {
other.home-manager = {
enable = true;
enableDirenv = true;
};
programs = {
agenix.enable = true;
nh = let
inherit (config.myOptions.other.system) username;
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 hape";
us = "NIX_SSHOPTS='-t' nixos-rebuild switch --flake \"/home/jacek/niksos#chmura\" -L --use-remote-sudo --target-host chmura";
# TODO use this when nh supports it
#us = "NIX_SSHOPTS='-t' nh os switch -H chmura -- --store ssh-ng://chmura";
};
profiling = false;
};
zoxide.enable = true;
anyrun.enable = true;
btop.enable = true;
foot.enable = true;
mpv.enable = true;
neovim.enable = true;
zathura.enable = true;
hypr = {
land.enable = true;
lock.enable = true;
idle.enable = true;
};
quickshell = {
enable = true;
enabledConfigs = [
"powermenu"
"poz"
];
};
};
||||||| parent of fa20c0c (replace all `myOptions` with `poz`)
myOptions = {
=======
poz = {
>>>>>>> fa20c0c (replace all `myOptions` with `poz`)
services = {
dunst.enable = true;
greetd = {
enable = true;
greeter = "gtkgreet";
launchOptions = [
"Hyprland"
"zsh"
"reboot"
"shutdown now"
];
};
mpd.enable = true;
pipewire.enable = true;
};
};
system.stateVersion = "23.11";
}