Reorganize files

This commit is contained in:
Henry Hiles 2023-12-24 11:01:25 -05:00
parent 2fc4f2dd4a
commit a32dfc1089
32 changed files with 260 additions and 398 deletions

View file

@ -0,0 +1 @@
{services.auto-cpufreq.enable = true;}

View file

@ -0,0 +1 @@
{self, ...}: {environment.etc."backup".source = self;}

10
modules/common/boot.nix Normal file
View file

@ -0,0 +1,10 @@
{pkgs, ...}: {
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
kernelPackages = pkgs.linuxPackages_zen;
kernelParams = ["sysrq_always_enabled=1"];
};
}

View file

@ -0,0 +1,8 @@
{
inputs,
pkgs,
...
}: {
programs.command-not-found.dbPath = "/etc/programs.sqlite";
environment.etc."programs.sqlite".source = inputs.programsdb.packages.${pkgs.system}.programs-sqlite;
}

View file

@ -0,0 +1,6 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
micro
prettyping
];
}

View file

@ -0,0 +1,6 @@
{
security.rtkit.enable = true;
nixpkgs.config.allowUnfree = true;
time.timeZone = "America/Toronto";
i18n.defaultLocale = "en_CA.UTF-8";
}

View file

@ -0,0 +1,6 @@
{
services.earlyoom = {
enable = true;
enableNotifications = true;
};
}

View file

@ -0,0 +1 @@
{nix.settings.experimental-features = ["nix-command" "flakes"];}

39
modules/common/fish.nix Normal file
View file

@ -0,0 +1,39 @@
{pkgs, ...}: {
programs.fish = {
enable = true;
interactiveShellInit = "neofetch";
};
environment = {
systemPackages = [pkgs.hyfetch];
sessionVariables.fish_greeting = "";
shells = [pkgs.fish];
shellAliases = {
# Utility
cat = "bat";
rm = "gio trash";
free = "free -h";
ping = "prettyping";
neofetch = "neowofetch";
shutdown = "shutdown now";
# Git
clone = "gh repo clone";
create = "gh repo create";
push = "git push";
commit = "git add -A && git commit -am";
# NixOS
dev = "nix develop";
garbage = "sudo nix-collect-garbage -d";
flake = "$EDITOR ~/.config/nixos/flake.nix";
common = "$EDITOR ~/.config/nixos/common.nix";
format = "cd ~/.config/nixos/ && nix fmt; cd -";
stylix = "$EDITOR ~/.config/nixos/$(hostname)/stylix.nix";
rebuild = "sudo nixos-rebuild switch --flake ~/.config/nixos/#";
config = "$EDITOR ~/.config/nixos/$(hostname)/configuration.nix";
home-manager = "$EDITOR ~/.config/nixos/$(hostname)/home-manager.nix";
};
};
users.defaultUserShell = pkgs.fish;
}

6
modules/common/micro.nix Normal file
View file

@ -0,0 +1,6 @@
{pkgs, ...}: {
environment = {
systemPackages = [pkgs.micro];
sessionVariables.EDITOR = "micro";
};
}

View file

@ -0,0 +1,6 @@
{
networking.networkmanager = {
enable = true;
wifi.macAddress = "random";
};
}

View file

@ -0,0 +1,6 @@
{
nix.settings = {
substituters = ["https://nix-gaming.cachix.org"];
trusted-public-keys = ["nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="];
};
}

View file

@ -0,0 +1,7 @@
{
users.users.quadradical = {
isNormalUser = true;
description = "QuadRadical";
extraGroups = ["networkmanager" "wheel"];
};
}

View file

@ -0,0 +1,7 @@
{
documentation = {
doc.enable = false;
info.enable = false;
nixos.enable = false;
};
}

6
modules/common/zram.nix Normal file
View file

@ -0,0 +1,6 @@
{
zramSwap = {
enable = true;
memoryPercent = 100;
};
}