Revert "share more settings"
This reverts commit 9c8723b16c
.
doesn't work that way
This commit is contained in:
parent
9c8723b16c
commit
845b4b6997
132
common.nix
132
common.nix
|
@ -2,58 +2,6 @@
|
||||||
let
|
let
|
||||||
impermanence = builtins.fetchTarball "https://github.com/nix-community/impermanence/archive/master.tar.gz";
|
impermanence = builtins.fetchTarball "https://github.com/nix-community/impermanence/archive/master.tar.gz";
|
||||||
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
|
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
|
||||||
|
|
||||||
# shared user settings
|
|
||||||
sharedUserSettings = {
|
|
||||||
# init password
|
|
||||||
hashedPassword = builtins.readFile "/data/nixos/password.secret";
|
|
||||||
|
|
||||||
# use fixed auth keys
|
|
||||||
openssh.authorizedKeys.keys = pkgs.lib.splitString "\n" (builtins.readFile "/data/nixos/authorized_keys.secret");
|
|
||||||
};
|
|
||||||
|
|
||||||
# shared home manager settings
|
|
||||||
sharedHomeManagerSettings = {
|
|
||||||
# initial version
|
|
||||||
home.stateVersion = "22.11";
|
|
||||||
|
|
||||||
# zsh with some nice prompt and extra main user configuration
|
|
||||||
programs.starship.enable = true;
|
|
||||||
programs.zoxide.enable = true;
|
|
||||||
programs.zoxide.options = [ "--cmd" "cd" ];
|
|
||||||
programs.zsh = {
|
|
||||||
# zsh with extras wanted
|
|
||||||
enable = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
autosuggestion.enable = true;
|
|
||||||
history.share = false;
|
|
||||||
syntaxHighlighting.enable = true;
|
|
||||||
|
|
||||||
# aliases
|
|
||||||
shellAliases = {
|
|
||||||
# system build/update/cleanup
|
|
||||||
update = "sudo TMPDIR=/var/cache/nix nixos-rebuild boot";
|
|
||||||
upgrade = "sudo TMPDIR=/var/cache/nix nixos-rebuild boot --upgrade";
|
|
||||||
updatenow = "sudo TMPDIR=/var/cache/nix nixos-rebuild switch";
|
|
||||||
upgradenow = "sudo TMPDIR=/var/cache/nix nixos-rebuild switch --upgrade";
|
|
||||||
gc = "sudo nix-collect-garbage --delete-older-than 7d";
|
|
||||||
verify = "sudo nix --extra-experimental-features nix-command store verify --all";
|
|
||||||
optimize = "sudo nix --extra-experimental-features nix-command store optimise";
|
|
||||||
|
|
||||||
# overwrite some tools
|
|
||||||
cat = "bat";
|
|
||||||
ls = "lsd";
|
|
||||||
|
|
||||||
# ssh around in the local network
|
|
||||||
mac = "ssh mac.fritz.box";
|
|
||||||
macroot = "ssh root@mac.fritz.box";
|
|
||||||
mini = "ssh mini.fritz.box";
|
|
||||||
miniroot = "ssh root@mini.fritz.box";
|
|
||||||
neko = "ssh neko.fritz.box";
|
|
||||||
nekoroot = "ssh root@neko.fritz.box";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
#
|
#
|
||||||
|
@ -578,12 +526,34 @@ in
|
||||||
# all users and passwords are defined here
|
# all users and passwords are defined here
|
||||||
users.mutableUsers = false;
|
users.mutableUsers = false;
|
||||||
|
|
||||||
# administrator, just the shared settings
|
#
|
||||||
users.users.root = sharedUserSettings;
|
# administrator
|
||||||
home-manager.users.root = sharedHomeManagerSettings;
|
#
|
||||||
|
|
||||||
# main user
|
users.users.root = {
|
||||||
users.users.cullmann = sharedUserSettings // {
|
# init password
|
||||||
|
hashedPassword = builtins.readFile "/data/nixos/password.secret";
|
||||||
|
|
||||||
|
# use fixed auth keys
|
||||||
|
openssh.authorizedKeys.keys = pkgs.lib.splitString "\n" (builtins.readFile "/data/nixos/authorized_keys.secret");
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.root = {
|
||||||
|
# initial version
|
||||||
|
home.stateVersion = "22.11";
|
||||||
|
|
||||||
|
# zsh with some nice prompt
|
||||||
|
programs.starship.enable = true;
|
||||||
|
programs.zoxide.enable = true;
|
||||||
|
programs.zoxide.options = [ "--cmd" "cd" ];
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
#
|
||||||
|
# my main user
|
||||||
|
#
|
||||||
|
|
||||||
|
users.users.cullmann = {
|
||||||
# hard code UID for stability over machines
|
# hard code UID for stability over machines
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
|
|
||||||
|
@ -595,9 +565,55 @@ in
|
||||||
|
|
||||||
# allow VirtualBox and sudo for my main user
|
# allow VirtualBox and sudo for my main user
|
||||||
extraGroups = [ "vboxusers" "wheel" ];
|
extraGroups = [ "vboxusers" "wheel" ];
|
||||||
|
|
||||||
|
# init password
|
||||||
|
hashedPassword = builtins.readFile "/data/nixos/password.secret";
|
||||||
|
|
||||||
|
# use fixed auth keys
|
||||||
|
openssh.authorizedKeys.keys = pkgs.lib.splitString "\n" (builtins.readFile "/data/nixos/authorized_keys.secret");
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.cullmann = sharedHomeManagerSettings // {
|
home-manager.users.cullmann = {
|
||||||
|
# initial version
|
||||||
|
home.stateVersion = "22.11";
|
||||||
|
|
||||||
|
# zsh with some nice prompt and extra main user configuration
|
||||||
|
programs.starship.enable = true;
|
||||||
|
programs.zoxide.enable = true;
|
||||||
|
programs.zoxide.options = [ "--cmd" "cd" ];
|
||||||
|
programs.zsh = {
|
||||||
|
# zsh with extras wanted
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
history.share = false;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
|
||||||
|
# aliases
|
||||||
|
shellAliases = {
|
||||||
|
# system build/update/cleanup
|
||||||
|
update = "sudo TMPDIR=/var/cache/nix nixos-rebuild boot";
|
||||||
|
upgrade = "sudo TMPDIR=/var/cache/nix nixos-rebuild boot --upgrade";
|
||||||
|
updatenow = "sudo TMPDIR=/var/cache/nix nixos-rebuild switch";
|
||||||
|
upgradenow = "sudo TMPDIR=/var/cache/nix nixos-rebuild switch --upgrade";
|
||||||
|
gc = "sudo nix-collect-garbage --delete-older-than 7d";
|
||||||
|
verify = "sudo nix --extra-experimental-features nix-command store verify --all";
|
||||||
|
optimize = "sudo nix --extra-experimental-features nix-command store optimise";
|
||||||
|
|
||||||
|
# overwrite some tools
|
||||||
|
cat = "bat";
|
||||||
|
ls = "lsd";
|
||||||
|
|
||||||
|
# ssh around in the local network
|
||||||
|
mac = "ssh mac.fritz.box";
|
||||||
|
macroot = "ssh root@mac.fritz.box";
|
||||||
|
mini = "ssh mini.fritz.box";
|
||||||
|
miniroot = "ssh root@mini.fritz.box";
|
||||||
|
neko = "ssh neko.fritz.box";
|
||||||
|
nekoroot = "ssh root@neko.fritz.box";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# enable keychain
|
# enable keychain
|
||||||
programs.keychain = {
|
programs.keychain = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Reference in a new issue