[Init]
This commit is contained in:
27
hosts/_/cfg.nix
Normal file
27
hosts/_/cfg.nix
Normal 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
71
hosts/_/home.nix
Normal 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
155
hosts/_/host.nix
Normal 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";
|
||||
|
||||
}
|
112
hosts/asgard/default.nix
Normal file
112
hosts/asgard/default.nix
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [];
|
||||
|
||||
users.users.sora = {
|
||||
home = "/Users/sora";
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
networking = {
|
||||
computerName = "asgard";
|
||||
hostName = "asgard";
|
||||
};
|
||||
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
fonts = with pkgs; [
|
||||
ibm-plex
|
||||
openmoji-color
|
||||
material-design-icons
|
||||
];
|
||||
};
|
||||
|
||||
environment = {
|
||||
shells = with pkgs; [ zsh ];
|
||||
variables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "vscodium";
|
||||
};
|
||||
systemPackages = with pkgs; [
|
||||
git
|
||||
ranger
|
||||
|
||||
fd
|
||||
ripgrep
|
||||
];
|
||||
};
|
||||
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
nix-daemon.enable = true;
|
||||
};
|
||||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
onActivation = {
|
||||
autoUpdate = false;
|
||||
upgrade = false;
|
||||
cleanup = "zap";
|
||||
};
|
||||
brews = [
|
||||
"wireguard-tools"
|
||||
];
|
||||
casks = [
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
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://cache.nixos.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
system = {
|
||||
defaults = {
|
||||
NSGlobalDomain = {
|
||||
KeyRepeat = 1;
|
||||
NSAutomaticCapitalizationEnabled = false;
|
||||
NSAutomaticSpellingCorrectionEnabled = false;
|
||||
};
|
||||
dock = {
|
||||
autohide = true;
|
||||
orientation = "bottom";
|
||||
showhidden = true;
|
||||
tilesize = 40;
|
||||
};
|
||||
finder = {
|
||||
QuitMenuItem = false;
|
||||
};
|
||||
trackpad = {
|
||||
Clicking = true;
|
||||
TrackpadRightClick = true;
|
||||
};
|
||||
};
|
||||
activationScripts.postActivation.text = ''sudo chsh -s ${pkgs.zsh}/bin/zsh'';
|
||||
stateVersion = 4;
|
||||
};
|
||||
}
|
14
hosts/asgard/home.nix
Normal file
14
hosts/asgard/home.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [];
|
||||
stateVersion = "22.05";
|
||||
};
|
||||
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
# FIND SETTINGS FROM /home/cli/zsh
|
||||
};
|
||||
};
|
||||
}
|
32
hosts/iriy/default.nix
Executable file
32
hosts/iriy/default.nix
Executable file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
../_/cfg.nix
|
||||
./hardware-configuration.nix
|
||||
../_/host.nix
|
||||
];
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 8;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot/efi";
|
||||
};
|
||||
};
|
||||
|
||||
hostcfg = {
|
||||
hostname = "iriy";
|
||||
wlp_if = "wlp9s0";
|
||||
wg_ip4 = "10.10.1.7/24";
|
||||
wg_ip6 = "fd10:10:10::7/128";
|
||||
wg_pk = config.sops.secrets.iriy_wg_priv.path;
|
||||
};
|
||||
|
||||
}
|
37
hosts/iriy/hardware-configuration.nix
Executable file
37
hosts/iriy/hardware-configuration.nix
Executable file
@@ -0,0 +1,37 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "v4l2loopback" "kvm-amd" ];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback.out ];
|
||||
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/f612abce-6f3f-439a-8585-6a050e18b7fc";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot/efi" =
|
||||
{ device = "/dev/disk/by-uuid/349E-5086";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ {
|
||||
device = "/dev/disk/by-uuid/42394c4d-2c81-4917-82ff-75a548715a7d";
|
||||
}];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
}
|
9
hosts/iriy/home.nix
Executable file
9
hosts/iriy/home.nix
Executable file
@@ -0,0 +1,9 @@
|
||||
{config, pkgs, ...}:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
../_/home.nix
|
||||
];
|
||||
|
||||
}
|
33
hosts/valinor/default.nix
Executable file
33
hosts/valinor/default.nix
Executable file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
../_/cfg.nix
|
||||
./hardware-configuration.nix
|
||||
../_/host.nix
|
||||
];
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 8;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot/efi";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
hostcfg = {
|
||||
hostname = "valinor";
|
||||
wlp_if = "wlp9s0";
|
||||
wg_ip4 = "10.10.1.5/24";
|
||||
wg_ip6 = "fd10:10:10::5/128";
|
||||
wg_pk = config.sops.secrets.valinor_wg_priv.path;
|
||||
};
|
||||
|
||||
}
|
34
hosts/valinor/hardware-configuration.nix
Executable file
34
hosts/valinor/hardware-configuration.nix
Executable file
@@ -0,0 +1,34 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "ahci" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "v4l2loopback" "kvm-amd" ];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback.out ];
|
||||
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/6f1fc595-b751-4917-ba87-7b8b02713e6b";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot/efi" =
|
||||
{ device = "/dev/disk/by-uuid/B532-133F";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/72ff6aac-d445-4e46-a474-2f1d9be7ea87"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
}
|
9
hosts/valinor/home.nix
Executable file
9
hosts/valinor/home.nix
Executable file
@@ -0,0 +1,9 @@
|
||||
{config, pkgs, ...}:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
../_/home.nix
|
||||
];
|
||||
|
||||
}
|
Reference in New Issue
Block a user