add wsl config

This commit is contained in:
2026-05-01 14:44:28 -05:00
parent fe112cb380
commit 31d59f89a9
3 changed files with 125 additions and 1 deletions
+15 -1
View File
@@ -28,6 +28,10 @@
url = "github:nix-community/disko/latest";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-wsl = {
url = "github:nix-community/NixOS-WSL/main";
inputs.nixpkgs.follows = "nixpkgs";
};
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.3";
inputs.nixpkgs.follows = "nixpkgs";
@@ -63,6 +67,7 @@
nixpkgs-unstable,
nix-darwin,
nix-homebrew,
nixos-wsl,
...
} @ inputs: let
systems = {
@@ -119,7 +124,16 @@
inputs.disko.nixosModules.disko
];
};
};
wsl = nixpkgs.lib.nixosSystem {
system = systems.x86_64;
specialArgs = {inherit inputs stable_pkgs unstable_pkgs;};
modules = [
./hosts/nixos/wsl/configuration.nix
nixos-wsl.nixosModules.default
inputs.home-manager.nixosModules.default
];
};
};
darwinConfigurations = {
cen-it-07 = nix-darwin.lib.darwinSystem {
system = systems.darwin;
+53
View File
@@ -0,0 +1,53 @@
{ config, lib, stable_pkgs, unstable_pkgs, ... }:
let
pkgs = stable_pkgs.x86_64;
unstable = unstable_pkgs.x86_64;
in
{
imports =
[
./hardware-configuration.nix
../../nixos
../../../users/blake
../../../modules/system
#../../../modules/homelab
];
home-manager.users.blake.imports = [
../../../users/blake/hosts/wsl.nix
];
system = {
ssh.enable = true;
sops.enable = true;
};
boot = {
loader = {
efi.canTouchEfiVariables = true;
grub = {
enable = true;
forceInstall = true;
};
};
};
# define shell
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
# packages reccomended by linode
environment.systemPackages = with pkgs; [
];
# setup the network forwarding this host is designed for
# general networking config
networking = {
hostName = "zygarde"; # Define your hostname.
};
system.stateVersion = "25.05"; # Did you read the comment?
}
+57
View File
@@ -0,0 +1,57 @@
{
config,
lib,
pkgs,
inputs,
...
}: let
home_dir = config.home.homeDirectory;
#home_dir = "/home/blake";
in {
imports = [
../dots/core
];
dots = {
lf.enable = true;
nvf.enable = true;
zsh.enable = true;
ssh.enable = true;
gpg.enable = true;
git.enable = true;
xdg.enable = true;
};
home.packages = with pkgs; [
];
# import snowbelle specific ssh keys
programs.ssh.matchBlocks = lib.mkForce {
"git.blakedheld.xyz" = {
user = "gitea";
identityFile = "${home_dir}/.ssh/id_vaniville";
port = 7567;
};
"git.snowbelle.lan" = {
user = "gitea";
identityFile = "${home_dir}/.ssh/id_vaniville";
port = 7567;
};
"bebe" = {
hostname = "10.10.0.1";
user = "root";
identityFile = "${home_dir}/.ssh/id_vaniville";
};
};
sops.secrets = {
"id_vaniville" = {
mode = "0600";
path = "${home_dir}/.ssh/id_vaniville";
};
"id_vaniville.pub" = {
mode = "644";
path = "${home_dir}/.ssh/id_vaniville.pub";
};
};
}