This commit is contained in:
Kopatz
2023-11-10 10:57:03 +00:00
parent 8e5ade9e39
commit eb27732122
3 changed files with 30 additions and 25 deletions

View File

@@ -15,7 +15,14 @@
inputs.nixpkgs.follows = "nixpkgs"; 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 let
system = "x86_64-linux"; system = "x86_64-linux";
overlay-unstable = final: prev: { overlay-unstable = final: prev: {
@@ -41,7 +48,7 @@
./modules/synapse.nix ./modules/synapse.nix
./modules/nextcloud.nix ./modules/nextcloud.nix
#./modules/coturn.nix #./modules/coturn.nix
./modules/acme.nix ./modules/acme.nix
./modules/samba.nix ./modules/samba.nix
@@ -70,9 +77,12 @@
]; ];
}; };
nixosConfigurations."wsl" = nixpkgs.lib.nixosSystem { nixosConfigurations."wsl" = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
#"${nixpkgs}/nixos/modules/profiles/minimal.nix"
./users/anon.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./systems/wsl/configuration.nix ./systems/wsl/configuration.nix
nixos-wsl.nixosModules.default nixos-wsl.nixosModules.default
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager

View File

@@ -5,7 +5,7 @@
# NixOS-WSL specific options are documented on the NixOS-WSL repository: # NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL # https://github.com/nix-community/NixOS-WSL
{ config, lib, pkgs, ... } : #nixos-wsl, ... }: { config, lib, pkgs, inputs, ... } : #nixos-wsl, ... }:
{ {
imports = [ imports = [
@@ -13,38 +13,32 @@
# <nixos-wsl/modules> # <nixos-wsl/modules>
]; ];
wsl.enable = true; wsl = {
wsl.defaultUser = "nixos"; enable = true;
startMenuLaunchers = true;
wslConf = {
automount.root = "/mnt";
interop = { enabled = false; appendWindowsPath = false;};
};
};
nix.optimise.automatic = true; nix.optimise.automatic = true;
nix.gc = { nix.gc = {
automatic = true; automatic = true;
dates = "weekly"; dates = "weekly";
options = "--delete-older-than 30d"; options = "--delete-older-than 30d";
}; };
nix.settings.trusted-substituters = [ "https://ai.cachix.org" ]; nix.settings.trusted-substituters = [ "https://ai.cachix.org" ];
nix.settings.trusted-public-keys = [ "ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc=" ]; nix.settings.trusted-public-keys = [ "ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc=" ];
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
neofetch neofetch
openssh openssh
]; ];
wsl.wslConf = {
interop = { enabled = false; appendWindowsPath = false; };
};
networking.hostName = "wsl"; 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 # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave # on your system were taken. It's perfectly fine and recommended to leave

View File

@@ -9,6 +9,7 @@
}; };
useUserPackages = true; useUserPackages = true;
users.anon = { users.anon = {
programs.git.enable = true;
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;