First Commit

This commit is contained in:
Jack Mechem 2025-07-22 21:05:51 +00:00
commit 4b1d7f684c
5 changed files with 272 additions and 0 deletions

91
flake.lock generated Executable file
View file

@ -0,0 +1,91 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1752798675,
"narHash": "sha256-oMJhxLVGVC7v0ReNQ/vFVKMQOPUixg/74MnZZ1Wkv4s=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "dcfd70f80fe6d872c2dc58fe3be384a681e56fea",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"zen-browser",
"nixpkgs"
]
},
"locked": {
"lastModified": 1752603129,
"narHash": "sha256-S+wmHhwNQ5Ru689L2Gu8n1OD6s9eU9n9mD827JNR+kw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e8c19a3cec2814c754f031ab3ae7316b64da085b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1752480373,
"narHash": "sha256-JHQbm+OcGp32wAsXTE/FLYGNpb+4GLi5oTvCxwSoBOA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "62e0f05ede1da0d54515d4ea8ce9c733f12d9f08",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"zen-browser": "zen-browser"
}
},
"zen-browser": {
"inputs": {
"home-manager": "home-manager_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1752809889,
"narHash": "sha256-oTIVrw7Cy2McAVqE7GCot5Fb8Wh4JBsUDKMX8u3DFlU=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "f19d2b6b18d4a2e8bf2d6a9f69c934d6726360c4",
"type": "github"
},
"original": {
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

30
flake.nix Executable file
View file

@ -0,0 +1,30 @@
{
description = "Nixos config flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
# IMPORTANT: we're using "libgbm" and is only available in unstable so ensure
# to have it up-to-date or simply don't specify the nixpkgs input
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, ... }@inputs: {
# use "nixos", or your hostname as the name of the configuration
# it's a better practice than "default" shown in the video
nixosConfigurations.t480 = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [
./hosts/t480/configuration.nix
inputs.home-manager.nixosModules.default
];
};
};
}

View file

@ -0,0 +1,77 @@
{ config, lib, pkgs, inputs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
inputs.home-manager.nixosModules.default
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = "t480"; # Define your hostname.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
nix.settings.experimental-features = [ "nix-command" "flakes" ];
time.timeZone = "America/LosAngeles";
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound.
services.pipewire = {
enable = true;
pulse.enable = true;
};
users.users.jack = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [
zed-editor
];
};
home-manager = {
extraSpecialArgs = {inherit inputs; };
users = {
"jack" = import ./home.nix;
};
};
nixpkgs.config.allowUnfree = true;
# Enable touchpad support (enabled default in most desktopManager).
services.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
programs.firefox.enable = true;
programs.hyprland.enable = true;
# List packages installed in system profile.
environment.systemPackages = with pkgs; [
neovim
tree
vim # Both vim and neovim just in case
wget
ghostty
git
gcc
];
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
system.stateVersion = "25.05"; # Did you read the comment?
}

View file

@ -0,0 +1,41 @@
# 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")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/8b0f7a68-4ca3-42e1-ae75-5a2c904dd88c";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/6E63-D7AB";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/446e42e1-0c23-461f-a098-180d59e0bdef"; }
];
# 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
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

33
hosts/t480/home.nix Normal file
View file

@ -0,0 +1,33 @@
{ config, pkgs, inputs, ... }:
{
imports = [
inputs.zen-browser.homeModules.twilight
];
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "jack";
home.homeDirectory = "/home/jack";
home.stateVersion = "25.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = [
];
programs.zen-browser.enable = true;
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
};
home.sessionVariables = {
EDITOR = "nvim";
};
programs.home-manager.enable = true;
}