Migrate to snowfall lib

This commit is contained in:
soraefir
2023-11-04 02:28:27 +01:00
parent a7ef5cf996
commit 99d64c588e
175 changed files with 3870 additions and 4002 deletions

View File

@ -0,0 +1,93 @@
{ 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;
};
}

View File

@ -0,0 +1,32 @@
{ config, inputs, ... }: {
imports = with inputs.hardware.nixosModules; [
./hardware-configuration.nix
common-cpu-intel
common-gpu-intel
];
hostcfg = {
hostname = "avalon";
username = "sora";
make = {
gui = false;
cli = true;
virt = true;
power = false;
game = false;
};
net = {
wlp = {
enable = false;
nif = "";
};
wg = {
enable = true;
ip4 = "10.10.1.2/32";
ip6 = "fd10:10:10::2/128";
pk = config.sops.secrets.avalon_wg_priv.path;
};
};
};
}

View File

@ -0,0 +1,32 @@
{ config, inputs, ... }: {
imports = with inputs.hardware.nixosModules; [
./hardware-configuration.nix
common-cpu-amd
common-gpu-amd
];
hostcfg = {
hostname = "iriy";
username = "sora";
make = {
gui = true;
cli = true;
virt = true;
power = false;
game = true;
};
net = {
wlp = {
enable = true;
nif = "wlp11s0";
};
wg = {
enable = true;
ip4 = "10.10.1.7/32";
ip6 = "fd10:10:10::7/128";
pk = config.sops.secrets.iriy_wg_priv.path;
};
};
};
}

View File

@ -0,0 +1,33 @@
{ 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 ];
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"; }];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.opengl.driSupport32Bit = true;
}

View File

@ -0,0 +1,32 @@
{ config, inputs, ... }: {
imports = with inputs.hardware.nixosModules; [
./hardware-configuration.nix
common-cpu-amd
common-gpu-amd
];
hostcfg = {
hostname = "valinor";
username = "sora";
make = {
gui = true;
cli = true;
virt = true;
power = true;
game = true;
};
net = {
wlp = {
enable = true;
nif = "wlp3s0";
};
wg = {
enable = true;
ip4 = "10.10.1.5/32";
ip6 = "fd10:10:10::5/128";
pk = config.sops.secrets.valinor_wg_priv.path;
};
};
};
}

View File

@ -0,0 +1,33 @@
{ 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 ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/e9713f83-ee3a-4fb1-806f-594c3bab7006";
fsType = "ext4";
};
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/F344-72E2";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/8bbeae2f-9431-4849-9b42-9f2655da596e"; }];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.opengl.driSupport32Bit = true;
}