From dbc2ede2fed8e159e2f556f169379f2f64c4d4fa Mon Sep 17 00:00:00 2001 From: Jack Mechem Date: Sun, 8 Mar 2026 15:48:23 -0700 Subject: [PATCH] Server --- flake.nix | 8 +++ hosts/dellserv/configuration.nix | 70 +++++++++++++++++++++++ hosts/dellserv/hardware-configuration.nix | 33 +++++++++++ hosts/dellserv/home.nix | 39 +++++++++++++ hosts/desktop/configuration.nix | 3 + hosts/t480/configuration.nix | 3 + modules/home-manager/zsh.nix | 1 + modules/nixos/system-packages.nix | 2 - modules/nixos/user-jack.nix | 1 - 9 files changed, 157 insertions(+), 3 deletions(-) create mode 100644 hosts/dellserv/configuration.nix create mode 100644 hosts/dellserv/hardware-configuration.nix create mode 100644 hosts/dellserv/home.nix diff --git a/flake.nix b/flake.nix index 4f73473..08f84c5 100755 --- a/flake.nix +++ b/flake.nix @@ -39,5 +39,13 @@ #inputs.midirun.nixosModules.default ]; }; + nixosConfigurations.dellserv = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/dellserv/configuration.nix + inputs.home-manager.nixosModules.default + #inputs.midirun.nixosModules.default + ]; + }; }; } diff --git a/hosts/dellserv/configuration.nix b/hosts/dellserv/configuration.nix new file mode 100644 index 0000000..dc23d66 --- /dev/null +++ b/hosts/dellserv/configuration.nix @@ -0,0 +1,70 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page, on +# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). + +{ config, lib, pkgs, inputs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + inputs.home-manager.nixosModules.default + ../../modules/nixos/user-jack.nix + ]; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "dell-xps-nixos-serv"; # Define your hostname. + networking.networkmanager.enable = true; + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + time.timeZone = "America/Los_Angeles"; + + services.dbus.enable = true; + + programs.zsh.enable = true; + + programs.dconf.enable = true; + + nixpkgs.config.allowUnfree = true; + + services.openssh.enable = true; + + home-manager = { + extraSpecialArgs = { inherit inputs; }; + users = { + "jack" = import ./home.nix; + }; + }; + + environment.systemPackages = with pkgs; [ + neovim + tree + vim # Both vim and neovim just in case + wget + git + gcc + fastfetch + brightnessctl + killall + unzip + python3 + nodejs + ]; + + virtualisation.docker.enable = true; + + services.libinput.enable = true; + + services.gvfs.enable = true; + + system.stateVersion = "25.11"; + +} + diff --git a/hosts/dellserv/hardware-configuration.nix b/hosts/dellserv/hardware-configuration.nix new file mode 100644 index 0000000..b8ca67f --- /dev/null +++ b/hosts/dellserv/hardware-configuration.nix @@ -0,0 +1,33 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/1147a4f4-e2fe-4c6a-be31-d1cf75599f07"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/EDF0-FBD3"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/2a01e260-f5d8-4038-a6c0-9ff22959350e"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/dellserv/home.nix b/hosts/dellserv/home.nix new file mode 100644 index 0000000..dba1476 --- /dev/null +++ b/hosts/dellserv/home.nix @@ -0,0 +1,39 @@ +{ + config, + pkgs, + inputs, + ... +}: + +{ + + imports = [ + ../../modules/home-manager/zsh.nix + ../../modules/home-manager/tmux.nix + ../../modules/home-manager/shell-aliases.nix + ]; + + programs.home-manager.enable = true; + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = "jack"; + home.homeDirectory = "/home/jack"; + + home.stateVersion = "25.05"; # Please read the comment before changing. + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + home.file = { }; + + nixpkgs = { + config = { + allowUnfree = true; + allowUnfreePredicate = (_: true); + }; + }; + + home.sessionVariables = { + EDITOR = "nvim"; + }; + +} diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 2c9aabb..33c6611 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -44,6 +44,9 @@ nixpkgs.config.allowUnfree = true; + services.gtkapps.enable = true; + services.gtkbar.enable = true; + # services.midirun = { # enable = true; # }; diff --git a/hosts/t480/configuration.nix b/hosts/t480/configuration.nix index 14b873b..e7ebd09 100644 --- a/hosts/t480/configuration.nix +++ b/hosts/t480/configuration.nix @@ -48,6 +48,9 @@ virtualisation.docker.enable = true; + services.gtkapps.enable = true; + services.gtkbar.enable = true; + xdg.portal = { enable = true; wlr.enable = true; diff --git a/modules/home-manager/zsh.nix b/modules/home-manager/zsh.nix index be336a2..f6e6649 100644 --- a/modules/home-manager/zsh.nix +++ b/modules/home-manager/zsh.nix @@ -11,6 +11,7 @@ syntaxHighlighting.enable = true; autosuggestion.enable = true; initContent = '' + ZSH_AUTOSUGGEST_USE_ASYNC=false fastfetch -c examples/11 ''; oh-my-zsh = { diff --git a/modules/nixos/system-packages.nix b/modules/nixos/system-packages.nix index 93ae626..c67da9f 100644 --- a/modules/nixos/system-packages.nix +++ b/modules/nixos/system-packages.nix @@ -5,8 +5,6 @@ programs.firefox.enable = true; programs.hyprland.enable = true; - services.gtkapps.enable = true; - services.gtkbar.enable = true; # List packages installed in system profile. environment.systemPackages = with pkgs; [ diff --git a/modules/nixos/user-jack.nix b/modules/nixos/user-jack.nix index 204484a..7055f10 100644 --- a/modules/nixos/user-jack.nix +++ b/modules/nixos/user-jack.nix @@ -11,7 +11,6 @@ "docker" ]; # Enable ‘sudo’ for the user. packages = with pkgs; [ - zed-editor cargo clang clang-tools