--- /dev/null
+flake.lock
boot.loader.grub.useOSProber = true;
# Networking.
- networking.hostName = "nixos";
+ networking.hostName = "t420";
networking.networkmanager.enable = true;
# Timezone.
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "jxnshi";
+ # Upower.
+ services.upower.enable = true;
+
# SSH.
programs.ssh.startAgent = true;
# System.
system.autoUpgrade.enable = true;
system.stateVersion = "24.11";
+
+ # Fish.
+ programs.bash.interactiveShellInit = ''
+ if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] then
+ shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
+ exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
+ fi
+ '';
}
system = "x86_64-linux";
in
{
- nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
+ nixosConfigurations.nixos= nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs system; };
modules = [ ./configuration.nix ];
};
--- /dev/null
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+ imports = [
+ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
+
+ boot.initrd.availableKernelModules = [ "ehci_pci" "ata_piix" "firewire_ohci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" ];
+ boot.initrd.kernelModules = [ "dm-snapshot" ];
+ boot.kernelModules = [ ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" = {
+ device = "/dev/disk/by-label/NIXOS_MAIN";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-label/NIXOS_BOOT";
+ fsType = "vfat";
+ options = [ "fmask=0077" "dmask=0077" ];
+ };
+
+ swapDevices = [
+ { device = "/dev/disk/by-label/NIXOS_SWAP"; }
+ ];
+
+ networking.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
home.packages = with pkgs; [
dwm # Window manager.
+ fish # Shell.
+ gimp # Image editor.
+ ghostty #
helix # Text editor.
+ krita # Drawing software.
monero-gui # Monero wallet.
st # Terminal emulator.
vimb # Web browser.
home-manager
htop
pfetch-rs
- syncthing
+ picom
tabbed
+ timg
tree
+ upower
xclip
wget
];
})
];
+ # Fish.
+ programs.fish.enable = true;
+
+ programs.fish.interactiveShellInit = ''
+ set fish_greeting
+ pfetch
+ '';
+
# Helix.
programs.helix.enable = true;