# 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. /home/insert/Documents/nixos/hardware-configuration.nix ]; hardware.graphics = { enable = true; #driSupport = true; enable32Bit = 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; programs.dconf.enable = true; # Enable the KDE Plasma Desktop Environment. services.displayManager.sddm.enable = false; services.xserver.desktopManager.plasma5.enable = false; services.greetd = { enable = true; settings = { default_session = { command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time -r --asterisks --remember-session --cmd sway"; user = "greeter"; }; }; }; services.xrdp.enable = false; services.xrdp.defaultWindowManager = "startplasma-x11"; virtualisation.docker = { enable = true; extraOptions = '' --insecure-registry "kuberound.internal:5000" ''; }; 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"; }; # Configure keymap in X11 services.xserver = { 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; #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 = { automatic = false; dates = "weekly"; options = "--delete-older-than 10d"; }; programs.zsh.enable = true; users.users.insert = { isNormalUser = true; description = "insert"; extraGroups = [ "networkmanager" "wheel" "input" "docker" "audio" "libvirtd" ]; shell = pkgs.zsh; }; programs.waybar = { enable = true; #package = pkgs.waybar.overrideAttrs (oldAttrs: { # mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; #}); #config = { # modules = [{module = "wlr/workspace"};]; #}; }; services.flatpak.enable = false; services.flatpak.packages = [ #"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/Documents/nixos/secrets/agenix" ]; age.secrets.email = { file = /home/insert/Documents/nixos/secrets/email.age; owner = "insert"; group = "users"; }; age.secrets.borg = { file = /home/insert/Documents/nixos/secrets/borg.age; owner = "insert"; group = "users"; }; #home-manager.users.insert= { pkgs, ... }: { security.polkit.enable = true; # Enable automatic login for the user. 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; [ noto-fonts-cjk-sans monocraft ]; # 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 pkgs.networkmanagerapplet #pkgs.sway inputs.agenix.packages."${pkgs.system}".default pkgs.vlc #pkgs.hyprland 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 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 #inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland pkgs.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" # ]; #}; services.earlyoom = { enable = true; freeSwapThreshold = 5; freeMemThreshold = 8; enableNotifications = true; extraArgs = [ "-g" "--avoid '^(X|hypr.*|kitty|wayland)$'" "--prefer '^(electron|librewolf|firefox|java|minecraft.*)$'" ]; }; 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"; #}; what = "nas-omv:/personal/randomfiles"; where = "/mnt/NAS"; } { type = "nfs"; #mountConfig = { # Options = "noatime"; #}; 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; xdg.portal.wlr.settings = { screencast = { chooser_type = "simple"; chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or"; }; }; xdg.portal.wlr.enable = true; xdg.portal.config.common.default = "*"; 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; }; nix.settings = { substituters = ["https://hyprland.cachix.org"]; trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; }; services.nscd.config = '' server-user nscd enable-cache passwd yes positive-time-to-live passwd 900 negative-time-to-live passwd 0 shared passwd yes enable-cache group yes positive-time-to-live group 900 negative-time-to-live group 0 shared group yes enable-cache netgroup yes positive-time-to-live netgroup 900 negative-time-to-live netgroup 0 shared netgroup yes enable-cache hosts yes positive-time-to-live hosts 900 negative-time-to-live hosts 0 shared hosts yes enable-cache services yes positive-time-to-live services 900 negative-time-to-live services 0 shared services yes ''; programs.hyprland = { enable = false; #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? }