diff --git a/base-system/flake.nix b/base-system/flake.nix index fba03b8..cb8a967 100644 --- a/base-system/flake.nix +++ b/base-system/flake.nix @@ -1,11 +1,18 @@ { - description = "Nix flake for basic configuration"; + description = "Nix flake for basic configuration, for surface and desktop"; + inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + + home-manager = { + url = github:nix-community/home-manager; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = inputs@{nixpkgs, ...}: + + outputs = inputs@{nixpkgs, home-manager, ...}: let system = "x86_64-linux"; pkgs = import nixpkgs { @@ -22,6 +29,12 @@ modules = [ ./desktop-config.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.twoneis = import ./home.nix + } ]; }; nixConfigurations.nixsurface = nixpkgs.lib.nixosSystem { @@ -29,6 +42,12 @@ modules = [ ./surface-config.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.twoneis = import ./home.nix + } ]; }; }; diff --git a/base-system/home.nix b/base-system/home.nix new file mode 100644 index 0000000..7f1b436 --- /dev/null +++ b/base-system/home.nix @@ -0,0 +1,16 @@ +{ config, pkgs, ... } + +{ + # Set username and home directory + home.username = "twoneis"; + home.homeDirectory = "/home/twoneis"; + + # Enable home manager (with self config) + programs.home-manager.enable = true; + + programs.git = { + enable = true; + userName = "twoneis"; + userEmail = "sanjay29@sapura.de"; + } +}