mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-05 23:18:11 +09:00
x1g9
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{
|
||||
x1g9 = {
|
||||
system = "x86_64-linux";
|
||||
stateVersion = "26.05";
|
||||
user = "moons";
|
||||
path = ./x1g9;
|
||||
|
||||
|
||||
@@ -2,6 +2,4 @@
|
||||
imports = [
|
||||
./hardware.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
|
||||
+24
-10
@@ -37,16 +37,25 @@ let
|
||||
"${name}: path must name an existing host directory"
|
||||
(
|
||||
ensure
|
||||
(lib.all
|
||||
(field: builtins.isList (spec.${field} or [ ]) && lib.all builtins.isString (spec.${field} or [ ]))
|
||||
[
|
||||
"profiles"
|
||||
"applications"
|
||||
"units"
|
||||
]
|
||||
(
|
||||
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
|
||||
(lib.all
|
||||
(field: builtins.isList (spec.${field} or [ ]) && lib.all builtins.isString (spec.${field} or [ ]))
|
||||
[
|
||||
"profiles"
|
||||
"applications"
|
||||
"units"
|
||||
]
|
||||
)
|
||||
"${name}: profiles, applications, and units must be lists of strings"
|
||||
(ensure (builtins.isBool (spec.homeManager or true)) "${name}: homeManager must be a boolean" spec)
|
||||
)
|
||||
"${name}: profiles, applications, and units must be lists of strings"
|
||||
(ensure (builtins.isBool (spec.homeManager or true)) "${name}: homeManager must be a boolean" spec)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -67,6 +76,7 @@ let
|
||||
homeModules = [
|
||||
(registry.mkModule { class = "home"; })
|
||||
(registry.mkSelectionModule selected)
|
||||
{ home.stateVersion = spec.stateVersion; }
|
||||
]
|
||||
++ lib.optional (homePath != null) homePath;
|
||||
in
|
||||
@@ -88,6 +98,7 @@ let
|
||||
homeModules = [
|
||||
(registry.mkModule { class = "home"; })
|
||||
(registry.mkSelectionModule selected)
|
||||
{ home.stateVersion = spec.stateVersion; }
|
||||
]
|
||||
++ lib.optional (homePath != null) homePath;
|
||||
in
|
||||
@@ -111,7 +122,10 @@ let
|
||||
modules = [
|
||||
(registry.mkModule { class = "nixos"; })
|
||||
(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 (nixosPath != null) nixosPath;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
home = {
|
||||
username = primaryUser;
|
||||
homeDirectory = "/home/${primaryUser}";
|
||||
stateVersion = "26.05";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
@@ -1,12 +1,29 @@
|
||||
{ primaryUser, ... }:
|
||||
{ primaryUser, pkgs, ... }:
|
||||
{
|
||||
users.users.${primaryUser} = {
|
||||
isNormalUser = true;
|
||||
description = "moons";
|
||||
extraGroups = [
|
||||
"adbusers"
|
||||
"docker"
|
||||
"libvirtd"
|
||||
"lp"
|
||||
"networkmanager"
|
||||
"scanner"
|
||||
"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 = {
|
||||
|
||||
@@ -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;
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
|
||||
@@ -3,6 +3,5 @@
|
||||
home = {
|
||||
username = "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" {
|
||||
system = "x86_64-linux";
|
||||
stateVersion = "26.05";
|
||||
user = "test";
|
||||
path = ./fixtures/registry/hosts;
|
||||
profiles = [ "interface.test" ];
|
||||
@@ -50,6 +51,7 @@ let
|
||||
|
||||
darwinHost = hostLib.mkDarwin "registry-test-darwin" {
|
||||
system = "aarch64-darwin";
|
||||
stateVersion = "26.05";
|
||||
user = "test";
|
||||
path = ./fixtures/registry/hosts;
|
||||
applications = [ "alpha" ];
|
||||
@@ -109,6 +111,8 @@ let
|
||||
"beta-home"
|
||||
];
|
||||
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.test.homeValues == [
|
||||
@@ -116,6 +120,7 @@ let
|
||||
"beta-home"
|
||||
];
|
||||
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.test.homeValues == [ "home" ];
|
||||
assert
|
||||
|
||||
Reference in New Issue
Block a user