move common/users.nix into users/
This commit is contained in:
parent
c6fbd21009
commit
0112637288
7 changed files with 150 additions and 104 deletions
|
|
@ -1,25 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
flake.modules.nixos.common-users = { pkgs, ... }: {
|
|
||||||
users.users = {
|
|
||||||
user = {
|
|
||||||
isNormalUser = true;
|
|
||||||
shell = pkgs.fish;
|
|
||||||
extraGroups = [
|
|
||||||
"networkmanager"
|
|
||||||
"wheel"
|
|
||||||
];
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICQPkAyy+Du9Omc2WtnUF2TV8jFAF4H6mJi2D4IZ1nzg user@himalia"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO3Y0PVpGfJHonqDS7qoCFhqzUvqGq9I9sax+F9e/5cs user@io"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1v3+q3EaruiiStWjubEJWvtejam/r41uoOpCdwJtLL user@rotterdam"
|
|
||||||
];
|
|
||||||
hashedPassword = "$6$Pj7v/CpstyuWQQV0$cNujVDhfMBdwlGVEnnd8t71.kZPixbo0u25cd.874iaqLTH4V5fa1f98V5zGapjQCz5JyZmsR94xi00sUrntT0";
|
|
||||||
};
|
|
||||||
root = {
|
|
||||||
shell = pkgs.fish;
|
|
||||||
hashedPassword = "!";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -6,7 +6,12 @@
|
||||||
modules = [
|
modules = [
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
{ networking.hostName = "alexandria"; }
|
{ networking.hostName = "alexandria"; }
|
||||||
{ nixpkgs.overlays = [ inputs.agenix.overlays.default inputs.self.overlays.default ]; }
|
{
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
inputs.agenix.overlays.default
|
||||||
|
inputs.self.overlays.default
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
# Common aspects (always included)
|
# Common aspects (always included)
|
||||||
inputs.self.modules.nixos.common-boot
|
inputs.self.modules.nixos.common-boot
|
||||||
|
|
@ -19,7 +24,10 @@
|
||||||
inputs.self.modules.nixos.common-security
|
inputs.self.modules.nixos.common-security
|
||||||
inputs.self.modules.nixos.common-services
|
inputs.self.modules.nixos.common-services
|
||||||
inputs.self.modules.nixos.common-tailscale
|
inputs.self.modules.nixos.common-tailscale
|
||||||
inputs.self.modules.nixos.common-users
|
|
||||||
|
# User aspects
|
||||||
|
inputs.self.modules.nixos.user
|
||||||
|
inputs.self.modules.nixos.root
|
||||||
|
|
||||||
# Server aspects
|
# Server aspects
|
||||||
inputs.self.modules.nixos.server-boot
|
inputs.self.modules.nixos.server-boot
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,12 @@
|
||||||
modules = [
|
modules = [
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
{ networking.hostName = "io"; }
|
{ networking.hostName = "io"; }
|
||||||
{ nixpkgs.overlays = [ inputs.agenix.overlays.default inputs.self.overlays.default ]; }
|
{
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
inputs.agenix.overlays.default
|
||||||
|
inputs.self.overlays.default
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
# Common aspects (always included)
|
# Common aspects (always included)
|
||||||
inputs.self.modules.nixos.common-boot
|
inputs.self.modules.nixos.common-boot
|
||||||
|
|
@ -19,7 +24,10 @@
|
||||||
inputs.self.modules.nixos.common-security
|
inputs.self.modules.nixos.common-security
|
||||||
inputs.self.modules.nixos.common-services
|
inputs.self.modules.nixos.common-services
|
||||||
inputs.self.modules.nixos.common-tailscale
|
inputs.self.modules.nixos.common-tailscale
|
||||||
inputs.self.modules.nixos.common-users
|
|
||||||
|
# User aspects
|
||||||
|
inputs.self.modules.nixos.user
|
||||||
|
inputs.self.modules.nixos.root
|
||||||
|
|
||||||
# Desktop aspects
|
# Desktop aspects
|
||||||
inputs.self.modules.nixos.desktop-boot
|
inputs.self.modules.nixos.desktop-boot
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,12 @@
|
||||||
modules = [
|
modules = [
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
{ networking.hostName = "rotterdam"; }
|
{ networking.hostName = "rotterdam"; }
|
||||||
{ nixpkgs.overlays = [ inputs.agenix.overlays.default inputs.self.overlays.default ]; }
|
{
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
inputs.agenix.overlays.default
|
||||||
|
inputs.self.overlays.default
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
# Common aspects (always included)
|
# Common aspects (always included)
|
||||||
inputs.self.modules.nixos.common-boot
|
inputs.self.modules.nixos.common-boot
|
||||||
|
|
@ -19,7 +24,10 @@
|
||||||
inputs.self.modules.nixos.common-security
|
inputs.self.modules.nixos.common-security
|
||||||
inputs.self.modules.nixos.common-services
|
inputs.self.modules.nixos.common-services
|
||||||
inputs.self.modules.nixos.common-tailscale
|
inputs.self.modules.nixos.common-tailscale
|
||||||
inputs.self.modules.nixos.common-users
|
|
||||||
|
# User aspects
|
||||||
|
inputs.self.modules.nixos.user
|
||||||
|
inputs.self.modules.nixos.root
|
||||||
|
|
||||||
# Desktop aspects
|
# Desktop aspects
|
||||||
inputs.self.modules.nixos.desktop-boot
|
inputs.self.modules.nixos.desktop-boot
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,12 @@
|
||||||
modules = [
|
modules = [
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
{ networking.hostName = "trantor"; }
|
{ networking.hostName = "trantor"; }
|
||||||
{ nixpkgs.overlays = [ inputs.agenix.overlays.default inputs.self.overlays.default ]; }
|
{
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
inputs.agenix.overlays.default
|
||||||
|
inputs.self.overlays.default
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
# Common aspects (always included)
|
# Common aspects (always included)
|
||||||
inputs.self.modules.nixos.common-boot
|
inputs.self.modules.nixos.common-boot
|
||||||
|
|
@ -19,7 +24,10 @@
|
||||||
inputs.self.modules.nixos.common-security
|
inputs.self.modules.nixos.common-security
|
||||||
inputs.self.modules.nixos.common-services
|
inputs.self.modules.nixos.common-services
|
||||||
inputs.self.modules.nixos.common-tailscale
|
inputs.self.modules.nixos.common-tailscale
|
||||||
inputs.self.modules.nixos.common-users
|
|
||||||
|
# User aspects
|
||||||
|
inputs.self.modules.nixos.user
|
||||||
|
inputs.self.modules.nixos.root
|
||||||
|
|
||||||
# Server aspects
|
# Server aspects
|
||||||
inputs.self.modules.nixos.server-boot
|
inputs.self.modules.nixos.server-boot
|
||||||
|
|
|
||||||
12
aspects/users/root.nix
Normal file
12
aspects/users/root.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
flake.modules.nixos.root =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
users.root = {
|
||||||
|
shell = pkgs.fish;
|
||||||
|
hashedPassword = "!";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,91 +1,118 @@
|
||||||
# aspects/users/user.nix
|
|
||||||
{ inputs, ... }:
|
{ inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
flake.homeConfigurations = {
|
flake = {
|
||||||
"user@rotterdam" = inputs.home-manager.lib.homeManagerConfiguration {
|
modules.nixos.user =
|
||||||
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
|
{ pkgs, ... }:
|
||||||
extraSpecialArgs = { inherit inputs; hostname = "rotterdam"; };
|
{
|
||||||
modules = [
|
users.users.user = {
|
||||||
{ nixpkgs.overlays = [ inputs.self.overlays.default ]; }
|
isNormalUser = true;
|
||||||
|
shell = pkgs.fish;
|
||||||
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICQPkAyy+Du9Omc2WtnUF2TV8jFAF4H6mJi2D4IZ1nzg user@himalia"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO3Y0PVpGfJHonqDS7qoCFhqzUvqGq9I9sax+F9e/5cs user@io"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1v3+q3EaruiiStWjubEJWvtejam/r41uoOpCdwJtLL user@rotterdam"
|
||||||
|
];
|
||||||
|
hashedPassword = "$6$Pj7v/CpstyuWQQV0$cNujVDhfMBdwlGVEnnd8t71.kZPixbo0u25cd.874iaqLTH4V5fa1f98V5zGapjQCz5JyZmsR94xi00sUrntT0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# CLI aspects (common module included)
|
homeConfigurations = {
|
||||||
inputs.self.modules.homeManager.cli-base
|
"user@rotterdam" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
inputs.self.modules.homeManager.cli-btop
|
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
|
||||||
inputs.self.modules.homeManager.cli-comma
|
extraSpecialArgs = {
|
||||||
inputs.self.modules.homeManager.cli-direnv
|
inherit inputs;
|
||||||
inputs.self.modules.homeManager.cli-helix
|
hostname = "rotterdam";
|
||||||
inputs.self.modules.homeManager.cli-starship
|
};
|
||||||
inputs.self.modules.homeManager.cli-tmux
|
modules = [
|
||||||
|
{ nixpkgs.overlays = [ inputs.self.overlays.default ]; }
|
||||||
|
|
||||||
# Shell
|
# CLI aspects (common module included)
|
||||||
inputs.self.modules.homeManager.shell-fish
|
inputs.self.modules.homeManager.cli-base
|
||||||
inputs.self.modules.homeManager.shell-bash
|
inputs.self.modules.homeManager.cli-btop
|
||||||
|
inputs.self.modules.homeManager.cli-comma
|
||||||
|
inputs.self.modules.homeManager.cli-direnv
|
||||||
|
inputs.self.modules.homeManager.cli-helix
|
||||||
|
inputs.self.modules.homeManager.cli-starship
|
||||||
|
inputs.self.modules.homeManager.cli-tmux
|
||||||
|
|
||||||
# Desktop
|
# Shell
|
||||||
inputs.self.modules.homeManager.desktop-desktop
|
inputs.self.modules.homeManager.shell-fish
|
||||||
inputs.self.modules.homeManager.desktop-niri
|
inputs.self.modules.homeManager.shell-bash
|
||||||
|
|
||||||
# Gaming
|
# Desktop
|
||||||
inputs.self.modules.homeManager.gaming-mangohud
|
inputs.self.modules.homeManager.desktop-desktop
|
||||||
|
inputs.self.modules.homeManager.desktop-niri
|
||||||
|
|
||||||
# Programs
|
# Gaming
|
||||||
inputs.self.modules.homeManager.programs-media # for obs-studio
|
inputs.self.modules.homeManager.gaming-mangohud
|
||||||
|
|
||||||
# Stylix
|
# Programs
|
||||||
inputs.self.modules.homeManager.stylix
|
inputs.self.modules.homeManager.programs-media # for obs-studio
|
||||||
|
|
||||||
# User-specific (from _user/)
|
# Stylix
|
||||||
./_user/git.nix
|
inputs.self.modules.homeManager.stylix
|
||||||
|
|
||||||
# Home configuration
|
# User-specific (from _user/)
|
||||||
{
|
./_user/git.nix
|
||||||
home = {
|
|
||||||
username = "user";
|
|
||||||
homeDirectory = "/home/user";
|
|
||||||
stateVersion = "22.05";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"user@io" = inputs.home-manager.lib.homeManagerConfiguration {
|
# Home configuration
|
||||||
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
|
{
|
||||||
extraSpecialArgs = { inherit inputs; hostname = "io"; };
|
home = {
|
||||||
modules = [
|
username = "user";
|
||||||
{ nixpkgs.overlays = [ inputs.self.overlays.default ]; }
|
homeDirectory = "/home/user";
|
||||||
|
stateVersion = "22.05";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# CLI aspects (common module included)
|
"user@io" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
inputs.self.modules.homeManager.cli-base
|
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
|
||||||
inputs.self.modules.homeManager.cli-btop
|
extraSpecialArgs = {
|
||||||
inputs.self.modules.homeManager.cli-comma
|
inherit inputs;
|
||||||
inputs.self.modules.homeManager.cli-direnv
|
hostname = "io";
|
||||||
inputs.self.modules.homeManager.cli-helix
|
};
|
||||||
inputs.self.modules.homeManager.cli-starship
|
modules = [
|
||||||
inputs.self.modules.homeManager.cli-tmux
|
{ nixpkgs.overlays = [ inputs.self.overlays.default ]; }
|
||||||
|
|
||||||
# Shell
|
# CLI aspects (common module included)
|
||||||
inputs.self.modules.homeManager.shell-fish
|
inputs.self.modules.homeManager.cli-base
|
||||||
inputs.self.modules.homeManager.shell-bash
|
inputs.self.modules.homeManager.cli-btop
|
||||||
|
inputs.self.modules.homeManager.cli-comma
|
||||||
|
inputs.self.modules.homeManager.cli-direnv
|
||||||
|
inputs.self.modules.homeManager.cli-helix
|
||||||
|
inputs.self.modules.homeManager.cli-starship
|
||||||
|
inputs.self.modules.homeManager.cli-tmux
|
||||||
|
|
||||||
# Desktop
|
# Shell
|
||||||
inputs.self.modules.homeManager.desktop-desktop
|
inputs.self.modules.homeManager.shell-fish
|
||||||
inputs.self.modules.homeManager.desktop-niri
|
inputs.self.modules.homeManager.shell-bash
|
||||||
|
|
||||||
# Stylix
|
# Desktop
|
||||||
inputs.self.modules.homeManager.stylix
|
inputs.self.modules.homeManager.desktop-desktop
|
||||||
|
inputs.self.modules.homeManager.desktop-niri
|
||||||
|
|
||||||
# User-specific (from _user/)
|
# Stylix
|
||||||
./_user/git.nix
|
inputs.self.modules.homeManager.stylix
|
||||||
|
|
||||||
# Home configuration
|
# User-specific (from _user/)
|
||||||
{
|
./_user/git.nix
|
||||||
home = {
|
|
||||||
username = "user";
|
# Home configuration
|
||||||
homeDirectory = "/home/user";
|
{
|
||||||
stateVersion = "22.05";
|
home = {
|
||||||
};
|
username = "user";
|
||||||
}
|
homeDirectory = "/home/user";
|
||||||
];
|
stateVersion = "22.05";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue