[Init]
This commit is contained in:
27
hosts/_/cfg.nix
Executable file
27
hosts/_/cfg.nix
Executable 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;
|
||||
};
|
||||
};
|
||||
}
|
86
hosts/_/home.nix
Executable file
86
hosts/_/home.nix
Executable file
@ -0,0 +1,86 @@
|
||||
{
|
||||
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; [
|
||||
|
||||
#lang
|
||||
#See DEVSH
|
||||
|
||||
#ui
|
||||
firefox
|
||||
vscodium
|
||||
xfce.thunar
|
||||
xfce.thunar-volman
|
||||
xfce.thunar-archive-plugin
|
||||
xfce.tumbler
|
||||
|
||||
# xplorer
|
||||
telegram-desktop
|
||||
obs-studio
|
||||
pavucontrol
|
||||
unzip
|
||||
appimage-run
|
||||
yt-dlp
|
||||
keepassxc
|
||||
nextcloud-client
|
||||
jellyfin-mpv-shim
|
||||
|
||||
#software
|
||||
godot_4
|
||||
krita
|
||||
gimp
|
||||
imv
|
||||
darktable
|
||||
gramps
|
||||
custom.simc
|
||||
|
||||
#games
|
||||
wineWowPackages.wayland
|
||||
gamemode
|
||||
gamescope
|
||||
mangohud
|
||||
prismlauncher
|
||||
openttd-jgrpp
|
||||
bottles
|
||||
|
||||
#sexyterm
|
||||
cbonsai
|
||||
pipes-rs
|
||||
cmatrix
|
||||
cava
|
||||
];
|
||||
|
||||
stateVersion = "23.05";
|
||||
};
|
||||
}
|
166
hosts/_/host.nix
Executable file
166
hosts/_/host.nix
Executable file
@ -0,0 +1,166 @@
|
||||
{
|
||||
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 = "intl";
|
||||
excludePackages = [ pkgs.xterm ];
|
||||
exportConfiguration = true;
|
||||
# libinput.touchpad.tapping = false;
|
||||
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;
|
||||
};
|
||||
|
||||
#documentation.nixos.enable = false;
|
||||
|
||||
services.fwupd.enable = true;
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.brillo.enable = true;
|
||||
services.blueman.enable = true;
|
||||
|
||||
programs.steam.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
programs.adb.enable = true;
|
||||
|
||||
programs.wireshark.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; [];
|
||||
};
|
||||
};
|
||||
|
||||
modules.battery_monitor.enable = true;
|
||||
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
users.sora = {
|
||||
isNormalUser = true;
|
||||
description = "sora";
|
||||
extraGroups = [ "networkmanager" "wheel" "vboxsf" "adbusers" "lp" "audio" "video" "docker" "wireshark"];
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
dconf
|
||||
gvfs
|
||||
sops
|
||||
|
||||
polkit_gnome
|
||||
nfs-utils
|
||||
bluez
|
||||
bluez-tools
|
||||
easyeffects
|
||||
|
||||
jre8
|
||||
jdk8
|
||||
jdk
|
||||
];
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
warn-dirty = false
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
'';
|
||||
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;
|
||||
packageOverrides = pkgs: rec{
|
||||
custom = import ../../pkgs { inherit pkgs; };
|
||||
};
|
||||
};
|
||||
nixpkgs.overlays = import ../../pkgs/overlay.nix { inherit pkgs; };
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
Reference in New Issue
Block a user