host: 抽出我的用户配置
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
../modules/nix-cache.nix
|
../modules/nix-cache.nix
|
||||||
|
../modules/users/origami.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
@@ -145,19 +146,10 @@
|
|||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
|
|
||||||
# Users
|
# Users
|
||||||
programs.fish.enable = true;
|
|
||||||
users.groups.origami.gid = 1000;
|
users.groups.origami.gid = 1000;
|
||||||
users.users.origami = {
|
users.users.origami.extraGroups = [ "wheel" "networkmanager" ];
|
||||||
isNormalUser = true;
|
|
||||||
shell = pkgs.fish;
|
|
||||||
description = "Origami404";
|
|
||||||
group = "origami";
|
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAZxRoweHoLfoaydPqhsLnc4EGgwTp7Uz1DZ2DG447B+ origami@fedora"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
sops.defaultSopsFile = ../../secrets/ssh-private.yaml;
|
sops.defaultSopsFile = ../../secrets/ssh-private.yaml;
|
||||||
sops.defaultSopsFormat = "yaml";
|
sops.defaultSopsFormat = "yaml";
|
||||||
sops.age.keyFile = "/home/origami/.config/sops/age/keys.txt";
|
sops.age.keyFile = "/home/origami/.config/sops/age/keys.txt";
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
users.users.origami = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Origami404";
|
||||||
|
group = "origami";
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJyrUiSdpTC+vP+pNDChehLG+ChYL2By2LtjmVJiHmaf origami@eris"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
../modules/nix-cache.nix
|
../modules/nix-cache.nix
|
||||||
|
../modules/users/origami.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# BIOS + GRUB, 安装到 MBR
|
# BIOS + GRUB, 安装到 MBR
|
||||||
@@ -78,18 +79,8 @@
|
|||||||
services.qemuGuest.enable = true;
|
services.qemuGuest.enable = true;
|
||||||
|
|
||||||
# 用户
|
# 用户
|
||||||
programs.fish.enable = true;
|
|
||||||
users.groups.origami.gid = 1000;
|
users.groups.origami.gid = 1000;
|
||||||
users.users.origami = {
|
users.users.origami.extraGroups = [ "wheel" ];
|
||||||
isNormalUser = true;
|
|
||||||
shell = pkgs.fish;
|
|
||||||
description = "Origami404";
|
|
||||||
group = "origami";
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAZxRoweHoLfoaydPqhsLnc4EGgwTp7Uz1DZ2DG447B+ origami@fedora"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
sops.defaultSopsFile = ../../secrets/ssh-private.yaml;
|
sops.defaultSopsFile = ../../secrets/ssh-private.yaml;
|
||||||
|
|||||||
Reference in New Issue
Block a user