From f819e30b03dffcf9e74af4b8552e4a8ab8f54c58 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Fri, 29 Sep 2023 14:22:24 -0400 Subject: major reorganizing to seperate modules --- hosts/config.nix | 128 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 hosts/config.nix (limited to 'hosts/config.nix') diff --git a/hosts/config.nix b/hosts/config.nix new file mode 100644 index 0000000..de49a45 --- /dev/null +++ b/hosts/config.nix @@ -0,0 +1,128 @@ +{ inputs, config, lib, pkgs, nurpkgs, user, stateVersion, ... }: +{ + imports = ( + import ../modules/desktop ++ + import ../modules/editor ++ + import ../modules/web ++ + import ../modules/shell ++ + import ../modules/terminal ++ + import ../modules/programs ++ + import ../modules/vpn + ); + + users.users.${user} = { + isNormalUser = true; + extraGroups = [ + "wheel" + "video" + "audio" + "camera" + "networkmanager" + "libvirtd" + ]; + }; + + #Timezone + time.timeZone = "America/New_York"; + + #Locale + 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"; + }; + + #Fonts + fonts.packages = with pkgs; [ + fira-code + fira-code-symbols + font-awesome + liberation_ttf + noto-fonts + noto-fonts-cjk + noto-fonts-emoji + (nerdfonts.override { fonts = [ "FiraCode" ]; } ) + ]; + + #Security + security.rtkit.enable = true; + security.polkit.enable = true; + + #Default Packages + environment.systemPackages = with pkgs; [ + #Terminal utils + btop #Resource monitor + coreutils #GNU Utils + git #VC + pciutils #PCI + usbutils #USB + gnutar + unzip + zip + wget + + #Devtools + binutils + clang-tools + gcc + gnumake + gdb + ]; + + programs = { + dconf.enable = true; + neovim.enable = true; + gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + }; + + services = { + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + }; + + #SSH + services.openssh.enable = true; + environment.shellInit = '' +gpg-connect-agent /bye +export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + ''; + + #Nix package manager configs. + nix = { + registry = lib.mapAttrs (_: value: {flake = value;}) inputs; + + nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry; + + settings = { + experimental-features = "nix-command flakes"; + auto-optimise-store = true; + }; + + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + }; + + system.stateVersion = stateVersion; + home-manager.users.${user} = { + home.username = user; + home.homeDirectory = "/home/${user}"; + home.stateVersion = stateVersion; + }; +} -- cgit v1.2.1