mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-06 21:20:13 +00:00
initial refactoring
This commit is contained in:
21
platforms/nixos/modules/nmasur/profiles/wsl.nix
Normal file
21
platforms/nixos/modules/nmasur/profiles/wsl.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.nmasur.profiles.wsl;
|
||||
in
|
||||
|
||||
{
|
||||
options.nmasur.profiles.wsl.enable = lib.mkEnableOption "WSL settings";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# Replace config directory with our repo, since it sources from config on
|
||||
# every launch
|
||||
system.activationScripts.configDir.text = ''
|
||||
rm -rf /etc/nixos
|
||||
ln --symbolic --no-dereference --force ${config.dotfilesPath} /etc/nixos
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
}
|
Reference in New Issue
Block a user