wanda: new host (NixOS-WSL)
Signed-off-by: s0me1newithhand7s <git+me@hand7s.org>
This commit is contained in:
parent
d3588098ee
commit
e3e1612691
66 changed files with 914 additions and 0 deletions
23
flake.nix
23
flake.nix
|
|
@ -593,6 +593,29 @@
|
||||||
inputs.nix-mineral.nixosModules.nix-mineral
|
inputs.nix-mineral.nixosModules.nix-mineral
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# WSL2
|
||||||
|
"wanda" = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = {
|
||||||
|
inherit
|
||||||
|
inputs
|
||||||
|
self
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
"${self}/wanda/"
|
||||||
|
inputs.agenix.nixosModules.default
|
||||||
|
inputs.nixos-wsl.nixosModules.default
|
||||||
|
inputs.stylix.nixosModules.stylix
|
||||||
|
inputs.home-manager.nixosModules.default
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
inputs.nix-index-database.nixosModules.nix-index
|
||||||
|
inputs.nix-bwrapper.nixosModules.default
|
||||||
|
inputs.nix-mineral.nixosModules.nix-mineral
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# deploy-rs
|
# deploy-rs
|
||||||
|
|
|
||||||
5
wanda/console/console.nix
Normal file
5
wanda/console/console.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
_: {
|
||||||
|
console = {
|
||||||
|
useXkbConfig = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
89
wanda/default.nix
Normal file
89
wanda/default.nix
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
{self, ...}: {
|
||||||
|
imports = [
|
||||||
|
"${self}/wanda/console/console.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/environment/systemPackages.nix"
|
||||||
|
"${self}/wanda/environment/variables.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/hardware/zram.nix"
|
||||||
|
"${self}/wanda/hardware/"
|
||||||
|
|
||||||
|
"${self}/wanda/home-manager/users.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/i18n/locales.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/networking/dhcp.nix"
|
||||||
|
"${self}/wanda/networking/firewall.nix"
|
||||||
|
"${self}/wanda/networking/hostname.nix"
|
||||||
|
"${self}/wanda/networking/networkmanager.nix"
|
||||||
|
"${self}/wanda/networking/wireguard.nix"
|
||||||
|
"${self}/wanda/networking/nameservers.nix"
|
||||||
|
"${self}/wanda/networking/hosts.nix"
|
||||||
|
"${self}/wanda/networking/hostId.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/nix/package.nix"
|
||||||
|
"${self}/wanda/nix/settings/allowed-users.nix"
|
||||||
|
"${self}/wanda/nix/settings/experimental-features.nix"
|
||||||
|
"${self}/wanda/nix/settings/substituters.nix"
|
||||||
|
"${self}/wanda/nix/settings/trusted-public-keys.nix"
|
||||||
|
"${self}/wanda/nix/settings/trusted-substituters.nix"
|
||||||
|
"${self}/wanda/nix/settings/trusted-users.nix"
|
||||||
|
"${self}/wanda/nix/settings/auto-optimise-store.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/nixpkgs/config.nix"
|
||||||
|
"${self}/wanda/nixpkgs/system.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/programs/nh.nix"
|
||||||
|
"${self}/wanda/programs/ssh.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/security/polkit.nix"
|
||||||
|
"${self}/wanda/security/rtkit.nix"
|
||||||
|
"${self}/wanda/security/sudo.nix"
|
||||||
|
"${self}/wanda/security/sudo-rs.nix"
|
||||||
|
"${self}/wanda/security/pam/yubico.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/services/greetd.nix"
|
||||||
|
"${self}/wanda/services/libinput.nix"
|
||||||
|
"${self}/wanda/services/openssh.nix"
|
||||||
|
"${self}/wanda/services/pipewire.nix"
|
||||||
|
"${self}/wanda/services/netbird.nix"
|
||||||
|
"${self}/wanda/services/qmk.nix"
|
||||||
|
"${self}/wanda/services/scx.nix"
|
||||||
|
"${self}/wanda/services/xserver.nix"
|
||||||
|
"${self}/wanda/services/sunshine.nix"
|
||||||
|
"${self}/wanda/services/usbmuxd.nix"
|
||||||
|
"${self}/wanda/services/irqbalance.nix"
|
||||||
|
"${self}/wanda/services/yubikey-agent.nix"
|
||||||
|
"${self}/wanda/services/resolved.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/sops/defaults.nix"
|
||||||
|
"${self}/wanda/sops/secrets.nix"
|
||||||
|
|
||||||
|
"${self}/hand7s/stylix/base16Scheme.nix"
|
||||||
|
"${self}/hand7s/stylix/cursor.nix"
|
||||||
|
"${self}/hand7s/stylix/defaults.nix"
|
||||||
|
"${self}/hand7s/stylix/fonts.nix"
|
||||||
|
"${self}/hand7s/stylix/image.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/system/name.nix"
|
||||||
|
"${self}/wanda/system/stateVersion.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/systemd/oomd.nix"
|
||||||
|
"${self}/wanda/systemd/slices/system-slice.nix"
|
||||||
|
"${self}/wanda/systemd/slices/user-slice.nix"
|
||||||
|
"${self}/wanda/systemd/slices/root-slice.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/time/timeZone.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/users/users/hand7s.nix"
|
||||||
|
"${self}/wanda/users/users/root.nix"
|
||||||
|
"${self}/wanda/users/mutableUsers.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/wsl/"
|
||||||
|
"${self}/wanda/wsl/wslConf.nix"
|
||||||
|
|
||||||
|
"${self}/wanda/xdg/icons.nix"
|
||||||
|
"${self}/wanda/xdg/mime.nix"
|
||||||
|
"${self}/wanda/xdg/portal.nix"
|
||||||
|
];
|
||||||
|
}
|
||||||
17
wanda/environment/systemPackages.nix
Normal file
17
wanda/environment/systemPackages.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
environment = {
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
(lib.hiPrio uutils-coreutils-noprefix)
|
||||||
|
uutils-findutils
|
||||||
|
uutils-diffutils
|
||||||
|
xdg-desktop-portal
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
xdg-desktop-portal-hyprland
|
||||||
|
home-manager
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
17
wanda/environment/variables.nix
Normal file
17
wanda/environment/variables.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{config, ...}: {
|
||||||
|
environment = {
|
||||||
|
variables = {
|
||||||
|
AMD_VULKAN_ICD = "AMDVLK";
|
||||||
|
HOSTNAME = config.networking.hostName;
|
||||||
|
QT_QPA_PLATFORM = "wayland";
|
||||||
|
SDL_VIDEODRIVER = "wayland";
|
||||||
|
CLUTTER_BACKEND = "wayland";
|
||||||
|
GDK_BACKEND = "wayland";
|
||||||
|
NIXPKGS_ALLOW_UNFREE = "1";
|
||||||
|
NIXPKGS_ALLOW_INSECURE = "1";
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
GRIMBLAST_HIDE_CURSOR = "0";
|
||||||
|
TERM = "xterm-256color";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
wanda/hardware/default.nix
Normal file
8
wanda/hardware/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
_: {
|
||||||
|
hardware = {
|
||||||
|
enableAllFirmware = true;
|
||||||
|
enableAllHardware = true;
|
||||||
|
enableRedistributableFirmware = true;
|
||||||
|
firmwareCompression = "zstd";
|
||||||
|
};
|
||||||
|
}
|
||||||
8
wanda/hardware/zram.nix
Normal file
8
wanda/hardware/zram.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
_: {
|
||||||
|
zramSwap = {
|
||||||
|
enable = true;
|
||||||
|
algorithm = "zstd";
|
||||||
|
priority = 100;
|
||||||
|
memoryPercent = 100;
|
||||||
|
};
|
||||||
|
}
|
||||||
28
wanda/home-manager/users.nix
Normal file
28
wanda/home-manager/users.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{self, ...}: {
|
||||||
|
home-manager = {
|
||||||
|
users = {
|
||||||
|
"hand7s" = {
|
||||||
|
imports = [
|
||||||
|
"${self}/hand7s/"
|
||||||
|
self.inputs.agenix.homeManagerModules.default
|
||||||
|
self.inputs.agenix.homeManagerModules.default
|
||||||
|
self.inputs.spicetify-nix.homeManagerModules.default
|
||||||
|
self.inputs.hyprland.homeManagerModules.default
|
||||||
|
self.inputs.chaotic.homeManagerModules.default
|
||||||
|
self.inputs.sops-nix.homeManagerModules.sops
|
||||||
|
|
||||||
|
self.inputs.nix-index-database.homeModules.nix-index
|
||||||
|
self.inputs.noctalia.homeModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
backupFileExtension = "force";
|
||||||
|
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit
|
||||||
|
self
|
||||||
|
;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
9
wanda/i18n/locales.nix
Normal file
9
wanda/i18n/locales.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
_: {
|
||||||
|
i18n = {
|
||||||
|
defaultLocale = "en_US.UTF-8";
|
||||||
|
supportedLocales = [
|
||||||
|
"en_US.UTF-8/UTF-8"
|
||||||
|
"ru_RU.UTF-8/UTF-8"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
10
wanda/networking/dhcp.nix
Normal file
10
wanda/networking/dhcp.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{lib, ...}: {
|
||||||
|
networking = {
|
||||||
|
useDHCP = lib.mkDefault true;
|
||||||
|
dhcpcd = {
|
||||||
|
enable = true;
|
||||||
|
persistent = false;
|
||||||
|
wait = "any";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
wanda/networking/firewall.nix
Normal file
8
wanda/networking/firewall.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
_: {
|
||||||
|
networking = {
|
||||||
|
firewall = {
|
||||||
|
allowPing = true;
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
5
wanda/networking/hostId.nix
Normal file
5
wanda/networking/hostId.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
_: {
|
||||||
|
networking = {
|
||||||
|
hostId = "5c79d468";
|
||||||
|
};
|
||||||
|
}
|
||||||
5
wanda/networking/hostname.nix
Normal file
5
wanda/networking/hostname.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
_: {
|
||||||
|
networking = {
|
||||||
|
hostName = "wanda";
|
||||||
|
};
|
||||||
|
}
|
||||||
7
wanda/networking/hosts.nix
Normal file
7
wanda/networking/hosts.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
_: {
|
||||||
|
networking = {
|
||||||
|
hosts = {
|
||||||
|
# nope.
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
29
wanda/networking/nameservers.nix
Normal file
29
wanda/networking/nameservers.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
_: {
|
||||||
|
networking = {
|
||||||
|
nameservers = [
|
||||||
|
# cf dns
|
||||||
|
"1.1.1.1"
|
||||||
|
"1.0.0.1"
|
||||||
|
"2606:4700:4700::1111"
|
||||||
|
"2606:4700:4700::1001"
|
||||||
|
|
||||||
|
# google dns
|
||||||
|
"8.8.8.8"
|
||||||
|
"8.8.4.4"
|
||||||
|
"2001:4860:4860::8888"
|
||||||
|
"2001:4860:4860::8844"
|
||||||
|
|
||||||
|
# q9 dns
|
||||||
|
"9.9.9.9"
|
||||||
|
"149.112.112.112"
|
||||||
|
"2620:fe::fe"
|
||||||
|
"2620:fe::9"
|
||||||
|
|
||||||
|
# open dns
|
||||||
|
"208.67.222.222"
|
||||||
|
"208.67.220.220"
|
||||||
|
"2620:119:35::35"
|
||||||
|
"2620:119:53::53"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
9
wanda/networking/networkmanager.nix
Normal file
9
wanda/networking/networkmanager.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
_: {
|
||||||
|
networking = {
|
||||||
|
networkmanager = {
|
||||||
|
enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
useNetworkd = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
10
wanda/networking/timeServers.nix
Normal file
10
wanda/networking/timeServers.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
_: {
|
||||||
|
networking = {
|
||||||
|
timeServers = [
|
||||||
|
"0.nixos.pool.ntp.org"
|
||||||
|
"1.nixos.pool.ntp.org"
|
||||||
|
"2.nixos.pool.ntp.org"
|
||||||
|
"3.nixos.pool.ntp.org"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
7
wanda/networking/wireguard.nix
Normal file
7
wanda/networking/wireguard.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
_: {
|
||||||
|
networking = {
|
||||||
|
wireguard = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
5
wanda/nix/package.nix
Normal file
5
wanda/nix/package.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
nix = {
|
||||||
|
package = pkgs.nixVersions.latest;
|
||||||
|
};
|
||||||
|
}
|
||||||
10
wanda/nix/settings/allowed-users.nix
Normal file
10
wanda/nix/settings/allowed-users.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
_: {
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
sandbox = true;
|
||||||
|
allowed-users = [
|
||||||
|
"@wheel"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
wanda/nix/settings/auto-optimise-store.nix
Normal file
7
wanda/nix/settings/auto-optimise-store.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
_: {
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
auto-optimise-store = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
10
wanda/nix/settings/experimental-features.nix
Normal file
10
wanda/nix/settings/experimental-features.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
_: {
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
19
wanda/nix/settings/substituters.nix
Normal file
19
wanda/nix/settings/substituters.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
_: {
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
substituters = [
|
||||||
|
# cache.nixos.org
|
||||||
|
"https://cache.nixos.org"
|
||||||
|
# cache.garnix.org
|
||||||
|
"https://cache.garnix.io"
|
||||||
|
# cachix
|
||||||
|
"https://nix-community.cachix.org/"
|
||||||
|
"https://chaotic-nyx.cachix.org/"
|
||||||
|
"https://hyprland.cachix.org"
|
||||||
|
"https://chaotic-nyx.cachix.org/"
|
||||||
|
# nix-community
|
||||||
|
"https://hydra.nix-community.org/"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
19
wanda/nix/settings/trusted-public-keys.nix
Normal file
19
wanda/nix/settings/trusted-public-keys.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
_: {
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
trusted-public-keys = [
|
||||||
|
# cache.nixos.org
|
||||||
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
# cache.garnix.io
|
||||||
|
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||||
|
# cachix.org
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
|
||||||
|
"ags.cachix.org-1:naAvMrz0CuYqeyGNyLgE010iUiuf/qx6kYrUv3NwAJ8="
|
||||||
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
|
"chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
|
||||||
|
"colmena.cachix.org-1:7BzpDnjjH8ki2CT3f6GdOk7QAzPOl+1t3LvTLXqYcSg="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
19
wanda/nix/settings/trusted-substituters.nix
Normal file
19
wanda/nix/settings/trusted-substituters.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
_: {
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
trusted-substituters = [
|
||||||
|
# cache.nixos.org
|
||||||
|
"https://nixos-cache-proxy.cofob.dev"
|
||||||
|
"https://cache.nixos.org"
|
||||||
|
# cache.garnix.org
|
||||||
|
"https://cache.garnix.io"
|
||||||
|
# cachix
|
||||||
|
"https://nix-community.cachix.org/"
|
||||||
|
"https://chaotic-nyx.cachix.org/"
|
||||||
|
"https://ags.cachix.org"
|
||||||
|
"https://hyprland.cachix.org"
|
||||||
|
"https://chaotic-nyx.cachix.org/"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
9
wanda/nix/settings/trusted-users.nix
Normal file
9
wanda/nix/settings/trusted-users.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
_: {
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
trusted-users = [
|
||||||
|
"@wheel"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
wanda/nixpkgs/config.nix
Normal file
8
wanda/nixpkgs/config.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
_: {
|
||||||
|
nixpkgs = {
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
allowBroken = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
6
wanda/nixpkgs/overlays.nix
Normal file
6
wanda/nixpkgs/overlays.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
_: {
|
||||||
|
nixpkgs = {
|
||||||
|
overlays = [
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
6
wanda/nixpkgs/system.nix
Normal file
6
wanda/nixpkgs/system.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
_: {
|
||||||
|
nixpkgs = {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
hostPlatform = "x86_64-linux";
|
||||||
|
};
|
||||||
|
}
|
||||||
12
wanda/programs/nh.nix
Normal file
12
wanda/programs/nh.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
_: {
|
||||||
|
programs = {
|
||||||
|
nh = {
|
||||||
|
enable = true;
|
||||||
|
clean = {
|
||||||
|
enable = true;
|
||||||
|
dates = "weekly";
|
||||||
|
extraArgs = "--keep 2 --keep-since 2d";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
wanda/programs/ssh.nix
Normal file
8
wanda/programs/ssh.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
_: {
|
||||||
|
programs = {
|
||||||
|
ssh = {
|
||||||
|
startAgent = true;
|
||||||
|
agentTimeout = "12h";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
15
wanda/security/pam/yubico.nix
Normal file
15
wanda/security/pam/yubico.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
_: {
|
||||||
|
security = {
|
||||||
|
pam = {
|
||||||
|
yubico = {
|
||||||
|
enable = false;
|
||||||
|
debug = true;
|
||||||
|
mode = "challenge-response";
|
||||||
|
control = "sufficient";
|
||||||
|
id = [
|
||||||
|
"1873055870"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
10
wanda/security/polkit.nix
Normal file
10
wanda/security/polkit.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
_: {
|
||||||
|
security = {
|
||||||
|
polkit = {
|
||||||
|
enable = true;
|
||||||
|
adminIdentities = [
|
||||||
|
"unix-group:wheel"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
wanda/security/rtkit.nix
Normal file
7
wanda/security/rtkit.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
_: {
|
||||||
|
security = {
|
||||||
|
rtkit = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
9
wanda/security/sudo-rs.nix
Normal file
9
wanda/security/sudo-rs.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
_: {
|
||||||
|
security = {
|
||||||
|
sudo-rs = {
|
||||||
|
enable = true;
|
||||||
|
wheelNeedsPassword = true;
|
||||||
|
execWheelOnly = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
wanda/security/sudo.nix
Normal file
7
wanda/security/sudo.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{lib, ...}: {
|
||||||
|
security = {
|
||||||
|
sudo = {
|
||||||
|
enable = lib.mkDefault false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
18
wanda/services/greetd.nix
Normal file
18
wanda/services/greetd.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
services = {
|
||||||
|
greetd = {
|
||||||
|
enable = true;
|
||||||
|
restart = false;
|
||||||
|
settings = {
|
||||||
|
default_session = {
|
||||||
|
command = "${lib.getExe pkgs.tuigreet} -r -t -c ${lib.getExe' pkgs.hyprland "start-hyprland"} --greet-align center";
|
||||||
|
user = "greeter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
wanda/services/irqbalance.nix
Normal file
7
wanda/services/irqbalance.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
_: {
|
||||||
|
services = {
|
||||||
|
irqbalance = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
15
wanda/services/libinput.nix
Normal file
15
wanda/services/libinput.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
_: {
|
||||||
|
services = {
|
||||||
|
libinput = {
|
||||||
|
enable = true;
|
||||||
|
mouse = {
|
||||||
|
accelProfile = "flat";
|
||||||
|
accelSpeed = "-1.0";
|
||||||
|
buttonMapping = "1 2 3 4 5 6 7 8 9";
|
||||||
|
horizontalScrolling = true;
|
||||||
|
leftHanded = false;
|
||||||
|
naturalScrolling = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
wanda/services/netbird.nix
Normal file
7
wanda/services/netbird.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
_: {
|
||||||
|
services = {
|
||||||
|
netbird = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
22
wanda/services/openssh.nix
Normal file
22
wanda/services/openssh.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{config, ...}: {
|
||||||
|
services = {
|
||||||
|
openssh = {
|
||||||
|
enable = true;
|
||||||
|
allowSFTP = true;
|
||||||
|
openFirewall = true;
|
||||||
|
ports = [
|
||||||
|
48630
|
||||||
|
];
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
PrintMotd = false;
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
authorizedKeysFiles = [
|
||||||
|
config.sops.secrets.sshKey.path
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
66
wanda/services/pipewire.nix
Normal file
66
wanda/services/pipewire.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
_: {
|
||||||
|
services = {
|
||||||
|
pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa = {
|
||||||
|
enable = true;
|
||||||
|
support32Bit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
audio = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
pulse = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
jack = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
wireplumber = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = {
|
||||||
|
pipewire = {
|
||||||
|
# PIPEWIRE_PROPS=node.force-rate=0
|
||||||
|
"92-low-latency" = {
|
||||||
|
"context.properties" = {
|
||||||
|
"default.clock.rate" = 48000;
|
||||||
|
"default.clock.allowed-rates" = [
|
||||||
|
44100
|
||||||
|
48000
|
||||||
|
88200
|
||||||
|
96000
|
||||||
|
];
|
||||||
|
|
||||||
|
"default.clock.min-quantum" = 512;
|
||||||
|
"default.clock.quantum" = 4096;
|
||||||
|
"default.clock.max-quantum" = 8192;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"93-no-resampling" = {
|
||||||
|
"context.properties" = {
|
||||||
|
"default.clock.rate" = 48000;
|
||||||
|
"default.clock.allowed-rates" = [
|
||||||
|
44100
|
||||||
|
48000
|
||||||
|
96000
|
||||||
|
192000
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"94-no-upmixing" = {
|
||||||
|
"stream.properties" = {
|
||||||
|
"channelmix.upmix" = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
9
wanda/services/qmk.nix
Normal file
9
wanda/services/qmk.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
services = {
|
||||||
|
udev = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
qmk-udev-rules
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
39
wanda/services/resolved.nix
Normal file
39
wanda/services/resolved.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
_: {
|
||||||
|
services = {
|
||||||
|
resolved = {
|
||||||
|
enable = true;
|
||||||
|
dnsovertls = "true";
|
||||||
|
dnssec = "true";
|
||||||
|
llmnr = "true";
|
||||||
|
domains = [
|
||||||
|
"~."
|
||||||
|
];
|
||||||
|
|
||||||
|
fallbackDns = [
|
||||||
|
# cf dns
|
||||||
|
"1.1.1.1"
|
||||||
|
"1.0.0.1"
|
||||||
|
"2606:4700:4700::1111"
|
||||||
|
"2606:4700:4700::1001"
|
||||||
|
|
||||||
|
# google dns
|
||||||
|
"8.8.8.8"
|
||||||
|
"8.8.4.4"
|
||||||
|
"2001:4860:4860::8888"
|
||||||
|
"2001:4860:4860::8844"
|
||||||
|
|
||||||
|
# q9 dns
|
||||||
|
"9.9.9.9"
|
||||||
|
"149.112.112.112"
|
||||||
|
"2620:fe::fe"
|
||||||
|
"2620:fe::9"
|
||||||
|
|
||||||
|
# open dns
|
||||||
|
"208.67.222.222"
|
||||||
|
"208.67.220.220"
|
||||||
|
"2620:119:35::35"
|
||||||
|
"2620:119:53::53"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
wanda/services/scx.nix
Normal file
8
wanda/services/scx.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
_: {
|
||||||
|
services = {
|
||||||
|
scx = {
|
||||||
|
enable = true;
|
||||||
|
scheduler = "scx_cosmos";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
10
wanda/services/sunshine.nix
Normal file
10
wanda/services/sunshine.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
_: {
|
||||||
|
services = {
|
||||||
|
sunshine = {
|
||||||
|
enable = true;
|
||||||
|
capSysAdmin = true;
|
||||||
|
openFirewall = true;
|
||||||
|
autoStart = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
wanda/services/usbmuxd.nix
Normal file
8
wanda/services/usbmuxd.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
services = {
|
||||||
|
usbmuxd = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.usbmuxd2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
26
wanda/services/xserver.nix
Normal file
26
wanda/services/xserver.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
services = {
|
||||||
|
xserver = {
|
||||||
|
display = lib.mkForce 0;
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
excludePackages = with pkgs; [
|
||||||
|
xterm
|
||||||
|
];
|
||||||
|
|
||||||
|
videoDrivers = [
|
||||||
|
"modesetting"
|
||||||
|
];
|
||||||
|
|
||||||
|
xkb = {
|
||||||
|
layout = "us, ru";
|
||||||
|
variant = "";
|
||||||
|
options = "grp:caps_toggle";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
wanda/services/yubikey-agent.nix
Normal file
8
wanda/services/yubikey-agent.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
services = {
|
||||||
|
yubikey-agent = {
|
||||||
|
package = pkgs.yubikey-agent;
|
||||||
|
enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
10
wanda/services/zerotier.nix
Normal file
10
wanda/services/zerotier.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
_: {
|
||||||
|
services = {
|
||||||
|
zerotierone = {
|
||||||
|
enable = true;
|
||||||
|
joinNetworks = [
|
||||||
|
#
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
5
wanda/system/name.nix
Normal file
5
wanda/system/name.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{config, ...}: {
|
||||||
|
system = {
|
||||||
|
name = config.networking.hostName;
|
||||||
|
};
|
||||||
|
}
|
||||||
5
wanda/system/stateVersion.nix
Normal file
5
wanda/system/stateVersion.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{config, ...}: {
|
||||||
|
system = {
|
||||||
|
stateVersion = config.system.nixos.release;
|
||||||
|
};
|
||||||
|
}
|
||||||
10
wanda/systemd/oomd.nix
Normal file
10
wanda/systemd/oomd.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
_: {
|
||||||
|
systemd = {
|
||||||
|
oomd = {
|
||||||
|
enable = true;
|
||||||
|
enableUserSlices = true;
|
||||||
|
enableSystemSlice = true;
|
||||||
|
enableRootSlice = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
14
wanda/systemd/slices/root-slice.nix
Normal file
14
wanda/systemd/slices/root-slice.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
_: {
|
||||||
|
systemd = {
|
||||||
|
slices = {
|
||||||
|
root = {
|
||||||
|
sliceConfig = {
|
||||||
|
ManagedOOMSwap = "kill";
|
||||||
|
ManagedOOMMemoryPressure = "kill";
|
||||||
|
ManagedOOMMemoryPressureLimit = "40%";
|
||||||
|
ManagedOOMMemoryPressureDurationSec = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
14
wanda/systemd/slices/system-slice.nix
Normal file
14
wanda/systemd/slices/system-slice.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
_: {
|
||||||
|
systemd = {
|
||||||
|
slices = {
|
||||||
|
system = {
|
||||||
|
sliceConfig = {
|
||||||
|
ManagedOOMSwap = "kill";
|
||||||
|
ManagedOOMMemoryPressure = "kill";
|
||||||
|
ManagedOOMMemoryPressureLimit = "40%";
|
||||||
|
ManagedOOMMemoryPressureDurationSec = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
14
wanda/systemd/slices/user-slice.nix
Normal file
14
wanda/systemd/slices/user-slice.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
_: {
|
||||||
|
systemd = {
|
||||||
|
slices = {
|
||||||
|
user = {
|
||||||
|
sliceConfig = {
|
||||||
|
ManagedOOMSwap = "kill";
|
||||||
|
ManagedOOMMemoryPressure = "kill";
|
||||||
|
ManagedOOMMemoryPressureLimit = "40%";
|
||||||
|
ManagedOOMMemoryPressureDurationSec = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
6
wanda/time/timeZone.nix
Normal file
6
wanda/time/timeZone.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
_: {
|
||||||
|
time = {
|
||||||
|
timeZone = "Europe/Moscow";
|
||||||
|
hardwareClockInLocalTime = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
5
wanda/users/mutableUsers.nix
Normal file
5
wanda/users/mutableUsers.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
_: {
|
||||||
|
users = {
|
||||||
|
mutableUsers = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
15
wanda/users/users/hand7s.nix
Normal file
15
wanda/users/users/hand7s.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
_: {
|
||||||
|
users = {
|
||||||
|
users = {
|
||||||
|
"hand7s" = {
|
||||||
|
description = "me";
|
||||||
|
isSystemUser = false;
|
||||||
|
isNormalUser = true;
|
||||||
|
initialHashedPassword = "$6$ckgRhNWmJgSwOUpJ$kfeAdokd5fa76HWbTmWN2YXx4M/PQVOTJku1ODbqbBhEkUFiLftdaJFRnNXfIM3Jtz0ShoRMSVCB7mDkxDrdi/";
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
9
wanda/users/users/root.nix
Normal file
9
wanda/users/users/root.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
_: {
|
||||||
|
users = {
|
||||||
|
users = {
|
||||||
|
"root" = {
|
||||||
|
initialHashedPassword = "$6$n4OLMvYHHStHvtmr$6OL0NV1dEM2b6oJRewkhuoFxM80lI67tfbJ6QkCg8WAA1gbeKrcwDAuJjm8zvpY4zcDR3Z5Zbo8uebfOi6XXF0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
10
wanda/virtualisation/docker.nix
Normal file
10
wanda/virtualisation/docker.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
_: {
|
||||||
|
virtualisation = {
|
||||||
|
docker = {
|
||||||
|
enable = true;
|
||||||
|
rootless = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
wanda/wsl/default.nix
Normal file
8
wanda/wsl/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
_: {
|
||||||
|
wsl = {
|
||||||
|
enable = true;
|
||||||
|
defaultUser = "hand7s";
|
||||||
|
startMenuLaunchers = true;
|
||||||
|
useWindowsDriver = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
13
wanda/wsl/wslConf.nix
Normal file
13
wanda/wsl/wslConf.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
_: {
|
||||||
|
wsl = {
|
||||||
|
wslConf = {
|
||||||
|
automount = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
user = {
|
||||||
|
default = "hand7s";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
wanda/xdg/icons.nix
Normal file
7
wanda/xdg/icons.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
_: {
|
||||||
|
xdg = {
|
||||||
|
icons = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
11
wanda/xdg/mime.nix
Normal file
11
wanda/xdg/mime.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
_: {
|
||||||
|
xdg = {
|
||||||
|
mime = {
|
||||||
|
enable = true;
|
||||||
|
defaultApplications = {
|
||||||
|
"x-scheme-handler/http" = "google-chrome.desktop";
|
||||||
|
"x-scheme-handler/https" = "google-chrome.desktop";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
35
wanda/xdg/portal.nix
Normal file
35
wanda/xdg/portal.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
xdg = {
|
||||||
|
portal = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
config = {
|
||||||
|
common = {
|
||||||
|
"org.freedesktop.impl.portal.FileChooser" = "termfilechooser";
|
||||||
|
|
||||||
|
default = [
|
||||||
|
"gtk"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
hyprland = {
|
||||||
|
"org.freedesktop.impl.portal.FileChooser" = [
|
||||||
|
"termfilechooser"
|
||||||
|
];
|
||||||
|
|
||||||
|
preferred = [
|
||||||
|
"gtk"
|
||||||
|
"hyprland"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
extraPortals = with pkgs; [
|
||||||
|
xdg-desktop-portal
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
xdg-desktop-portal-hyprland
|
||||||
|
xdg-desktop-portal-termfilechooser
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue