switch to hyprland

This commit is contained in:
Mars 2024-05-28 04:08:06 -04:00
parent 80b6273752
commit f74047f29b
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
14 changed files with 1178 additions and 810 deletions

View file

@ -6,27 +6,33 @@
...
}:
with lib // pkgs // inputs; {
imports = [./hardware.nix];
security.sudo.extraConfig = ''
Defaults lecture = never, pwfeedback
'';
security.pam.loginLimits = [
{
domain = "*";
item = "nofile";
type = "-";
value = "32768";
}
{
domain = "*";
item = "memlock";
type = "-";
value = "32768";
}
imports = [
./hardware.nix
];
security = {
rtkit.enable = true;
pam.loginLimits = [
{
domain = "*";
item = "nofile";
type = "-";
value = "32768";
}
{
domain = "*";
item = "memlock";
type = "-";
value = "32768";
}
];
sudo.extraConfig = ''
Defaults lecture = never, pwfeedback
'';
};
console.catppuccin.enable = true;
systemd.user.extraConfig = let
@ -42,9 +48,7 @@ with lib // pkgs // inputs; {
age = {
secrets.passwd.file = /etc/secrets/passwd.age;
identityPaths = [
"/persist/root/.ssh/id_ed25519"
];
identityPaths = ["/persist/root/.ssh/id_ed25519"];
};
chaotic = {
@ -81,7 +85,9 @@ with lib // pkgs // inputs; {
environment = {
sessionVariables = {
BROWSER = "firefox-nightly";
EDITOR = "nvim";
TERMINAL = "wezterm";
DIRENV_WARN_TIMEOUT = "100s";
};
@ -91,6 +97,8 @@ with lib // pkgs // inputs; {
internal.lightly-boehs-qt6
snowfallorg.flake
sound-theme-freedesktop
winetricks
wineWowPackages.staging
xclip
yt-dlp
];
@ -101,15 +109,13 @@ with lib // pkgs // inputs; {
"/etc/NetworkManager"
"/etc/secrets"
"/etc/ssh"
"/etc/mullvad-vpn"
"/root/.ssh"
"/var/lib/bluetooth"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
];
files = [
"/etc/machine-id"
"/etc/git-credentials"
];
files = ["/etc/machine-id"];
};
};
@ -118,18 +124,9 @@ with lib // pkgs // inputs; {
kernelPackages = linuxPackages_cachyos;
supportedFilesystems = ["btrfs" "ntfs"];
binfmt.registrations.appimage = {
wrapInterpreterInShell = false;
interpreter = "${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'';
};
initrd.systemd = {
enable = true;
emergencyAccess = true; # No password needed bc of LUKS
emergencyAccess = true; # No password needed because of LUKS
};
plymouth = {
@ -208,6 +205,8 @@ with lib // pkgs // inputs; {
min-free = "${toString (5 * 1024 * 1024 * 1024)}";
max-free = "${toString (10 * 1024 * 1024 * 1024)}";
extra-sandbox-paths = [config.programs.ccache.cacheDir];
extra-experimental-features = [
"flakes" # flakes
"nix-command" # experimental nix commands
@ -219,40 +218,39 @@ with lib // pkgs // inputs; {
substituters = [
"https://cache.nixos.org"
"https://cache.privatevoid.net"
"https://cuda-maintainers.cachix.org"
"https://hyprland.cachix.org"
"https://nix-community.cachix.org"
"https://nyx.chaotic.cx/"
"https://cuda-maintainers.cachix.org"
"https://cache.privatevoid.net"
];
trusted-substituters = [
"cache.nixos.org"
"nix-community.cachix.org"
"nyx.chaotic.cx"
"cuda-maintainers.cachix.org"
"cache.privatevoid.net"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nyx.chaotic.cx-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
"cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg="
"chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
"cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nyx.chaotic.cx-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
];
};
};
programs = {
ccache.enable = true;
dconf.enable = true;
fish.enable = true;
gamemode.enable = true;
nix-ld.enable = true;
steam.enable = true;
gnupg.agent.enable = true;
virt-manager.enable = true;
hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};
nh = {
enable = true;
clean.enable = true;
@ -262,6 +260,7 @@ with lib // pkgs // inputs; {
};
networking = {
useDHCP = mkDefault true;
hostName = "navis";
firewall.enable = false;
nameservers = ["1.1.1.1" "1.0.0.1"];
@ -271,20 +270,27 @@ with lib // pkgs // inputs; {
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
services = {
btrfs.autoScrub.enable = true;
flatpak.enable = true;
getty.autologinUser = "marshall";
gnome.gnome-keyring.enable = true;
mullvad-vpn.enable = true;
ollama.enable = true;
openssh.enable = true;
spice-vdagentd.enable = true;
udisks2.enable = true;
displayManager.autoLogin = {
greetd = {
enable = true;
user = "marshall";
settings = rec {
initial_session = {
command = "${pkgs.hyprland}/bin/Hyprland";
user = "marshall";
};
default_session = initial_session;
};
};
libinput = {
@ -295,34 +301,12 @@ with lib // pkgs // inputs; {
xserver = {
enable = true;
videoDrivers = ["nvidia"];
xkb.layout = "us";
displayManager.startx = {
enable = true;
};
xrandrHeads = [
{
output = "DP-0";
monitorConfig = ''
Option "PreferredMode" "2560x1440_165.08"
'';
}
];
windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
enableConfiguredRecompile = true;
flake = {
enable = true;
compiler = "ghc982";
};
};
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
@ -340,6 +324,7 @@ with lib // pkgs // inputs; {
hardware = {
bluetooth.enable = true;
i2c.enable = true;
opengl = {
enable = true;
@ -354,7 +339,7 @@ with lib // pkgs // inputs; {
nvidia-container-toolkit.enable = true;
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.latest;
package = config.boot.kernelPackages.nvidiaPackages.beta;
modesetting.enable = true;
powerManagement.enable = true;
@ -367,17 +352,5 @@ with lib // pkgs // inputs; {
};
};
xdg.portal = {
enable = true;
config.common.default = "*";
xdgOpenUsePortal = true;
extraPortals = [
kdePackages.xdg-desktop-portal-kde
xdg-desktop-portal-gtk
xdg-desktop-portal-shana
];
};
system.stateVersion = "24.05";
}

View file

@ -15,6 +15,7 @@
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
boot.tmp.useTmpfs = true;
fileSystems."/" = {
device = "/dev/disk/by-uuid/d375c3a3-63a3-47f8-8b77-58fabbb8f67b";