fully tabs2space

This commit is contained in:
Reid 2024-04-02 23:11:47 -07:00
parent 38839cdcbf
commit 9743295319
9 changed files with 79 additions and 78 deletions

View file

@ -15,9 +15,9 @@ in {
++ (mapModulesRec' (toString ./modules) import); ++ (mapModulesRec' (toString ./modules) import);
hm.imports = [ hm.imports = [
inputs.hyprlock.homeManagerModules.hyprlock inputs.hyprlock.homeManagerModules.hyprlock
inputs.hypridle.homeManagerModules.hypridle inputs.hypridle.homeManagerModules.hypridle
inputs.hyprland.homeManagerModules.default inputs.hyprland.homeManagerModules.default
]; ];
environment.variables = { environment.variables = {
@ -32,7 +32,7 @@ in {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
registry.nixpkgs.flake = inputs.nixpkgs; registry.nixpkgs.flake = inputs.nixpkgs;
settings = { settings = {
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true; auto-optimise-store = true;
keep-outputs = true; keep-outputs = true;
@ -43,11 +43,11 @@ in {
"https://hyprland.cachix.org" "https://hyprland.cachix.org"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
]; ];
}; };
}; };
system.stateVersion = mkDefault "23.11"; system.stateVersion = mkDefault "23.11";

View file

@ -9,8 +9,8 @@
modules = import ./modules.nix { modules = import ./modules.nix {
inherit lib; inherit lib;
self.attrs = import ./attrs.nix { self.attrs = import ./attrs.nix {
inherit lib; inherit lib;
self = {}; self = {};
}; };
}; };
mylib = mylib =

View file

@ -5,13 +5,13 @@ let
cfg = config.modules.desktop.dunst; cfg = config.modules.desktop.dunst;
in { in {
options.modules.desktop.dunst = { options.modules.desktop.dunst = {
enable = mkEnableOption "Enable dunst, a lightweight replacement for the notification daemons provided by most desktop environments"; enable = mkEnableOption "Enable dunst, a lightweight replacement for the notification daemons provided by most desktop environments";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
hm.services.dunst = { hm.services.dunst = {
enable = true; enable = true;
configFile = ../../config/dunst.conf; configFile = ../../config/dunst.conf;
}; };
}; };
} }

View file

@ -5,24 +5,24 @@ let
cfg = config.modules.desktop.hyprpaper; cfg = config.modules.desktop.hyprpaper;
in { in {
options.modules.desktop.hyprpaper = { options.modules.desktop.hyprpaper = {
enable = mkEnableOption "Enable hyprpaper, a wayland wallpaper utility"; enable = mkEnableOption "Enable hyprpaper, a wayland wallpaper utility";
package = mkOption { package = mkOption {
type = types.package; type = types.package;
default = inputs.hyprpaper.packages.${system}.hyprpaper; default = inputs.hyprpaper.packages.${system}.hyprpaper;
example = "pkgs.hyperpaper"; example = "pkgs.hyperpaper";
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
hm.wayland.windowManager.hyprland.settings.exec-once = [ "${lib.getExe cfg.package}" ]; hm.wayland.windowManager.hyprland.settings.exec-once = [ "${lib.getExe cfg.package}" ];
hm.xdg.configFile."hypr/hyprpaper.conf" = let hm.xdg.configFile."hypr/hyprpaper.conf" = let
img = ../../assets/wallpaper.png; img = ../../assets/wallpaper.png;
in { in {
text = '' text = ''
preload = ${img} preload = ${img}
wallpaper = ,${img} wallpaper = ,${img}
splash = false splash = false
''; '';
}; };
}; };
} }

View file

@ -9,7 +9,7 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.direnv ={ programs.direnv = {
enable = true; enable = true;
silent = true; silent = true;
nix-direnv.enable = true; nix-direnv.enable = true;

View file

@ -9,13 +9,13 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
boot = { boot = {
tmp.useTmpfs = lib.mkDefault true; tmp.useTmpfs = lib.mkDefault true;
tmp.cleanOnBoot = lib.mkDefault (!config.boot.tmp.useTmpfs); tmp.cleanOnBoot = lib.mkDefault (!config.boot.tmp.useTmpfs);
kernel.sysctl = { kernel.sysctl = {
# magic sysrq key, allows low-level commands through keyboard input # magic sysrq key, allows low-level commands through keyboard input
"kernel.sysrq" = 0; "kernel.sysrq" = 0;
## TCP hardening ## TCP hardening
# prevent bogus ICMP errors from filling up logs # prevent bogus ICMP errors from filling up logs
@ -50,21 +50,21 @@ in {
security = { security = {
# prevents replacing the kernel without a reboot # prevents replacing the kernel without a reboot
protectKernelImage = true; protectKernelImage = true;
# rtkit allows unprivileged processes to use realtime scheduling # rtkit allows unprivileged processes to use realtime scheduling
# polkit allows unprivileged processes to speak to privileged processes (ex. nmtui, reboot) # polkit allows unprivileged processes to speak to privileged processes (ex. nmtui, reboot)
rtkit.enable = true; rtkit.enable = true;
polkit.enable = true; polkit.enable = true;
}; };
# personal computer? no firewall ty :3 # personal computer? no firewall ty :3
networking.firewall.enable = false; networking.firewall.enable = false;
} // (mkIf cfg.useDoas { } // (mkIf cfg.useDoas {
security.sudo.enable = false; security.sudo.enable = false;
security.doas.enable = true; security.doas.enable = true;
security.doas.extraRules = [ security.doas.extraRules = [
{ users = [ config.user.name ]; noPass = true; persist = false; keepEnv = true; } { users = [ config.user.name ]; noPass = true; persist = false; keepEnv = true; }
]; ];
environment.systemPackages = with pkgs; [ doas-sudo-shim ]; environment.systemPackages = with pkgs; [ doas-sudo-shim ];
}); });
} }

View file

@ -42,6 +42,7 @@ in {
"security.workspace.trust.untrustedFiles" = "open"; "security.workspace.trust.untrustedFiles" = "open";
"explorer.compactFolders" = false;
"explorer.confirmDelete" = false; "explorer.confirmDelete" = false;
"explorer.confirmDragAndDrop" = true; "explorer.confirmDragAndDrop" = true;

View file

@ -8,30 +8,30 @@ with lib.my;
}; };
config = { config = {
user = rec { user = rec {
name = "reidlab"; name = "reidlab";
description = "reid"; description = "reid";
extraGroups = ["wheel" "input" "audio" "video" "storage"]; extraGroups = ["wheel" "input" "audio" "video" "storage"];
isNormalUser = true; isNormalUser = true;
home = "/home/${name}"; home = "/home/${name}";
group = name; group = name;
uid = 1000; uid = 1000;
}; };
users.groups.${config.user.group} = {}; users.groups.${config.user.group} = {};
users.users.${config.user.name} = mkAliasDefinitions options.user; users.users.${config.user.name} = mkAliasDefinitions options.user;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
hm.home.username = config.user.name; hm.home.username = config.user.name;
hm.home.homeDirectory = lib.mkForce config.user.home; hm.home.homeDirectory = lib.mkForce config.user.home;
nix.settings = let nix.settings = let
users = ["root" config.user.name]; users = ["root" config.user.name];
in { in {
trusted-users = users; trusted-users = users;
allowed-users = users; allowed-users = users;
}; };
}; };
} }

View file

@ -1,19 +1,19 @@
{ ... }: { ... }:
{ {
config = { config = {
hm.xdg.enable = true; hm.xdg.enable = true;
hm.xdg.userDirs = { hm.xdg.userDirs = {
enable = true; enable = true;
createDirectories = true; createDirectories = true;
desktop = "$HOME/desktop"; desktop = "$HOME/desktop";
documents = "$HOME/documents"; documents = "$HOME/documents";
download = "$HOME/downloads"; download = "$HOME/downloads";
music = "$HOME/music"; music = "$HOME/music";
pictures = "$HOME/pictures"; pictures = "$HOME/pictures";
publicShare = "$HOME/public"; publicShare = "$HOME/public";
templates = "$HOME/templates"; templates = "$HOME/templates";
videos = "$HOME/videos"; videos = "$HOME/videos";
}; };
}; };
} }