Maybe working?

This commit is contained in:
Daniel Flanagan 2023-10-03 13:18:12 -05:00
parent 30b5da453d
commit a3304265d2
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
10 changed files with 114 additions and 73 deletions

View file

@ -120,6 +120,21 @@
"type": "github" "type": "github"
} }
}, },
"hardware": {
"locked": {
"lastModified": 1696161939,
"narHash": "sha256-HI1DxS//s46/qv9dcW06TzXaBjxL2DVTQP8R1QsnHzM=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "0ab3ee718e964fb42dc57ace6170f19cb0b66532",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixos-hardware",
"type": "github"
}
},
"helix": { "helix": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
@ -279,6 +294,7 @@
"inputs": { "inputs": {
"api-lyte-dev": "api-lyte-dev", "api-lyte-dev": "api-lyte-dev",
"disko": "disko", "disko": "disko",
"hardware": "hardware",
"helix": "helix", "helix": "helix",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_4",

View file

@ -15,7 +15,8 @@
# TODO: do I really need this in the root of my flake if _only_ beefcake uses it? # TODO: do I really need this in the root of my flake if _only_ beefcake uses it?
api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git"; api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git";
# TODO: hardware.url = "github:nixos/nixos-hardware"; # might be useful for laptops hardware.url = "github:nixos/nixos-hardware";
# TODO: hyprland.url = "github:hyprwm/Hyprland"; # TODO: hyprland.url = "github:hyprwm/Hyprland";
# TODO: nix-colors.url = "github:misterio77/nix-colors"; # TODO: nix-colors.url = "github:misterio77/nix-colors";
}; };
@ -23,6 +24,7 @@
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
nixpkgs-unstable,
home-manager, home-manager,
... ...
} @ inputs: let } @ inputs: let
@ -59,16 +61,28 @@
# NixOS configuration entrypoint # NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname' # Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = { nixosConfigurations = let
dragon = nixpkgs.lib.nixosSystem { mkNixosSystem = system: modules:
nixpkgs.lib.nixosSystem {
system = system;
specialArgs = { specialArgs = {
inherit inputs outputs; inherit inputs outputs system;
flake = self; flake = self;
}; };
modules = [ modules = [self.nixosModules.common] ++ modules;
./nixos/dragon
];
}; };
# mkNixosUnstableSystem = system: modules:
# nixpkgs-unstable.lib.nixosSystem {
# system = system;
# specialArgs = {
# inherit inputs outputs system;
# flake = self;
# };
# modules = [ self.nixosModules.common ] ++ modules;
# };
in {
dragon = mkNixosSystem "x86_64-linux" [./nixos/dragon];
thinker = mkNixosSystem "x86_64-linux" [./nixos/thinker];
}; };
# Standalone home-manager configuration entrypoint # Standalone home-manager configuration entrypoint

View file

@ -6,6 +6,7 @@
... ...
}: let }: let
pkgs = inputs.nixpkgs.legacyPackages.${system}; pkgs = inputs.nixpkgs.legacyPackages.${system};
unstable-pkgs = inputs.nixpkgs-unstable.legacyPackages.${system};
in { in {
services.journald.extraConfig = "SystemMaxUse=1G"; services.journald.extraConfig = "SystemMaxUse=1G";
@ -17,7 +18,8 @@ in {
MANPAGER = "less"; MANPAGER = "less";
}; };
systemPackages = with pkgs; [ systemPackages = with pkgs;
[
age age
bat bat
bc bc
@ -28,7 +30,6 @@ in {
curl curl
dog dog
dua dua
eza
fd fd
file file
gnumake gnumake
@ -61,7 +62,10 @@ in {
xh xh
zellij zellij
zstd zstd
]; ]
++ (with unstable-pkgs; [
eza
]);
}; };
users.users = { users.users = {

View file

@ -1,6 +1,7 @@
# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module). # Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
# These should be stuff you would like to share with others, not your personal configurations. # These should be stuff you would like to share with others, not your personal configurations.
{ {
common = import ./common.nix;
amd = import ./amd.nix; amd = import ./amd.nix;
desktop-usage = import ./desktop-usage.nix; desktop-usage = import ./desktop-usage.nix;
intel = import ./intel.nix; intel = import ./intel.nix;

View file

@ -6,7 +6,8 @@
./user-installed-applications.nix ./user-installed-applications.nix
]; ];
fonts.packages = with pkgs; [ # fonts.packages if unstable?
fonts.fonts = with pkgs; [
(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];}) (nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
(iosevka.override { (iosevka.override {
set = "lyteterm"; set = "lyteterm";

View file

@ -8,7 +8,6 @@
... ...
}: { }: {
networking.hostName = "dragon"; networking.hostName = "dragon";
nixpkgs.hostPlatform = "x86_64-linux";
imports = imports =
[ [

View file

@ -1,32 +1,38 @@
{ {
modulesPath, flake,
inputs,
outputs,
lib, lib,
config,
pkgs,
... ...
}: { }: {
imports = [ networking.hostName = "thinker";
../modules/intel.nix
../modules/desktop-usage.nix
../modules/podman.nix
../modules/wifi.nix
(modulesPath + "/installer/scan/not-detected.nix") imports =
[
inputs.disko.nixosModules.disko
flake.diskoConfigurations.thinker
]
++ (with outputs.nixosModules; [
# If you want to use modules your own flake exports (from modules/nixos):
desktop-usage
podman
postgres
wifi
])
++ [
inputs.hardware.nixosModules.lenovo-thinkpad-t480
# ./relative-module.nix
]; ];
# TODO: https://github.com/NixOS/nixos-hardware/blob/master/lenovo/thinkpad/t480/default.nix
# TODO: hibernation? I've been using [deep] in /sys/power/mem_sleep alright # TODO: hibernation? I've been using [deep] in /sys/power/mem_sleep alright
# with this machine so it may not be necessary? # with this machine so it may not be necessary?
# need to measure percentage lost per day, but I think it's around 10%/day # need to measure percentage lost per day, but I think it's around 10%/day
# it looks like I may have had hibernation working -- see ../old/third.nix # it looks like I may have had hibernation working -- see ../old/third.nix
# hardware
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
networking.hostName = "thinker";
services.pcscd.enable = true; # why do I need this? SD card slot?
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
services.printing.enable = true; # I own a printer in the year of our Lord 2023 services.printing.enable = true; # I own a printer in the year of our Lord 2023