From a75625751176e67b8bd73383a927aeeb812e3b5d Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 2 Feb 2024 04:25:35 +0000 Subject: [PATCH] Break out users --- configuration.nix | 30 +----------------------------- users/nyadmin/default.nix | 14 ++++++++++++++ users/stitchynyan/default.nix | 18 ++++++++++++++++++ 3 files changed, 33 insertions(+), 29 deletions(-) create mode 100644 users/nyadmin/default.nix create mode 100644 users/stitchynyan/default.nix diff --git a/configuration.nix b/configuration.nix index fbe7cf9..b770964 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,8 +1,3 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running `nixos-help`). - - { config, pkgs, lib, ... }: { @@ -72,32 +67,9 @@ boot.kernel.sysctl."kernel.sched_rt_runtime_us" = -1; - - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem ( lib.getName pkg) [ - "osu-lazer" - ]; - users.mutableUsers = false; users.users = { - stitchynyan = { - isNormalUser = true; - shell = pkgs.zsh; - home = "/home/stitchynyan"; - description = "Personal user"; - extraGroups = [ "wheel" "networkmanager" "kvm" "libvirt" "audio" ]; - initialHashedPassword = "$y$j9T$rvySCWHYE4AO4A9J0Vf20.$x5hpBNsOWovQFtNfFUIt17OAH5MJFwFBGjxbaEIagJ3"; - }; - nyadmin = { - isNormalUser = true; - shell = pkgs.zsh; - home = "/home/nyadmin"; - description = "Administrator~"; - extraGroups = [ "wheel" "kvm" "libvirt" "docker" ]; - initialHashedPassword = "$y$j9T$XguIcj/AVXsWW/MxSYAGh0$TivGAa0z8KNCli2mKTd24vtqimpadNzqMFwfbeh0p30"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOVgHcJ9C8TD515x+KqFKNYUa6IZML6LU3FWovmDIvyZ" ]; - }; + root.initialHashedPassword = "!"; }; networking.firewall = { diff --git a/users/nyadmin/default.nix b/users/nyadmin/default.nix new file mode 100644 index 0000000..0f613f8 --- /dev/null +++ b/users/nyadmin/default.nix @@ -0,0 +1,14 @@ +{ config, pkgs, lib, ... }: + +{ + users.users.nyadmin = { + isNormalUser = true; + shell = pkgs.zsh; + home = "/home/nyadmin"; + description = "Administrator~"; + extraGroups = [ "wheel" "kvm" "libvirt" "docker" ]; + initialHashedPassword = "$y$j9T$XguIcj/AVXsWW/MxSYAGh0$TivGAa0z8KNCli2mKTd24vtqimpadNzqMFwfbeh0p30"; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOVgHcJ9C8TD515x+KqFKNYUa6IZML6LU3FWovmDIvyZ" ]; + }; +} diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix new file mode 100644 index 0000000..355f830 --- /dev/null +++ b/users/stitchynyan/default.nix @@ -0,0 +1,18 @@ +{ config, pkgs, lib, ... }: + +{ + + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem ( lib.getName pkg) [ + "osu-lazer" + ]; + + users.users.stitchynyan = { + isNormalUser = true; + shell = pkgs.zsh; + home = "/home/stitchynyan"; + description = "Personal user"; + extraGroups = [ "wheel" "networkmanager" "kvm" "libvirt" "audio" ]; + initialHashedPassword = "$y$j9T$rvySCWHYE4AO4A9J0Vf20.$x5hpBNsOWovQFtNfFUIt17OAH5MJFwFBGjxbaEIagJ3"; + }; +}