diff --git a/home/home.nix b/home/home.nix index 480e94b..48736bd 100644 --- a/home/home.nix +++ b/home/home.nix @@ -8,8 +8,8 @@ in # Home Manager needs a bit of information about you and the # paths it should manage. - home.username = secrets.user.name; - home.homeDirectory = secrets.user.dir; + home.username = secrets.userName; + home.homeDirectory = secrets.userDir; home.keyboard = { model = "pc105"; @@ -64,10 +64,10 @@ in progs = { alacritty.enable = true; - git = with secrets.git; { + git = { enable = true; - gpgKey = gpgSigningKey; - inherit userName userEmail; + gpgKey = secrets.gpgSigningKey; + inherit (secrets) userName userEmail; }; # password manager diff --git a/secrets.example.nix b/secrets.example.nix index 02e3606..ea4a460 100644 --- a/secrets.example.nix +++ b/secrets.example.nix @@ -3,23 +3,19 @@ 127.0.0.2 other-localhost ''; - user = { - name = "Bob"; - dir = "/home/bob"; - }; + realName = "Bob"; + userName = "bob"; + userDir = "/home/bob"; + userEmail = "bob@example.com"; - git = { - userName = "Bob Ross"; - userEmail = "bross@example.com"; - # gpg --list-secret-keys - gpgSigningKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" - }; + # gpg --list-secret-keys + gpgSigningKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; - emailAccounts = { - "personal" = { - flavor = "yandex.com"; - address = "bross@yandex.ru"; - passwordCommand = "pass show emails/bross@yandex.ru"; - }; + emailAccounts = { + "personal" = { + flavor = "yandex.com"; + address = "bross@yandex.ru"; + passwordCommand = "pass show emails/bross@yandex.ru"; }; - } + }; +} diff --git a/secrets.nix b/secrets.nix index b14ae77..1db197e 100644 Binary files a/secrets.nix and b/secrets.nix differ diff --git a/system/configuration.nix b/system/configuration.nix index 1438621..e7c8561 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -74,10 +74,10 @@ in programs.zsh.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.me = with secrets.user; { + users.users.me = { isNormalUser = true; - inherit name; - home = dir; + name = secrets.userName; + home = secrets.userDir; extraGroups = [ "wheel" # Enable ‘sudo’ for the user. "networkmanager" diff --git a/system/machine/home/default.nix b/system/machine/home/default.nix index 044058d..8b2e4b6 100644 --- a/system/machine/home/default.nix +++ b/system/machine/home/default.nix @@ -4,11 +4,10 @@ let secrets = import ../../../secrets.nix; in { - imports = - [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; boot = { # Use the GRUB 2 boot loader.