wsl
This commit is contained in:
16
flake.nix
16
flake.nix
@@ -15,7 +15,14 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
outputs = { self, nixpkgs, nixos-hardware, nixos-wsl, nixpkgs-unstable, agenix, home-manager }@inputs:
|
||||
outputs = { self,
|
||||
nixpkgs,
|
||||
nixos-hardware,
|
||||
nixos-wsl,
|
||||
nixpkgs-unstable,
|
||||
agenix,
|
||||
home-manager
|
||||
}@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
overlay-unstable = final: prev: {
|
||||
@@ -41,7 +48,7 @@
|
||||
./modules/synapse.nix
|
||||
|
||||
./modules/nextcloud.nix
|
||||
#./modules/coturn.nix
|
||||
#./modules/coturn.nix
|
||||
|
||||
./modules/acme.nix
|
||||
./modules/samba.nix
|
||||
@@ -70,9 +77,12 @@
|
||||
];
|
||||
};
|
||||
nixosConfigurations."wsl" = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
#"${nixpkgs}/nixos/modules/profiles/minimal.nix"
|
||||
./users/anon.nix
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
|
||||
./systems/wsl/configuration.nix
|
||||
nixos-wsl.nixosModules.default
|
||||
home-manager.nixosModules.home-manager
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
|
||||
# https://github.com/nix-community/NixOS-WSL
|
||||
|
||||
{ config, lib, pkgs, ... } : #nixos-wsl, ... }:
|
||||
{ config, lib, pkgs, inputs, ... } : #nixos-wsl, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@@ -13,38 +13,32 @@
|
||||
# <nixos-wsl/modules>
|
||||
];
|
||||
|
||||
wsl.enable = true;
|
||||
wsl.defaultUser = "nixos";
|
||||
wsl = {
|
||||
enable = true;
|
||||
startMenuLaunchers = true;
|
||||
wslConf = {
|
||||
automount.root = "/mnt";
|
||||
interop = { enabled = false; appendWindowsPath = false;};
|
||||
};
|
||||
};
|
||||
|
||||
nix.optimise.automatic = true;
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
nix.settings.trusted-substituters = [ "https://ai.cachix.org" ];
|
||||
nix.settings.trusted-public-keys = [ "ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc=" ];
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
neofetch
|
||||
openssh
|
||||
neofetch
|
||||
openssh
|
||||
];
|
||||
|
||||
wsl.wslConf = {
|
||||
interop = { enabled = false; appendWindowsPath = false; };
|
||||
};
|
||||
|
||||
networking.hostName = "wsl";
|
||||
|
||||
home-manager.users.nixos = { pkgs, ... }: {
|
||||
programs.bash.enable = true;
|
||||
programs.git = {
|
||||
enable = true;
|
||||
};
|
||||
# The state version is required and should stay at the version you
|
||||
# originally installed.
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It's perfectly fine and recommended to leave
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
};
|
||||
useUserPackages = true;
|
||||
users.anon = {
|
||||
programs.git.enable = true;
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
Reference in New Issue
Block a user