dotfiles/nix-conf/home-manager/flake.nix

119 lines
3.4 KiB
Nix
Raw Permalink Normal View History

2022-11-06 20:23:10 +00:00
{
description = "simple home-manager config";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
nixgl.url = "github:guibou/nixGL";
2022-11-09 11:35:28 +00:00
rust-overlay.url = "github:oxalica/rust-overlay";
2022-11-09 13:00:23 +00:00
from-yaml = {
url = "github:pegasust/fromYaml";
flake = false;
};
2022-11-06 20:23:10 +00:00
};
2022-11-09 13:00:23 +00:00
outputs =
{ nixpkgs
, home-manager
, nixgl
, rust-overlay
, flake-utils
, from-yaml
, ...
}:
2022-11-07 18:36:01 +00:00
let
system = "x86_64-linux";
2022-11-09 11:35:28 +00:00
overlays = [ nixgl.overlay rust-overlay.overlays.default ];
# pkgs = nixpkgs.legacyPackages.${system}.appendOverlays overlays;
2022-12-01 02:17:06 +00:00
pkgs = import nixpkgs {
inherit system overlays;
config = {allowUnfree = true;};
};
2022-11-09 13:00:23 +00:00
lib = (import ../lib-nix { inherit pkgs from-yaml; lib = pkgs.lib; });
2022-11-07 18:36:01 +00:00
in
{
homeConfigurations =
let x11_wsl = ''
# x11 output for WSL
export DISPLAY=$(ip route list default | awk '{print $3}'):0
export LIBGL_ALWAYS_INDIRECT=1
'';
in
rec {
"hungtr" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home.nix
];
# optionally pass inarguments to module
# we migrate this from in-place modules to allow flexibility
# in this case, we can add "home" to input arglist of home.nix
extraSpecialArgs = {
myLib = lib;
myHome = {
username = "hungtr";
homeDirectory = "/home/hungtr";
};
};
2022-11-14 07:50:02 +00:00
};
"nixos@Felia" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home.nix
];
# optionally pass inarguments to module
# we migrate this from in-place modules to allow flexibility
# in this case, we can add "home" to input arglist of home.nix
extraSpecialArgs = {
myLib = lib;
myHome = {
username = "nixos";
homeDirectory = "/home/nixos";
shellInitExtra = ''
'' + x11_wsl;
};
};
};
2022-11-24 01:06:21 +00:00
# NOTE: This is never actually tested
"ubuntu_admin" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home.nix
];
extraSpecialArgs = {
myLib = lib;
myHome = {
username = "ubuntu_admin";
homeDirectory = "/home/ubuntu_admin";
shellInitExtra = ''
'' + x11_wsl;
};
};
};
hwtr = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home.nix
];
extraSpecialArgs = {
myLib = lib;
myHome = {
username = "hwtr";
homeDirectory = "/home/hwtr";
2022-12-01 02:17:06 +00:00
packages = [
pkgs.nixgl.nixGLIntel
pkgs.postman
];
shellAliases = {
nixGL = "nixGLIntel";
};
};
};
};
};
2022-11-06 20:23:10 +00:00
};
}