Change flake.nix to allow different nixpkgs versions

This commit is contained in:
2024-06-14 20:32:52 -05:00
parent 0a8ded6db3
commit c8ccbac32c
10 changed files with 211 additions and 42 deletions

View File

@@ -65,7 +65,6 @@
users.users.eesim = {
isNormalUser = true;
extraGroups = [ "wheel" "video" "audo" "networkmanager" ];
packages = with pkgs; [];
shell = pkgs.fish;
};

View File

@@ -0,0 +1,45 @@
# 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" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/ad45b094-608d-4850-b5ba-0f3917947629";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/ad45b094-608d-4850-b5ba-0f3917947629";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/ad45b094-608d-4850-b5ba-0f3917947629";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
swapDevices = [ ];
# 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.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

23
hosts/default/home.nix Normal file
View File

@@ -0,0 +1,23 @@
{
config,
pkgs,
...
}:
{
imports = [
../../modules/home
];
home = {
username = "eesim";
homeDirectory = "/home/eesim";
};
home.file.".config/nvim".source = ../shared/dotfiles/nvim;
home.file.".tmux.conf".source = ../shared/dotfiles/tmux;
programs.home-manager.enable = true;
home.stateVersion = "23.11";
}

39
hosts/default/system.nix Normal file
View File

@@ -0,0 +1,39 @@
# Edit this configuration file to define what should be installed on
# 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`).
{
lib,
config,
pkgs,
...
}: {
nix = {
settings = {
experimental-features = "nix-command flakes";
};
};
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Set your time zone.
time.timeZone = "America/Chicago";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
# Define a user account.
users.users.eesim = {
isNormalUser = true;
extraGroups = [ "wheel" ];
};
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "23.11"; # Did you read the comment?
}