Skip to content

Commit

Permalink
Merge pull request #796 from kachick/retire-from-hm-nixos-module
Browse files Browse the repository at this point in the history
Replace home-manager NixOS module with standalone version again
  • Loading branch information
kachick committed Sep 18, 2024
2 parents 02de31a + 29b1329 commit d627429
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 22 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ For example
```bash
nix --extra-experimental-features 'nix-command flakes' shell 'github:NixOS/nixpkgs/nixos-24.05#git' \
--command sudo nixos-rebuild switch \
--flake 'github:kachick/dotfiles#moss' \
--flake "github:kachick/dotfiles#$(hostname)" \
--show-trace
sudo reboot now
```
Expand All @@ -49,6 +49,15 @@ List defined hostnames
nix flake show 'github:kachick/dotfiles' --json | jq '.nixosConfigurations | keys[]'
```

This repository intentionally reverts the home-manager NixOS module.\
So, you should activate the user dotfiles with standalone home-manager even though NixOS.

```bash
nix run 'github:kachick/dotfiles#home-manager' -- switch -b backup --flake 'github:kachick/dotfiles#kachick@desktop'
```

See [GH-680](https://github.com/kachick/dotfiles/issues/680) for background

## Ubuntu

1. Install [Nix](https://nixos.org/) package manager with [DeterminateSystems/nix-installer](https://github.com/DeterminateSystems/nix-installer) to enable [Flakes](https://nixos.wiki/wiki/Flakes) by default.
Expand Down Expand Up @@ -162,4 +171,11 @@ If you are developing this repository, the simple reactivation is as follows.
makers apply user@linux-cli
```

For NixOS

```bash
sudo nixos-rebuild switch --flake ".#$(hostname)" --show-trace && \
makers apply kachick@desktop
```

If you encounter any errors in the above steps, Check and update CI and [wiki](https://github.com/kachick/dotfiles/wiki).
11 changes: 11 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,17 @@
};
in
{
"kachick@desktop" = home-manager.lib.homeManagerConfiguration (
x86-Linux
// {
modules = [
./home-manager/kachick.nix
./home-manager/systemd.nix
./home-manager/gnome.nix
];
}
);

"kachick@wsl" = home-manager.lib.homeManagerConfiguration (
x86-Linux
// {
Expand Down
21 changes: 0 additions & 21 deletions nixos/desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,6 @@ in
};
};

home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
users.kachick = {
imports = [
../../home-manager/kachick.nix
../../home-manager/systemd.nix
../../home-manager/gnome.nix
];
};
extraSpecialArgs = {
inherit
inputs
outputs
edge-pkgs
homemade-pkgs
;
};
};

services.xserver = {
enable = true;

Expand Down

0 comments on commit d627429

Please sign in to comment.