diff --git a/flake.nix b/flake.nix index 63ce975..3e9aacb 100644 --- a/flake.nix +++ b/flake.nix @@ -4,17 +4,31 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; + home-manager = { + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + disko = { url = "github:nix-community/disko/latest"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { nixpkgs, disko, ... }: { + outputs = { nixpkgs, home-manager, disko, ... }: { nixosConfigurations = { opti = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ ./hosts/opti disko.nixosModules.disko ]; + modules = [ + ./hosts/opti + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.wekuz = import ./hosts/opti/home.nix; + } + disko.nixosModules.disko + ]; }; }; }; diff --git a/hosts/opti/default.nix b/hosts/opti/default.nix index e081f57..e8fbe3f 100644 --- a/hosts/opti/default.nix +++ b/hosts/opti/default.nix @@ -59,28 +59,6 @@ }; }; - environment.systemPackages = with pkgs; [ - git - neovim - btop - ncdu - tmux - wget - iperf3 - dnsutils - file - which - zstd - zip - xz - unzip - ripgrep - smartmontools - lm_sensors - ethtool - fastfetch - ]; - environment.variables.EDITOR = "nvim"; users.users.wekuz = { diff --git a/hosts/opti/home.nix b/hosts/opti/home.nix new file mode 100644 index 0000000..f7e575e --- /dev/null +++ b/hosts/opti/home.nix @@ -0,0 +1,47 @@ +{ pkgs, ... }: + +{ + home.username = "wekuz"; + home.homeDirectory = "/home/wekuz"; + + home.packages = with pkgs; [ + neofetch + + # Utilities + neovim + tmux + zip + xz + unzip + p7zip + zstd + ripgrep + file + which + btop + ncdu + lm_sensors + pciutils + usbutils + smartmontools + + # Networking + mtr + iperf3 + wget + dnsutils + ldns + ethtool + ]; + + programs.git = { + enable = true; + userName = "Wekuz"; + userEmail = "wekuz@duck.com"; + extraConfig = { init.defaultBranch = "main"; }; + }; + + programs.zsh = { enable = true; }; + + home.stateVersion = "25.05"; +}