This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page, on | |
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). | |
# NixOS-WSL specific options are documented on the NixOS-WSL repository: | |
# https://github.com/nix-community/NixOS-WSL | |
{ config, lib, pkgs, ... }: | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
{ | |
# Home Manager needs a bit of information about you and the paths it should | |
# manage. | |
home.username = "nixos"; | |
home.homeDirectory = "/home/nixos"; | |
imports = [ | |
# https://github.com/nix-community/nixos-vscode-server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function normalize< | |
I, | |
T extends Exclude<I, Function>, | |
F extends Extract<I, (...args: any) => T> | |
>(funcOrVal: I, ...args: Parameters<F>): T { | |
return funcOrVal instanceof Function ? funcOrVal(...args) : funcOrVal; | |
} | |
// with only one type parameter | |
function normalize<I>( |