mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 09:28:27 +02:00
refactor: Use haumea for filesystem-based module system for flake outputs
refactor: Use hyphen(`-`) for variable names & folder names(except Python), replace all unserscore(`_`) with hyphen(`-`).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{username, ...}: {
|
||||
{myvars, ...}: {
|
||||
####################################################################
|
||||
#
|
||||
# NixOS's Configuration for Remote Building / Distributed Building
|
||||
@@ -14,7 +14,7 @@
|
||||
# nix.settings.max-jobs = 0;
|
||||
nix.distributedBuilds = true;
|
||||
nix.buildMachines = let
|
||||
sshUser = username;
|
||||
sshUser = myvars.username;
|
||||
# ssh key's path on local machine
|
||||
sshKey = "/etc/agenix/ssh-key-romantic";
|
||||
systems = [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
vars_networking,
|
||||
myvars,
|
||||
...
|
||||
}: {
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
@@ -8,7 +8,7 @@
|
||||
# Or disable the firewall altogether.
|
||||
networking.firewall.enable = lib.mkDefault false;
|
||||
|
||||
programs.ssh = vars_networking.ssh;
|
||||
programs.ssh = myvars.networking.ssh;
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
username,
|
||||
myvars,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
@@ -7,7 +7,7 @@
|
||||
users.mutableUsers = false;
|
||||
|
||||
users.groups = {
|
||||
"${username}" = {};
|
||||
"${myvars.username}" = {};
|
||||
docker = {};
|
||||
wireshark = {};
|
||||
# for android platform tools's udev rules
|
||||
@@ -19,14 +19,14 @@
|
||||
uinput = {};
|
||||
};
|
||||
|
||||
users.users."${username}" = {
|
||||
users.users."${myvars.username}" = {
|
||||
# generated by `mkpasswd -m scrypt`
|
||||
# we have to use initialHashedPassword here when using tmpfs for /
|
||||
initialHashedPassword = "$7$CU..../....KDvTIXqLTXpmCaoUy2yC9.$145eM358b7Q0sRXgEBvxctd5EAuEEdao57LmZjc05D.";
|
||||
home = "/home/${username}";
|
||||
home = "/home/${myvars.username}";
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
username
|
||||
myvars.username
|
||||
"users"
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
# root's ssh key are mainly used for remote deployment
|
||||
users.users.root = {
|
||||
initialHashedPassword = config.users.users."${username}".initialHashedPassword;
|
||||
openssh.authorizedKeys.keys = config.users.users."${username}".openssh.authorizedKeys.keys;
|
||||
initialHashedPassword = config.users.users."${myvars.username}".initialHashedPassword;
|
||||
openssh.authorizedKeys.keys = config.users.users."${myvars.username}".openssh.authorizedKeys.keys;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
username,
|
||||
myvars,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
@@ -46,7 +46,7 @@ in {
|
||||
settings = {
|
||||
default_session = {
|
||||
# Wayland Desktop Manager is installed only for user ryan via home-manager!
|
||||
user = username;
|
||||
user = myvars.username;
|
||||
# .wayland-session is a script generated by home-manager, which links to the current wayland compositor(sway/hyprland or others).
|
||||
# with such a vendor-no-locking script, we can switch to another wayland compositor without modifying greetd's config here.
|
||||
command = "$HOME/.wayland-session"; # start a wayland session directly without a login manager
|
||||
@@ -75,7 +75,7 @@ in {
|
||||
lightdm.enable = true;
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = username;
|
||||
user = myvars.username;
|
||||
};
|
||||
# use a fake session to skip desktop manager
|
||||
# and let Home Manager take care of the X session
|
||||
|
||||
Reference in New Issue
Block a user