From ce38e52ee9a5feb5192283af033e32ef0a6a52c2 Mon Sep 17 00:00:00 2001 From: poslop Date: Wed, 9 Jul 2025 11:46:32 -0500 Subject: [PATCH] no clue really --- flake.nix | 23 +++++++++-------- hosts/nixos-vm1/configuration.nix | 27 ++++++++----------- hosts/nixos-vm1/hardware-configuration.nix | 30 +++++++++++++--------- hosts/nixos-vm2/configuration.nix | 20 +++++++-------- hosts/nixos-vm2/hardware-configuration.nix | 30 +++++++++++++--------- modules/core/default.nix | 1 - modules/core/hjem.nix | 13 +++++----- modules/core/packages.nix | 5 +--- modules/core/program.nix | 2 +- modules/core/ssh.nix | 5 +--- modules/core/timezone.nix | 4 +-- modules/core/user.nix | 11 ++------ modules/home/git.nix | 8 ++++-- modules/home/hyprland/hyprland.nix | 4 +-- modules/home/hyprland/monitor.nix | 6 +---- modules/home/neovim.nix | 2 +- modules/home/packages.nix | 9 +++++-- modules/home/ssh.nix | 5 +--- modules/home/zsh/default.nix | 6 +---- modules/home/zsh/plugins.nix | 6 ----- modules/home/zsh/zsh.nix | 3 ++- 21 files changed, 99 insertions(+), 121 deletions(-) delete mode 100644 modules/home/zsh/plugins.nix diff --git a/flake.nix b/flake.nix index 13e7cf1..9a397a0 100644 --- a/flake.nix +++ b/flake.nix @@ -14,22 +14,23 @@ }; }; - outputs = { self, nixpkgs, ... } @ inputs: - let + outputs = + { self, nixpkgs, ... }@inputs: + let system = "x86_64-linux"; username = "poslop"; - in + in { - nixosConfigurations = { - nixos-vm2 = nixpkgs.lib.nixosSystem { - inherit system; - modules = [ ./hosts/nixos-vm2/configuration.nix ]; - specialArgs = { - host = "nixos-vm2"; - inherit self inputs username; + nixosConfigurations = { + nixos-vm2 = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ ./hosts/nixos-vm2/configuration.nix ]; + specialArgs = { + host = "nixos-vm2"; + inherit self inputs username; + }; }; }; - }; }; } diff --git a/hosts/nixos-vm1/configuration.nix b/hosts/nixos-vm1/configuration.nix index 73b565b..20db7d5 100644 --- a/hosts/nixos-vm1/configuration.nix +++ b/hosts/nixos-vm1/configuration.nix @@ -1,17 +1,19 @@ -{ config, lib, pkgs, ... }: +{ + pkgs, + ... +}: { nix.settings = { experimental-features = "nix-command flakes"; }; - imports = - [ - ./hardware-configuration.nix - ./modules - ]; - - programs.hyprland.enable = true; + imports = [ + ./hardware-configuration.nix + ./modules + ]; + + programs.hyprland.enable = true; boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; @@ -27,14 +29,6 @@ pulse.enable = true; }; - users.users.poslop = { - isNormalUser = true; - extraGroups = [ "wheel" ]; - packages = with pkgs; [ - tree - ]; - }; - environment.systemPackages = with pkgs; [ kitty vim @@ -46,4 +40,3 @@ system.stateVersion = "24.11"; } - diff --git a/hosts/nixos-vm1/hardware-configuration.nix b/hosts/nixos-vm1/hardware-configuration.nix index 4bb8aa0..9149754 100644 --- a/hosts/nixos-vm1/hardware-configuration.nix +++ b/hosts/nixos-vm1/hardware-configuration.nix @@ -1,26 +1,32 @@ # 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, ... }: +{ + lib, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.availableKernelModules = [ + "ahci" + "xhci_pci" + "virtio_pci" + "sr_mod" + "virtio_blk" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/39b3801f-ffcd-421f-966f-46625fb8d4ca"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/39b3801f-ffcd-421f-966f-46625fb8d4ca"; + fsType = "ext4"; + }; - swapDevices = - [ { device = "/dev/disk/by-uuid/7043d338-93f0-40a7-9033-6616685e32f3"; } - ]; + swapDevices = [ { device = "/dev/disk/by-uuid/7043d338-93f0-40a7-9033-6616685e32f3"; } ]; networking.useDHCP = lib.mkDefault true; diff --git a/hosts/nixos-vm2/configuration.nix b/hosts/nixos-vm2/configuration.nix index 1fb56d8..a8569dd 100644 --- a/hosts/nixos-vm2/configuration.nix +++ b/hosts/nixos-vm2/configuration.nix @@ -1,22 +1,20 @@ -{ config, lib, pkgs, ... }: +{ + ... +}: { - imports = - [ - ./hardware-configuration.nix - ../../modules - ]; - - programs.hyprland.enable = true; + imports = [ + ./hardware-configuration.nix + ../../modules + ]; + + programs.hyprland.enable = true; boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; - services.spice-vdagentd.enable = true; services.qemuGuest.enable = true; - system.stateVersion = "24.11"; } - diff --git a/hosts/nixos-vm2/hardware-configuration.nix b/hosts/nixos-vm2/hardware-configuration.nix index 7ab2977..1b9b152 100644 --- a/hosts/nixos-vm2/hardware-configuration.nix +++ b/hosts/nixos-vm2/hardware-configuration.nix @@ -1,26 +1,32 @@ # 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, ... }: +{ + lib, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.availableKernelModules = [ + "ahci" + "xhci_pci" + "virtio_pci" + "sr_mod" + "virtio_blk" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/b8c66f3c-759d-4d4f-9d1a-3f2e04d91e23"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/b8c66f3c-759d-4d4f-9d1a-3f2e04d91e23"; + fsType = "ext4"; + }; - swapDevices = - [ { device = "/dev/disk/by-uuid/b7d73851-7f85-44fa-b62a-e35deb0ea98a"; } - ]; + swapDevices = [ { device = "/dev/disk/by-uuid/b7d73851-7f85-44fa-b62a-e35deb0ea98a"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/modules/core/default.nix b/modules/core/default.nix index c8b7ce5..0270804 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -11,4 +11,3 @@ ./ssh.nix ]; } - diff --git a/modules/core/hjem.nix b/modules/core/hjem.nix index dedbb76..5ba620e 100644 --- a/modules/core/hjem.nix +++ b/modules/core/hjem.nix @@ -1,14 +1,13 @@ -{ - inputs, - username, - ... -}: +{ inputs, username, lib, ... }: { - imports = [inputs.hjem.nixosModules.default]; + imports = [ + inputs.hjem.nixosModules.default + (lib.modules.mkAliasOptionModule ["hj"] ["hjem" "users" username]) + ]; config.hjem = { - extraModules = [inputs.hjem-rum.hjemModules.default]; + extraModules = [ inputs.hjem-rum.hjemModules.default ]; users.${username} = { enable = true; diff --git a/modules/core/packages.nix b/modules/core/packages.nix index cc70fd7..ca2c53a 100644 --- a/modules/core/packages.nix +++ b/modules/core/packages.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +{ pkgs, ... }: { environment.systemPackages = with pkgs; [ wl-clipboard diff --git a/modules/core/program.nix b/modules/core/program.nix index 5646663..809b683 100644 --- a/modules/core/program.nix +++ b/modules/core/program.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +_: { programs.zsh.enable = true; } diff --git a/modules/core/ssh.nix b/modules/core/ssh.nix index 8254dbd..7d6e457 100644 --- a/modules/core/ssh.nix +++ b/modules/core/ssh.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +_: { services.openssh = { enable = true; diff --git a/modules/core/timezone.nix b/modules/core/timezone.nix index 44c287f..1738d87 100644 --- a/modules/core/timezone.nix +++ b/modules/core/timezone.nix @@ -1,3 +1 @@ -{ - time.timeZone = "America/Chicago"; -} +{ time.timeZone = "America/Chicago"; } diff --git a/modules/core/user.nix b/modules/core/user.nix index c4ae958..72bbdc2 100644 --- a/modules/core/user.nix +++ b/modules/core/user.nix @@ -1,17 +1,10 @@ -{ - username, - pkgs, - ... -}: +{ username, pkgs, ... }: { users.users.${username} = { isNormalUser = true; description = "${username}"; - #group = "${username}"; - extraGroups = [ - "wheel" - ]; + extraGroups = [ "wheel" ]; shell = pkgs.zsh; }; nix.settings.allowed-users = [ "@wheel" ]; diff --git a/modules/home/git.nix b/modules/home/git.nix index 4ec5568..fc57297 100644 --- a/modules/home/git.nix +++ b/modules/home/git.nix @@ -1,6 +1,10 @@ -{ config, pkgs, username, ... }: { - config.hjem.users.username.rum.programs.git = { + config, + username, + ... +}: +{ + hj.rum.programs.git = { enable = true; settings = { user = { diff --git a/modules/home/hyprland/hyprland.nix b/modules/home/hyprland/hyprland.nix index 98dfe35..b147fd1 100644 --- a/modules/home/hyprland/hyprland.nix +++ b/modules/home/hyprland/hyprland.nix @@ -1,3 +1 @@ -{ - programs.hyprland.enable = true; -} +{ programs.hyprland.enable = true; } diff --git a/modules/home/hyprland/monitor.nix b/modules/home/hyprland/monitor.nix index b280a41..53a9002 100644 --- a/modules/home/hyprland/monitor.nix +++ b/modules/home/hyprland/monitor.nix @@ -1,5 +1 @@ -{ - config.me.rum.programs.hyprland.settings.monitor = [ - ", 1920x1080@60, auto, 1" - ]; -} +{ config.me.rum.programs.hyprland.settings.monitor = [ ", 1920x1080@60, auto, 1" ]; } diff --git a/modules/home/neovim.nix b/modules/home/neovim.nix index dab3e42..4f86262 100644 --- a/modules/home/neovim.nix +++ b/modules/home/neovim.nix @@ -1,4 +1,4 @@ -{ pkgs, inputs, ... }: +_: { programs.neovim = { enable = true; diff --git a/modules/home/packages.nix b/modules/home/packages.nix index c3cfc8a..0634b1f 100644 --- a/modules/home/packages.nix +++ b/modules/home/packages.nix @@ -1,7 +1,12 @@ -{ config, pkgs, username, ... }: +{ + pkgs, + username, + ... +}: { - hjem.users.username.packages = with pkgs; [ + hjem.users.${username}.packages = with pkgs; [ + statix git zsh neofetch diff --git a/modules/home/ssh.nix b/modules/home/ssh.nix index 8254dbd..7d6e457 100644 --- a/modules/home/ssh.nix +++ b/modules/home/ssh.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +_: { services.openssh = { enable = true; diff --git a/modules/home/zsh/default.nix b/modules/home/zsh/default.nix index db05157..faed268 100644 --- a/modules/home/zsh/default.nix +++ b/modules/home/zsh/default.nix @@ -1,5 +1 @@ -{ - imports = [ - ./zsh.nix - ]; -} +{ imports = [ ./zsh.nix ]; } diff --git a/modules/home/zsh/plugins.nix b/modules/home/zsh/plugins.nix deleted file mode 100644 index c12d828..0000000 --- a/modules/home/zsh/plugins.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - programs.zsh.plugins = [ - { - - } -} diff --git a/modules/home/zsh/zsh.nix b/modules/home/zsh/zsh.nix index 213cf0e..0afa572 100644 --- a/modules/home/zsh/zsh.nix +++ b/modules/home/zsh/zsh.nix @@ -1,5 +1,6 @@ +{ username, ... }: { - config.hjem.users.username.rum.programs.zsh = { + config.hjem.users.${username}.rum.programs.zsh = { enable = true; }; }