nixos-config

NixOS configs for my systems
Log | Files | Refs

commit c912add857c1440032bebd723a16a2c16d3cdfa0
parent 97c213ebae30c23073ed90ad55658f61a9e84ae1
Author: Vineet Kumar <git@vineetk.net>
Date:   Fri,  9 Aug 2024 18:29:01 -0400

try using home-manager

Diffstat:
Mflake.lock | 22++++------------------
Mflake.nix | 38++++++++++++++++++++++++++------------
Ahome.nix | 10++++++++++
3 files changed, 40 insertions(+), 30 deletions(-)

diff --git a/flake.lock b/flake.lock @@ -2,7 +2,9 @@ "nodes": { "home-manager": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { "lastModified": 1723015306, @@ -20,22 +22,6 @@ }, "nixpkgs": { "locked": { - "lastModified": 1722185531, - "narHash": "sha256-veKR07psFoJjINLC8RK4DiLniGGMgF3QMlS4tb74S6k=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "52ec9ac3b12395ad677e8b62106f0b98c1f8569d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { "lastModified": 1722987190, "narHash": "sha256-68hmex5efCiM2aZlAAEcQgmFI4ZwWt8a80vOeB/5w3A=", "owner": "nixos", @@ -53,7 +39,7 @@ "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix @@ -1,22 +1,36 @@ { - description = "simple nixos flake"; + description = "my nixos configuration"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; - home-manager.url = "github:nix-community/home-manager"; + + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, ... }@attrs: { + outputs = { self, home-manager, nixpkgs, ... }@attrs: { # TODO: deduplicate this - nixosConfigurations.demiurge = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = attrs; - modules = [ ./hosts/demiurge ]; - }; - nixosConfigurations.lappy = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = attrs; - modules = [ ./hosts/lappy ]; + nixosConfigurations = { + demiurge = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = attrs; + modules = [ ./hosts/demiurge ]; + }; + + lappy = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = attrs; + modules = [ + ./hosts/lappy + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.vin = import ./home.nix; + } + ]; + }; }; }; } diff --git a/home.nix b/home.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: + +{ + home.username = "vin"; + home.homeDirectory = "/home/vin"; + + home.stateVersion = "24.05"; + + programs.home-manager.enable = true; +}