376 lines
7.6 KiB
Nix
376 lines
7.6 KiB
Nix
|
{
|
||
|
lib,
|
||
|
pkgs,
|
||
|
inputs,
|
||
|
...
|
||
|
}: {
|
||
|
imports = with inputs; [
|
||
|
./hardware.nix
|
||
|
|
||
|
nixos-apple-silicon.nixosModules.apple-silicon-support
|
||
|
];
|
||
|
|
||
|
hardware.asahi = {
|
||
|
useExperimentalGPUDriver = true;
|
||
|
experimentalGPUInstallMode = "replace";
|
||
|
setupAsahiSound = true;
|
||
|
peripheralFirmwareDirectory = ./firmware;
|
||
|
};
|
||
|
|
||
|
boot.kernelParams = [
|
||
|
"hid_apple.iso_layout=0"
|
||
|
"apple_dcp.show_notch=1"
|
||
|
];
|
||
|
|
||
|
networking = {
|
||
|
hostName = "canis-nix";
|
||
|
|
||
|
wireless.iwd = {
|
||
|
enable = true;
|
||
|
settings.General.EnableNetworkConfiguration = true;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
security = {
|
||
|
rtkit.enable = true;
|
||
|
|
||
|
pam = {
|
||
|
services.login.enableGnomeKeyring = true;
|
||
|
|
||
|
loginLimits = [
|
||
|
{
|
||
|
domain = "*";
|
||
|
item = "nofile";
|
||
|
type = "-";
|
||
|
value = "32768";
|
||
|
}
|
||
|
{
|
||
|
domain = "*";
|
||
|
item = "memlock";
|
||
|
type = "-";
|
||
|
value = "32768";
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
|
||
|
sudo-rs = {
|
||
|
enable = true;
|
||
|
wheelNeedsPassword = false;
|
||
|
execWheelOnly = true;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
fonts = {
|
||
|
packages = with pkgs.nerd-fonts;
|
||
|
[
|
||
|
_0xproto
|
||
|
_3270
|
||
|
agave
|
||
|
anonymice
|
||
|
arimo
|
||
|
aurulent-sans-mono
|
||
|
bigblue-terminal
|
||
|
bitstream-vera-sans-mono
|
||
|
blex-mono
|
||
|
caskaydia-cove
|
||
|
caskaydia-mono
|
||
|
code-new-roman
|
||
|
comic-shanns-mono
|
||
|
commit-mono
|
||
|
cousine
|
||
|
d2coding
|
||
|
daddy-time-mono
|
||
|
dejavu-sans-mono
|
||
|
departure-mono
|
||
|
droid-sans-mono
|
||
|
envy-code-r
|
||
|
fantasque-sans-mono
|
||
|
fira-code
|
||
|
fira-mono
|
||
|
geist-mono
|
||
|
go-mono
|
||
|
gohufont
|
||
|
hack
|
||
|
hasklug
|
||
|
heavy-data
|
||
|
hurmit
|
||
|
im-writing
|
||
|
inconsolata
|
||
|
inconsolata-go
|
||
|
inconsolata-lgc
|
||
|
intone-mono
|
||
|
iosevka
|
||
|
iosevka-term
|
||
|
iosevka-term-slab
|
||
|
jetbrains-mono
|
||
|
lekton
|
||
|
liberation
|
||
|
lilex
|
||
|
martian-mono
|
||
|
meslo-lg
|
||
|
monaspace
|
||
|
monofur
|
||
|
monoid
|
||
|
mononoki
|
||
|
mplus
|
||
|
noto
|
||
|
open-dyslexic
|
||
|
overpass
|
||
|
profont
|
||
|
proggy-clean-tt
|
||
|
recursive-mono
|
||
|
roboto-mono
|
||
|
sauce-code-pro
|
||
|
shure-tech-mono
|
||
|
space-mono
|
||
|
symbols-only
|
||
|
terminess-ttf
|
||
|
tinos
|
||
|
ubuntu
|
||
|
ubuntu-mono
|
||
|
ubuntu-sans
|
||
|
victor-mono
|
||
|
zed-mono
|
||
|
]
|
||
|
++ (with pkgs.iosevka-comfy; [
|
||
|
comfy
|
||
|
comfy-duo
|
||
|
comfy-fixed
|
||
|
comfy-motion
|
||
|
comfy-motion-duo
|
||
|
comfy-motion-fixed
|
||
|
comfy-wide
|
||
|
comfy-wide-duo
|
||
|
comfy-wide-fixed
|
||
|
comfy-wide-motion
|
||
|
comfy-wide-motion-duo
|
||
|
comfy-wide-motion-fixed
|
||
|
]);
|
||
|
};
|
||
|
|
||
|
console.catppuccin.enable = true;
|
||
|
|
||
|
systemd.user.extraConfig = let
|
||
|
path = lib.concatStringsSep ":" [
|
||
|
"/run/wrappers/bin"
|
||
|
"/etc/profiles/per-user/%u/bin"
|
||
|
"/nix/var/nix/profiles/default/bin"
|
||
|
"/run/current-system/sw/bin"
|
||
|
];
|
||
|
in ''
|
||
|
DefaultEnvironment="PATH=${path}"
|
||
|
'';
|
||
|
|
||
|
environment = {
|
||
|
sessionVariables = {
|
||
|
COSMIC_DATA_CONTROL_ENABLED = 1;
|
||
|
BROWSER = "zen";
|
||
|
DIRENV_WARN_TIMEOUT = "100s";
|
||
|
EDITOR = "nvim";
|
||
|
NIXOS_OZONE_WL = 1;
|
||
|
TERMINAL = "wezterm";
|
||
|
};
|
||
|
|
||
|
systemPackages = with pkgs; [
|
||
|
sound-theme-freedesktop
|
||
|
uutils-coreutils-noprefix
|
||
|
xclip
|
||
|
yt-dlp
|
||
|
(callPackage ./pkgs/sddm-theme-minesddm.nix {})
|
||
|
];
|
||
|
};
|
||
|
|
||
|
boot = {
|
||
|
loader = {
|
||
|
systemd-boot.enable = true;
|
||
|
efi.canTouchEfiVariables = true;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
nix = {
|
||
|
daemonCPUSchedPolicy = "batch";
|
||
|
daemonIOSchedClass = "idle";
|
||
|
daemonIOSchedPriority = 7;
|
||
|
|
||
|
gc = {
|
||
|
automatic = true;
|
||
|
dates = "Sat *-*-* 03:00";
|
||
|
options = "--delete-older-than 30d";
|
||
|
};
|
||
|
|
||
|
optimise = {
|
||
|
automatic = true;
|
||
|
dates = ["04:00"];
|
||
|
};
|
||
|
|
||
|
settings = {
|
||
|
auto-optimise-store = true;
|
||
|
builders-use-substitutes = true;
|
||
|
flake-registry = "/etc/nix/registry.json";
|
||
|
keep-going = true;
|
||
|
log-lines = 30;
|
||
|
max-jobs = "auto";
|
||
|
sandbox-fallback = false;
|
||
|
sandbox = true;
|
||
|
system-features = [
|
||
|
"nixos-test"
|
||
|
"kvm"
|
||
|
"recursive-nix"
|
||
|
"big-parallel"
|
||
|
"gccarch-x86-64-v4"
|
||
|
];
|
||
|
use-cgroups = true;
|
||
|
use-xdg-base-directories = true;
|
||
|
warn-dirty = false;
|
||
|
|
||
|
allowed-users = [
|
||
|
"root"
|
||
|
"@wheel"
|
||
|
"nix-builder"
|
||
|
];
|
||
|
trusted-users = [
|
||
|
"root"
|
||
|
"@wheel"
|
||
|
"nix-builder"
|
||
|
];
|
||
|
|
||
|
min-free = "${toString (5 * 1024 * 1024 * 1024)}";
|
||
|
max-free = "${toString (10 * 1024 * 1024 * 1024)}";
|
||
|
|
||
|
extra-experimental-features = [
|
||
|
"flakes" # flakes
|
||
|
"nix-command" # experimental nix commands
|
||
|
"recursive-nix" # let nix invoke itself
|
||
|
"ca-derivations" # content addressed nix
|
||
|
"auto-allocate-uids" # allow nix to automatically pick UIDs, rather than creating nixbld* user accounts
|
||
|
"cgroups" # allow nix to execute builds inside cgroups
|
||
|
];
|
||
|
|
||
|
substituters = [
|
||
|
"https://cache.nixos.org?priority=100"
|
||
|
"https://cache.privatevoid.net"
|
||
|
"https://cosmic.cachix.org/"
|
||
|
"https://cuda-maintainers.cachix.org"
|
||
|
"https://hyprland.cachix.org"
|
||
|
"https://nix-community.cachix.org"
|
||
|
];
|
||
|
|
||
|
trusted-public-keys = [
|
||
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||
|
"cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg="
|
||
|
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
|
||
|
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
|
||
|
programs = {
|
||
|
dconf.enable = true;
|
||
|
fish.enable = true;
|
||
|
gnupg.agent.enable = true;
|
||
|
|
||
|
appimage = {
|
||
|
enable = true;
|
||
|
binfmt = true;
|
||
|
};
|
||
|
|
||
|
hyprland = {
|
||
|
enable = true;
|
||
|
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||
|
};
|
||
|
|
||
|
nh = {
|
||
|
enable = true;
|
||
|
flake = "/home/marshall/nix-config";
|
||
|
};
|
||
|
|
||
|
obs-studio = {
|
||
|
enable = true;
|
||
|
enableVirtualCamera = true;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
time = {
|
||
|
hardwareClockInLocalTime = true;
|
||
|
timeZone = "America/New_York";
|
||
|
};
|
||
|
|
||
|
services = {
|
||
|
flatpak.enable = true;
|
||
|
getty.autologinUser = "marshall";
|
||
|
gnome.gnome-keyring.enable = true;
|
||
|
mullvad-vpn.enable = true;
|
||
|
openssh.enable = true;
|
||
|
|
||
|
displayManager.sddm = {
|
||
|
enable = true;
|
||
|
wayland.enable = true;
|
||
|
wayland.compositor = "kwin";
|
||
|
theme = "minesddm";
|
||
|
};
|
||
|
desktopManager.cosmic.enable = false;
|
||
|
|
||
|
libinput = {
|
||
|
enable = true;
|
||
|
touchpad.naturalScrolling = true;
|
||
|
};
|
||
|
|
||
|
pipewire = {
|
||
|
enable = true;
|
||
|
pulse.enable = true;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
users = {
|
||
|
mutableUsers = true;
|
||
|
|
||
|
users.marshall = {
|
||
|
isNormalUser = true;
|
||
|
shell = pkgs.fish;
|
||
|
|
||
|
extraGroups = [
|
||
|
"disk"
|
||
|
"gamemode"
|
||
|
"networkmanager"
|
||
|
"wheel"
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
|
||
|
snowfallorg.users.marshall = {
|
||
|
create = true;
|
||
|
admin = true;
|
||
|
};
|
||
|
|
||
|
home-manager.useGlobalPkgs = true;
|
||
|
|
||
|
hardware = {
|
||
|
bluetooth.enable = true;
|
||
|
i2c.enable = true;
|
||
|
|
||
|
graphics = {
|
||
|
enable = true;
|
||
|
extraPackages = with pkgs; [
|
||
|
vaapiVdpau
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
|
||
|
xdg.portal = {
|
||
|
enable = true;
|
||
|
xdgOpenUsePortal = true;
|
||
|
|
||
|
config.common.default = "*";
|
||
|
|
||
|
extraPortals = [
|
||
|
pkgs.xdg-desktop-portal-cosmic
|
||
|
pkgs.xdg-desktop-portal-gnome
|
||
|
pkgs.xdg-desktop-portal-gtk
|
||
|
];
|
||
|
};
|
||
|
|
||
|
system.stateVersion = "25.05";
|
||
|
}
|