Added home-manager to flake config

This commit is contained in:
Niklas Hermanns 2024-07-02 13:20:14 +02:00
parent 932f37c6e6
commit e5ff8ce072
5 changed files with 71 additions and 16 deletions

View File

@ -71,17 +71,6 @@
# Enable touchpad support (enabled default in most desktopManager). # Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true; # services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.hermannsn = {
isNormalUser = true;
description = "Niklas Hermanns";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
kdePackages.kate
# thunderbird
];
};
# Install firefox. # Install firefox.
programs.firefox.enable = true; programs.firefox.enable = true;

View File

@ -1,6 +1,41 @@
{ {
"nodes": { "nodes": {
"home-manager": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1719827385,
"narHash": "sha256-qs+nU20Sm8czHg3bhGCqiH+8e13BJyRrKONW34g3i50=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "391ca6e950c2525b4f853cbe29922452c14eda82",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.05",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1716542732,
"narHash": "sha256-0Y9fRr0CUqWT4KgBITmaGwlnNIGMYuydu2L8iLTfHU4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d12251ef6e8e6a46e05689eeccd595bdbd3c9e60",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1719707984, "lastModified": 1719707984,
"narHash": "sha256-RoxIr/fbndtuKqulGvNCcuzC6KdAib85Q8gXnjzA1dw=", "narHash": "sha256-RoxIr/fbndtuKqulGvNCcuzC6KdAib85Q8gXnjzA1dw=",
@ -18,7 +53,8 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "home-manager": "home-manager",
"nixpkgs": "nixpkgs_2"
} }
} }
}, },

View File

@ -3,14 +3,29 @@ description = "My flakes configuration";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
home-manager.url = "github:nix-community/home-manager/release-24.05";
}; };
outputs = { self, nixpkgs }@inputs: outputs = { self, nixpkgs, home-manager }@inputs:
let
system = "x86_64-linux";
specialArgs = inputs // { inherit system; };
shared-modules = [
home-manager.nixosModules.home-manager
{
home-manager = {
useUserPackages = true;
extraSpecialArgs = specialArgs;
};
}
];
in
{ {
nixosConfigurations = { nixosConfigurations = {
nos = nixpkgs.lib.nixosSystem { nos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; specialArgs = specialArgs;
modules = [ ./nos.nix]; system = system;
modules = shared-modules ++ [ ./nos.nix];
}; };
}; };
}; };

15
hermannsn.nix Normal file
View File

@ -0,0 +1,15 @@
# hermannsn.nix
{ pkgs, ...}:
{
users.users.hermannsn = {
isNormalUser = true;
description = "Niklas Hermanns";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
kdePackages.kate
# thunderbird
];
};
}

View File

@ -4,7 +4,7 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = [ ./configuration.nix ]; imports = [ ./configuration.nix ./hermannsn.nix ];
# Bootloader. # Bootloader.
boot.loader.grub.enable = true; boot.loader.grub.enable = true;