Skip to content

Commit

Permalink
Added home-manager to nixos config
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmus-kirk committed Sep 20, 2024
1 parent 75a4a02 commit 9385f85
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
13 changes: 8 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
default = kirk;
};
nixosConfigurations = {
pi = nixpkgs.lib.nixosSystem {
pi = nixpkgs.lib.nixosSystem rec {
system = "aarch64-linux";

modules = [
Expand All @@ -69,10 +69,13 @@
nixarr.nixosModules.default
home-manager.nixosModules.home-manager
{
home-manager.users.user.imports = [
./configurations/home-manager/pi/home.nix
self.homeManagerModules.default
];
home-manager.users.user = {
imports = [
./configurations/home-manager/pi/home.nix
self.homeManagerModules.default
];
config.home.packages = [ home-manager.packages."${system}".default ];
};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
Expand Down
7 changes: 0 additions & 7 deletions modules/home-manager/homeManagerScripts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ with lib; let
hm-upgrade = pkgs.writeShellApplication {
name = "hm-upgrade";
text = ''
# TODO: test this.
#sudo su
#nix-env --install --file '<nixpkgs>' --attr nixVersions.unstable cacert -I nixpkgs=channel:nixpkgs-unstable
#systemctl daemon-reload
#systemctl restart nix-daemon
#exit
# Update, switch to new config, and cleanup
${hm-update}/bin/hm-update &&
${hm-rebuild}/bin/hm-rebuild &&
Expand Down
2 changes: 2 additions & 0 deletions modules/home-manager/userDirs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ with lib; let
sort-downloads = pkgs.writeShellApplication {
name = "sort-downloads";

runtimeInputs = with pkgs; [ toybox ];

text = ''
downRoot="${config.xdg.userDirs.extraConfig.XDG_DOWNLOADS_ROOT}"
unsorted="${config.xdg.userDirs.download}"
Expand Down

0 comments on commit 9385f85

Please sign in to comment.