Replies: 12 comments
-
home.nix: { config, pkgs, ... }:
{
# Let Home Manager install and manage itself:
programs.home-manager.enable = true;
# Home Manager needs a bit of information about you and the paths it should manage:
home.username = "paddygoat";
home.homeDirectory = "/home/paddygoat";
# This value determines the Home Manager release that your configuration is compatible with.
# This helps avoid breakage when a new Home Manager release introduces backwards incompatible changes.
#
# You can update Home Manager without changing this value.
# See the Home Manager release notes for a list of state version changes in each release.
home.stateVersion = "21.05";
# home.packages = [ pkgs.plasma5Packages.kdenlive ];
# home.packages = with pkgs; [
# git
# git-crypt
# gnupg
# ];
home.packages = with pkgs; [
plasma5Packages.kdenlive
git
git-crypt
gnupg
audacity
gimp
nano
qtractor
jack2
lmms
];
} |
Beta Was this translation helpful? Give feedback.
-
When you're using flakes, nothing really matters except the Everything ends up as a big So is Do you have something that looks like this?: { config, lib, ... }:
{
imports = [ ./hardware-configuration.nix ./home.nix ];
} If you are not importing |
Beta Was this translation helpful? Give feedback.
-
The reason you have the |
Beta Was this translation helpful? Give feedback.
-
Thanks @MatthewCroughan. I eventually sussed out that capitalisation in my username was causing an issue - bit of a newbie mistake. Then re-vamped another Flake.nix script which worked with a little bit of fine tuning: {
description = "My system config based on flake";
inputs = {
nixpkgs.url = "nixpkgs/nixos-21.05";
home-manager.url = "github:nix-community/home-manager/release-21.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
};
lib = nixpkgs.lib;
in {
homeManagerConfigurations = {
paddygoat = home-manager.lib.homeManagerConfiguration {
inherit system pkgs;
username = "paddygoat";
homeDirectory = "/home/paddygoat";
configuration = {
imports = [
./home.nix
];
};
};
};
nixosConfigurations = {
nixos = lib.nixosSystem {
inherit system;
modules = [
./system/configuration.nix
];
};
};
};
} |
Beta Was this translation helpful? Give feedback.
-
I'm slightly confused by the "Everything ends up as a big .nix expression in the end" argument. Doesn't this preclude individual users from managing their homes independently of the system administrator? That is, I want to manage my home with home-manager without the sysadmin having to include my file, or having to rebuild the OS any time I change my config. |
Beta Was this translation helpful? Give feedback.
-
I just mean to say that if |
Beta Was this translation helpful? Give feedback.
-
So if you want to use flakes, you can't use home-manager to maintain your personal profile? I'd like to use flakes and use my home-manager configuration on non-nixos systems too. |
Beta Was this translation helpful? Give feedback.
-
I actually miserably failed when trying to use EDIT, ah, I think I get it: my home config is separate from system config (for (theoretical at the moment) portability to non-NixOS), so it does make sense that So I guess the question is rather why does the README sound like the |
Beta Was this translation helpful? Give feedback.
-
Aha good to know, I'll just give it a try then. |
Beta Was this translation helpful? Give feedback.
-
Indeed, this is a mistake in the README.
The command |
Beta Was this translation helpful? Give feedback.
-
Slightly hijacking the thread: I have EDIT: found the answer here https://nixos.wiki/wiki/Flakes#Enable_unfree_software_in_home-manager |
Beta Was this translation helpful? Give feedback.
-
That's the piece of info I needed, thanks! It's in the manpage of |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there an existing issue for this?
Issue description
I'm not sure if this is the right place to ask this question as it's also a flake issue, but seems like running
home-manager switch -f ./home.nix
does not put my home.nix file into the store with my other DIY config scripts.After running
nixos-rebuild build --flake .#
in my DIY config directory, all my files are in /nix/store/ EXCEPT home.nix and I get this error:[paddygoat@nixos:~/Paddy_Nix_Backup]$ home-manager switch -f ./home.nix
/nix/store/wvxc8aaaxmvpprcp8c3sk12320rsx407-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/paddygoat
No change so reusing latest profile generation 2
Creating home file links in /home/paddygoat
Activating onFilesChange
Activating reloadSystemd
There are 154 unread and relevant news items.
Read them by running the command 'home-manager news'.
[paddygoat@nixos:~/Paddy_Nix_Backup]$ nixos-rebuild build --flake .#
warning: Git tree '/home/paddygoat/Paddy_Nix_Backup' is dirty
building the system configuration...
warning: Git tree '/home/paddygoat/Paddy_Nix_Backup' is dirty
error: getting status of '/nix/store/rsfrp307b6a26jsw6s3badmjgjvl2n5z-source/home.nix': No such file or directory
(use '--show-trace' to show detailed location information)
[paddygoat@nixos:~/Paddy_Nix_Backup]$
Please advise ..... Thank you very much !!
Maintainer CC
No response
System information
Beta Was this translation helpful? Give feedback.
All reactions