This commit is contained in:
Hadi 2024-06-18 11:42:22 +02:00 committed by GitHub
parent 40648d4041
commit c3b54c538f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 25 additions and 7 deletions

View File

@ -19,7 +19,7 @@ It's a simple way to manage your system configuration and dotfiles.
- 🏠 `home` are the dotfiles and configuration files for the user - 🏠 `home` are the dotfiles and configuration files for the user
- 💻 `hosts` are the system configuration files - 💻 `hosts` are the system configuration files
- 'laptop' is my own configuration for my laptop with nvidia - 'laptop' is my own configuration for my laptop with nvidia
- 'server' is for my nixos server (w/nextcloud, nginx, vaultwarden, ...) - 'server' is for my nixos server (w/nextcloud, nginx, vaultwarden, ... look `hosts/modules/server`)
- 'guest' is a *template* that you can copy and modify for *your own system* - 'guest' is a *template* that you can copy and modify for *your own system*
- 'themes' contains all the *themes* available (see [THEMES.md](docs/THEMES.md)) - 'themes' contains all the *themes* available (see [THEMES.md](docs/THEMES.md))
- 'modules' are some nix modules that you can import (nvidia, prime, fonts, ...) - 'modules' are some nix modules that you can import (nvidia, prime, fonts, ...)
@ -31,12 +31,12 @@ It's a simple way to manage your system configuration and dotfiles.
git clone https://github.com/anotherhadi/nixy ~/.config/nixos git clone https://github.com/anotherhadi/nixy ~/.config/nixos
``` ```
- Copy the `hosts/guest` folder and rename it to your system name - Copy the `hosts/guest` folder, rename it to your system name and change the variables inside the `variables.nix` file
- Change the variables inside your new hosts - Add your `hardware-configuration.nix` to your new hosts folder
.. - Add your 'nixosConfigurations' inside `flake.nix` (You can edit the "yourhostname" one and change the lines containing #CHANGEME)
```sh ```sh
sudo nixos-rebuild switch --flake ~/.config/nixos#nixy sudo nixos-rebuild switch --flake ~/.config/nixos#your_hostname
``` ```
## Documentation ## Documentation

View File

@ -41,7 +41,7 @@
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users."hadi" = import ./home/laptop.nix; # CHANGE ME users."hadi" = import ./home/laptop.nix;
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
}; };
} }
@ -59,7 +59,25 @@
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users."hadi" = import ./home/server.nix; # CHANGE ME users."hadi" = import ./home/server.nix;
extraSpecialArgs = { inherit inputs; };
};
}
];
};
yourhostname = nixpkgs.lib.nixosSystem { #CHANGEME
system = "x86_64-linux";
modules = [
./hosts/yourhostname/configuration.nix #CHANGEME
inputs.home-manager.nixosModules.home-manager
{
nixpkgs.overlays = [ nur.overlay ];
_module.args = { inherit inputs; };
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users."yourusername" = import ./home/laptop.nix; #CHANGEME
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
}; };
} }