История изменений
Исправление bryak, (текущая версия) :
cat /etc/nixos/configuration/services/home-manager.nix
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
home-manager
];
}
nixos-rebuild test;nixos-rebuild switch
Далее создаю файл /home/user/.config/nixpkgs/home.nix со следующим содержанием
[user@nixos:~]$ cat /home/user/.config/nixpkgs/home.nix
{ config, pkgs, ... }:
{
programs.git = {
enable = true;
userName = "Jane Doe999";
userEmail = "jane.doe@example.org";
};
}
[user@nixos:~]$ home-manager build;home-manager switch
/nix/store/s5adlfkykq4y2dp2nf7mlspijw0bjfql-home-manager-generation
There are 96 unread and relevant news items.
Read them by running the command 'home-manager news'.
/nix/store/s5adlfkykq4y2dp2nf7mlspijw0bjfql-home-manager-generation
Starting home manager activation
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
replacing old 'home-manager-path'
installing 'home-manager-path'
Activating linkGeneration
Cleaning up orphan links from /home/user
No change so reusing latest profile generation 1
Creating home file links in /home/user
Activating onFilesChange
Activating reloadSystemD
User systemd daemon not running. Skipping reload.
There are 96 unread and relevant news items.
Read them by running the command 'home-manager news'.
[user@nixos:~]$ git config –list
user.email=jane.doe@example.org
user.name=Jane Doe999
Ясно, но как бы так сделать, чтобы не создавать home/user/.config/nixpkgs/home.nix? чтобы всё это декларировать в /etc/nixos/configuration.nix?
Исходная версия bryak, :
cat /etc/nixos/configuration/services/home-manager.nix
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
home-manager
];
}
nixos-rebuild test;nixos-rebuild switch
Далее создаю файл /home/user/.config/nixpkgs/home.nix со следующим содержанием [user@nixos:~]$ cat /home/user/.config/nixpkgs/home.nix
{ config, pkgs, ... }:
{
programs.git = {
enable = true;
userName = "Jane Doe999";
userEmail = "jane.doe@example.org";
};
}
[user@nixos:~]$ home-manager build;home-manager switch
/nix/store/s5adlfkykq4y2dp2nf7mlspijw0bjfql-home-manager-generation
There are 96 unread and relevant news items.
Read them by running the command 'home-manager news'.
/nix/store/s5adlfkykq4y2dp2nf7mlspijw0bjfql-home-manager-generation
Starting home manager activation
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
replacing old 'home-manager-path'
installing 'home-manager-path'
Activating linkGeneration
Cleaning up orphan links from /home/user
No change so reusing latest profile generation 1
Creating home file links in /home/user
Activating onFilesChange
Activating reloadSystemD
User systemd daemon not running. Skipping reload.
There are 96 unread and relevant news items.
Read them by running the command 'home-manager news'.
[user@nixos:~]$ git config –list
user.email=jane.doe@example.org
user.name=Jane Doe999
Ясно, но как бы так сделать, чтобы не создавать home/user/.config/nixpkgs/home.nix? чтобы всё это декларировать в /etc/nixos/configuration.nix?