Update structure

This commit is contained in:
Keisuke Hirata 2026-02-28 19:06:35 +09:00
parent e3de591a27
commit 2acc8a1e67
9 changed files with 91 additions and 92 deletions

View File

@ -4,6 +4,7 @@
enable = true; enable = true;
interactiveShellInit = '' interactiveShellInit = ''
set -g fish_greeting "" set -g fish_greeting ""
set -gx SSH_AUTH_SOCK "$XDG_RUNTIME_DIR/ssh-agent"
''; '';
}; };

11
hosts/arcadia/default.nix Normal file
View File

@ -0,0 +1,11 @@
inputs:
let
mkHost = import ../mkHost.nix inputs;
in
mkHost {
system = "x86_64-linux";
hostname = "Arcadia";
username = "hare";
systemModules = [ ./nixos.nix ];
homeModule = [ ./home-manager.nix ];
}

View File

@ -43,7 +43,6 @@
gimp gimp
inkscape inkscape
obsidian obsidian
# davinci-resolve
kdePackages.filelight kdePackages.filelight
inputs.zen-browser.packages."${stdenv.hostPlatform.system}".default inputs.zen-browser.packages."${stdenv.hostPlatform.system}".default
(deno.overrideAttrs (oldAttrs: { (deno.overrideAttrs (oldAttrs: {
@ -62,6 +61,8 @@
vinegar vinegar
antigravity antigravity
davinci-resolve
]; ];
services.easyeffects = { services.easyeffects = {
enable = true; enable = true;

View File

@ -1,95 +1,9 @@
inputs: inputs:
let
mkHost =
{
system,
hostname,
username,
systemModules,
homeModule,
}:
{
nixos = inputs.nixpkgs.lib.nixosSystem {
modules = systemModules ++ [
{
users.users.${username} = {
isNormalUser = true;
description = "";
extraGroups = [
"networkmanager"
"wheel"
];
};
}
];
inherit system;
specialArgs = {
inherit inputs hostname username;
};
};
home-manager = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};
extraSpecialArgs = {
inherit inputs hostname username;
};
modules = [
{
home = {
inherit username;
homeDirectory = "/home/${username}";
};
programs.home-manager.enable = true;
}
(import ../system/home-manager)
]
++ homeModule;
};
};
in
rec { rec {
hosts = { hosts = {
arcadia = arcadia = import ./arcadia inputs;
let x1carbon = import ./x1carbon inputs;
inputs.nixpkgs = import inputs.nixpkgs { fungus = import ./fungus inputs;
config.rocmSupport = true;
};
in
mkHost {
system = "x86_64-linux";
hostname = "Arcadia";
username = "hare";
systemModules = [
./arcadia/nixos.nix
];
homeModule = [
./arcadia/home-manager.nix
];
};
x1carbon = mkHost {
system = "x86_64-linux";
hostname = "x1carbon";
username = "hare";
systemModules = [
./x1carbon/nixos.nix
];
homeModule = [
./x1carbon/home-manager.nix
];
};
fungus = mkHost {
system = "x86_64-linux";
hostname = "Fungus";
username = "hare";
systemModules = [
./fungus/nixos.nix
];
homeModule = [
./fungus/home-manager.nix
];
};
}; };
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.mapAttrs (_: host: host.home-manager) hosts;

11
hosts/fungus/default.nix Normal file
View File

@ -0,0 +1,11 @@
inputs:
let
mkHost = import ../mkHost.nix inputs;
in
mkHost {
system = "x86_64-linux";
hostname = "Fungus";
username = "hare";
systemModules = [ ./nixos.nix ];
homeModule = [ ./home-manager.nix ];
}

48
hosts/mkHost.nix Normal file
View File

@ -0,0 +1,48 @@
inputs:
{
system,
hostname,
username,
systemModules,
homeModule,
}:
{
nixos = inputs.nixpkgs.lib.nixosSystem {
modules = systemModules ++ [
{
users.users.${username} = {
isNormalUser = true;
description = "";
extraGroups = [
"networkmanager"
"wheel"
];
};
}
];
inherit system;
specialArgs = {
inherit inputs hostname username;
};
};
home-manager = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};
extraSpecialArgs = {
inherit inputs hostname username;
};
modules = [
{
home = {
inherit username;
homeDirectory = "/home/${username}";
};
programs.home-manager.enable = true;
}
(import ../system/home-manager)
]
++ homeModule;
};
}

View File

@ -0,0 +1,11 @@
inputs:
let
mkHost = import ../mkHost.nix inputs;
in
mkHost {
system = "x86_64-linux";
hostname = "x1carbon";
username = "hare";
systemModules = [ ./nixos.nix ];
homeModule = [ ./home-manager.nix ];
}

View File

@ -31,12 +31,13 @@ in
fzf fzf
ghq ghq
android-tools
]; ];
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";
users.users.${username} = { users.users.${username} = {
extraGroups = [ extraGroups = [
"adbusers"
"docker" "docker"
]; ];
shell = pkgs.fish; shell = pkgs.fish;
@ -45,7 +46,6 @@ in
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIW2Yrqwi4YjIrdI8mygX5pTHDPmrUgbmpZ4WxoTqORi keihi@Vostro-LapTop" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIW2Yrqwi4YjIrdI8mygX5pTHDPmrUgbmpZ4WxoTqORi keihi@Vostro-LapTop"
]; ];
}; };
programs.adb.enable = true;
programs.nix-ld.enable = true; programs.nix-ld.enable = true;
programs.light.enable = true; programs.light.enable = true;

View File

@ -1,4 +1,6 @@
{ {
programs.ssh.startAgent = true;
services.openssh = { services.openssh = {
enable = true; enable = true;
ports = [ 22 ]; ports = [ 22 ];