chore: NixOS | format nix files
This commit is contained in:
@@ -40,12 +40,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {nixpkgs, ...} @ inputs: let
|
||||||
self,
|
|
||||||
nixpkgs,
|
|
||||||
...
|
|
||||||
} @ inputs:
|
|
||||||
let
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
host = "rihla";
|
host = "rihla";
|
||||||
user = "shahab";
|
user = "shahab";
|
||||||
@@ -73,7 +68,7 @@
|
|||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
"${user}" = inputs.home-manager.lib.homeManagerConfiguration {
|
"${user}" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = [ ./home-manager/home.nix ];
|
modules = [./home-manager/home.nix];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -5,22 +5,26 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
# Be sure to actually install the font first!
|
# Be sure to actually install the font first!
|
||||||
font = "ComicCodeLigatures";
|
font = "ComicCodeLigatures";
|
||||||
username = "shahab";
|
username = "shahab";
|
||||||
email = "shahab@dogar.dev";
|
email = "shahab@dogar.dev";
|
||||||
fullName = "Shahab Dogar";
|
fullName = "Shahab Dogar";
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
# You can import other home-manager modules here
|
# You can import other home-manager modules here
|
||||||
imports = [
|
imports = [
|
||||||
# Custom import to configure font
|
# Custom import to configure font
|
||||||
(import ./configs/alacritty.nix { inherit pkgs config; font = font; })
|
(import ./configs/alacritty.nix {
|
||||||
|
inherit pkgs config font;
|
||||||
|
})
|
||||||
|
|
||||||
# Custom import for username and email
|
# Custom import for username and email
|
||||||
(import ./configs/git.nix { inherit pkgs config lib; userEmail = email; userName = fullName; })
|
(import ./configs/git.nix {
|
||||||
|
inherit pkgs config lib;
|
||||||
|
userEmail = email;
|
||||||
|
userName = fullName;
|
||||||
|
})
|
||||||
|
|
||||||
./configs/firefox.nix
|
./configs/firefox.nix
|
||||||
./configs/direnv.nix
|
./configs/direnv.nix
|
||||||
@@ -46,10 +50,10 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
|
inherit username;
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
stateVersion = "24.05";
|
stateVersion = "24.05";
|
||||||
|
|
||||||
username = username;
|
|
||||||
homeDirectory = "/home/${username}";
|
homeDirectory = "/home/${username}";
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
{
|
{device ? throw "Set this to your disk device, e.g. /dev/sda", ...}: {
|
||||||
device ? throw "Set this to your disk device, e.g. /dev/sda",
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
main = {
|
main = {
|
||||||
@@ -38,16 +35,36 @@
|
|||||||
"token-timeout=10"
|
"token-timeout=10"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
content = {
|
||||||
|
type = "lvm_pv";
|
||||||
|
vg = "luks_vg";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lvm_vg = {
|
||||||
|
luks_vg = {
|
||||||
|
type = "lvm_vg";
|
||||||
|
lvs = {
|
||||||
|
swap = {
|
||||||
|
size = "64G";
|
||||||
|
content = {
|
||||||
|
type = "swap";
|
||||||
|
resumeDevice = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
size = "100%FREE";
|
||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
extraArgs = ["-L" "nixos" "-f"];
|
extraArgs = ["-L" "nixos" "-f"];
|
||||||
subvolumes = {
|
subvolumes = {
|
||||||
"/root" = {
|
"/root" = {
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
mountOptions = [
|
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
"/nix" = {
|
"/nix" = {
|
||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
@@ -65,19 +82,10 @@
|
|||||||
"noatime"
|
"noatime"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"/swap" = {
|
|
||||||
mountpoint = "/swap";
|
|
||||||
swap.swapfile.size = "64G";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/persistant".neededForBoot = true;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,23 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
config,
|
||||||
|
lib,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||||
|
|
||||||
|
fileSystems."/persistant".neededForBoot = true;
|
||||||
boot = {
|
boot = {
|
||||||
initrd = {
|
initrd = {
|
||||||
availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "thunderbolt" "usb_storage" "sd_mod" ];
|
availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "thunderbolt" "usb_storage" "sd_mod"];
|
||||||
kernelModules = [ ];
|
kernelModules = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
kernelModules = [ "kvm-amd" ];
|
kernelModules = ["kvm-amd"];
|
||||||
extraModulePackages = [ ];
|
extraModulePackages = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
|||||||
Reference in New Issue
Block a user