mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 09:28:12 +09:00
x1g9
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
x1g9 = {
|
x1g9 = {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
stateVersion = "26.05";
|
||||||
user = "moons";
|
user = "moons";
|
||||||
path = ./x1g9;
|
path = ./x1g9;
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,4 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "26.05";
|
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-1
@@ -35,6 +35,14 @@ let
|
|||||||
ensure (spec ? user && builtins.isString spec.user && spec.user != "") "${name}: user is required" (
|
ensure (spec ? user && builtins.isString spec.user && spec.user != "") "${name}: user is required" (
|
||||||
ensure (spec ? path && builtins.pathExists spec.path)
|
ensure (spec ? path && builtins.pathExists spec.path)
|
||||||
"${name}: path must name an existing host directory"
|
"${name}: path must name an existing host directory"
|
||||||
|
(
|
||||||
|
ensure
|
||||||
|
(
|
||||||
|
spec ? stateVersion
|
||||||
|
&& builtins.isString spec.stateVersion
|
||||||
|
&& builtins.match "[0-9][0-9]\\.[0-9][0-9]" spec.stateVersion != null
|
||||||
|
)
|
||||||
|
"${name}: stateVersion is required and must have the form YY.MM"
|
||||||
(
|
(
|
||||||
ensure
|
ensure
|
||||||
(lib.all
|
(lib.all
|
||||||
@@ -51,6 +59,7 @@ let
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
mkSpecialArgs = name: spec: {
|
mkSpecialArgs = name: spec: {
|
||||||
@@ -67,6 +76,7 @@ let
|
|||||||
homeModules = [
|
homeModules = [
|
||||||
(registry.mkModule { class = "home"; })
|
(registry.mkModule { class = "home"; })
|
||||||
(registry.mkSelectionModule selected)
|
(registry.mkSelectionModule selected)
|
||||||
|
{ home.stateVersion = spec.stateVersion; }
|
||||||
]
|
]
|
||||||
++ lib.optional (homePath != null) homePath;
|
++ lib.optional (homePath != null) homePath;
|
||||||
in
|
in
|
||||||
@@ -88,6 +98,7 @@ let
|
|||||||
homeModules = [
|
homeModules = [
|
||||||
(registry.mkModule { class = "home"; })
|
(registry.mkModule { class = "home"; })
|
||||||
(registry.mkSelectionModule selected)
|
(registry.mkSelectionModule selected)
|
||||||
|
{ home.stateVersion = spec.stateVersion; }
|
||||||
]
|
]
|
||||||
++ lib.optional (homePath != null) homePath;
|
++ lib.optional (homePath != null) homePath;
|
||||||
in
|
in
|
||||||
@@ -111,7 +122,10 @@ let
|
|||||||
modules = [
|
modules = [
|
||||||
(registry.mkModule { class = "nixos"; })
|
(registry.mkModule { class = "nixos"; })
|
||||||
(registry.mkSelectionModule selected)
|
(registry.mkSelectionModule selected)
|
||||||
{ networking.hostName = lib.mkDefault name; }
|
{
|
||||||
|
networking.hostName = lib.mkDefault name;
|
||||||
|
system.stateVersion = spec.stateVersion;
|
||||||
|
}
|
||||||
]
|
]
|
||||||
++ lib.optional (spec.homeManager or true) (mkHomeManagerModule name spec selected)
|
++ lib.optional (spec.homeManager or true) (mkHomeManagerModule name spec selected)
|
||||||
++ lib.optional (nixosPath != null) nixosPath;
|
++ lib.optional (nixosPath != null) nixosPath;
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
home = {
|
home = {
|
||||||
username = primaryUser;
|
username = primaryUser;
|
||||||
homeDirectory = "/home/${primaryUser}";
|
homeDirectory = "/home/${primaryUser}";
|
||||||
stateVersion = "26.05";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|||||||
@@ -1,12 +1,29 @@
|
|||||||
{ primaryUser, ... }:
|
{ primaryUser, pkgs, ... }:
|
||||||
{
|
{
|
||||||
users.users.${primaryUser} = {
|
users.users.${primaryUser} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "moons";
|
description = "moons";
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
|
"adbusers"
|
||||||
|
"docker"
|
||||||
|
"libvirtd"
|
||||||
|
"lp"
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
|
"scanner"
|
||||||
"wheel"
|
"wheel"
|
||||||
|
"vboxusers"
|
||||||
|
"dialout"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
ignoreShellProgramCheck = true;
|
||||||
|
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIKhxDkucmeCor6CKoXAua7DgDSzuXrZOtpdkyzQxz5+aAAAABHNzaDo= moons@moons14.com"
|
||||||
|
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIN6hZJyng/5LgFKPjR6uZAd/00UkO0vN0uQOoIvfSELdAAAABHNzaDo= moons@moons14.com"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPLwReAiwhXoO34S2+MrvqUhi8IWp4IzUq4OSp3niJdq"
|
||||||
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
|
|||||||
@@ -1,6 +1,2 @@
|
|||||||
{ inputs, ... }:
|
|
||||||
{
|
{
|
||||||
flake.overlays.default = _final: prev: {
|
|
||||||
llm-agents = inputs.llm-agents.packages.${prev.stdenv.hostPlatform.system};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
-1
@@ -5,5 +5,4 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot.loader.grub.enable = false;
|
boot.loader.grub.enable = false;
|
||||||
system.stateVersion = "26.05";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,5 @@
|
|||||||
home = {
|
home = {
|
||||||
username = "test";
|
username = "test";
|
||||||
homeDirectory = if pkgs.stdenv.hostPlatform.isDarwin then "/Users/test" else "/home/test";
|
homeDirectory = if pkgs.stdenv.hostPlatform.isDarwin then "/Users/test" else "/home/test";
|
||||||
stateVersion = "26.05";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ let
|
|||||||
|
|
||||||
nixosHost = hostLib.mkNixos "registry-test" {
|
nixosHost = hostLib.mkNixos "registry-test" {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
stateVersion = "26.05";
|
||||||
user = "test";
|
user = "test";
|
||||||
path = ./fixtures/registry/hosts;
|
path = ./fixtures/registry/hosts;
|
||||||
profiles = [ "interface.test" ];
|
profiles = [ "interface.test" ];
|
||||||
@@ -50,6 +51,7 @@ let
|
|||||||
|
|
||||||
darwinHost = hostLib.mkDarwin "registry-test-darwin" {
|
darwinHost = hostLib.mkDarwin "registry-test-darwin" {
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
|
stateVersion = "26.05";
|
||||||
user = "test";
|
user = "test";
|
||||||
path = ./fixtures/registry/hosts;
|
path = ./fixtures/registry/hosts;
|
||||||
applications = [ "alpha" ];
|
applications = [ "alpha" ];
|
||||||
@@ -109,6 +111,8 @@ let
|
|||||||
"beta-home"
|
"beta-home"
|
||||||
];
|
];
|
||||||
assert nixosHost.config.my.profiles.interface.test.enable;
|
assert nixosHost.config.my.profiles.interface.test.enable;
|
||||||
|
assert nixosHost.config.system.stateVersion == "26.05";
|
||||||
|
assert nixosHost.config.home-manager.users.test.home.stateVersion == "26.05";
|
||||||
assert nixosHost.config.home-manager.users.test.my.applications.alpha.enable;
|
assert nixosHost.config.home-manager.users.test.my.applications.alpha.enable;
|
||||||
assert
|
assert
|
||||||
nixosHost.config.home-manager.users.test.test.homeValues == [
|
nixosHost.config.home-manager.users.test.test.homeValues == [
|
||||||
@@ -116,6 +120,7 @@ let
|
|||||||
"beta-home"
|
"beta-home"
|
||||||
];
|
];
|
||||||
assert darwinHost.config.my.applications.alpha.enable;
|
assert darwinHost.config.my.applications.alpha.enable;
|
||||||
|
assert darwinHost.config.home-manager.users.test.home.stateVersion == "26.05";
|
||||||
assert darwinHost.config.home-manager.users.test.my.applications.alpha.enable;
|
assert darwinHost.config.home-manager.users.test.my.applications.alpha.enable;
|
||||||
assert darwinHost.config.home-manager.users.test.test.homeValues == [ "home" ];
|
assert darwinHost.config.home-manager.users.test.test.homeValues == [ "home" ];
|
||||||
assert
|
assert
|
||||||
|
|||||||
Reference in New Issue
Block a user