2024-04-12 22:20:55 +00:00
|
|
|
|
# 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
|
2024-04-12 22:20:55 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
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;
|
2024-04-12 22:20:55 +00:00
|
|
|
|
services.xserver.desktopManager.plasma5.enable = false;
|
2024-04-14 16:07:47 +00:00
|
|
|
|
services.greetd = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = {
|
|
|
|
|
default_session = {
|
2024-04-17 14:19:00 +00:00
|
|
|
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time -r --asterisks --remember-session --cmd Hyprland";
|
2024-04-14 16:07:47 +00:00
|
|
|
|
user = "greeter";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
2024-04-12 22:20:55 +00:00
|
|
|
|
services.xrdp.enable = false;
|
|
|
|
|
services.xrdp.defaultWindowManager = "startplasma-x11";
|
|
|
|
|
virtualisation.docker = {
|
|
|
|
|
enable = true;
|
|
|
|
|
extraOptions = ''
|
|
|
|
|
--insecure-registry "kuberound.internal:5000"
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
2024-04-13 20:27:31 +00:00
|
|
|
|
|
2024-04-12 22:20:55 +00:00
|
|
|
|
# Configure keymap in X11
|
|
|
|
|
services.xserver = {
|
2024-04-14 15:32:15 +00:00
|
|
|
|
xkb.layout = "us";
|
|
|
|
|
xkb.variant = "";
|
2024-04-12 22:20:55 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Enable CUPS to print documents.
|
|
|
|
|
services.printing.enable = true;
|
|
|
|
|
|
|
|
|
|
# Enable sound with pipewire.
|
|
|
|
|
sound.enable = true;
|
|
|
|
|
hardware.pulseaudio.enable = false;
|
|
|
|
|
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;
|
2024-04-12 22:20:55 +00:00
|
|
|
|
dates = "weekly";
|
|
|
|
|
options = "--delete-older-than 10d";
|
|
|
|
|
};
|
2024-04-14 15:27:26 +00:00
|
|
|
|
|
|
|
|
|
programs.zsh.enable = true;
|
2024-04-12 22:20:55 +00:00
|
|
|
|
users.users.insert = {
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
description = "insert";
|
|
|
|
|
extraGroups = [ "networkmanager" "wheel" "input" "docker" "libvirtd" ];
|
2024-04-14 15:27:26 +00:00
|
|
|
|
shell = pkgs.zsh;
|
2024-04-12 22:20:55 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
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;
|
2024-04-12 22:20:55 +00:00
|
|
|
|
services.flatpak.packages = [
|
2024-04-14 20:01:23 +00:00
|
|
|
|
#"flathub:app/dev.lizardbyte.app.Sunshine//stable"
|
2024-04-12 22:20:55 +00:00
|
|
|
|
];
|
|
|
|
|
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;
|
2024-04-12 22:20:55 +00:00
|
|
|
|
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-12 22:20:55 +00:00
|
|
|
|
|
2024-04-13 19:42:15 +00:00
|
|
|
|
#home-manager.users.insert= { pkgs, ... }: {
|
2024-04-12 22:20:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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";
|
2024-04-12 22:20:55 +00:00
|
|
|
|
|
|
|
|
|
# Allow unfree packages
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fonts.fontDir.enable = true;
|
|
|
|
|
fonts.packages = with pkgs; [
|
|
|
|
|
monocraft
|
|
|
|
|
];
|
|
|
|
|
|
2024-04-13 20:27:31 +00:00
|
|
|
|
|
2024-04-12 22:20:55 +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
|
2024-04-12 22:20:55 +00:00
|
|
|
|
#pkgs.sway
|
|
|
|
|
inputs.agenix.packages."${pkgs.system}".default
|
|
|
|
|
pkgs.vlc
|
|
|
|
|
#pkgs.hyprland
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
2024-04-12 22:20:55 +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";
|
|
|
|
|
};
|
2024-04-12 22:20:55 +00:00
|
|
|
|
|
|
|
|
|
services.rpcbind.enable = true; # needed for NFS
|
|
|
|
|
systemd.mounts = [{
|
|
|
|
|
type = "nfs";
|
|
|
|
|
#mountConfig = {
|
|
|
|
|
# Options = "noatime";
|
|
|
|
|
#};
|
|
|
|
|
what = "kubbernetter-5:/var/mnt/md0/personal/randomfiles";
|
|
|
|
|
where = "/mnt/NAS";
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
type = "nfs";
|
|
|
|
|
#mountConfig = {
|
|
|
|
|
# Options = "noatime";
|
|
|
|
|
#};
|
|
|
|
|
what = "kubbernetter-5:/var/mnt/md0/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;
|
|
|
|
|
|
|
|
|
|
xdg.portal = { enable = true; extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; };
|
|
|
|
|
#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="];
|
|
|
|
|
};
|
|
|
|
|
|
2024-04-12 22:20:55 +00:00
|
|
|
|
programs.hyprland = {
|
|
|
|
|
enable = true;
|
|
|
|
|
#enableNvidiaPatches = true;
|
|
|
|
|
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. It‘s 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?
|
|
|
|
|
|
|
|
|
|
}
|