mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-15 05:02:10 +00:00
dawin/linux
This commit is contained in:
parent
5cdf8fd873
commit
1e4caa255f
6 changed files with 20 additions and 19 deletions
19
flake.nix
19
flake.nix
|
|
@ -41,8 +41,9 @@
|
|||
darwinSystem = "aarch64-darwin";
|
||||
linuxSystem = "x86_64-linux";
|
||||
username = "rathi";
|
||||
darwinHostname = "hari-macbook-pro";
|
||||
linuxHostname = "workstation";
|
||||
darwinConfigName = "darwin";
|
||||
darwinMachineHostname = "hari-macbook-pro";
|
||||
linuxConfigName = "linux";
|
||||
darwinPkgs = import nixpkgs {system = darwinSystem;};
|
||||
linuxPkgs = import nixpkgs {
|
||||
system = linuxSystem;
|
||||
|
|
@ -52,14 +53,14 @@
|
|||
formatter.${darwinSystem} = darwinPkgs.alejandra;
|
||||
formatter.${linuxSystem} = linuxPkgs.alejandra;
|
||||
|
||||
darwinConfigurations.${darwinHostname} = nix-darwin.lib.darwinSystem {
|
||||
darwinConfigurations.${darwinConfigName} = nix-darwin.lib.darwinSystem {
|
||||
system = darwinSystem;
|
||||
specialArgs = {
|
||||
inherit inputs self username;
|
||||
hostname = darwinHostname;
|
||||
hostname = darwinMachineHostname;
|
||||
};
|
||||
modules = [
|
||||
./hosts/${darwinHostname}
|
||||
./hosts/${darwinConfigName}
|
||||
home-manager.darwinModules.home-manager
|
||||
nix-homebrew.darwinModules.nix-homebrew
|
||||
{
|
||||
|
|
@ -69,7 +70,7 @@
|
|||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs self username;
|
||||
hostname = darwinHostname;
|
||||
hostname = darwinMachineHostname;
|
||||
};
|
||||
home-manager.backupFileExtension = "hm-bak";
|
||||
home-manager.users.${username} = import ./home;
|
||||
|
|
@ -84,14 +85,14 @@
|
|||
];
|
||||
};
|
||||
|
||||
homeConfigurations.${linuxHostname} = home-manager.lib.homeManagerConfiguration {
|
||||
homeConfigurations.${linuxConfigName} = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = linuxPkgs;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs self username;
|
||||
hostname = linuxHostname;
|
||||
hostname = linuxConfigName;
|
||||
};
|
||||
modules = [
|
||||
./hosts/${linuxHostname}
|
||||
./hosts/${linuxConfigName}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue