mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-06-25 14:32:05 +02:00
Add new default host, move some environment variables, etc
This commit is contained in:
parent
f6213d5513
commit
5b4c1fb787
331
hosts/default/config.nix
Normal file
331
hosts/default/config.nix
Normal file
@ -0,0 +1,331 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
host,
|
||||||
|
inputs,
|
||||||
|
username,
|
||||||
|
options,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware.nix
|
||||||
|
./users.nix
|
||||||
|
../../modules/amd-drivers.nix
|
||||||
|
../../modules/nvidia-drivers.nix
|
||||||
|
../../modules/nvidia-prime-drivers.nix
|
||||||
|
../../modules/intel-drivers.nix
|
||||||
|
../../modules/vm-guest-services.nix
|
||||||
|
../../modules/local-hardware-clock.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Kernel
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages;
|
||||||
|
# boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||||
|
|
||||||
|
# Bootloader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
boot.kernel.sysctl = {
|
||||||
|
"vm.max_map_count" = 2147483642;
|
||||||
|
};
|
||||||
|
boot.tmp.useTmpfs = false;
|
||||||
|
boot.tmp.tmpfsSize = "30%";
|
||||||
|
boot.binfmt.registrations.appimage = {
|
||||||
|
wrapInterpreterInShell = false;
|
||||||
|
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
|
||||||
|
recognitionType = "magic";
|
||||||
|
offset = 0;
|
||||||
|
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
|
||||||
|
magicOrExtension = ''\x7fELF....AI\x02'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# This is for OBS Virtual Cam Support - v4l2loopback setup
|
||||||
|
boot.kernelModules = [ "v4l2loopback" ];
|
||||||
|
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# Enable networking
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
networking.hostName = "${host}";
|
||||||
|
networking.timeServers = options.networking.timeServers.default ++ [ "pool.ntp.org" ];
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "America/Chicago";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
hyprland = {
|
||||||
|
enable = true;
|
||||||
|
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
firefox.enable = true;
|
||||||
|
dconf.enable = true;
|
||||||
|
seahorse.enable = true;
|
||||||
|
fuse.userAllowOther = true;
|
||||||
|
mtr.enable = true;
|
||||||
|
gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
virt-manager.enable = true;
|
||||||
|
steam = {
|
||||||
|
enable = true;
|
||||||
|
gamescopeSession.enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
dedicatedServer.openFirewall = true;
|
||||||
|
};
|
||||||
|
thunar = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs.xfce; [ thunar-archive-plugin thunar-volman ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
users = {
|
||||||
|
mutableUsers = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages =
|
||||||
|
let
|
||||||
|
sugar = pkgs.callPackage ../../pkgs/sddm-sugar-dark.nix { };
|
||||||
|
tokyo-night = pkgs.libsForQt5.callPackage ../../pkgs/sddm-tokyo-night.nix { };
|
||||||
|
in
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
|
vim
|
||||||
|
wget
|
||||||
|
git
|
||||||
|
cmatrix
|
||||||
|
lolcat
|
||||||
|
neofetch
|
||||||
|
htop
|
||||||
|
libvirt
|
||||||
|
lxqt.lxqt-policykit
|
||||||
|
mangohud
|
||||||
|
lm_sensors
|
||||||
|
unzip
|
||||||
|
unrar
|
||||||
|
libnotify
|
||||||
|
eza
|
||||||
|
v4l-utils
|
||||||
|
ydotool
|
||||||
|
wl-clipboard
|
||||||
|
lm_sensors
|
||||||
|
pciutils
|
||||||
|
socat
|
||||||
|
cowsay
|
||||||
|
ripgrep
|
||||||
|
lsd
|
||||||
|
lshw
|
||||||
|
pkg-config
|
||||||
|
meson
|
||||||
|
gnumake
|
||||||
|
ninja
|
||||||
|
symbola
|
||||||
|
noto-fonts-color-emoji
|
||||||
|
material-icons
|
||||||
|
brightnessctl
|
||||||
|
virt-viewer
|
||||||
|
swappy
|
||||||
|
appimage-run
|
||||||
|
networkmanagerapplet
|
||||||
|
yad
|
||||||
|
playerctl
|
||||||
|
nh
|
||||||
|
nixfmt-rfc-style
|
||||||
|
discord
|
||||||
|
libvirt
|
||||||
|
swww
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
gnome.file-roller
|
||||||
|
swaynotificationcenter
|
||||||
|
imv
|
||||||
|
transmission-gtk
|
||||||
|
distrobox
|
||||||
|
mpv
|
||||||
|
gimp
|
||||||
|
obs-studio
|
||||||
|
rustup
|
||||||
|
audacity
|
||||||
|
pavucontrol
|
||||||
|
tree
|
||||||
|
protonup-qt
|
||||||
|
font-awesome
|
||||||
|
spotify
|
||||||
|
neovide
|
||||||
|
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||||
|
sugar.sddm-sugar-dark # Name: sugar-dark
|
||||||
|
tokyo-night # Name: tokyo-night-sddm
|
||||||
|
pkgs.libsForQt5.qt5.qtgraphicaleffects
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
ZANEYOS_VERSION = "2.0";
|
||||||
|
ZANEYOS = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Services to start
|
||||||
|
services = {
|
||||||
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager.sddm = {
|
||||||
|
enable = true;
|
||||||
|
autoNumlock = true;
|
||||||
|
wayland.enable = true;
|
||||||
|
theme = "sugar-dark";
|
||||||
|
};
|
||||||
|
desktopManager.cinnamon.enable = false;
|
||||||
|
xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
smartd = {
|
||||||
|
enable = true;
|
||||||
|
autodetect = true;
|
||||||
|
};
|
||||||
|
libinput.enable = true;
|
||||||
|
openssh.enable = true;
|
||||||
|
flatpak.enable = false;
|
||||||
|
printing.enable = true;
|
||||||
|
gnome.gnome-keyring.enable = true;
|
||||||
|
avahi = {
|
||||||
|
enable = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
ipp-usb.enable = true;
|
||||||
|
syncthing = {
|
||||||
|
enable = false;
|
||||||
|
user = "${username}";
|
||||||
|
dataDir = "/home/${username}";
|
||||||
|
configDir = "/home/${username}/.config/syncthing";
|
||||||
|
};
|
||||||
|
pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
rpcbind.enable = true;
|
||||||
|
nfs.server.enable = true;
|
||||||
|
};
|
||||||
|
systemd.services.flatpak-repo = {
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
path = [ pkgs.flatpak ];
|
||||||
|
script = ''
|
||||||
|
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
hardware.sane = {
|
||||||
|
enable = true;
|
||||||
|
extraBackends = [ pkgs.sane-airscan ];
|
||||||
|
disabledDefaultBackends = [ "escl" ];
|
||||||
|
};
|
||||||
|
hardware.logitech.wireless.enable = true;
|
||||||
|
hardware.logitech.wireless.enableGraphical = true;
|
||||||
|
# Enable sound with pipewire.
|
||||||
|
sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
|
||||||
|
# Security / Polkit
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
security.polkit.enable = true;
|
||||||
|
security.polkit.extraConfig = ''
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if (
|
||||||
|
subject.isInGroup("users")
|
||||||
|
&& (
|
||||||
|
action.id == "org.freedesktop.login1.reboot" ||
|
||||||
|
action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
|
||||||
|
action.id == "org.freedesktop.login1.power-off" ||
|
||||||
|
action.id == "org.freedesktop.login1.power-off-multiple-sessions"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return polkit.Result.YES;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Optimization settings and garbage collection automation
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
auto-optimise-store = true;
|
||||||
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
substituters = [ "https://hyprland.cachix.org" ];
|
||||||
|
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
|
||||||
|
};
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Virtualization / Containers
|
||||||
|
virtualisation.libvirtd.enable = true;
|
||||||
|
virtualisation.podman = {
|
||||||
|
enable = true;
|
||||||
|
dockerCompat = true;
|
||||||
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# OpenGL
|
||||||
|
hardware.opengl = {
|
||||||
|
enable = true;
|
||||||
|
driSupport = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Extra Module Options
|
||||||
|
drivers.amdgpu.enable = true;
|
||||||
|
drivers.nvidia.enable = false;
|
||||||
|
drivers.nvidia-prime = {
|
||||||
|
enable = false;
|
||||||
|
intelBusID = "";
|
||||||
|
nvidiaBusID = "";
|
||||||
|
};
|
||||||
|
drivers.intel.enable = false;
|
||||||
|
vm.guest-services.enable = false;
|
||||||
|
local.hardware-clock.enable = false;
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
# this value at the release version of the first install of this system.
|
||||||
|
# Before changing this value read the documentation for this option
|
||||||
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
|
}
|
@ -1,51 +1,30 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{
|
{ config, lib, modulesPath, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "sd_mod" ];
|
||||||
"xhci_pci"
|
|
||||||
"ahci"
|
|
||||||
"nvme"
|
|
||||||
"usbhid"
|
|
||||||
"sd_mod"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" =
|
||||||
device = "/dev/disk/by-uuid/362d23fa-3cbd-4ee1-9c27-ea8c30242ec3";
|
{ device = "/dev/disk/by-uuid/9e36b8f0-e272-4e69-99ad-dba17949887f";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-cdf913d6-7149-4a8f-9461-61c394b2f5af".device = "/dev/disk/by-uuid/cdf913d6-7149-4a8f-9461-61c394b2f5af";
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/7CBF-413D";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/home/zaney/Documents" = {
|
swapDevices = [ ];
|
||||||
device = "/dev/disk/by-uuid/35f6d96f-0837-4868-8ce5-8e1df5e3b2f3";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/C598-AF28";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/home/zaney/Videos" = {
|
|
||||||
device = "/dev/disk/by-uuid/cbe1beaf-6c7f-4251-ad5c-2897aecc367d";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [ { device = "/dev/disk/by-uuid/8160cef0-c5eb-4caa-9ef5-56a5b4eb51b8"; } ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
@ -53,8 +32,8 @@
|
|||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.enp7s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.enp7s0.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.wlp0s20u10.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
447
hosts/default/home.nix
Normal file
447
hosts/default/home.nix
Normal file
@ -0,0 +1,447 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
username,
|
||||||
|
host,
|
||||||
|
gtkThemeFromScheme,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
palette = config.colorScheme.palette;
|
||||||
|
inherit (import ./variables.nix)
|
||||||
|
gitUsername
|
||||||
|
gitEmail
|
||||||
|
theme
|
||||||
|
;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Home Manager Settings
|
||||||
|
home.username = "${username}";
|
||||||
|
home.homeDirectory = "/home/${username}";
|
||||||
|
home.stateVersion = "23.11";
|
||||||
|
|
||||||
|
# Set The Colorscheme
|
||||||
|
colorScheme = inputs.nix-colors.colorSchemes."${theme}";
|
||||||
|
|
||||||
|
# Import Program Configurations
|
||||||
|
imports = [
|
||||||
|
inputs.nix-colors.homeManagerModules.default
|
||||||
|
inputs.hyprland.homeManagerModules.default
|
||||||
|
../../config/hyprland.nix
|
||||||
|
../../config/swaync.nix
|
||||||
|
../../config/waybar.nix
|
||||||
|
../../config/wlogout.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Define Settings For Xresources
|
||||||
|
xresources.properties = {
|
||||||
|
"Xcursor.size" = 24;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Place Files Inside Home Directory
|
||||||
|
home.file."Pictures/Wallpapers" = {
|
||||||
|
source = ../../config/wallpapers;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
home.file.".config/wlogout/icons" = {
|
||||||
|
source = ../../config/wlogout;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
home.file.".local/share/fonts" = {
|
||||||
|
source = ../../config/fonts;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
home.file.".config/starship.toml".source = ../../config/starship.toml;
|
||||||
|
home.file.".config/ascii-neofetch".source = ../../config/ascii-neofetch;
|
||||||
|
home.file.".base16-themes".source = ../../config/base16-themes;
|
||||||
|
home.file.".emoji".source = ../../config/emoji;
|
||||||
|
home.file.".face.icon".source = ../../config/face.jpg;
|
||||||
|
home.file.".config/neofetch/config.conf".text = ''
|
||||||
|
print_info() {
|
||||||
|
prin "$(color 6) ZaneyOS $ZANEYOS_VERSION"
|
||||||
|
info underline
|
||||||
|
info "$(color 7) VER" kernel
|
||||||
|
info "$(color 2) UP " uptime
|
||||||
|
info "$(color 4) PKG" packages
|
||||||
|
info "$(color 6) DE " de
|
||||||
|
info "$(color 5) TER" term
|
||||||
|
info "$(color 3) CPU" cpu
|
||||||
|
info "$(color 7) GPU" gpu
|
||||||
|
info "$(color 5) MEM" memory
|
||||||
|
prin " "
|
||||||
|
prin "$(color 1) $(color 2) $(color 3) $(color 4) $(color 5) $(color 6) $(color 7) $(color 8)"
|
||||||
|
}
|
||||||
|
distro_shorthand="on"
|
||||||
|
memory_unit="gib"
|
||||||
|
cpu_temp="C"
|
||||||
|
separator=" $(color 4)>"
|
||||||
|
stdout="off"
|
||||||
|
'';
|
||||||
|
home.file.".config/swappy/config".text = ''
|
||||||
|
[Default]
|
||||||
|
save_dir=/home/${username}/Pictures/Screenshots
|
||||||
|
save_filename_format=swappy-%Y%m%d-%H%M%S.png
|
||||||
|
show_panel=false
|
||||||
|
line_size=5
|
||||||
|
text_size=20
|
||||||
|
text_font=Ubuntu
|
||||||
|
paint_mode=brush
|
||||||
|
early_exit=true
|
||||||
|
fill_shape=false
|
||||||
|
'';
|
||||||
|
|
||||||
|
|
||||||
|
# Install & Configure Git
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = "${gitUsername}";
|
||||||
|
userEmail = "${gitEmail}";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Create XDG Dirs
|
||||||
|
xdg = {
|
||||||
|
userDirs = {
|
||||||
|
enable = true;
|
||||||
|
createDirectories = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
dconf.settings = {
|
||||||
|
"org/virt-manager/virt-manager/connections" = {
|
||||||
|
autoconnect = [ "qemu:///system" ];
|
||||||
|
uris = [ "qemu:///system" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure Cursor Theme
|
||||||
|
home.pointerCursor = {
|
||||||
|
gtk.enable = true;
|
||||||
|
x11.enable = true;
|
||||||
|
package = pkgs.bibata-cursors;
|
||||||
|
name = "Bibata-Modern-Ice";
|
||||||
|
size = 24;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Theme GTK
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
font = {
|
||||||
|
name = "Ubuntu";
|
||||||
|
size = 12;
|
||||||
|
package = pkgs.ubuntu_font_family;
|
||||||
|
};
|
||||||
|
theme = {
|
||||||
|
name = "${config.colorScheme.slug}";
|
||||||
|
package = gtkThemeFromScheme { scheme = config.colorScheme; };
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus-Dark";
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
gtk4.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Theme QT -> GTK
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme = "gtk";
|
||||||
|
style = {
|
||||||
|
name = "adwaita-dark";
|
||||||
|
package = pkgs.adwaita-qt;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Scripts
|
||||||
|
home.packages = [
|
||||||
|
(import ../../scripts/emopicker9000.nix { inherit pkgs; })
|
||||||
|
(import ../../scripts/task-waybar.nix { inherit pkgs; })
|
||||||
|
(import ../../scripts/squirtle.nix { inherit pkgs; })
|
||||||
|
(import ../../scripts/themechange.nix {
|
||||||
|
inherit pkgs;
|
||||||
|
inherit host;
|
||||||
|
inherit username;
|
||||||
|
})
|
||||||
|
(import ../../scripts/theme-selector.nix { inherit pkgs; })
|
||||||
|
(import ../../scripts/nvidia-offload.nix { inherit pkgs; })
|
||||||
|
(import ../../scripts/wallsetter.nix {
|
||||||
|
inherit pkgs;
|
||||||
|
inherit username;
|
||||||
|
})
|
||||||
|
(import ../../scripts/web-search.nix { inherit pkgs; })
|
||||||
|
(import ../../scripts/rofi-launcher.nix { inherit pkgs; })
|
||||||
|
(import ../../scripts/screenshootin.nix { inherit pkgs; })
|
||||||
|
(import ../../scripts/list-hypr-bindings.nix {
|
||||||
|
inherit pkgs;
|
||||||
|
inherit host;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
gh.enable = true;
|
||||||
|
neovim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
vimdiffAlias = true;
|
||||||
|
withNodeJs = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
lua-language-server
|
||||||
|
gopls
|
||||||
|
xclip
|
||||||
|
wl-clipboard
|
||||||
|
luajitPackages.lua-lsp
|
||||||
|
nil
|
||||||
|
rust-analyzer
|
||||||
|
nodePackages.bash-language-server
|
||||||
|
yaml-language-server
|
||||||
|
pyright
|
||||||
|
marksman
|
||||||
|
];
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
alpha-nvim
|
||||||
|
auto-session
|
||||||
|
bufferline-nvim
|
||||||
|
dressing-nvim
|
||||||
|
indent-blankline-nvim
|
||||||
|
nvim-treesitter.withAllGrammars
|
||||||
|
lualine-nvim
|
||||||
|
nvim-autopairs
|
||||||
|
nvim-web-devicons
|
||||||
|
nvim-cmp
|
||||||
|
nvim-surround
|
||||||
|
nvim-lspconfig
|
||||||
|
cmp-nvim-lsp
|
||||||
|
cmp-buffer
|
||||||
|
luasnip
|
||||||
|
cmp_luasnip
|
||||||
|
friendly-snippets
|
||||||
|
lspkind-nvim
|
||||||
|
comment-nvim
|
||||||
|
nvim-ts-context-commentstring
|
||||||
|
{
|
||||||
|
plugin = dracula-nvim;
|
||||||
|
config = "colorscheme dracula";
|
||||||
|
}
|
||||||
|
plenary-nvim
|
||||||
|
neodev-nvim
|
||||||
|
luasnip
|
||||||
|
telescope-nvim
|
||||||
|
todo-comments-nvim
|
||||||
|
nvim-tree-lua
|
||||||
|
telescope-fzf-native-nvim
|
||||||
|
vim-tmux-navigator
|
||||||
|
];
|
||||||
|
extraConfig = ''
|
||||||
|
set noemoji
|
||||||
|
'';
|
||||||
|
extraLuaConfig = ''
|
||||||
|
${builtins.readFile ../../config/nvim/options.lua}
|
||||||
|
${builtins.readFile ../../config/nvim/keymaps.lua}
|
||||||
|
${builtins.readFile ../../config/nvim/plugins/alpha.lua}
|
||||||
|
${builtins.readFile ../../config/nvim/plugins/autopairs.lua}
|
||||||
|
${builtins.readFile ../../config/nvim/plugins/auto-session.lua}
|
||||||
|
${builtins.readFile ../../config/nvim/plugins/comment.lua}
|
||||||
|
${builtins.readFile ../../config/nvim/plugins/cmp.lua}
|
||||||
|
${builtins.readFile ../../config/nvim/plugins/lsp.lua}
|
||||||
|
${builtins.readFile ../../config/nvim/plugins/nvim-tree.lua}
|
||||||
|
${builtins.readFile ../../config/nvim/plugins/telescope.lua}
|
||||||
|
${builtins.readFile ../../config/nvim/plugins/todo-comments.lua}
|
||||||
|
${builtins.readFile ../../config/nvim/plugins/treesitter.lua}
|
||||||
|
require("ibl").setup()
|
||||||
|
require("bufferline").setup{}
|
||||||
|
require("lualine").setup({
|
||||||
|
icons_enabled = true,
|
||||||
|
theme = 'dracula',
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
kitty = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.kitty;
|
||||||
|
font.name = "JetBrainsMono Nerd Font";
|
||||||
|
font.size = 16;
|
||||||
|
settings = {
|
||||||
|
scrollback_lines = 2000;
|
||||||
|
wheel_scroll_min_lines = 1;
|
||||||
|
window_padding_width = 4;
|
||||||
|
confirm_os_window_close = 0;
|
||||||
|
background_opacity = "0.9";
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
foreground #${palette.base05}
|
||||||
|
background #${palette.base00}
|
||||||
|
color0 #${palette.base03}
|
||||||
|
color1 #${palette.base08}
|
||||||
|
color2 #${palette.base0B}
|
||||||
|
color3 #${palette.base09}
|
||||||
|
color4 #${palette.base0D}
|
||||||
|
color5 #${palette.base0E}
|
||||||
|
color6 #${palette.base0C}
|
||||||
|
color7 #${palette.base06}
|
||||||
|
color8 #${palette.base04}
|
||||||
|
color9 #${palette.base08}
|
||||||
|
color10 #${palette.base0B}
|
||||||
|
color11 #${palette.base0A}
|
||||||
|
color12 #${palette.base0C}
|
||||||
|
color13 #${palette.base0E}
|
||||||
|
color14 #${palette.base0C}
|
||||||
|
color15 #${palette.base07}
|
||||||
|
color16 #${palette.base00}
|
||||||
|
color17 #${palette.base0F}
|
||||||
|
color18 #${palette.base0B}
|
||||||
|
color19 #${palette.base09}
|
||||||
|
color20 #${palette.base0D}
|
||||||
|
color21 #${palette.base0E}
|
||||||
|
color22 #${palette.base0C}
|
||||||
|
color23 #${palette.base06}
|
||||||
|
cursor #${palette.base07}
|
||||||
|
cursor_text_color #${palette.base00}
|
||||||
|
selection_foreground #${palette.base01}
|
||||||
|
selection_background #${palette.base0D}
|
||||||
|
url_color #${palette.base0C}
|
||||||
|
active_border_color #${palette.base04}
|
||||||
|
inactive_border_color #${palette.base00}
|
||||||
|
bell_border_color #${palette.base03}
|
||||||
|
tab_bar_style fade
|
||||||
|
tab_fade 1
|
||||||
|
active_tab_foreground #${palette.base04}
|
||||||
|
active_tab_background #${palette.base00}
|
||||||
|
active_tab_font_style bold
|
||||||
|
inactive_tab_foreground #${palette.base07}
|
||||||
|
inactive_tab_background #${palette.base08}
|
||||||
|
inactive_tab_font_style bold
|
||||||
|
tab_bar_background #${palette.base00}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
starship = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.starship;
|
||||||
|
};
|
||||||
|
wofi = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
allow_images = true;
|
||||||
|
prompt = "Run Programs...";
|
||||||
|
width = "35%";
|
||||||
|
hide_scroll = true;
|
||||||
|
term = "kitty";
|
||||||
|
show = "drun";
|
||||||
|
};
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: JetBrainsMono Nerd Font Mono,monospace;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
#window {
|
||||||
|
border-radius: 25px;
|
||||||
|
border: 2px solid #${palette.base08};
|
||||||
|
background: #${palette.base00};
|
||||||
|
}
|
||||||
|
#input {
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 2px solid #${palette.base0B};
|
||||||
|
margin: 20px;
|
||||||
|
padding: 15px 25px;
|
||||||
|
background: #${palette.base00};
|
||||||
|
color: #${palette.base05};
|
||||||
|
}
|
||||||
|
#inner-box {
|
||||||
|
border: none;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
#outer-box {
|
||||||
|
border: none;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
#text {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
#entry {
|
||||||
|
margin: 10px 80px;
|
||||||
|
padding: 20px 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
#entry:focus {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
#entry:hover {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
#entry:selected {
|
||||||
|
background-color: #${palette.base0F};
|
||||||
|
color: #${palette.base00};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
bash = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
profileExtra = ''
|
||||||
|
#if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
|
||||||
|
# exec Hyprland
|
||||||
|
#fi
|
||||||
|
'';
|
||||||
|
initExtra = ''
|
||||||
|
neofetch
|
||||||
|
if [ -f $HOME/.bashrc-personal ]; then
|
||||||
|
source $HOME/.bashrc-personal
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
shellAliases = {
|
||||||
|
sv = "sudo nvim";
|
||||||
|
flake-rebuild = "nh os switch --hostname ${host} /home/${username}/zaneyos";
|
||||||
|
flake-update = "nh os switch --hostname ${host} --update";
|
||||||
|
gcCleanup = "nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
|
||||||
|
v = "nvim";
|
||||||
|
ls = "lsd";
|
||||||
|
ll = "lsd -l";
|
||||||
|
la = "lsd -a";
|
||||||
|
lal = "lsd -al";
|
||||||
|
".." = "cd ..";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home-manager.enable = true;
|
||||||
|
hyprlock = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
disable_loading_bar = true;
|
||||||
|
grace = 10;
|
||||||
|
hide_cursor = true;
|
||||||
|
no_fade_in = false;
|
||||||
|
};
|
||||||
|
background = [
|
||||||
|
{
|
||||||
|
path = "/home/${username}/Pictures/Wallpapers/zaney-wallpaper.jpg";
|
||||||
|
blur_passes = 3;
|
||||||
|
blur_size = 8;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
input-field = [
|
||||||
|
{
|
||||||
|
size = "200, 50";
|
||||||
|
position = "0, -80";
|
||||||
|
monitor = "";
|
||||||
|
dots_center = true;
|
||||||
|
fade_on_empty = false;
|
||||||
|
font_color = "rgb(202, 211, 245)";
|
||||||
|
inner_color = "rgb(91, 96, 120)";
|
||||||
|
outer_color = "rgb(24, 25, 38)";
|
||||||
|
outline_thickness = 5;
|
||||||
|
placeholder_text = "Password...";
|
||||||
|
shadow_passes = 2;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1,91 +0,0 @@
|
|||||||
# PLEASE READ THE WIKI FOR DETERMINING
|
|
||||||
# WHAT TO PUT HERE AS OPTIONS.
|
|
||||||
# https://gitlab.com/Zaney/zaneyos/-/wikis/Setting-Options
|
|
||||||
|
|
||||||
let
|
|
||||||
setUsername = "defaultuser";
|
|
||||||
setHostname = "nixos";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
# No Change Needed Below
|
|
||||||
username = "${setUsername}";
|
|
||||||
hostname = "${setHostname}";
|
|
||||||
userHome = "/home/${setUsername}";
|
|
||||||
flakeDir = "/home/${setUsername}/zaneyos";
|
|
||||||
wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git"; # Can be changed IF you know what your doing
|
|
||||||
wallpaperDir = "/home/${setUsername}/Pictures/Wallpapers";
|
|
||||||
screenshotDir = "/home/${setUsername}/Pictures/Screenshots";
|
|
||||||
flakePrev = "/home/${setUsername}/.zaneyos-previous";
|
|
||||||
flakeBackup = "/home/${setUsername}/.zaneyos-backup";
|
|
||||||
|
|
||||||
# Git Configuration ( For Pulling Software Repos )
|
|
||||||
gitUsername = "John Smith";
|
|
||||||
gitEmail = "johnsmith@gmail.com";
|
|
||||||
|
|
||||||
# Base16 Theme
|
|
||||||
theme = "atelier-cave";
|
|
||||||
|
|
||||||
# Hyprland Settings
|
|
||||||
borderAnim = true; # Enable / Disable Hyprland Border Animation
|
|
||||||
extraMonitorSettings = "";
|
|
||||||
|
|
||||||
# Waybar Settings
|
|
||||||
waybarAnim = true; # Enable / Disable Waybar Animation CSS
|
|
||||||
bar-number = true; # Enable / Disable Workspace Numbers In Waybar
|
|
||||||
|
|
||||||
# System Settings
|
|
||||||
clock24h = false;
|
|
||||||
theLocale = "en_US.UTF-8";
|
|
||||||
theKBDLayout = "us";
|
|
||||||
theSecondKBDLayout = "de";
|
|
||||||
theKBDVariant = "";
|
|
||||||
theLCVariables = "en_US.UTF-8";
|
|
||||||
theTimezone = "America/Chicago";
|
|
||||||
theShell = "bash"; # Possible options: bash, zsh
|
|
||||||
theKernel = "zen"; # Possible options: default, latest, lqx, xanmod, zen
|
|
||||||
sdl-videodriver = "x11"; # Either x11 or wayland ONLY. Games might require x11 set here
|
|
||||||
# For Hybrid Systems intel-nvidia
|
|
||||||
# Should Be Used As gpuType
|
|
||||||
cpuType = "intel";
|
|
||||||
gpuType = "intel";
|
|
||||||
|
|
||||||
# Nvidia Hybrid Devices ONLY NEEDED FOR HYBRID SYSTEMS!
|
|
||||||
intel-bus-id = "PCI:1:0:0";
|
|
||||||
nvidia-bus-id = "PCI:0:2:0";
|
|
||||||
|
|
||||||
# Enable / Setup NFS
|
|
||||||
nfs = false;
|
|
||||||
nfsMountPoint = "/mnt/nas";
|
|
||||||
nfsDevice = "nas:/volume1/nas";
|
|
||||||
|
|
||||||
# NTP & HWClock Settings
|
|
||||||
ntp = true;
|
|
||||||
localHWClock = false;
|
|
||||||
|
|
||||||
# Enable Printer & Scanner Support
|
|
||||||
printer = true;
|
|
||||||
|
|
||||||
# Program Options
|
|
||||||
browser = "firefox"; # Install & Set Default Browser
|
|
||||||
terminal = "kitty"; # Set Default System Terminal
|
|
||||||
distrobox = false;
|
|
||||||
flatpak = false;
|
|
||||||
kdenlive = false;
|
|
||||||
blender = false;
|
|
||||||
enableZeroAD = false;
|
|
||||||
|
|
||||||
# Enable Support For
|
|
||||||
# Logitech Devices
|
|
||||||
logitech = false;
|
|
||||||
|
|
||||||
# Enable Terminals ( If You Disable All You Get Kitty )
|
|
||||||
wezterm = false;
|
|
||||||
alacritty = false;
|
|
||||||
kitty = true;
|
|
||||||
|
|
||||||
# Enable Python & PyCharm
|
|
||||||
python = false;
|
|
||||||
|
|
||||||
# Enable SyncThing
|
|
||||||
syncthing = false;
|
|
||||||
}
|
|
39
hosts/default/users.nix
Normal file
39
hosts/default/users.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
host,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (import ./variables.nix) gitUsername;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
users.users = {
|
||||||
|
"${username}" = {
|
||||||
|
homeMode = "755";
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "${gitUsername}";
|
||||||
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"libvirtd"
|
||||||
|
"scanner"
|
||||||
|
"lp"
|
||||||
|
];
|
||||||
|
shell = pkgs.bash;
|
||||||
|
ignoreShellProgramCheck = true;
|
||||||
|
packages = with pkgs; [ ];
|
||||||
|
};
|
||||||
|
# "newuser" = {
|
||||||
|
# homeMode = "755";
|
||||||
|
# isNormalUser = true;
|
||||||
|
# description = "New user account";
|
||||||
|
# extraGroups = [ "networkmanager" "wheel" "libvirtd" ];
|
||||||
|
# shell = pkgs.bash;
|
||||||
|
# ignoreShellProgramCheck = true;
|
||||||
|
# packages = with pkgs; [];
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
}
|
20
hosts/default/variables.nix
Normal file
20
hosts/default/variables.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
# Git Configuration ( For Pulling Software Repos )
|
||||||
|
gitUsername = "John Smith";
|
||||||
|
gitEmail = "example@gmail.com";
|
||||||
|
|
||||||
|
# Base16 Theme
|
||||||
|
theme = "dracula";
|
||||||
|
|
||||||
|
# Hyprland Settings
|
||||||
|
borderAnim = true; # Enable / Disable Hyprland Border Animation
|
||||||
|
extraMonitorSettings = "";
|
||||||
|
|
||||||
|
# Waybar Settings
|
||||||
|
clock24h = false;
|
||||||
|
waybarAnimations = false;
|
||||||
|
|
||||||
|
# Program Options
|
||||||
|
browser = "firefox"; # Set Default Browser
|
||||||
|
terminal = "kitty"; # Set Default System Terminal
|
||||||
|
}
|
@ -115,6 +115,7 @@
|
|||||||
[
|
[
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
|
handbrake
|
||||||
git
|
git
|
||||||
cmatrix
|
cmatrix
|
||||||
lolcat
|
lolcat
|
||||||
@ -133,6 +134,7 @@
|
|||||||
wl-clipboard
|
wl-clipboard
|
||||||
lm_sensors
|
lm_sensors
|
||||||
pciutils
|
pciutils
|
||||||
|
ffmpeg
|
||||||
socat
|
socat
|
||||||
cowsay
|
cowsay
|
||||||
ripgrep
|
ripgrep
|
||||||
|
@ -60,7 +60,6 @@ git clone https://gitlab.com/zaney/zaneyos.git
|
|||||||
cd zaneyos || exit
|
cd zaneyos || exit
|
||||||
mkdir hosts/"$hostName"
|
mkdir hosts/"$hostName"
|
||||||
cp hosts/default/*.nix hosts/"$hostName"
|
cp hosts/default/*.nix hosts/"$hostName"
|
||||||
git add .
|
|
||||||
sed -i "/^\s*host[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$hostName\"/" ./flake.nix
|
sed -i "/^\s*host[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$hostName\"/" ./flake.nix
|
||||||
|
|
||||||
echo "-----"
|
echo "-----"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user