repo: fix formatting

This commit is contained in:
Anthony Rodriguez 2024-09-24 15:09:36 +02:00
parent 5ca57843d6
commit 80452cb292
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
32 changed files with 345 additions and 220 deletions

View file

@ -1,5 +1,4 @@
_:
{
_: {
imports = [
./core.nix
./automount.nix

View file

@ -1,17 +1,16 @@
{ ... }:
{
xdg.mimeApps = {
enable = true;
enable = true;
defaultApplications = {
"default-web-browser" = [ "firefox.desktop" ];
"text/html" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
"x-scheme-handler/about" = [ "firefox.desktop" ];
"x-scheme-handler/unknown" = [ "firefox.desktop" ];
"application/pdf" = [ "org.gnome.Evince.desktop" ];
"audio/wav" = [ "rhythmbox" ];
"default-web-browser" = [ "firefox.desktop" ];
"text/html" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
"x-scheme-handler/about" = [ "firefox.desktop" ];
"x-scheme-handler/unknown" = [ "firefox.desktop" ];
"application/pdf" = [ "org.gnome.Evince.desktop" ];
"audio/wav" = [ "rhythmbox" ];
};
};
}

View file

@ -1,5 +1,4 @@
_:
{
_: {
programs.chromium.enable = true;
programs.firefox.enable = true;
}

View file

@ -3,7 +3,7 @@
{
programs.git = {
enable = true;
userName = "Anthony Rodriguez";
userName = "Anthony Rodriguez";
userEmail = "anthony@nezia.dev";
signing = {
signByDefault = true;

View file

@ -3,5 +3,13 @@
{
programs.fzf.enable = true;
programs.fastfetch.enable = true;
home.packages = with pkgs; [ imhex obsidian proton-pass spotify vesktop wl-clipboard stremio ];
home.packages = with pkgs; [
imhex
obsidian
proton-pass
spotify
vesktop
wl-clipboard
stremio
];
}

View file

@ -7,7 +7,7 @@
escapeTime = 10;
clock24 = true;
keyMode = "vi";
mouse = true;
mouse = true;
baseIndex = 1;
extraConfig = ''
set-option -a terminal-features "''${TERM}:RGB"

View file

@ -1,5 +1,4 @@
_:
{
_: {
imports = [
./fish.nix
./starship.nix

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, ... }:
let
catppuccin-fish = pkgs.fetchFromGitHub {
@ -8,7 +8,7 @@ let
hash = "sha256-shQxlyoauXJACoZWtRUbRMxmm10R8vOigXwjxBhG8ng=";
};
in
{
{
programs.fish = {
enable = true;
interactiveShellInit = ''
@ -16,9 +16,15 @@ in
fish_vi_key_bindings # Enable Vi mode
fish_config theme choose "Catppuccin Frappe"
'';
shellAbbrs = { cd = "z"; ngc = "sudo nix-collect-garbage -d"; };
shellAbbrs = {
cd = "z";
ngc = "sudo nix-collect-garbage -d";
};
plugins = [
{ name = "fzf"; src = pkgs.fishPlugins.fzf.src; }
{
name = "fzf";
src = pkgs.fishPlugins.fzf.src;
}
];
};
@ -35,4 +41,3 @@ in
xdg.configFile."fish/themes/Catppuccin Frappe.theme".source = "${catppuccin-fish}/themes/Catppuccin Frappe.theme";
}

View file

@ -1,4 +1,5 @@
{ ... }: {
{ ... }:
{
programs.zoxide = {
enable = true;
enableBashIntegration = false;

View file

@ -1,5 +1,4 @@
_:
{
_: {
imports = [
../common
./gaming

View file

@ -1,5 +1,4 @@
_:
{
_: {
imports = [
../common
];

View file

@ -1,5 +1,4 @@
_:
{
_: {
imports = [
./system
./syncthing

View file

@ -1,16 +1,22 @@
{ config, username, hostname, ... }:
{
config,
username,
hostname,
...
}:
let
homeDir = "/home/${username}";
devices = import ./devices.nix;
otherDevices = builtins.removeAttrs devices [hostname];
in {
otherDevices = builtins.removeAttrs devices [ hostname ];
in
{
services = {
syncthing = {
enable = true;
user = "${username}";
dataDir = "${homeDir}/Documents";
configDir = "${homeDir}/.config/syncthing"; # Folder for Syncthing's settings and keys
configDir = "${homeDir}/.config/syncthing"; # Folder for Syncthing's settings and keys
key = "${config.sops.secrets."syncthing/${hostname}/key".path}";
cert = "${config.sops.secrets."syncthing/${hostname}/cert".path}";
settings = {

View file

@ -1,5 +1,9 @@
# TODO: add to sops directly instead of relying on another nix file
{
"vamos" = { id = "UO6JWVU-MTLZGVQ-Z3QAFYH-6PW2QR6-SBOVM6P-S6JXR2S-A7VYAU2-RLRXEQY"; };
"solaire" = { id = "R5RK7CH-DRFXW4E-ARTPMHN-UMWYQ4O-QK7F3TA-EHVLDK4-DQ6CBT4-XRRWQQM"; };
"vamos" = {
id = "UO6JWVU-MTLZGVQ-Z3QAFYH-6PW2QR6-SBOVM6P-S6JXR2S-A7VYAU2-RLRXEQY";
};
"solaire" = {
id = "R5RK7CH-DRFXW4E-ARTPMHN-UMWYQ4O-QK7F3TA-EHVLDK4-DQ6CBT4-XRRWQQM";
};
}

View file

@ -14,8 +14,8 @@
plymouth = {
enable = true;
extraConfig = ''
[Daemon]
DeviceScale=2
[Daemon]
DeviceScale=2
'';
};
consoleLogLevel = 0;

View file

@ -12,7 +12,10 @@
users.users.nezia = {
isNormalUser = true;
description = "Anthony Rodriguez";
extraGroups = [ "networkmanager" "wheel" ];
extraGroups = [
"networkmanager"
"wheel"
];
};
# automount
@ -25,5 +28,8 @@
system.stateVersion = "24.05";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
}

View file

@ -1,5 +1,4 @@
_:
{
_: {
imports = [
./core.nix

View file

@ -10,14 +10,20 @@
openFirewall = true;
};
services.printing.drivers = [ pkgs.gutenprint pkgs.hplip ];
services.printing.drivers = [
pkgs.gutenprint
pkgs.hplip
];
hardware.sane.enable = true; # enables support for SANE scanners
hardware.sane.extraBackends = [
pkgs.sane-airscan # generic
pkgs.hplip # HP
pkgs.epkowa # Epson
pkgs.utsushi # other printers
pkgs.sane-airscan # generic
pkgs.hplip # HP
pkgs.epkowa # Epson
pkgs.utsushi # other printers
];
services.udev.packages = [
pkgs.sane-airscan
pkgs.utsushi
];
services.udev.packages = [ pkgs.sane-airscan pkgs.utsushi ];
}

View file

@ -38,7 +38,7 @@
serviceConfig = {
ExecStart = "${pkgs.uni-sync}/bin/uni-sync";
};
wantedBy = ["multi-user.target"];
wantedBy = [ "multi-user.target" ];
};
modules.nvidia.enable = true;
modules.gaming.enable = true;
@ -46,4 +46,3 @@
stylix.image = ../../wallpapers/lucy-edgerunners-wallpaper.jpg;
}

View file

@ -1,28 +1,44 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ];

View file

@ -1,27 +1,25 @@
{ inputs, ... }:
{
imports = [
./hardware-configuration.nix
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
];
imports = [
./hardware-configuration.nix
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
];
services.fprintd.enable = true;
services.power-profiles-daemon.enable = true;
services.keyd = {
enable = true;
keyboards = {
default = {
ids = [ "*" ];
settings = {
main = {
capslock = "overload(control, esc)";
};
};
};
};
};
config.modules.neovim.enable = true;
services.fprintd.enable = true;
services.power-profiles-daemon.enable = true;
services.keyd = {
enable = true;
keyboards = {
default = {
ids = [ "*" ];
settings = {
main = {
capslock = "overload(control, esc)";
};
};
};
};
};
modules.neovim.enable = true;
}

View file

@ -1,29 +1,50 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ "amdgpu" "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" "cryptd" ];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"thunderbolt"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [
"amdgpu"
"dm-snapshot"
];
boot.kernelModules = [
"kvm-amd"
"cryptd"
];
boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/39d0e0c6-ea32-4ee4-ac76-b28fbff687f8";
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/4ef04567-9633-45b9-addc-55c3020f45b7";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/4ef04567-9633-45b9-addc-55c3020f45b7";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/C519-2E55";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/C519-2E55";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ];

View file

@ -1,5 +1,4 @@
_:
{
_: {
imports = [
./docker.nix
./pipewire.nix

View file

@ -1,8 +1,13 @@
{ config, lib, username, ... }:
{
config,
lib,
username,
...
}:
let
cfg = config.modules.docker;
in
{
{
options.modules.docker.enable = lib.mkEnableOption "docker module";
config = lib.mkIf cfg.enable {
virtualisation.docker = {

View file

@ -1,8 +1,13 @@
{ lib, config, pkgs, ... }:
{
lib,
config,
pkgs,
...
}:
let
cfg = config.modules.gaming;
in
{
{
options = {
modules.gaming = {
enable = lib.mkEnableOption "Enable the gaming module";
@ -30,4 +35,3 @@ in
services.udev.packages = [ pkgs.via ];
};
}

View file

@ -1,9 +1,15 @@
{ config, lib, pkgs, username, ... }:
{
config,
lib,
pkgs,
username,
...
}:
let
cfg = config.modules.gnome;
stylixEnabled = config.modules.stylix.enable or false;
in
{
{
options = {
modules.gnome = {
enable = lib.mkEnableOption "Enable Gnome";
@ -17,14 +23,33 @@ in
enable = true;
extraGSettingsOverridePackages = [ pkgs.mutter ];
extraGSettingsOverrides = ''
[org.gnome.mutter]
experimental-features=['scale-monitor-framebuffer']
[org.gnome.mutter]
experimental-features=['scale-monitor-framebuffer']
'';
};
};
environment.gnome.excludePackages =
(with pkgs; [ gnome-console gnome-photos gnome-tour gnome-software iagno hitori atomix gnome-contacts gnome-initial-setup gnome-music gedit cheese tali epiphany geary yelp ]);
environment.gnome.excludePackages = (
with pkgs;
[
gnome-console
gnome-photos
gnome-tour
gnome-software
iagno
hitori
atomix
gnome-contacts
gnome-initial-setup
gnome-music
gedit
cheese
tali
epiphany
geary
yelp
]
);
environment.systemPackages = with pkgs; [
gnome-tweaks
@ -67,12 +92,31 @@ in
enable-hot-corners = false;
};
"org/gnome/desktop/search-providers" = {
disabled=["org.gnome.Terminal.desktop" "org.gnome.Software.desktop" "org.gnome.seahorse.Application.desktop" "org.gnome.clocks.desktop" "org.gnome.Characters.desktop" "org.gnome.Calendar.desktop" "org.gnome.Calculator.desktop"];
disabled = [
"org.gnome.Terminal.desktop"
"org.gnome.Software.desktop"
"org.gnome.seahorse.Application.desktop"
"org.gnome.clocks.desktop"
"org.gnome.Characters.desktop"
"org.gnome.Calendar.desktop"
"org.gnome.Calculator.desktop"
];
enabled = ["org.gnome.Nautilus.desktop" "org.gnome.Settings.desktop"];
enabled = [
"org.gnome.Nautilus.desktop"
"org.gnome.Settings.desktop"
];
};
"org/freedesktop/tracker/mine/files" = {
index-recursive-directories=["&DESKTOP" "&DOCUMENTS" "&MUSIC" "&PICTURES" "&VIDEOS" "/home/${username}/Notes" "/home/${username}/Projects"];
index-recursive-directories = [
"&DESKTOP"
"&DOCUMENTS"
"&MUSIC"
"&PICTURES"
"&VIDEOS"
"/home/${username}/Notes"
"/home/${username}/Projects"
];
};
};

View file

@ -2,14 +2,14 @@
let
cfg = config.modules.nvidia;
in
{
{
options = {
modules.nvidia = {
enable = lib.mkEnableOption "Enable the Nvidia module";
};
};
config = lib.mkIf cfg.enable {
services.xserver.videoDrivers = ["nvidia"];
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
# Modesetting is required.

View file

@ -3,7 +3,7 @@
let
cfg = config.modules.pipewire;
in
{
{
options.modules.pipewire.enable = lib.mkEnableOption "pipewire module";
options.modules.pipewire.latencyFix.enable = lib.mkEnableOption "enable latency fixes";
config = lib.mkIf cfg.enable {
@ -21,10 +21,10 @@ in
services.pipewire.extraConfig.pipewire."92-low-latency" = lib.mkIf cfg.latencyFix.enable {
"context.properties" = {
"default.clock.rate" = 48000;
"default.clock.rate" = 48000;
"default.clock.allowed-rates" = [ 48000 ];
"default.clock.quantum" = 2048;
"default.clock.min-quantum" = 1024;
"default.clock.min-quantum" = 1024;
};
};

View file

@ -1,8 +1,13 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.stylix;
in
{
{
options = {
modules.stylix = {
enable = lib.mkEnableOption "Enable the stylix module";

View file

@ -1,6 +1,12 @@
{ config, lib, inputs, username, ... }:
{
config,
lib,
inputs,
username,
...
}:
let
cfg = config.modules.wezterm;
cfg = config.modules.wezterm;
in
{
options = {
@ -14,69 +20,69 @@ in
enable = true;
# package = inputs.wezterm.packages.${pkgs.system}.default;
extraConfig = ''
local w = require('wezterm')
local w = require('wezterm')
local function is_vim(pane)
return pane:get_user_vars().IS_NVIM == 'true'
local function is_vim(pane)
return pane:get_user_vars().IS_NVIM == 'true'
end
local direction_keys = {
h = 'Left',
j = 'Down',
k = 'Up',
l = 'Right',
}
local function split_nav(resize_or_move, key)
return {
key = key,
mods = resize_or_move == 'resize' and 'META' or 'CTRL',
action = w.action_callback(function(win, pane)
if is_vim(pane) then
win:perform_action({
SendKey = { key = key, mods = resize_or_move == 'resize' and 'META' or 'CTRL' },
}, pane)
else
if resize_or_move == 'resize' then
win:perform_action({ AdjustPaneSize = { direction_keys[key], 3 } }, pane)
else
win:perform_action({ ActivatePaneDirection = direction_keys[key] }, pane)
end
end
end),
}
end
local direction_keys = {
h = 'Left',
j = 'Down',
k = 'Up',
l = 'Right',
}
return {
enable_wayland = false,
front_end = "WebGpu",
hide_tab_bar_if_only_one_tab = true,
show_new_tab_button_in_tab_bar = false,
harfbuzz_features = { "ss01", "ss03" },
local function split_nav(resize_or_move, key)
return {
key = key,
mods = resize_or_move == 'resize' and 'META' or 'CTRL',
action = w.action_callback(function(win, pane)
if is_vim(pane) then
win:perform_action({
SendKey = { key = key, mods = resize_or_move == 'resize' and 'META' or 'CTRL' },
}, pane)
else
if resize_or_move == 'resize' then
win:perform_action({ AdjustPaneSize = { direction_keys[key], 3 } }, pane)
else
win:perform_action({ ActivatePaneDirection = direction_keys[key] }, pane)
end
end
end),
}
end
leader = { key = " ", mods = "CTRL", timeout_milliseconds = 1000 },
return {
enable_wayland = false,
front_end = "WebGpu",
hide_tab_bar_if_only_one_tab = true,
show_new_tab_button_in_tab_bar = false,
harfbuzz_features = { "ss01", "ss03" },
leader = { key = " ", mods = "CTRL", timeout_milliseconds = 1000 },
keys = {
{
mods = "LEADER",
key = "-",
action = wezterm.action.SplitVertical { domain = "CurrentPaneDomain" }
keys = {
{
mods = "LEADER",
key = "-",
action = wezterm.action.SplitVertical { domain = "CurrentPaneDomain" }
},
{
mods = "LEADER",
key = "=",
action = wezterm.action.SplitHorizontal { domain = "CurrentPaneDomain" }
},
split_nav('move', 'h'),
split_nav('move', 'j'),
split_nav('move', 'k'),
split_nav('move', 'l'),
split_nav('resize', 'h'),
split_nav('resize', 'j'),
split_nav('resize', 'k'),
split_nav('resize', 'l'),
},
{
mods = "LEADER",
key = "=",
action = wezterm.action.SplitHorizontal { domain = "CurrentPaneDomain" }
},
split_nav('move', 'h'),
split_nav('move', 'j'),
split_nav('move', 'k'),
split_nav('move', 'l'),
split_nav('resize', 'h'),
split_nav('resize', 'j'),
split_nav('resize', 'k'),
split_nav('resize', 'l'),
},
}
}
'';
};
};