This commit is contained in:
2025-12-25 17:14:54 +09:00
parent 50e49e8454
commit b550bf3b91
3 changed files with 132 additions and 91 deletions
+28 -5
View File
@@ -34,9 +34,23 @@
}; };
}; };
outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, ...}: outputs =
inputs@{
self,
nixpkgs,
nixpkgs-unstable,
nixos-hardware,
home-manager,
...
}:
let let
mkSystem = { host, system, profile, extraModules ? [ ] }: mkSystem =
{
host,
system,
profile,
extraModules ? [ ],
}:
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
inherit system; inherit system;
specialArgs = { specialArgs = {
@@ -49,9 +63,11 @@
./modules/core ./modules/core
./profiles/${profile}.nix ./profiles/${profile}.nix
./hosts/${host} ./hosts/${host}
] ++ extraModules; ]
++ extraModules;
}; };
in { in
{
nixosConfigurations = { nixosConfigurations = {
x1g9 = mkSystem { x1g9 = mkSystem {
host = "x1g9"; host = "x1g9";
@@ -83,13 +99,20 @@
profile = "cli-server"; profile = "cli-server";
extraModules = [ ]; extraModules = [ ];
}; };
service-1 = mkSystem {
host = "service-1";
system = "x86_64-linux";
profile = "cli-server";
extraModules = [ ];
};
}; };
devShells = { devShells = {
x86_64-linux = x86_64-linux =
let let
pkgs = import nixpkgs { system = "x86_64-linux"; }; pkgs = import nixpkgs { system = "x86_64-linux"; };
in { in
{
next-web = import ./shells/next-web.nix { inherit pkgs; }; next-web = import ./shells/next-web.nix { inherit pkgs; };
jupyter = import ./shells/jupyter.nix { inherit pkgs; }; jupyter = import ./shells/jupyter.nix { inherit pkgs; };
rust = import ./shells/rust/default.nix { inherit pkgs; }; rust = import ./shells/rust/default.nix { inherit pkgs; };
+12
View File
@@ -0,0 +1,12 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ ... }:
{
imports =
[
./hardware-configuration.nix
];
}
+6
View File
@@ -24,6 +24,12 @@
identityFile = "~/.ssh/id_ed25519_sk_rk"; identityFile = "~/.ssh/id_ed25519_sk_rk";
identitiesOnly = true; identitiesOnly = true;
}; };
"service-1.moons14.com" = {
host = "service-1.moons14.com";
identityFile = "~/.ssh/id_ed25519_sk_rk";
identitiesOnly = true;
};
}; };
extraConfig = '' extraConfig = ''