diff --git a/flake.nix b/flake.nix index 470a1b4..c2ee6db 100644 --- a/flake.nix +++ b/flake.nix @@ -8,12 +8,16 @@ # Add other flake inputs if needed }; - outputs = { self, nixpkgs, ... }@inputs: { + outputs = { + self, + nixpkgs, + ... + } @ inputs: { nixosConfigurations = { puter = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ ./hosts/puter/default.nix ]; - specialArgs = { inherit inputs; }; + modules = [./hosts/puter/default.nix]; + specialArgs = {inherit inputs;}; }; }; }; diff --git a/hosts/puter/hardware-configuration.nix b/hosts/puter/hardware-configuration.nix index 08f2742..1977826 100644 --- a/hosts/puter/hardware-configuration.nix +++ b/hosts/puter/hardware-configuration.nix @@ -1,31 +1,34 @@ # 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, ... }: { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" "wl" ]; - boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel" "wl"]; + boot.extraModulePackages = [config.boot.kernelPackages.broadcom_sta]; fileSystems."/" = { device = "/dev/disk/by-uuid/19a0aa4c-8d49-4545-9ed6-cd4a952f9353"; fsType = "ext4"; }; - boot.initrd.luks.devices."luks-08992355-1404-44dc-9bb4-fd32f1d0b62d".device = - "/dev/disk/by-uuid/08992355-1404-44dc-9bb4-fd32f1d0b62d"; + boot.initrd.luks.devices."luks-08992355-1404-44dc-9bb4-fd32f1d0b62d".device = "/dev/disk/by-uuid/08992355-1404-44dc-9bb4-fd32f1d0b62d"; fileSystems."/boot" = { device = "/dev/disk/by-uuid/F54E-7011"; fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; + options = ["fmask=0022" "dmask=0022"]; }; - swapDevices = - [{ device = "/dev/disk/by-uuid/c9b7b195-d072-4574-8e39-a5e4f90ca84d"; }]; + swapDevices = [{device = "/dev/disk/by-uuid/c9b7b195-d072-4574-8e39-a5e4f90ca84d";}]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -40,12 +43,11 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - boot.initrd.luks.devices."luks-d27fc6c5-7edd-4c18-ab70-3ca02a28abcc".device = - "/dev/disk/by-uuid/d27fc6c5-7edd-4c18-ab70-3ca02a28abcc"; + boot.initrd.luks.devices."luks-d27fc6c5-7edd-4c18-ab70-3ca02a28abcc".device = "/dev/disk/by-uuid/d27fc6c5-7edd-4c18-ab70-3ca02a28abcc"; nixpkgs.config.packageOverrides = pkgs: { intel-vaapi-driver = - pkgs.intel-vaapi-driver.override { enableHybridCodec = true; }; + pkgs.intel-vaapi-driver.override {enableHybridCodec = true;}; }; hardware.opengl = { @@ -57,7 +59,7 @@ ]; }; - environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; + environment.sessionVariables = {LIBVA_DRIVER_NAME = "i965";}; hardware.facetimehd = { enable = true; @@ -74,7 +76,7 @@ ''; # This goes in the extraConfig section IdleAction=ignore }; - environment.systemPackages = with pkgs; [ mbpfan thermald ]; + environment.systemPackages = with pkgs; [mbpfan thermald]; - boot.blacklistedKernelModules = [ "b43" "ssb" "brcmfmac" "brcmsmac" "bcma" ]; + boot.blacklistedKernelModules = ["b43" "ssb" "brcmfmac" "brcmsmac" "bcma"]; } diff --git a/hosts/puter/packages.nix b/hosts/puter/packages.nix index 3080a08..32c599b 100644 --- a/hosts/puter/packages.nix +++ b/hosts/puter/packages.nix @@ -1,10 +1,14 @@ -{ config, pkgs, ... }: { - nixpkgs.config.permittedInsecurePackages = [ "python-2.7.18.8" ]; - nixpkgs.config = { chromium = { enableWideVine = true; }; }; +{ + config, + pkgs, + ... +}: { + nixpkgs.config.permittedInsecurePackages = ["python-2.7.18.8"]; + nixpkgs.config = {chromium = {enableWideVine = true;};}; users.users.user = { isNormalUser = true; description = "user"; - extraGroups = [ "networkmanager" "wheel" "video" "libvirtd" ]; + extraGroups = ["networkmanager" "wheel" "video" "libvirtd"]; packages = with pkgs; [ # stuff needed by neovim fzf diff --git a/hosts/puter/syncthing.nix b/hosts/puter/syncthing.nix index 7f119fe..a9eb7d4 100644 --- a/hosts/puter/syncthing.nix +++ b/hosts/puter/syncthing.nix @@ -1,4 +1,8 @@ -{ config, pkgs, ... }: { +{ + config, + pkgs, + ... +}: { services.syncthing = { enable = true; openDefaultPorts = true; @@ -14,33 +18,30 @@ settings = { devices = { "phone" = { - id = - "N3RII7R-4YOKJ46-HY6NSTD-TPE7SW4-N66CWVQ-J2JVW7E-NARRMBF-JG27YQ7"; + id = "N3RII7R-4YOKJ46-HY6NSTD-TPE7SW4-N66CWVQ-J2JVW7E-NARRMBF-JG27YQ7"; }; "bigbox" = { - id = - "RFFXZJI-HJTEDCU-M7MU3SW-M7DJK4U-MESRKYA-OGHYOSG-KNZO7JB-6LQ5VAE"; + id = "RFFXZJI-HJTEDCU-M7MU3SW-M7DJK4U-MESRKYA-OGHYOSG-KNZO7JB-6LQ5VAE"; }; }; folders = { "brain_zero" = { # Name of folder in Syncthing, also the folder ID path = "/home/user/brain_zero/"; # Which folder to add to Syncthing - devices = [ "phone" ]; # Which devices to share the folder with - ignores = - [ ".obsidian/workspace-mobile.json" ".obsidian/workspace.json" ]; + devices = ["phone"]; # Which devices to share the folder with + ignores = [".obsidian/workspace-mobile.json" ".obsidian/workspace.json"]; }; "brain_zero_readonly" = { # Name of folder in Syncthing, also the folder ID path = "/home/user/brain_zero/"; # Which folder to add to Syncthing type = "sendonly"; - devices = [ "bigbox" ]; # Which devices to share the folder with + devices = ["bigbox"]; # Which devices to share the folder with }; "puter_home" = { path = "/home/user/"; type = "sendonly"; - devices = [ "bigbox" ]; - ignores = [ ".*" "!.ssh/" ]; + devices = ["bigbox"]; + ignores = [".*" "!.ssh/"]; }; }; }; diff --git a/modules/common/shell.nix b/modules/common/shell.nix index 69fdf92..cf715ea 100644 --- a/modules/common/shell.nix +++ b/modules/common/shell.nix @@ -1,8 +1,13 @@ -{ config, pkgs, lib, ... }: { +{ + config, + pkgs, + lib, + ... +}: { environment.variables.EDITOR = "nvim"; users.users.user.shell = pkgs.bash; - environment.shells = with pkgs; [ bash ]; + environment.shells = with pkgs; [bash]; programs.bash = { interactiveShellInit = '' if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] @@ -14,7 +19,7 @@ }; programs.fish.enable = true; - environment.systemPackages = with pkgs; [ starship ]; + environment.systemPackages = with pkgs; [starship]; programs.starship = { enable = true; settings = { diff --git a/modules/common/utils.nix b/modules/common/utils.nix index 2dafe50..4eefeed 100644 --- a/modules/common/utils.nix +++ b/modules/common/utils.nix @@ -1,5 +1,9 @@ -{ config, pkgs, ... }: { - programs.neovim = { defaultEditor = true; }; +{ + config, + pkgs, + ... +}: { + programs.neovim = {defaultEditor = true;}; environment.systemPackages = with pkgs; [ pciutils btop