feat: multiple user
This commit is contained in:
parent
2acc8a1e67
commit
35623910b0
|
|
@ -5,7 +5,11 @@ in
|
||||||
mkHost {
|
mkHost {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
hostname = "Arcadia";
|
hostname = "Arcadia";
|
||||||
|
users = [
|
||||||
|
{
|
||||||
username = "hare";
|
username = "hare";
|
||||||
|
homeModule = [ ./hare ];
|
||||||
|
}
|
||||||
|
];
|
||||||
systemModules = [ ./nixos.nix ];
|
systemModules = [ ./nixos.nix ];
|
||||||
homeModule = [ ./home-manager.nix ];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,19 +8,19 @@
|
||||||
home.stateVersion = "25.05";
|
home.stateVersion = "25.05";
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nix-index-database.homeModules.nix-index
|
inputs.nix-index-database.homeModules.nix-index
|
||||||
./display.nix
|
../display.nix
|
||||||
../../home-manager/tofi.nix
|
../../../home-manager/tofi.nix
|
||||||
../../home-manager/hyprland
|
../../../home-manager/hyprland
|
||||||
../../home-manager/fnott.nix
|
../../../home-manager/fnott.nix
|
||||||
../../home-manager/wezterm
|
../../../home-manager/wezterm
|
||||||
../../home-manager/fish
|
../../../home-manager/fish
|
||||||
../../home-manager/vscode.nix
|
../../../home-manager/vscode.nix
|
||||||
../../home-manager/direnv.nix
|
../../../home-manager/direnv.nix
|
||||||
../../home-manager/firefox.nix
|
../../../home-manager/firefox.nix
|
||||||
../../home-manager/obs-studio.nix
|
../../../home-manager/obs-studio.nix
|
||||||
../../home-manager/zeditor.nix
|
../../../home-manager/zeditor.nix
|
||||||
../../home-manager/blender.nix
|
../../../home-manager/blender.nix
|
||||||
../../home-manager/voicevox.nix
|
../../../home-manager/voicevox.nix
|
||||||
];
|
];
|
||||||
hare.hyprland = {
|
hare.hyprland = {
|
||||||
input.sensitivity = -1.0;
|
input.sensitivity = -1.0;
|
||||||
|
|
@ -6,5 +6,5 @@ rec {
|
||||||
fungus = import ./fungus inputs;
|
fungus = import ./fungus inputs;
|
||||||
};
|
};
|
||||||
nixos = builtins.mapAttrs (_: host: host.nixos) hosts;
|
nixos = builtins.mapAttrs (_: host: host.nixos) hosts;
|
||||||
home-manager = builtins.mapAttrs (_: host: host.home-manager) hosts;
|
home-manager = builtins.foldl' (a: b: a // b) { } (map (h: h.home-manager) (builtins.attrValues hosts));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,11 @@ in
|
||||||
mkHost {
|
mkHost {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
hostname = "Fungus";
|
hostname = "Fungus";
|
||||||
|
users = [
|
||||||
|
{
|
||||||
username = "hare";
|
username = "hare";
|
||||||
|
homeModule = [ ./hare ];
|
||||||
|
}
|
||||||
|
];
|
||||||
systemModules = [ ./nixos.nix ];
|
systemModules = [ ./nixos.nix ];
|
||||||
homeModule = [ ./home-manager.nix ];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,16 @@
|
||||||
{ conifg, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.stateVersion = "25.05";
|
home.stateVersion = "25.05";
|
||||||
imports = [
|
imports = [
|
||||||
../../home-manager/direnv.nix
|
../../../home-manager/direnv.nix
|
||||||
../../home-manager/wezterm
|
../../../home-manager/wezterm
|
||||||
../../home-manager/fish
|
../../../home-manager/fish
|
||||||
];
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
];
|
];
|
||||||
|
home.packages = with pkgs; [ ];
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "Hare";
|
settings.user.name = "Hare";
|
||||||
userEmail = "kei.hiracchi.0928@gmail.com";
|
settings.user.email = "kei.hiracchi.0928@gmail.com";
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
|
|
@ -2,15 +2,22 @@ inputs:
|
||||||
{
|
{
|
||||||
system,
|
system,
|
||||||
hostname,
|
hostname,
|
||||||
username,
|
users,
|
||||||
systemModules,
|
systemModules,
|
||||||
homeModule,
|
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
pkgs = import inputs.nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
nixos = inputs.nixpkgs.lib.nixosSystem {
|
nixos = inputs.nixpkgs.lib.nixosSystem {
|
||||||
modules = systemModules ++ [
|
modules = systemModules ++ [
|
||||||
{
|
{
|
||||||
users.users.${username} = {
|
users.users = builtins.listToAttrs (map (u: {
|
||||||
|
name = u.username;
|
||||||
|
value = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "";
|
description = "";
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
|
|
@ -18,31 +25,33 @@ inputs:
|
||||||
"wheel"
|
"wheel"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
}) users);
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs hostname username;
|
inherit inputs hostname;
|
||||||
|
username = (builtins.head users).username;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home-manager = inputs.home-manager.lib.homeManagerConfiguration {
|
home-manager = builtins.listToAttrs (map (u: {
|
||||||
pkgs = import inputs.nixpkgs {
|
name = "${u.username}@${hostname}";
|
||||||
inherit system;
|
value = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
config.allowUnfree = true;
|
inherit pkgs;
|
||||||
};
|
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit inputs hostname username;
|
inherit inputs hostname;
|
||||||
|
username = u.username;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
home = {
|
home = {
|
||||||
inherit username;
|
username = u.username;
|
||||||
homeDirectory = "/home/${username}";
|
homeDirectory = "/home/${u.username}";
|
||||||
};
|
};
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
}
|
}
|
||||||
(import ../system/home-manager)
|
(import ../system/home-manager)
|
||||||
]
|
] ++ u.homeModule;
|
||||||
++ homeModule;
|
|
||||||
};
|
};
|
||||||
|
}) users);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,11 @@ in
|
||||||
mkHost {
|
mkHost {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
hostname = "x1carbon";
|
hostname = "x1carbon";
|
||||||
|
users = [
|
||||||
|
{
|
||||||
username = "hare";
|
username = "hare";
|
||||||
|
homeModule = [ ./hare ];
|
||||||
|
}
|
||||||
|
];
|
||||||
systemModules = [ ./nixos.nix ];
|
systemModules = [ ./nixos.nix ];
|
||||||
homeModule = [ ./home-manager.nix ];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,16 @@
|
||||||
{
|
{
|
||||||
home.stateVersion = "25.05";
|
home.stateVersion = "25.05";
|
||||||
imports = [
|
imports = [
|
||||||
../../home-manager/hyprland
|
../../../home-manager/hyprland
|
||||||
../../home-manager/tofi.nix
|
../../../home-manager/tofi.nix
|
||||||
../../home-manager/fnott.nix
|
../../../home-manager/fnott.nix
|
||||||
../../home-manager/direnv.nix
|
../../../home-manager/direnv.nix
|
||||||
../../home-manager/obs-studio.nix
|
../../../home-manager/obs-studio.nix
|
||||||
../../home-manager/wezterm
|
../../../home-manager/wezterm
|
||||||
../../home-manager/fish
|
../../../home-manager/fish
|
||||||
];
|
];
|
||||||
hare.hyprland = {
|
hare.hyprland = {
|
||||||
style = import ../../home-manager/hyprland/styles/thin.nix { inherit lib; };
|
style = import ../../../home-manager/hyprland/styles/thin.nix { inherit lib; };
|
||||||
input.sensitivity = -0.6;
|
input.sensitivity = -0.6;
|
||||||
wallpaperCommand = "swww img /usr/share/wallpaper/";
|
wallpaperCommand = "swww img /usr/share/wallpaper/";
|
||||||
};
|
};
|
||||||
Loading…
Reference in New Issue
Block a user