Cleanup wsl

This commit is contained in:
2024-11-25 12:31:59 +01:00
parent 709140c8c7
commit e60a384be4
4 changed files with 37 additions and 33 deletions
+1 -23
View File
@@ -1,29 +1,7 @@
{ {
pkgs,
inputs,
...
}: {
imports = [
inputs.nixos-wsl.nixosModules.wsl
];
wsl.enable = true;
wsl.defaultUser = "zoriya";
environment.systemPackages = with pkgs; [
wslu
wsl-open
];
services.flatpak.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
config.common.default = "*";
};
services.openssh = { services.openssh = {
enable = true; enable = true;
ports = [ 1022 ]; ports = [1022];
settings = { settings = {
PasswordAuthentication = false; PasswordAuthentication = false;
PermitRootLogin = "no"; PermitRootLogin = "no";
-2
View File
@@ -1,6 +1,4 @@
{ {
description = "A very basic flake";
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable"; nixpkgs.url = "nixpkgs/nixos-unstable";
home-manager = { home-manager = {
+27 -7
View File
@@ -9,6 +9,7 @@
wsl ? false, wsl ? false,
darwin ? false, darwin ? false,
custom ? [], custom ? [],
customHome ? [],
}: let }: let
systemFunc = systemFunc =
if darwin if darwin
@@ -24,14 +25,13 @@
then ../modules/cli/darwin.nix then ../modules/cli/darwin.nix
else ../modules/cli; else ../modules/cli;
specialArgs = inputs // {inherit system;}; specialArgs = inputs // {inherit system user;};
in in
systemFunc { systemFunc {
inherit system specialArgs; inherit system specialArgs;
modules = modules =
[ [
overlays overlays
inputs.impermanence.nixosModules.impermanence
cli cli
(../environments + "/${env}") (../environments + "/${env}")
@@ -66,14 +66,34 @@ in
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = specialArgs; extraSpecialArgs = specialArgs;
users.${user} = { users.${user} = {
imports = [ imports =
../modules/cli/home.nix [
(../environments + "/${env}/home.nix") ../modules/cli/home.nix
inputs.nix-index-database.hmModules.nix-index (../environments + "/${env}/home.nix")
]; inputs.nix-index-database.hmModules.nix-index
]
++ customHome;
}; };
}; };
} }
] ]
++ nixpkgs.lib.optionals wsl [
inputs.nixos-wsl.nixosModules.wsl
({pkgs, ...}: {
wsl.enable = true;
wsl.defaultUser = user;
environment.systemPackages = with pkgs; [
wslu
wsl-open
];
services.flatpak.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
config.common.default = "*";
};
})
]
++ custom; ++ custom;
} }
+9 -1
View File
@@ -1,4 +1,12 @@
{ {
impermanence,
user,
...
}: {
imports = [
impermanence.nixosModules.impermanence
];
environment.persistence."/nix/persist" = { environment.persistence."/nix/persist" = {
hideMounts = true; hideMounts = true;
directories = [ directories = [
@@ -30,7 +38,7 @@
"/var/snapraid.content" "/var/snapraid.content"
"/var/cache/locatedb" "/var/cache/locatedb"
]; ];
users.zoriya = { users.${user} = {
directories = [ directories = [
"downloads" "downloads"
"stuff" "stuff"