Hi, I just upgraded from 23.05 to 23.11. When I compile home manager I get a cryptic error message.
error: syntax error, unexpected PATH_END, expecting DOLLAR_CURLY
at «string»:1:1:
1| /home/rasmus/.local/share//home-manager/news-read-ids
| ^
Is there a way to get more clues to way is wrong?
I use flakes
{
description = "Your new nix config";
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
# You can access packages and modules from different nixpkgs revs
# at the same time. Here's an working example:
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
# Home manager
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# TODO: Add any other flake you might need
# hardware.url = "github:nixos/nixos-hardware";
nix-colors.url = "github:misterio77/nix-colors";
};
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
home-manager,
...
} @ inputs: let
inherit (self) outputs;
# Supported systems for your flake packages, shell, etc.
systems = [
"aarch64-linux"
"x86_64-linux"
];
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
pkgs-unstable = nixpkgs-unstable.legacyPackages.x86_64-linux;
# This is a function that generates an attribute by calling a function you
# pass to it, with each system as an argument
forAllSystems = nixpkgs.lib.genAttrs systems;
in {
# Your custom packages
# Accessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
# Formatter for your nix files, available through 'nix fmt'
# Other options beside 'alejandra' include 'nixpkgs-fmt'
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
# Your custom packages and modifications, exported as overlays
overlays = import ./overlays {inherit inputs;};
# Reusable nixos modules you might want to export
# These are usually stuff you would upstream into nixpkgs
nixosModules = import ./modules/nixos;
# Reusable home-manager modules you might want to export
# These are usually stuff you would upstream into home-manager
homeManagerModules = import ./modules/home-manager;
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
nixLap = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
# > Our main nixos configuration file <
./hosts/nixLap/configuration.nix
];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"rasmus@nixLap" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs outputs;
inherit pkgs-unstable;
};
modules = [
# > Our main home-manager configuration file <
./hosts/nixLap/home.nix
];
};
};
nixosConfigurations = {
nixBox = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
# > Our main nixos configuration file <
./hosts/nixBox/configuration.nix
];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"rasmus@nixBox" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
# > Our main home-manager configuration file <
./hosts/nixBox/home.nix
];
};
};
};
}
and my main home.nix is:
{
inputs,
outputs,
lib,
config,
pkgs,
pkgs-unstable,
...
}:
{
imports = [
];
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = _: true;
};
};
home = {
username = "rasmus";
homeDirectory = "/home/rasmus";
};
home.packages = (with pkgs; [
stow
flatpak
vlc
gnome.gnome-software
neofetch
pass
nurl
rustup
unzip
gimp
gnome.gnome-calculator
# fetchFromGithub
# Libra office and spell check
libreoffice-qt
hunspell
hunspellDicts.da_DK
# LaTeX
texlive.combined.scheme-full
])
++
(with pkgs-unstable; [
# eza
]);
xdg.enable = true;
# Enable home-manager and git
programs.home-manager.enable = true;
programs.git = {
enable = true;
userEmail = "rasmus@enev.dk";
userName = "Rasmus Enevoldsen";
# git config --global init.defaultBranch
extraConfig = {
init.defaultBranch = "main";
};
};
programs.ssh = {
enable = true;
compression = true;
forwardAgent = true;
extraConfig = ''
AddKeysToAgent yes
'';
};
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "23.05";
}