From 8639459949c8e7f3046dcbdf238d672ffb6dbd3c Mon Sep 17 00:00:00 2001 From: Sebastian Fischer Date: Thu, 5 Feb 2026 21:29:11 +0100 Subject: [PATCH] [TASK] Add home-manager --- README.md | 9 ++++++--- config/common.nix | 3 --- config/configuration.nix | 22 ++++++++++------------ config/home.nix | 5 +++-- 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 95f69e6..23971f2 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils vir Video QXL configuration.nix services.spice-vdagentd.enable = true; -## Install +## Install inside nixos sudo -i @@ -27,8 +27,11 @@ mount -o umask=077 /dev/disk/by-label/boot /mnt/boot swapon /dev/sda2 + nixos-generate-config --root /mnt -vi /mnt/etc/nixos/configuration.nix + +sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz home-manager +sudo nix-channel --update https://nixos.org/manual/nixos/stable/ @@ -37,4 +40,4 @@ sudo nixos-rebuild switch ### cleanup sudo nix-collect-garbage -d ### optimize & cleanup -sudo nix-store --optimise && sudo nix-collect-garbage -d \ No newline at end of file +sudo nix-store --optimise && sudo nix-collect-garbage -d diff --git a/config/common.nix b/config/common.nix index a020067..21238b9 100644 --- a/config/common.nix +++ b/config/common.nix @@ -116,9 +116,6 @@ isNormalUser = true; description = "Sebastian Fischer"; extraGroups = [ "networkmanager" "wheel" ]; - packages = with pkgs; [ - # thunderbird - ]; }; # Install firefox. diff --git a/config/configuration.nix b/config/configuration.nix index f702545..c38bba2 100644 --- a/config/configuration.nix +++ b/config/configuration.nix @@ -1,7 +1,3 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - { config, pkgs, ... }: { @@ -9,14 +5,16 @@ ./hardware-configuration.nix ./common.nix # ./vm.nix - ./home.nix + ]; - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "25.11"; # Did you read the comment? + # Home Manager Konfiguration + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + + # Dein(e) Benutzer mit Home Manager + home-manager.users.sebastian = import ./home.nix; + + system.stateVersion = "25.11"; + nixpkgs.config.allowUnfree = true; } diff --git a/config/home.nix b/config/home.nix index b147df0..f5971bc 100644 --- a/config/home.nix +++ b/config/home.nix @@ -1,9 +1,10 @@ # In deiner home.nix -{ pkgs, ... }: +{ config, pkgs, ... }: { + home.stateVersion = "25.11"; + home.packages = with pkgs; [ rustdesk - # deine anderen Pakete... ]; }