summaryrefslogtreecommitdiffstats
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/config.nix130
-rw-r--r--hosts/default.nix50
-rw-r--r--hosts/jonbox/default.nix119
-rw-r--r--hosts/jonbox/filesystem.nix4
-rw-r--r--hosts/jonbox/hardware.nix70
-rw-r--r--hosts/jontop/default.nix76
-rw-r--r--hosts/jontop/hardware.nix40
7 files changed, 120 insertions, 369 deletions
diff --git a/hosts/config.nix b/hosts/config.nix
deleted file mode 100644
index 2052c12..0000000
--- a/hosts/config.nix
+++ /dev/null
@@ -1,130 +0,0 @@
-{ 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/games ++
- import ../modules/vpn ++
- import ../modules/music
- );
-
- 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;
- };
-}
diff --git a/hosts/default.nix b/hosts/default.nix
deleted file mode 100644
index 862cccf..0000000
--- a/hosts/default.nix
+++ /dev/null
@@ -1,50 +0,0 @@
-{ inputs, lib, nixpkgs, nixpkgs-unstable, nurpkgs, nixos-hardware, home-manager, stateVersion }:
-let
- system = "x86_64-linux";
- pkgs = import nixpkgs {
- inherit system;
- };
-
- pkgs-unstable = import nixpkgs-unstable {
- inherit system;
- };
-
- lib = nixpkgs.lib;
-in
-{
- jonbox = lib.nixosSystem {
- inherit system;
- specialArgs = {
- inherit inputs system pkgs-unstable nurpkgs stateVersion;
- user = "jon";
- };
- modules = [
- { nixpkgs.overlays = [ nurpkgs.overlay ]; }
- ./config.nix
- ./jonbox
-
- home-manager.nixosModules.home-manager {
- home-manager.useGlobalPkgs = true;
- home-manager.useUserPackages = true;
- }
- ];
- };
-
- jontop = lib.nixosSystem {
- inherit system;
- specialArgs = {
- inherit inputs system pkgs-unstable nurpkgs nixos-hardware stateVersion;
- user = "jon";
- };
- modules = [
- { nixpkgs.overlays = [ nurpkgs.overlay ]; }
- ./config.nix
- ./jontop
-
- home-manager.nixosModules.home-manager {
- home-manager.useGlobalPkgs = true;
- home-manager.useUserPackages = true;
- }
- ];
- };
-}
diff --git a/hosts/jonbox/default.nix b/hosts/jonbox/default.nix
index 643838b..0f525ca 100644
--- a/hosts/jonbox/default.nix
+++ b/hosts/jonbox/default.nix
@@ -1,58 +1,77 @@
-{ config, lib, pkgs, stateVersion, ... }:
-
{
- imports = [
- ./hardware.nix
- ../../modules/hardware/bluetooth.nix
- ../../modules/virt
- ];
-
- #Boot options
- boot = {
- loader = {
- systemd-boot = {
- enable = true;
- configurationLimit = 8;
- };
- efi.canTouchEfiVariables = true;
- timeout = 5;
- };
- kernelPackages = pkgs.linuxPackages_latest;
+ inputs,
+ lib,
+ pkgs,
+ ...
+}: {
+ #Filesystems
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/83cafaff-8be3-477f-b13c-c47dafdf969d";
+ fsType = "btrfs";
+ options = [ "compress=zstd" "subvol=@" ];
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/40EA-5550";
+ fsType = "vfat";
+ };
+
+ fileSystems."/mnt/jonshare" = {
+ device = "homenas:/var/data/jon";
+ fsType = "nfs";
};
-
- #Unfree-packages.
- nixpkgs.config.allowUnfreePredicate = pkg:
- builtins.elem (lib.getName pkg) [
- "nvidia-x11"
- "nvidia-settings"
- "nvidia-persistenced"
- "code"
- "vscode"
- "steam"
- "steam-original"
- "steam-run"
- ];
-
- #OpenGL
- hardware.opengl = {
- enable = true;
- driSupport = true;
- driSupport32Bit = true;
+ fileSystems."/mnt/plexshare" = {
+ device = "homenas:/var/data/plex";
+ fsType = "nfs";
};
-
- #X11 Server
- services.xserver.videoDrivers = [ "nvidia" ];
- home-manager.users.jon.gtk.cursorTheme = {
- package = pkgs.quintom-cursor-theme;
- name = "Quintom_Ink";
- size = 12;
+
+ fileSystems."/mnt/share" = {
+ device = "homenas:/var/data/shared";
+ fsType = "nfs";
};
+
+ swapDevices =
+ [
+ { device = "/dev/disk/by-uuid/acfc7ea5-0787-4e05-bcf1-20b7adb0f35c"; }
+ ];
+
+ #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" ]; } )
+ ];
- awesome.enable = true;
- hyprland.enable = true;
- mullvad-vpn.enable = true;
- mpd.enable = true;
+ modules = {
+ device = {
+ cpu = "intel";
+ gpu = "nvidia";
+ drive = "nvme";
+ hasBluetooth = true;
+ };
+ desktop = {
+ hyprland.enable = true;
+ apps = {
+ browsers.firefox.enable = true;
+ games = {
+ enable = true;
+ steam.enable = true;
+ };
+ mpd.enable = true;
+ flatpak.enable = true;
+ newsboat.enable = true;
+ };
+ };
+ };
- games.enable = true;
+ home.manager.wayland.windowManager.hyprland.extraConfig = ''
+ monitor=DP-2,1920x1080,0x0,1
+ monitor=HDMI-A-2,1920x1080,1920x0,1
+ '';
}
diff --git a/hosts/jonbox/filesystem.nix b/hosts/jonbox/filesystem.nix
deleted file mode 100644
index 5b8ec2b..0000000
--- a/hosts/jonbox/filesystem.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-{ config, lib, pkgs, modulesPath, ... }:
-
-{
-}
diff --git a/hosts/jonbox/hardware.nix b/hosts/jonbox/hardware.nix
deleted file mode 100644
index bbe651f..0000000
--- a/hosts/jonbox/hardware.nix
+++ /dev/null
@@ -1,70 +0,0 @@
-{ config, lib, pkgs, modulesPath, ... }:
-{
- imports =
- [ (modulesPath + "/installer/scan/not-detected.nix") ];
-
- boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
- boot.initrd.kernelModules = [ ];
- boot.kernelModules = [ "kvm-intel" ];
- boot.extraModulePackages = [ ];
-
- #Filesystems
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/83cafaff-8be3-477f-b13c-c47dafdf969d";
- fsType = "btrfs";
- options = [ "compress=zstd" "subvol=@" ];
- };
-
- fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/40EA-5550";
- fsType = "vfat";
- };
-
- fileSystems."/mnt/jonshare" = {
- device = "homenas:/var/data/jon";
- fsType = "nfs";
- };
-
- fileSystems."/mnt/plexshare" = {
- device = "homenas:/var/data/plex";
- fsType = "nfs";
- };
-
- fileSystems."/mnt/share" = {
- device = "homenas:/var/data/shared";
- fsType = "nfs";
- };
-
- swapDevices =
- [
- { device = "/dev/disk/by-uuid/acfc7ea5-0787-4e05-bcf1-20b7adb0f35c"; }
- ];
-
- #SSD-optimization
- services.fstrim.enable = true;
- services.btrfs.autoScrub =
- {
- enable = true;
- interval = "weekly";
- };
-
- #Hardware
- hardware.nvidia = {
- modesetting.enable = true;
- powerManagement.enable = false;
- powerManagement.finegrained = false;
- open = false;
- nvidiaSettings = true;
- package = config.boot.kernelPackages.nvidiaPackages.beta;
- };
-
- #Firmware
- nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
- powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
- hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-
- #Networking
- networking.hostName = "jonbox";
- networking.useDHCP = lib.mkDefault true;
- networking.networkmanager.enable = true;
-}
diff --git a/hosts/jontop/default.nix b/hosts/jontop/default.nix
index c916696..cebdb90 100644
--- a/hosts/jontop/default.nix
+++ b/hosts/jontop/default.nix
@@ -1,31 +1,57 @@
-{ inputs, config, lib, modulesPath, pkgs, ... }:
-
{
- imports = [
- ./hardware.nix
- ../../modules/hardware/bluetooth.nix
- ];
+ inputs,
+ lib,
+ pkgs,
+ ...
+}: {
+ #Filesystems
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/72e455f9-4b10-4cb2-a8e4-cfe39c4a8d1f";
+ fsType = "btrfs";
+ options = [ "compress=zstd" "subvol=@" ];
+ };
- #Boot options
- boot = {
- loader = {
- systemd-boot = {
- enable = true;
- configurationLimit = 8;
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/27F7-4AFD";
+ fsType = "vfat";
+ };
+
+ swapDevices =
+ [
+ { device = "/dev/disk/by-uuid/4133a381-ab7d-4a25-9013-3f4b2d31bc5a"; }
+ ];
+
+ #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" ]; } )
+ ];
+
+ modules = {
+ device = {
+ cpu = "intel";
+ gpu = "intel";
+ drive = "ssd";
+ hasBluetooth = true;
+ };
+ desktop = {
+ hyprland.enable = true;
+ apps = {
+ browsers.firefox.enable = true;
+ games = {
+ enable = false;
+ steam.enable = false;
+ };
+ mpd.enable = false;
+ flatpak.enable = true;
+ newsboat.enable = true;
};
- efi.canTouchEfiVariables = true;
- timeout = 5;
};
- kernelPackages = pkgs.linuxPackages_latest;
- };
-
-
- hardware.opengl = {
- enable = true;
};
-
- programs.light.enable = true;
-
- awesome.enable = true;
}
-
diff --git a/hosts/jontop/hardware.nix b/hosts/jontop/hardware.nix
deleted file mode 100644
index dc5af7e..0000000
--- a/hosts/jontop/hardware.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-{ config, lib, pkgs, nixos-hardware, modulesPath, ... }:
-{
- imports =
- [
- (modulesPath + "/installer/scan/not-detected.nix")
- nixos-hardware.nixosModules.lenovo-thinkpad-x220
- ];
-
- boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
- boot.initrd.kernelModules = [ "i915" ];
- boot.kernelModules = [ "kvm-intel" ];
- boot.extraModulePackages = [ ];
-
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/72e455f9-4b10-4cb2-a8e4-cfe39c4a8d1f";
- fsType = "btrfs";
- };
-
- fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/27F7-4AFD";
- fsType = "vfat";
- };
-
- swapDevices =
- [ { device = "/dev/disk/by-uuid/4133a381-ab7d-4a25-9013-3f4b2d31bc5a"; }
- ];
-
- #SSD-optimization
- services.fstrim.enable = true;
-
- #Firmware
- nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
- powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
- hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-
- #Networking
- networking.hostName = "jontop";
- networking.useDHCP = lib.mkDefault true;
- networking.networkmanager.enable = true;
-}