nixconfig/configuration.nix

366 lines
10 KiB
Nix
Raw Normal View History

# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
#Credit to anyone I got these config files from, I would add it here but its been months
{ inputs, config, lib, pkgs, ... }:
{
environment.etc.nixpkgs.source = inputs.nixpkgs;
imports =
[ # Include the results of the hardware scan.
2024-04-13 20:27:31 +00:00
/home/insert/Documents/nixos/hardware-configuration.nix
];
hardware.opengl = {
enable = true;
#driSupport = true;
driSupport32Bit = true;
};
# Bootloader.
boot.loader.systemd-boot.enable = true;
# boot.loader.grub.enable = true;
# boot.loader.grub.device = "nodev";
# boot.loader.grub.useOSProber = true;
boot.loader.systemd-boot.configurationLimit = 15;
boot.loader.efi.canTouchEfiVariables = true;
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/New_York";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
2024-04-14 15:32:15 +00:00
services.displayManager.sddm.enable = false;
services.xserver.desktopManager.plasma5.enable = false;
2024-04-14 16:07:47 +00:00
services.greetd = {
enable = true;
settings = {
default_session = {
2024-06-05 14:17:55 +00:00
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time -r --asterisks --remember-session --cmd sway";
2024-04-14 16:07:47 +00:00
user = "greeter";
};
};
};
services.xrdp.enable = false;
services.xrdp.defaultWindowManager = "startplasma-x11";
virtualisation.docker = {
enable = true;
extraOptions = ''
--insecure-registry "kuberound.internal:5000"
'';
};
2024-06-05 14:17:55 +00:00
environment.variables = rec {
NIXOS_OZONE_WL = "1";
KUBECONFIG = "/home/insert/Desktop/k3s.yaml";
QT_QPA_PLATFORMTHEME = "qt5ct";
ELECTRON_OZONE_PLATFORM_HINT = "auto";
WLR_NO_HARDWARE_CURSORS = "1";
NO_HARDWARE_CURSORS = "true";
};
2024-04-13 20:27:31 +00:00
# Configure keymap in X11
services.xserver = {
2024-04-14 15:32:15 +00:00
xkb.layout = "us";
xkb.variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
2024-07-14 01:08:09 +00:00
#hardware.pulseaudio.support32Bit = true;
#hardware.pulseaudio.extraConfig = "load-module module-combine-sink";
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.auto-optimise-store = true;
system.autoUpgrade.enable = false;
nix.gc = {
2024-05-04 12:33:43 +00:00
automatic = false;
dates = "weekly";
options = "--delete-older-than 10d";
};
2024-04-14 15:27:26 +00:00
programs.zsh.enable = true;
users.users.insert = {
isNormalUser = true;
description = "insert";
2024-07-14 01:08:09 +00:00
extraGroups = [ "networkmanager" "wheel" "input" "docker" "audio" "libvirtd" ];
2024-04-14 15:27:26 +00:00
shell = pkgs.zsh;
};
programs.waybar = {
enable = true;
#package = pkgs.waybar.overrideAttrs (oldAttrs: {
# mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
#});
#config = {
# modules = [{module = "wlr/workspace"};];
#};
};
2024-04-14 20:01:23 +00:00
services.flatpak.enable = false;
services.flatpak.packages = [
2024-04-14 20:01:23 +00:00
#"flathub:app/dev.lizardbyte.app.Sunshine//stable"
];
services.flatpak.remotes = {
"flathub" = "https://dl.flathub.org/repo/flathub.flatpakrepo";
"flathub-beta" = "https://dl.flathub.org/beta-repo/flathub-beta.flatpakrepo";
};
age.identityPaths = [ "/home/insert/.ssh/id_rsa" ];
age.secrets.email = {
2024-04-13 17:16:36 +00:00
file = /home/insert/Documents/nixos/secrets/email.age;
owner = "insert";
group = "users";
};
2024-05-05 00:46:51 +00:00
age.secrets.borg = {
file = /home/insert/Documents/nixos/secrets/borg.age;
owner = "insert";
group = "users";
};
2024-04-13 19:42:15 +00:00
#home-manager.users.insert= { pkgs, ... }: {
security.polkit.enable = true;
# Enable automatic login for the user.
2024-04-14 15:32:15 +00:00
services.displayManager.autoLogin.enable = false;
services.displayManager.autoLogin.user = "insert";
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
fonts.fontDir.enable = true;
fonts.packages = with pkgs; [
monocraft
];
2024-04-13 20:27:31 +00:00
# List packages installed in system profile. To search, run:
# $ nix search wget
programs.nix-ld.enable = true;
environment.systemPackages = [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
pkgs.tailscale
pkgs.wayland
pkgs.docker-compose
2024-04-20 21:40:30 +00:00
pkgs.networkmanagerapplet
#pkgs.sway
inputs.agenix.packages."${pkgs.system}".default
pkgs.vlc
#pkgs.hyprland
2024-07-14 01:08:09 +00:00
pkgs.pavucontrol
pkgs.pulseaudio
pkgs.wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
pkgs.bemenu # wayland clone of dmenu
pkgs.mako # notification system developed by swaywm maintainer
#pkgs.eww-wayland
pkgs.wofi
2024-07-10 13:14:48 +00:00
pkgs.cifs-utils
pkgs.swww
pkgs.nfs-utils
#pkgs.waybar
pkgs.libnotify
pkgs.polkit_gnome
pkgs.libsForQt5.breeze-icons
pkgs.libsForQt5.dolphin
pkgs.glib
pkgs.pinentry
pkgs.adoptopenjdk-bin
#inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland
pkgs.gnome.nautilus
pkgs.libsForQt5.ark
];
services.tailscale.enable = true;
services.gvfs.enable = true;
programs.steam.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
#pinentryFlavor = "gtk2";
};
services.pcscd.enable = true;
#programs.sway = {
# enable = true;
# wrapperFeatures.gtk = true;
# extraOptions = [
# "--unsupported-gpu"
# ];
#};
2024-04-13 19:42:15 +00:00
services.earlyoom = {
enable = true;
freeSwapThreshold = 5;
freeMemThreshold = 8;
enableNotifications = true;
extraArgs = [
"-g" "--avoid '^(X|hypr.*|kitty|wayland)$'"
"--prefer '^(electron|librewolf|firefox|java|minecraft.*)$'"
];
};
2024-05-04 12:33:43 +00:00
programs.nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 10d --keep 5";
flake = "/home/insert/Documents/nixos";
};
services.rpcbind.enable = true; # needed for NFS
systemd.mounts = [{
type = "nfs";
#mountConfig = {
# Options = "noatime";
#};
2024-07-10 13:14:48 +00:00
what = "nas-omv:/personal/randomfiles";
where = "/mnt/NAS";
}
{
type = "nfs";
#mountConfig = {
# Options = "noatime";
#};
2024-07-10 13:14:48 +00:00
what = "nas-omv:/personal/pc-backups";
where = "/mnt/NAS-backup";
}];
systemd.automounts = [{
wantedBy = [ "multi-user.target" ];
#automountConfig = {
# TimeoutIdleSec = "600";
#};
where = "/mnt/NAS";
}
{
wantedBy = [ "multi-user.target" ];
#automountConfig = {
# TimeoutIdleSec = "600";
#};
where = "/mnt/NAS-backup";
}];
systemd = {
user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
systemd.user.services.waybar.enable = false;
2024-07-14 01:08:09 +00:00
xdg.portal.wlr.settings = {
screencast = {
chooser_type = "simple";
chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or";
};
};
xdg.portal.wlr.enable = true;
xdg.portal = { enable = true; extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ]; };
#xdg.portal = { enable = true; extraPortals = [ inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland ]; };
#xdg.portal = { enable = true; };
2024-05-20 03:17:21 +00:00
nix.settings = {
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
};
programs.hyprland = {
enable = false;
#enableNvidiaPatches = true;
2024-06-04 14:50:35 +00:00
#package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};
#programs.nnn.enable = false;
#programs.hyprland.enable = true;
#programs.hyprland.enableNvidiaPatches = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
#networking.firewall.enable = false;
#I am so, so, so very sorry
networking.firewall.enable = true;
networking.firewall.checkReversePath = "loose";
networking.firewall.allowedUDPPortRanges = [
{ from = 0; to = 65535; }
{ from = 0; to = 65535; }
];
networking.firewall.allowedTCPPortRanges = [
{ from = 0; to = 65535; }
{ from = 0; to = 65535; }
];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
}