From 5c95d29a744245a88f1a0618c62c25cb3ff32836 Mon Sep 17 00:00:00 2001 From: rocketcamel Date: Fri, 24 Jan 2025 11:17:21 -0800 Subject: [PATCH] chore: formatted --- .config/nvim/lazy-lock.json | 6 +-- nix/flake.nix | 50 +++++++++++++++--------- nix/hosts/tux/configuration.nix | 39 +++++++++++++----- nix/hosts/tux/hardware-configuration.nix | 25 +++++++++--- nix/hosts/wsl-kumatani/configuration.nix | 11 ++++-- nix/modules/commonPackages.nix | 3 +- nix/modules/default.nix | 16 ++++++-- nix/modules/hm.nix | 12 +++++- nix/modules/i3.nix | 16 ++++++-- nix/modules/kanata.nix | 12 +++++- nix/users/luca/git.nix | 4 +- nix/users/luca/home.nix | 5 ++- nix/users/luca/tmux.nix | 2 +- 13 files changed, 147 insertions(+), 54 deletions(-) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 200b2f4..4eadf1d 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -4,9 +4,9 @@ "lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "e942edf5c85b6a2ab74059ea566cac5b3e1514a4" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.nvim": { "branch": "main", "commit": "4446e834c30c799627d65691c73d59638e5c965f" }, - "nvim-lspconfig": { "branch": "master", "commit": "513f4f0bde469ecb3abe2e1b606f63cf142e751e" }, - "nvim-treesitter": { "branch": "master", "commit": "6587a5886873cce8698a47477224c30578b33a24" }, + "mini.nvim": { "branch": "main", "commit": "f90b6b820062fc06d6d51ed61a0f9b7f9a13b01b" }, + "nvim-lspconfig": { "branch": "master", "commit": "b4d65bce97795438ab6e1974b3672c17a4865e3c" }, + "nvim-treesitter": { "branch": "master", "commit": "51562d44fc6280f92bb9a3d87e7b3cb327377ca5" }, "plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" }, "rose-pine": { "branch": "main", "commit": "42f0724e0bca9f57f0bcfa688787c37b8d4befe8" }, "telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" } diff --git a/nix/flake.nix b/nix/flake.nix index d71de6f..5ecb39e 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -8,7 +8,13 @@ home-manager.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = inputs@{ nixpkgs, home-manager, nixos-wsl, ... }: + outputs = + inputs@{ + nixpkgs, + home-manager, + nixos-wsl, + ... + }: let systems = [ "x86_64-linux" ]; hosts = [ @@ -21,23 +27,31 @@ isWSL = false; } ]; - in { - nixosConfigurations = builtins.listToAttrs (map (host: { - name = host.name; - value = nixpkgs.lib.nixosSystem { - specialArgs = { - inherit inputs; - meta = { hostname = host.name; }; + in + { + nixosConfigurations = builtins.listToAttrs ( + map (host: { + name = host.name; + value = nixpkgs.lib.nixosSystem { + specialArgs = { + inherit inputs; + meta = { + hostname = host.name; + }; + }; + system = "x86_64-linux"; + modules = [ + ./hosts/${host.name}/configuration.nix + home-manager.nixosModules.home-manager + { + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + } + ] ++ (if host.isWSL then [ nixos-wsl.nixosModules.default ] else [ ]); }; - system = "x86_64-linux"; - modules = [ - ./hosts/${host.name}/configuration.nix - home-manager.nixosModules.home-manager - { - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - } - ] ++ (if host.isWSL then [ nixos-wsl.nixosModules.default ] else [ ]); - }; - }) hosts); + }) hosts + ); }; } diff --git a/nix/hosts/tux/configuration.nix b/nix/hosts/tux/configuration.nix index 184fed5..ba07cfe 100644 --- a/nix/hosts/tux/configuration.nix +++ b/nix/hosts/tux/configuration.nix @@ -2,10 +2,19 @@ # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ config, lib, pkgs, inputs, home-manager, meta, ... }: +{ + config, + lib, + pkgs, + inputs, + home-manager, + meta, + ... +}: { - imports = [ # Include the results of the hardware scan. + imports = [ + # Include the results of the hardware scan. ./hardware-configuration.nix ../../modules/default.nix ]; @@ -18,7 +27,10 @@ }; networking.networkmanager.enable = true; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; networking.hostName = meta.hostname; @@ -45,7 +57,9 @@ xdg.portal = { enable = true; extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; - config.common = { default = [ "gtk" ]; }; + config.common = { + default = [ "gtk" ]; + }; }; time.timeZone = "America/Vancouver"; @@ -66,18 +80,24 @@ pulse.enable = true; }; - hardware = { graphics.enable = true; }; + hardware = { + graphics.enable = true; + }; users.users.luca = { isNormalUser = true; extraGroups = [ "wheel" ]; shell = pkgs.zsh; - hashedPassword = - "$y$j9T$wp9I05TfxjrAzCMCcxlei1$Fm7sJJSwFHpSIQT0RESOdJ7vkTYyN0IXs5n/xkg65y3"; + hashedPassword = "$y$j9T$wp9I05TfxjrAzCMCcxlei1$Fm7sJJSwFHpSIQT0RESOdJ7vkTYyN0IXs5n/xkg65y3"; }; - environment.systemPackages = with pkgs; - config.commonPackages ++ [ dolphin wireguard-tools ]; + environment.systemPackages = + with pkgs; + config.commonPackages + ++ [ + dolphin + wireguard-tools + ]; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. @@ -91,4 +111,3 @@ system.stateVersion = "24.11"; } - diff --git a/nix/hosts/tux/hardware-configuration.nix b/nix/hosts/tux/hardware-configuration.nix index dc2bf31..b03b587 100644 --- a/nix/hosts/tux/hardware-configuration.nix +++ b/nix/hosts/tux/hardware-configuration.nix @@ -1,13 +1,24 @@ # 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") ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "nvme" + "usb_storage" + "sd_mod" + "rtsx_pci_sdmmc" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -20,7 +31,10 @@ fileSystems."/boot" = { device = "/dev/disk/by-uuid/0193-75C3"; fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; + options = [ + "fmask=0077" + "dmask=0077" + ]; }; swapDevices = [ ]; @@ -33,6 +47,5 @@ # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/nix/hosts/wsl-kumatani/configuration.nix b/nix/hosts/wsl-kumatani/configuration.nix index 962ef74..28a2ff3 100644 --- a/nix/hosts/wsl-kumatani/configuration.nix +++ b/nix/hosts/wsl-kumatani/configuration.nix @@ -2,7 +2,13 @@ # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ config, lib, pkgs, meta, ... }: +{ + config, + lib, + pkgs, + meta, + ... +}: { imports = [ ../../modules/default.nix ]; @@ -13,8 +19,7 @@ hm.enable = true; users.users.luca.shell = pkgs.zsh; - environment.systemPackages = with pkgs; - config.commonPackages ++ [ asciiquarium ]; + environment.systemPackages = with pkgs; config.commonPackages ++ [ asciiquarium ]; system.stateVersion = "24.05"; } diff --git a/nix/modules/commonPackages.nix b/nix/modules/commonPackages.nix index 6b24304..bbc68af 100644 --- a/nix/modules/commonPackages.nix +++ b/nix/modules/commonPackages.nix @@ -1,4 +1,5 @@ -{ pkgs, lib, ... }: { +{ pkgs, lib, ... }: +{ options = { commonPackages = lib.mkOption { type = lib.types.listOf lib.types.package; diff --git a/nix/modules/default.nix b/nix/modules/default.nix index e556a43..51fd84c 100644 --- a/nix/modules/default.nix +++ b/nix/modules/default.nix @@ -1,4 +1,14 @@ -{ pkgs, lib, config, ... }: { - imports = [ ./commonPackages.nix ./hm.nix ./i3.nix ./kanata.nix ]; +{ + pkgs, + lib, + config, + ... +}: +{ + imports = [ + ./commonPackages.nix + ./hm.nix + ./i3.nix + ./kanata.nix + ]; } - diff --git a/nix/modules/hm.nix b/nix/modules/hm.nix index af39586..57db71f 100644 --- a/nix/modules/hm.nix +++ b/nix/modules/hm.nix @@ -1,5 +1,13 @@ -{ lib, config, pkgs, ... }: { - options = { hm.enable = lib.mkEnableOption "enable home-manager"; }; +{ + lib, + config, + pkgs, + ... +}: +{ + options = { + hm.enable = lib.mkEnableOption "enable home-manager"; + }; config = lib.mkIf config.hm.enable { home-manager.useGlobalPkgs = true; diff --git a/nix/modules/i3.nix b/nix/modules/i3.nix index 6d07cfd..ecd0cbf 100644 --- a/nix/modules/i3.nix +++ b/nix/modules/i3.nix @@ -1,5 +1,13 @@ -{ pkgs, lib, config, ... }: { - options = { i3.enable = lib.mkEnableOption "enable i3"; }; +{ + pkgs, + lib, + config, + ... +}: +{ + options = { + i3.enable = lib.mkEnableOption "enable i3"; + }; config = lib.mkIf config.i3.enable { services.xserver = { @@ -7,7 +15,9 @@ windowManager.i3.enable = true; }; - services.displayManager = { defaultSession = "none+i3"; }; + services.displayManager = { + defaultSession = "none+i3"; + }; services.libinput.touchpad.naturalScrolling = true; home-manager.users.luca = { diff --git a/nix/modules/kanata.nix b/nix/modules/kanata.nix index 3894aaa..fa05047 100644 --- a/nix/modules/kanata.nix +++ b/nix/modules/kanata.nix @@ -1,5 +1,13 @@ -{ pkgs, lib, config, ... }: { - options.kanata = { enable = lib.mkEnableOption "enable kanata"; }; +{ + pkgs, + lib, + config, + ... +}: +{ + options.kanata = { + enable = lib.mkEnableOption "enable kanata"; + }; config = lib.mkIf config.kanata.enable { services.kanata.enable = true; diff --git a/nix/users/luca/git.nix b/nix/users/luca/git.nix index 9d3efbd..2ccd69f 100755 --- a/nix/users/luca/git.nix +++ b/nix/users/luca/git.nix @@ -3,7 +3,9 @@ userName = "rocketcamel"; userEmail = "luca_lise@icloud.com"; extraConfig = { - init = { defaultBranch = "main"; }; + init = { + defaultBranch = "main"; + }; commit.gpgsign = true; gpg.format = "ssh"; user.signingkey = "~/.ssh/commits.id_rsa.pub"; diff --git a/nix/users/luca/home.nix b/nix/users/luca/home.nix index 63d6bf7..f86a32c 100755 --- a/nix/users/luca/home.nix +++ b/nix/users/luca/home.nix @@ -10,7 +10,10 @@ tmux = import ./tmux.nix { inherit pkgs; }; }; - home.packages = with pkgs; [ nodejs_22 pnpm ]; + home.packages = with pkgs; [ + nodejs_22 + pnpm + ]; home.stateVersion = "24.11"; diff --git a/nix/users/luca/tmux.nix b/nix/users/luca/tmux.nix index cbf6a5c..9696b14 100755 --- a/nix/users/luca/tmux.nix +++ b/nix/users/luca/tmux.nix @@ -7,7 +7,7 @@ baseIndex = 1; sensibleOnTop = true; keyMode = "vi"; - plugins = with pkgs; [{ plugin = tmuxPlugins.tokyo-night-tmux; }]; + plugins = with pkgs; [ { plugin = tmuxPlugins.tokyo-night-tmux; } ]; extraConfig = '' bind -n M-H previous-window bind -n M-L next-window