diff --git a/falcon-nixos/configuration.nix b/falcon-nixos/configuration.nix index ee3809c..94eedfe 100644 --- a/falcon-nixos/configuration.nix +++ b/falcon-nixos/configuration.nix @@ -1,23 +1,26 @@ -{ config, pkgs, inputs, ... }: - { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; + config, + pkgs, + inputs, + ... +}: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - nix.settings.experimental-features = ["nix-command" "flakes" ]; + nix.settings.experimental-features = ["nix-command" "flakes"]; networking.hostName = "falcon-nixos"; # Define your hostname. users.users.yadunut = { shell = pkgs.zsh; isNormalUser = true; - extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. - openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJXOpmWsAnl2RtOuJJMRUx+iJTwf2RWJ1iS3FqXJFzFG" ]; + extraGroups = ["wheel"]; # Enable ‘sudo’ for the user. + openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJXOpmWsAnl2RtOuJJMRUx+iJTwf2RWJ1iS3FqXJFzFG"]; }; security.sudo.wheelNeedsPassword = false; @@ -30,7 +33,6 @@ age.secrets.tailscale.file = ./secrets/tailscale.age; - programs.zsh.enable = true; # List services that you want to enable: @@ -41,7 +43,7 @@ services.tailscale = { enable = true; authKeyFile = config.age.secrets.tailscale.path; - extraUpFlags = [ "--login-server" "http://ts.yadunut.com:444" ]; + extraUpFlags = ["--login-server" "http://ts.yadunut.com:444"]; }; environment.variables.EDITOR = "nvim"; @@ -60,9 +62,7 @@ package = config.boot.kernelPackages.nvidiaPackages.stable; }; # Need this for nvidia-smi - services.xserver.videoDrivers = [ "nvidia" ]; + services.xserver.videoDrivers = ["nvidia"]; system.stateVersion = "23.11"; # Did you read the comment? - } - diff --git a/falcon-nixos/hardware-configuration.nix b/falcon-nixos/hardware-configuration.nix index d194797..761aab4 100644 --- a/falcon-nixos/hardware-configuration.nix +++ b/falcon-nixos/hardware-configuration.nix @@ -1,31 +1,35 @@ # 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 + "/profiles/qemu-guest.nix") - ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; - boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; - fileSystems."/" = - { device = "/dev/disk/by-uuid/12b222f4-bd4b-4f52-9402-c99057a39382"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/12b222f4-bd4b-4f52-9402-c99057a39382"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/0625-632C"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/0625-632C"; + fsType = "vfat"; + }; - swapDevices = - [ { device = "/dev/disk/by-uuid/d56b2565-66f8-4f22-a078-8b0e4c9bb019"; } - ]; + swapDevices = [ + {device = "/dev/disk/by-uuid/d56b2565-66f8-4f22-a078-8b0e4c9bb019";} + ]; # 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 diff --git a/falcon-nixos/home.nix b/falcon-nixos/home.nix index 4eae638..5790555 100644 --- a/falcon-nixos/home.nix +++ b/falcon-nixos/home.nix @@ -1,5 +1,8 @@ -{ config, pkgs, ... } : { + config, + pkgs, + ... +}: { home.username = "yadunut"; home.homeDirectory = "/home/yadunut"; @@ -31,7 +34,6 @@ }; }; - programs.tmux = { enable = true; newSession = true; @@ -43,11 +45,9 @@ pain-control ]; }; - programs.zsh.prezto.pmodules = [ "tmux" ]; + programs.zsh.prezto.pmodules = ["tmux"]; programs.zsh.prezto.tmux.autoStartRemote = true; programs.fzf.tmux.enableShellIntegration = true; - home.stateVersion = "23.11"; } - diff --git a/falcon-nixos/secrets/secrets.nix b/falcon-nixos/secrets/secrets.nix index c59ef09..b805f32 100644 --- a/falcon-nixos/secrets/secrets.nix +++ b/falcon-nixos/secrets/secrets.nix @@ -1,8 +1,6 @@ -let +let system1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHMBVrt8ORitBVmkDSf78zli0M2+ggQtdnPEywqaaKA root@nixos"; - systems = [ system1 ]; -in -{ + systems = [system1]; +in { "tailscale.age".publicKeys = systems; } - diff --git a/flake.lock b/flake.lock index eb42fa4..eb5c949 100644 --- a/flake.lock +++ b/flake.lock @@ -215,11 +215,11 @@ ] }, "locked": { - "lastModified": 1731887066, - "narHash": "sha256-uw7K/RsYioJicV79Nl39yjtfhdfTDU2aRxnBgvFhkZ8=", + "lastModified": 1732025103, + "narHash": "sha256-qjEI64RKvDxRyEarY0jTzrZMa8ebezh2DEZmJJrpVdo=", "owner": "nix-community", "repo": "home-manager", - "rev": "f3a2ff69586f3a54b461526e5702b1a2f81e740a", + "rev": "a46e702093a5c46e192243edbd977d5749e7f294", "type": "github" }, "original": { @@ -236,11 +236,11 @@ ] }, "locked": { - "lastModified": 1731604581, - "narHash": "sha256-Qq2YZZaDTB3FZLWU/Hgh1uuWlUBl3cMLGB99bm7rFUM=", + "lastModified": 1731887066, + "narHash": "sha256-uw7K/RsYioJicV79Nl39yjtfhdfTDU2aRxnBgvFhkZ8=", "owner": "nix-community", "repo": "home-manager", - "rev": "1d0862ee2d7c6f6cd720d6f32213fa425004be10", + "rev": "f3a2ff69586f3a54b461526e5702b1a2f81e740a", "type": "github" }, "original": { @@ -285,11 +285,11 @@ ] }, "locked": { - "lastModified": 1731642829, - "narHash": "sha256-vG+O2RZRzYZ8BUMNNJ+BLSj6PUoGW7taDQbp6QNJ3Xo=", + "lastModified": 1731885500, + "narHash": "sha256-ZrztYfSOS33J+ewq5alBOSdnIyZ0/sr1iy7FyBe9zIg=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "f86f158efd4bab8dce3e207e4621f1df3a760b7a", + "rev": "c60b5c924c6188a0b3ca2e139ead3d0f92ae5db5", "type": "github" }, "original": { @@ -345,11 +345,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1731883908, - "narHash": "sha256-Yt/eVhoj+SwpsQVK0YxM8jou55ni0+dqANuQ2IvIA28=", + "lastModified": 1732035679, + "narHash": "sha256-J03v1XnxvsrrvHmzKVBZiwik8678IXfkH1/ZR954ujk=", "owner": "nix-community", "repo": "nixvim", - "rev": "5bc3fa6996ee37b754f2e815a165be6e4d0cfcb9", + "rev": "929bb0cd1cffb9917ab14be9cdb3f27efd6f505f", "type": "github" }, "original": { @@ -368,11 +368,11 @@ ] }, "locked": { - "lastModified": 1731582522, - "narHash": "sha256-1w6aM4bG5cl2E4jHLPnMKkrUO4tY1jUX1NI6/RwJN7Y=", + "lastModified": 1731936508, + "narHash": "sha256-z0BSSf78LkxIrrFXZYmCoRRAxAmxMUKpK7CyxQRvkZI=", "owner": "NuschtOS", "repo": "search", - "rev": "13300b2297c51368e0892c3ebe220f688014fe15", + "rev": "fe07070f811b717a4626d01fab714a87d422a9e1", "type": "github" }, "original": { @@ -443,11 +443,11 @@ ] }, "locked": { - "lastModified": 1730321837, - "narHash": "sha256-vK+a09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/+maI=", + "lastModified": 1731944360, + "narHash": "sha256-sJxPh+V0vUkBhlA58ok/y0o96AtfqiEF0O8qsdolI6o=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "746901bb8dba96d154b66492a29f5db0693dbfcc", + "rev": "579b9a2fd0020cd9cd81a4ef4eab2dca4d20c94c", "type": "github" }, "original": { diff --git a/modules/git.nix b/modules/git.nix index 8fd8b13..3874461 100644 --- a/modules/git.nix +++ b/modules/git.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { programs.git-credential-oauth.enable = true; programs.git = { enable = true; @@ -25,11 +24,10 @@ "https://git.yadunut.dev" = { oauthClientId = "a4792ccc-144e-407e-86c9-5e7d8d9c3269"; oauthScopes = "read:repository write:repository"; - oauthAuthURL = "/login/oauth/authorize"; - oauthTokenURL = "/login/oauth/access_token"; + oauthAuthURL = "/login/oauth/authorize"; + oauthTokenURL = "/login/oauth/access_token"; }; }; - }; }; home.packages = [ diff --git a/modules/wezterm/default.nix b/modules/wezterm/default.nix index 289020b..be6010f 100644 --- a/modules/wezterm/default.nix +++ b/modules/wezterm/default.nix @@ -1,5 +1,9 @@ -{ config, pkgs, inputs, ... }: { + config, + pkgs, + inputs, + ... +}: { home.packages = [ pkgs.comic-mono ]; @@ -7,4 +11,4 @@ enable = true; extraConfig = builtins.readFile ./wezterm.lua; }; -} \ No newline at end of file +} diff --git a/modules/zsh.nix b/modules/zsh.nix index 27b0b33..1dd42aa 100644 --- a/modules/zsh.nix +++ b/modules/zsh.nix @@ -1,5 +1,8 @@ -{ config, pkgs, ... }: { + config, + pkgs, + ... +}: { home.packages = with pkgs; [ zsh-completions bat diff --git a/yadunut-mba/home.nix b/yadunut-mba/home.nix index c5e01cc..5798a34 100644 --- a/yadunut-mba/home.nix +++ b/yadunut-mba/home.nix @@ -1,6 +1,10 @@ -{ config, pkgs, inputs, lib, ... }: - { + config, + pkgs, + inputs, + lib, + ... +}: { imports = [ ../modules/zsh.nix ../modules/neovim.nix @@ -32,10 +36,8 @@ pkgs.zellij pkgs.httpie - pkgs.emacs pkgs.wezterm - pkgs.arc-browser pkgs.raycast pkgs.tailscale pkgs.vscode @@ -89,17 +91,17 @@ # /etc/profiles/per-user/yadunut/etc/profile.d/hm-session-vars.sh # home.sessionVariables = { - JAVA_HOME="/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home"; - ANDROID_HOME="$HOME/Library/Android/sdk"; - EDITOR="nvim"; - VISUAL="nvim"; + JAVA_HOME = "/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home"; + ANDROID_HOME = "$HOME/Library/Android/sdk"; + EDITOR = "nvim"; + VISUAL = "nvim"; }; home.sessionPath = [ "$ANDROID_HOME/emulator" "$ANDROID_HOME/platform-tools" ]; - programs.zsh.shellAliases = { - lg = "lazygit"; + programs.zsh.shellAliases = { + lg = "lazygit"; }; programs.direnv = { @@ -130,30 +132,30 @@ orange = "#cb4b16"; }; gruvbox-light = { - bg="#d5c4a1"; - fg="#504945"; - orange="#980005"; - green="#79740e"; - yellow="#d79921"; - blue="#458588"; - magenta="#b16286"; - cyan="#689d6a"; - black="#ebdbb2"; - white="#3c3836"; - red="#d65d0e"; + bg = "#d5c4a1"; + fg = "#504945"; + orange = "#980005"; + green = "#79740e"; + yellow = "#d79921"; + blue = "#458588"; + magenta = "#b16286"; + cyan = "#689d6a"; + black = "#ebdbb2"; + white = "#3c3836"; + red = "#d65d0e"; }; gruvbox-dark = { - fg="#ebdbb2"; - bg="#504945"; - black="#3c3836"; - red="#cc241d"; - green="#98971a"; - yellow="#d79921"; - blue="#458588"; - magenta="#b16286"; - cyan="#689d6a"; - white="#fbf1c7"; - orange="#d65d0e"; + fg = "#ebdbb2"; + bg = "#504945"; + black = "#3c3836"; + red = "#cc241d"; + green = "#98971a"; + yellow = "#d79921"; + blue = "#458588"; + magenta = "#b16286"; + cyan = "#689d6a"; + white = "#fbf1c7"; + orange = "#d65d0e"; }; }; }; diff --git a/yadunut-mbp/home.nix b/yadunut-mbp/home.nix index 1ae215c..633a355 100644 --- a/yadunut-mbp/home.nix +++ b/yadunut-mbp/home.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { imports = [ (import ../modules/zsh.nix) (import ../modules/git.nix) @@ -61,9 +63,7 @@ # (pkgs.writeShellScriptBin "my-hello" '' # echo "Hello, ${config.home.username}!" # '') - - ]; - + ]; # Home Manager is pretty good at managing dotfiles. The primary way to manage # plain files is through 'home.file'. @@ -79,8 +79,8 @@ home.sessionVariables = { EDITOR = "nvim"; VISUAL = "nvim"; - JAVA_HOME="/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home"; - ANDROID_HOME="$HOME/Library/Android/sdk"; + JAVA_HOME = "/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home"; + ANDROID_HOME = "$HOME/Library/Android/sdk"; }; home.sessionPath = [ @@ -88,8 +88,8 @@ "$ANDROID_HOME/platform-tools" ]; - programs.zsh.shellAliases = { - lg = "lazygit"; + programs.zsh.shellAliases = { + lg = "lazygit"; }; programs.direnv = {