repo: clean code

This commit is contained in:
Anthony Rodriguez 2024-09-25 09:02:43 +02:00
parent 9af73f65f4
commit 87eff73b58
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
22 changed files with 121 additions and 113 deletions

View file

@ -1,3 +1,3 @@
{...}: { _: {
services.udiskie.enable = true; services.udiskie.enable = true;
} }

View file

@ -1,6 +1,8 @@
{inputs, ...}: { _: {
home.username = "nezia"; home = {
home.homeDirectory = "/home/nezia"; username = "nezia";
homeDirectory = "/home/nezia";
stateVersion = "24.05";
};
programs.home-manager.enable = true; programs.home-manager.enable = true;
home.stateVersion = "24.05";
} }

View file

@ -1,4 +1,4 @@
{...}: { _: {
xdg.mimeApps = { xdg.mimeApps = {
enable = true; enable = true;
defaultApplications = { defaultApplications = {

View file

@ -1,4 +1,4 @@
{...}: { _: {
programs.git = { programs.git = {
enable = true; enable = true;
userName = "Anthony Rodriguez"; userName = "Anthony Rodriguez";

View file

@ -1,4 +1,4 @@
{...}: { _: {
programs.gpg = { programs.gpg = {
enable = true; enable = true;
publicKeys = [ publicKeys = [

View file

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

View file

@ -20,7 +20,7 @@ in {
plugins = [ plugins = [
{ {
name = "fzf"; name = "fzf";
src = pkgs.fishPlugins.fzf.src; inherit (pkgs.fishPlugins.fzf) src;
} }
]; ];
}; };

View file

@ -1,4 +1,4 @@
{...}: { _: {
programs.starship = { programs.starship = {
enable = true; enable = true;
enableTransience = true; enableTransience = true;

View file

@ -1,4 +1,4 @@
{...}: { _: {
programs.zellij = { programs.zellij = {
enable = true; enable = true;
settings = { settings = {

View file

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

View file

@ -4,9 +4,10 @@ _: {
./syncthing ./syncthing
./sops.nix ./sops.nix
]; ];
modules = {
modules.gnome.enable = true; gnome.enable = true;
modules.stylix.enable = true; stylix.enable = true;
modules.docker.enable = true; docker.enable = true;
modules.pipewire.enable = true; pipewire.enable = true;
};
} }

View file

@ -3,10 +3,12 @@
username, username,
... ...
}: { }: {
sops.defaultSopsFile = ../../secrets/secrets.yaml; sops = {
sops.defaultSopsFormat = "yaml"; defaultSopsFile = ../../secrets/secrets.yaml;
sops.age.keyFile = "/home/${username}/.config/sops/age/keys.txt"; defaultSopsFormat = "yaml";
age.keyFile = "/home/${username}/.config/sops/age/keys.txt";
sops.secrets."syncthing/${hostname}/key" = {}; secrets."syncthing/${hostname}/key" = {};
sops.secrets."syncthing/${hostname}/cert" = {}; secrets."syncthing/${hostname}/cert" = {};
};
} }

View file

@ -1,4 +1,4 @@
{...}: { _: {
boot = { boot = {
loader = { loader = {
timeout = 0; timeout = 0;

View file

@ -1,10 +1,16 @@
{hostname, ...}: { {hostname, ...}: {
networking.hostName = hostname; networking.hostName = hostname;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
services = {
xserver.xkb = {
layout = "us";
variant = "";
};
services.xserver.xkb = { # automount
layout = "us"; udisks2.enable = true;
variant = "";
fwupd.enable = true;
}; };
users.users.nezia = { users.users.nezia = {
@ -16,11 +22,6 @@
]; ];
}; };
# automount
services.udisks2.enable = true;
services.fwupd.enable = true;
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;

View file

@ -1,4 +1,4 @@
{...}: { _: {
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Paris"; time.timeZone = "Europe/Paris";

View file

@ -1,4 +1,4 @@
{...}: { _: {
# fix direnv integration with fish # fix direnv integration with fish
environment.pathsToLink = ["/share/fish"]; environment.pathsToLink = ["/share/fish"];

View file

@ -1,18 +1,24 @@
{pkgs, ...}: { {pkgs, ...}: {
# setup printing service services = {
services.printing.enable = true; # setup printing service
printing.enable = true;
services.avahi = { avahi = {
enable = true; enable = true;
nssmdns4 = true; nssmdns4 = true;
openFirewall = true; openFirewall = true;
};
printing.drivers = [
pkgs.gutenprint
pkgs.hplip
];
udev.packages = [
pkgs.sane-airscan
pkgs.utsushi
];
}; };
services.printing.drivers = [
pkgs.gutenprint
pkgs.hplip
];
hardware.sane.enable = true; # enables support for SANE scanners hardware.sane.enable = true; # enables support for SANE scanners
hardware.sane.extraBackends = [ hardware.sane.extraBackends = [
pkgs.sane-airscan # generic pkgs.sane-airscan # generic
@ -20,8 +26,4 @@
pkgs.epkowa # Epson pkgs.epkowa # Epson
pkgs.utsushi # other printers pkgs.utsushi # other printers
]; ];
services.udev.packages = [
pkgs.sane-airscan
pkgs.utsushi
];
} }

View file

@ -4,25 +4,25 @@
{ {
config, config,
lib, lib,
pkgs,
modulesPath, modulesPath,
... ...
}: { }: {
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot = {
boot.initrd.availableKernelModules = [ initrd.availableKernelModules = [
"nvme" "nvme"
"xhci_pci" "xhci_pci"
"ahci" "ahci"
"usb_storage" "usb_storage"
"usbhid" "usbhid"
"sd_mod" "sd_mod"
]; ];
boot.initrd.kernelModules = []; initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"]; kernelModules = ["kvm-amd"];
boot.extraModulePackages = []; extraModulePackages = [];
};
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-label/NIXROOT"; device = "/dev/disk/by-label/NIXROOT";

View file

@ -3,17 +3,18 @@
./hardware-configuration.nix ./hardware-configuration.nix
inputs.nixos-hardware.nixosModules.framework-13-7040-amd inputs.nixos-hardware.nixosModules.framework-13-7040-amd
]; ];
services = {
services.fprintd.enable = true; fprintd.enable = true;
services.power-profiles-daemon.enable = true; power-profiles-daemon.enable = true;
services.keyd = { keyd = {
enable = true; enable = true;
keyboards = { keyboards = {
default = { default = {
ids = ["*"]; ids = ["*"];
settings = { settings = {
main = { main = {
capslock = "overload(control, esc)"; capslock = "overload(control, esc)";
};
}; };
}; };
}; };

View file

@ -4,31 +4,33 @@
{ {
config, config,
lib, lib,
pkgs,
modulesPath, modulesPath,
... ...
}: { }: {
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot = {
boot.initrd.availableKernelModules = [ initrd = {
"nvme" availableKernelModules = [
"xhci_pci" "nvme"
"thunderbolt" "xhci_pci"
"usb_storage" "thunderbolt"
"sd_mod" "usb_storage"
]; "sd_mod"
boot.initrd.kernelModules = [ ];
"amdgpu" kernelModules = [
"dm-snapshot" "amdgpu"
]; "dm-snapshot"
boot.kernelModules = [ ];
"kvm-amd" luks.devices."crypt".device = "/dev/disk/by-uuid/39d0e0c6-ea32-4ee4-ac76-b28fbff687f8";
"cryptd" };
]; kernelModules = [
boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/39d0e0c6-ea32-4ee4-ac76-b28fbff687f8"; "kvm-amd"
boot.extraModulePackages = []; "cryptd"
];
extraModulePackages = [];
};
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/4ef04567-9633-45b9-addc-55c3020f45b7"; device = "/dev/disk/by-uuid/4ef04567-9633-45b9-addc-55c3020f45b7";

View file

@ -27,26 +27,24 @@ in {
}; };
}; };
environment.gnome.excludePackages = ( environment.gnome.excludePackages = with pkgs; [
with pkgs; [ gnome-console
gnome-console gnome-photos
gnome-photos gnome-tour
gnome-tour gnome-software
gnome-software iagno
iagno hitori
hitori atomix
atomix gnome-contacts
gnome-contacts gnome-initial-setup
gnome-initial-setup gnome-music
gnome-music gedit
gedit cheese
cheese tali
tali epiphany
epiphany geary
geary yelp
yelp ];
]
);
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gnome-tweaks gnome-tweaks

View file

@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
inputs,
username, username,
... ...
}: let }: let