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";
|
2022-12-30 08:45:15 +00:00
|
|
|
nixgl.url = "./../../out-of-tree/nixGL";
|
2022-11-09 11:35:28 +00:00
|
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
2022-12-14 20:39:13 +00:00
|
|
|
# Allows default.nix to call onto flake.nix. Useful for nix eval and automations
|
|
|
|
flake-compat = {
|
|
|
|
url = "github:edolstra/flake-compat";
|
|
|
|
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
|
|
|
|
, ...
|
|
|
|
}:
|
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;
|
2022-12-06 00:48:56 +00:00
|
|
|
config = { allowUnfree = true; };
|
2022-12-01 02:17:06 +00:00
|
|
|
};
|
2022-12-11 00:00:49 +00:00
|
|
|
# lib = (import ../lib { inherit pkgs; lib = pkgs.lib; });
|
2022-12-11 01:46:05 +00:00
|
|
|
base = import ./base;
|
|
|
|
inherit (base) mkModuleArgs;
|
2022-12-28 02:08:07 +00:00
|
|
|
|
2022-12-21 11:18:01 +00:00
|
|
|
kde_module = {config, pkgs, ...}: {
|
|
|
|
fonts.fontconfig.enable = true;
|
2022-12-21 22:49:03 +00:00
|
|
|
home.packages = [
|
|
|
|
(pkgs.nerdfonts.override {fonts = ["DroidSansMono"];})
|
|
|
|
];
|
2022-12-21 11:18:01 +00:00
|
|
|
# For some reasons, Windows es in the font name as DroidSansMono NF
|
|
|
|
# so we need to override this
|
|
|
|
base.alacritty.font.family = "DroidSansMono Nerd Font";
|
|
|
|
};
|
2022-11-07 18:36:01 +00:00
|
|
|
in
|
2022-11-14 20:56:23 +00:00
|
|
|
{
|
2022-12-30 08:45:15 +00:00
|
|
|
debug = {
|
|
|
|
inherit overlays pkgs base;
|
|
|
|
};
|
2022-11-14 20:56:23 +00:00
|
|
|
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;
|
2022-12-11 01:46:05 +00:00
|
|
|
modules = base.modules ++ [
|
2022-11-14 20:56:23 +00:00
|
|
|
./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
|
2022-12-11 00:00:49 +00:00
|
|
|
extraSpecialArgs = mkModuleArgs {
|
|
|
|
inherit pkgs;
|
2022-11-14 20:56:23 +00:00
|
|
|
myHome = {
|
|
|
|
username = "hungtr";
|
|
|
|
homeDirectory = "/home/hungtr";
|
|
|
|
};
|
|
|
|
};
|
2022-11-14 07:50:02 +00:00
|
|
|
};
|
2022-12-21 11:18:01 +00:00
|
|
|
"hungtr@bao" = home-manager.lib.homeManagerConfiguration {
|
|
|
|
inherit pkgs;
|
|
|
|
modules = base.modules ++ [
|
|
|
|
./home.nix
|
|
|
|
kde_module
|
2022-12-28 02:08:07 +00:00
|
|
|
./base/productive_desktop.nix
|
2022-12-21 11:18:01 +00:00
|
|
|
];
|
|
|
|
# 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 = mkModuleArgs {
|
|
|
|
inherit pkgs;
|
|
|
|
myHome = {
|
|
|
|
username = "hungtr";
|
|
|
|
homeDirectory = "/home/hungtr";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2022-11-14 20:56:23 +00:00
|
|
|
"nixos@Felia" = home-manager.lib.homeManagerConfiguration {
|
|
|
|
inherit pkgs;
|
|
|
|
modules = [
|
|
|
|
./home.nix
|
2022-12-11 07:34:36 +00:00
|
|
|
{
|
|
|
|
base.shells = {
|
|
|
|
shellInitExtra = ''
|
|
|
|
'' + x11_wsl;
|
|
|
|
};
|
|
|
|
}
|
2022-11-14 20:56:23 +00:00
|
|
|
];
|
|
|
|
# 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
|
2022-12-11 00:00:49 +00:00
|
|
|
extraSpecialArgs = mkModuleArgs {
|
|
|
|
inherit pkgs;
|
2022-11-14 20:56:23 +00:00
|
|
|
myHome = {
|
|
|
|
username = "nixos";
|
|
|
|
homeDirectory = "/home/nixos";
|
|
|
|
};
|
|
|
|
};
|
2022-11-08 19:14:47 +00:00
|
|
|
};
|
2022-12-06 00:48:56 +00:00
|
|
|
# NOTE: This is never actually tested. This is for Ubuntu@Felia
|
|
|
|
# "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;
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
|
|
|
|
# Personal laptop
|
2022-11-14 20:56:23 +00:00
|
|
|
hwtr = home-manager.lib.homeManagerConfiguration {
|
|
|
|
inherit pkgs;
|
2022-12-11 01:46:05 +00:00
|
|
|
modules = base.modules ++ [
|
2022-11-14 20:56:23 +00:00
|
|
|
./home.nix
|
2022-12-30 08:45:15 +00:00
|
|
|
./base/graphics.nix
|
2022-12-11 00:00:49 +00:00
|
|
|
{
|
2022-12-30 08:45:15 +00:00
|
|
|
base.graphics.enable = true;
|
2022-12-11 00:00:49 +00:00
|
|
|
base.alacritty.font.family = "BitstreamVeraSansMono Nerd Font";
|
|
|
|
}
|
2022-11-14 20:56:23 +00:00
|
|
|
];
|
2022-12-11 00:00:49 +00:00
|
|
|
extraSpecialArgs = mkModuleArgs {
|
|
|
|
inherit pkgs;
|
2022-11-14 20:56:23 +00:00
|
|
|
myHome = {
|
|
|
|
username = "hwtr";
|
|
|
|
homeDirectory = "/home/hwtr";
|
2022-12-01 02:17:06 +00:00
|
|
|
packages = [
|
|
|
|
pkgs.postman
|
2022-11-29 23:08:44 +00:00
|
|
|
];
|
2022-11-14 20:56:23 +00:00
|
|
|
};
|
2022-11-08 19:14:47 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2022-11-06 20:23:10 +00:00
|
|
|
};
|
|
|
|
}
|