handle config file using environment variable
parent
10a9c55c7e
commit
9cb1c91bc8
|
@ -87,6 +87,8 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.variables.NIXOS_CONFIG = "/home/rilla/configs/nix-config/capibara.nix";
|
||||||
|
|
||||||
networking.networkmanager.wifi.macAddress = "CC:AF:78:75:29:32";
|
networking.networkmanager.wifi.macAddress = "CC:AF:78:75:29:32";
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
|
@ -35,7 +35,6 @@ in {
|
||||||
./neovim
|
./neovim
|
||||||
./pass
|
./pass
|
||||||
./rss
|
./rss
|
||||||
./scripts
|
|
||||||
./snapcast
|
./snapcast
|
||||||
./sound
|
./sound
|
||||||
./ssh
|
./ssh
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
home.packages = [
|
|
||||||
(pkgs.callPackage ./nixos-rebuild.nix { inherit config pkgs; })
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
config-dir="configs/nix-config";
|
|
||||||
in
|
|
||||||
pkgs.writeScriptBin "nixos-rebuild" ''
|
|
||||||
#!${pkgs.dash}/bin/dash
|
|
||||||
HOSTNAME="''${HOSTNAME:-''$(hostname)}"
|
|
||||||
export NIXOS_CONFIG="${config.home.homeDirectory}/${config-dir}/''${HOSTNAME}.nix"
|
|
||||||
${pkgs.nixos-rebuild}/bin/nixos-rebuild "$@"
|
|
||||||
''
|
|
Loading…
Reference in New Issue