feat: created variable-based nix configuration

Added variables.nix
Added Syncthing service definition
This commit is contained in:
Zhongheng Liu 2024-07-31 14:46:59 +00:00
commit 0770a70d0b
4 changed files with 21 additions and 13 deletions

View file

@ -7,11 +7,10 @@
pkgs,
...
}:
let
globals = import ./globals.nix;
in
{
imports = [
./variables.nix
./nvidia.nix
./hardware-configuration.nix
];
boot.loader = {
@ -58,11 +57,11 @@ in
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
};
networking = {
hostName = "${globals.myHostName}";
hostName = "${config.myHostName}";
networkmanager.enable = true;
};
users.users = {
"${globals.myUserName}" = {
"${config.myUserName}" = {
initialPassword = "stevenpassword";
isNormalUser = true;
openssh.authorizedKeys.keys = [