From 2d8ba9f7ea87a948989424103de3abf3b8cc9969 Mon Sep 17 00:00:00 2001 From: biscuit Date: Fri, 20 Jun 2025 08:58:14 -0500 Subject: [PATCH] q --- README.md | 5 ++++- config.default.nix | 10 ++++++++-- config.local.nix | 13 +++++++++---- nixos/desktop/configuration.nix | 2 +- nixos/desktop/hardware-configuration.nix | 16 +++++++++++----- pkgs/git/default.nix | 11 +++++++++-- system/default.nix | 2 ++ system/users.nix | 2 +- 8 files changed, 45 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index d868089..a48fdd3 100644 --- a/README.md +++ b/README.md @@ -50,5 +50,8 @@ Sakamoto NixOS is built with various profiles intended for reproducibility. - **Linux:** ```sh - sudo nixos-rebuild --extra-experimental-features "nix-command flakes" -- switch --flake ~/.config/nixos#desktop + sudo nixos-rebuild --flake ~/.config/nixos#desktop --impure + sudo nix run home-manager -- init --switch + home-manager switch --flake ~/.config/nixos#desktop --impure + reboot ``` diff --git a/config.default.nix b/config.default.nix index ed3f43c..c8232d2 100644 --- a/config.default.nix +++ b/config.default.nix @@ -8,17 +8,23 @@ vpnSecretFile = "/home/biscuit/Wireguard/secret"; }; + gitProfile = { + user = "biscuit"; + email = "biscuit@sakamoto.dev"; + defaultBranch = "master"; + }; + terminal = { termFont = "JetBrainsMono Nerd Font"; # e.g., JetBrainsMono Nerd Font termSize = "11"; - termShell = "zsh"; + termShell = "fish"; shellAliases = { ls = "ls --color=auto"; update = '' if [[ $(uname) == "Darwin" ]]; then sudo darwin-rebuild switch --flake ~/.config/nixos#macos else - sudo nixos-rebuild switch --flake ~/.config/nixos#desktop && home-manager switch --flake ~/.config/nixos#desktop + sudo nixos-rebuild switch --flake ~/.config/nixos#desktop --impure && home-manager switch --flake ~/.config/nixos#desktop --impure fi ''; agu = "pkill gjs & ags run ~/.config/nixos/pkgs/ags/biscuit/app.ts & disown (jobs -p) &"; diff --git a/config.local.nix b/config.local.nix index 25274fd..0152f89 100644 --- a/config.local.nix +++ b/config.local.nix @@ -4,15 +4,20 @@ timezone = "America/Chicago"; vpn = { - vpnEnable = true; + vpnEnable = false; vpnSecretFile = "/home/biscuit/Wireguard/secret"; }; + gitProfile = { + user = "biscuit"; + email = "biscuit@sakamoto.dev"; + defaultBranch = "master"; + }; + terminal = { termFont = "JetBrainsMono Nerd Font"; # e.g., JetBrainsMono Nerd Font termSize = "18"; - termShell = "zsh"; - + termShell = "fish"; shellAliases = { ls = "ls --color=auto"; update = '' @@ -20,7 +25,7 @@ if [ "$(uname)" = "Darwin" ]; then sudo darwin-rebuild switch --flake ~/.config/nixos#macos else - sudo nixos-rebuild switch --flake ~/.config/nixos#desktop && home-manager switch --flake ~/.config/nixos#desktop + sudo nixos-rebuild switch --flake ~/.config/nixos#desktop --impure && home-manager switch --flake ~/.config/nixos#desktop --impure fi ' ''; diff --git a/nixos/desktop/configuration.nix b/nixos/desktop/configuration.nix index d674c12..7b7723c 100644 --- a/nixos/desktop/configuration.nix +++ b/nixos/desktop/configuration.nix @@ -7,7 +7,7 @@ }: { imports = [ # Include the results of the hardware scan. - ./hardware-configuration.nix + /etc/nixos/hardware-configuration.nix ../../modules/system.nix ../../modules/display-manager.nix ../../modules/app.nix diff --git a/nixos/desktop/hardware-configuration.nix b/nixos/desktop/hardware-configuration.nix index c970b77..044722e 100644 --- a/nixos/desktop/hardware-configuration.nix +++ b/nixos/desktop/hardware-configuration.nix @@ -8,24 +8,29 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "firewire_ohci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/8552e23a-af9f-4af8-947f-9ea6ff1e7195"; + { device = "/dev/disk/by-uuid/d72dddb2-a232-46aa-8d46-c4b9cd7ed95e"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/00BB-80E9"; + { device = "/dev/disk/by-uuid/A6A3-E317"; fsType = "vfat"; options = [ "fmask=0077" "dmask=0077" ]; }; + fileSystems."/home" = + { device = "/dev/disk/by-uuid/a60ba0ab-dd33-4570-a2e9-873439d9cccf"; + fsType = "ext4"; + }; + swapDevices = - [ { device = "/dev/disk/by-uuid/2a916b88-8039-481b-9c30-4edd0f329eb3"; } + [ { device = "/dev/disk/by-uuid/49b9aca5-2a3a-43bf-b488-a23757979f32"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking @@ -34,7 +39,8 @@ # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; + # networking.interfaces.eno2.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/pkgs/git/default.nix b/pkgs/git/default.nix index b04f182..89084da 100644 --- a/pkgs/git/default.nix +++ b/pkgs/git/default.nix @@ -1,3 +1,10 @@ -{ ... }: { - programs.git.enable = true; +{gitProfile, ...}: { + programs.git = { + enable = true; + extraConfig = { + user.name = "${gitProfile.user}"; + user.email = "${gitProfile.email}"; + init.defaultBranch = "${gitProfile.defaultBranch}"; + }; + }; } diff --git a/system/default.nix b/system/default.nix index b8034b0..37ecccd 100644 --- a/system/default.nix +++ b/system/default.nix @@ -19,6 +19,8 @@ gtk3 libxml2 + git + cargo gcc rustc diff --git a/system/users.nix b/system/users.nix index 0eac348..0273916 100644 --- a/system/users.nix +++ b/system/users.nix @@ -5,7 +5,7 @@ ... }: { users = { - defaultUserShell = pkgs.zsh; + defaultUserShell = pkgs.${terminal.termShell}; users = { ${username} = { isNormalUser = true;