# SPDX-FileCopyrightText: 2025 Ethan Reece # # SPDX-License-Identifier: MIT { config, inputs, lib, pkgs, system, ... }: { imports = [ inputs.home-manager.nixosModules.home-manager # inputs.impermanence.nixosModules.impermanence # inputs.lanzaboote.nixosModules.lanzaboote inputs.lix-module.nixosModules.default inputs.niri.nixosModules.niri inputs.sops-nix.nixosModules.sops inputs.stylix.nixosModules.stylix inputs.catppuccin.nixosModules.catppuccin ]; # fonts = { # enableDefaultPackages = true; # packages = [ pkgs.nerd-fonts.jetbrains-mono ]; # }; options = { flakeSettings = lib.mkOption { description = '' Settings specific to this flake. ''; default = { }; type = lib.types.submodule { options = { graphical = lib.mkEnableOption "graphical"; }; }; }; }; config = { programs = { vim.enable = true; git = { enable = true; }; gnupg = { enable = true; agent = { enable = true; pinentryPackage = pkgs.pinentry-tty; }; }; ssh = { startAgent = true; enableAskPassword = false; askPassword = ""; }; # // lib.mkIf config.flakeSettings.graphical { # enableAskPassword = true; # askPassword = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass"; # }; # zsh = { # enable = true; # autosuggestions.enable = true; # ohMyZsh.enable = true; # syntaxHighlighting.enable = true; # zsh-autoenv.enable = true; # }; } // lib.mkIf config.flakeSettings.graphical { niri.enable = true; hyprlock.enable = true; }; nix.settings.experimental-features = [ "nix-command" "flakes" ]; catppuccin = { enable = true; flavor = "mocha"; accent = "mauve"; }; stylix = (import ../stylix { inherit config pkgs; }) // { homeManagerIntegration = { autoImport = false; followSystem = false; }; }; security.sudo-rs = { enable = true; }; boot = { loader = { systemd-boot = { enable = true; memtest86.enable = true; }; efi.canTouchEfiVariables = true; }; }; environment = { systemPackages = [ pkgs.age pkgs.btrfs-progs pkgs.cryptsetup pkgs.lvm2 pkgs.pciutils pkgs.shadow pkgs.usbutils pkgs.uutils-coreutils-noprefix inputs.disko.packages.${system}.disko-install pkgs.nixos-install-tools ]; }; hardware.graphics = lib.mkIf config.flakeSettings.graphical { enable = true; enable32Bit = true; }; home-manager = { useGlobalPkgs = true; useUserPackages = true; }; time.timeZone = "America/Chicago"; i18n = { defaultLocale = "eo"; extraLocales = [ "en_US.UTF-8/UTF-8" ]; }; console = { # font = "JetBrains Mono Nerd Font"; keyMap = "us"; }; networking = { networkmanager = { enable = true; }; }; users = { mutableUsers = true; users.root = { extraGroups = [ "wheel" "networkmanager" "aria2" ]; shell = pkgs.nushell; isSystemUser = true; home = "/root"; }; }; systemd = { services = { nix-daemon.environment.TMPDIR = "/var/tmp"; }; }; services = { openssh = { enable = true; settings = { PasswordAuthentication = false; }; }; aria2 = { enable = true; }; } // lib.mkIf config.flakeSettings.graphical { pipewire = { enable = true; wireplumber.enable = true; }; greetd = { enable = true; settings = { default_session = { command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd ${config.programs.niri.package}/bin/niri-session"; user = "greeter"; }; }; }; }; }; }