This commit is contained in:
Tao Tien 2023-07-19 00:52:04 -07:00
parent 6cf6fb63f9
commit b40afd66ea
5 changed files with 49 additions and 37 deletions

26
flake.lock generated
View file

@ -10,31 +10,45 @@
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixos-hardware",
"type": "github"
"id": "nixos-hardware",
"type": "indirect"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1689605451,
"narHash": "sha256-u2qp2k9V1smCfk6rdUcgMKvBj3G9jVvaPHyeXinjN9E=",
"owner": "Nixos",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "53657afe29748b3e462f1f892287b7e254c26d77",
"type": "github"
},
"original": {
"owner": "Nixos",
"id": "nixpkgs",
"ref": "nixos-23.05",
"type": "indirect"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1689534811,
"narHash": "sha256-jnSUdzD/414d94plCyNlvTJJtiTogTep6t7ZgIKIHiE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}
}
},

View file

@ -2,21 +2,23 @@
description = "we say NO to shitty OSes";
inputs = {
nixpkgs.url = "github:Nixos/nixpkgs/nixos-23.05";
nixos-hardware.url = "github:NixOS/nixos-hardware";
nixpkgs.url = "nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
nixos-hardware.url = "nixos-hardware";
};
outputs = { nixpkgs, ... }@inputs:
outputs = { nixpkgs, nixos-hardware, nixpkgs-unstable, ... }:
let
# pkgs = import nixpkgs {
# config.allowUnfree = true;
# };
nixosSystem = (systemModules: inputs.nixpkgs.lib.nixosSystem { modules = systemModules; });
nixos-hw = inputs.nixos-hardware.nixosModules;
overlay-unstable = final: prev: {
unstable = nixpkgs-unstable.legacyPackages.x86_64-linux;
};
nixosSystem = (systemModules: nixpkgs.lib.nixosSystem { modules = systemModules; });
nixos-hw = nixos-hardware.nixosModules;
in
{
nixosConfigurations = {
NOcomputer = nixosSystem [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
nixos-hw.common-cpu-amd
nixos-hw.common-gpu-nvidia-nonprime
./systems/BASED.nix
@ -26,6 +28,7 @@
./users/tao.nix
];
NOlaptop = nixosSystem [
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
nixos-hw.common-cpu-intel
# inputs.nixos-hardware.nixosModules.framework
./systems/BASED.nix

View file

@ -33,6 +33,11 @@
VISUAL = "hx";
};
environment.sessionVariables = {
EDITOR = "hx";
VISUAL = "hx";
};
hardware.enableAllFirmware = true;
hardware.bluetooth.enable = lib.mkDefault true;

View file

@ -1,10 +1,12 @@
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [
# mesa
openrgb
gwe
liquidctl
];
{ pkgs, config, ... }:
{
environment.systemPackages = with pkgs;
[
# mesa
openrgb
gwe
liquidctl
];
fileSystems."/home" = {
device = "/dev/disk/by-uuid/eb9fcce2-e9f3-438a-b5ce-8f72f32f0e09";
@ -41,12 +43,10 @@
systemd.user.services.fans = {
description = "NZXT fans to 100% using liquidctl";
# serviceConfig.User = "tao";
script = ''
${pkgs.liquidctl}/bin/liquidctl -m nzxt set sync speed 100
'';
wantedBy = [ "default.target" ];
# partOf = [ "graphical-session.target" ];
};
services.udev.packages = [ pkgs.openrgb ];
@ -55,6 +55,7 @@
SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic UART Port", SYMLINK+="ttyBmpTarg"
'';
# boot.kernelPackages = pkgs.linuxPackages_latest;
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.kernelModules = [ "i2c-dev" "kvm-amd" ];
@ -65,9 +66,8 @@
};
hardware.nvidia = {
modesetting.enable = true;
# package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
};
networking.hostName = "NOcomputer";
}

View file

@ -1,7 +1,4 @@
{ pkgs, config, ... }:
let
unstableTarball = fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz";
in
{ pkgs, ... }:
{
users.users.tao.packages = with pkgs; [
darktable
@ -24,6 +21,7 @@ in
tio
unstable.nushell
unstable.prusa-slicer
unstable.wezterm
virt-manager
zoxide
];
@ -35,14 +33,6 @@ in
configDir = "/home/tao/.config/syncthing";
};
nixpkgs.config = {
packageOverrides = pkgs: {
unstable = import unstableTarball {
config = config.nixpkgs.config;
};
};
};
fonts.fonts = with pkgs; [
(nerdfonts.override { fonts = [ "FiraCode" ]; })
noto-fonts-cjk