This commit is contained in:
2023-04-12 20:32:07 +02:00
parent 10fbbc2654
commit a2365058b2
86 changed files with 5132 additions and 4 deletions

27
hosts/_/cfg.nix Normal file
View File

@@ -0,0 +1,27 @@
{
lib,
config,
...
}:
with lib;
let
cfg = config.hostcfg;
in {
options.hostcfg = {
hostname = mkOption {
type = types.str;
};
wlp_if = mkOption {
type = types.str;
};
wg_ip4 = mkOption {
type = types.str;
};
wg_ip6 = mkOption {
type = types.str;
};
wg_pk = mkOption {
type = types.str;
};
};
}

71
hosts/_/home.nix Normal file
View File

@@ -0,0 +1,71 @@
{
config,
pkgs,
...
}:{
imports = [
../../colors
../../home/cli
../../home/gui
../../home/wayland/hyprland
];
systemd.user.startServices = "sd-switch";
programs.home-manager.enable = true;
services.nextcloud-client.enable = true;
xdg.userDirs.enable = true;
xdg.userDirs.desktop = "${config.home.homeDirectory}/desktop";
xdg.userDirs.documents = "${config.home.homeDirectory}/desktop";
xdg.userDirs.download = "${config.home.homeDirectory}/downloads";
xdg.userDirs.extraConfig = {
XDG_MISC_DIR = "${config.home.homeDirectory}/misc";
};
xdg.userDirs.music = "${config.home.homeDirectory}/media/music";
xdg.userDirs.pictures = "${config.home.homeDirectory}/media/photo";
xdg.userDirs.publicShare = "${config.home.homeDirectory}/media/photo";
xdg.userDirs.templates = "${config.home.homeDirectory}/media/template";
xdg.userDirs.videos = "${config.home.homeDirectory}/media/video";
xdg.userDirs.createDirectories = true;
home = {
username = "sora";
homeDirectory = "/home/sora";
packages = with pkgs; [
#ui
firefox
vscodium
xfce.thunar
xfce.thunar-volman
xfce.thunar-archive-plugin
discord
telegram-desktop
obs-studio
pavucontrol
unzip
appimage-run
yt-dlp
keepassxc
nextcloud-client
jellyfin-mpv-shim
#games
wineWowPackages.wayland
gamemode
gamescope
mangohud
prismlauncher
openttd-jgrpp
bottles
#sexyterm
cbonsai
pipes-rs
cmatrix
cava
];
stateVersion = "23.05";
};
}

155
hosts/_/host.nix Normal file
View File

@@ -0,0 +1,155 @@
{
config,
pkgs,
...
}: {
imports =
[
../../home/wayland
# ../../home/xorg
../../modules
];
time.timeZone = "Europe/Zurich";
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_GB.UTF-8";
LC_IDENTIFICATION = "en_GB.UTF-8";
LC_MEASUREMENT = "en_GB.UTF-8";
LC_MONETARY = "en_GB.UTF-8";
LC_NAME = "en_GB.UTF-8";
LC_NUMERIC = "en_GB.UTF-8";
LC_PAPER = "en_GB.UTF-8";
LC_TELEPHONE = "en_GB.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
services = {
fstrim = {
enable = true;
};
xserver = {
enable = true;
videoDrivers = [ "amd" ];
layout = "us";
xkbVariant = "";
excludePackages = [ pkgs.xterm ];
desktopManager.xterm.enable = false;
};
gvfs = {
enable = true;
};
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
services.pcscd.enable = true;
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
};
hardware.bluetooth.enable = true;
services.blueman.enable = true;
programs.steam = {
enable = true;
};
programs.zsh = {
enable = true;
};
programs.ssh = {
extraConfig = ''
IdentityFile ${config.sops.secrets."${config.hostcfg.hostname}_ssh_priv".path}
'';
};
security.polkit.enable = true;
security.pam.services.swaylock = {
text = ''
auth include login
'';
};
hardware = {
opengl = {
enable = true;
extraPackages = with pkgs; [];
};
};
users = {
defaultUserShell = pkgs.zsh;
users.sora = {
isNormalUser = true;
description = "sora";
extraGroups = [ "networkmanager" "wheel" "vboxsf" "lp"];
};
};
environment.systemPackages = with pkgs; [
wget
dconf
gvfs
go
cargo
nodejs
polkit_gnome
nfs-utils
bluez
bluez-tools
jre8
jdk8
jdk
];
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
warn-dirty = false
'';
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
settings = {
auto-optimise-store = true;
builders-use-substitutes = true;
substituters = [
"https://hyprland.cachix.org"
"https://cache.nixos.org"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
];
};
};
nixpkgs.config = {
permittedInsecurePackages = [
];
allowUnfree = true;
};
system.stateVersion = "unstable";
}