1
Fork 0
mirror of https://github.com/thegeneralist01/config.git synced 2026-03-07 10:59:55 +01:00

initial commit

This commit is contained in:
TheGeneralist 2025-05-24 15:38:19 +02:00
commit 50da7ffff8
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4
68 changed files with 3086 additions and 0 deletions

View file

@ -0,0 +1,37 @@
# 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`).
{ self, config, pkgs, lib, inputs, ... }:
{
imports =
[
./hardware-configuration.nix
inputs.agenix.darwinModules.default
# inputs.home-manager.darwinModules.default
];
# age.secrets.hostkey.file = ./hostkey.age;
# services.openssh.hostKeys = [{
# type = "ed25519";
# path = config.age.secrets.hostkey.path;
# }];
users.users.thegeneralist = {
name = "thegeneralist";
home = "/Users/thegeneralist";
shell = pkgs.nushell;
# openssh.authorizedKeys.keys = let
# inherit (import ../../keys.nix) thegeneralist;
# in [ thegeneralist ];
};
# home-manager.users.thegeneralist.home = {
# stateVersion = "24.11";
# homeDirectory = "/Users/thegeneralist";
# };
system.stateVersion = 6;
}

View file

@ -0,0 +1,26 @@
lib: inputs: self: lib.nixosSystem {
specialArgs = inputs // { inherit inputs; inherit self; };
modules = [
./configuration.nix
# Modules
({ pkgs, ... }: let
inherit (lib) filter hasSuffix;
commonModules = lib.filesystem.listFilesRecursive ../../modules/common |> filter (hasSuffix ".nix");
darwinModules = lib.filesystem.listFilesRecursive ../../modules/darwin |> filter (hasSuffix ".nix");
in {
imports = commonModules ++ darwinModules;
})
# Overlays
({ pkgs, lib, ... }: let
inherit (lib) attrValues hasAttrByPath getAttrFromPath filter;
packagePath = [ "overlays" "default" ];
overlays = (attrValues inputs)
|> filter (hasAttrByPath packagePath)
|> map (getAttrFromPath packagePath);
in {
nixpkgs.overlays = overlays;
})
];
}

View file

@ -0,0 +1,11 @@
{ lib, ... }:
{
# 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;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-darwin";
}

Binary file not shown.

View file

@ -0,0 +1,57 @@
# 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`).
{ self, config, pkgs, lib, inputs, ... }:
{
imports =
[
./hardware-configuration.nix
inputs.agenix.nixosModules.default
inputs.home-manager.nixosModules.default
];
age.secrets.hostkey.file = ./hostkey.age;
services.openssh.hostKeys = [{
type = "ed25519";
path = config.age.secrets.hostkey.path;
}];
users.users.thegeneralist = {
isNormalUser = true;
description = "thegeneralist";
extraGroups = [ "wheel" "audio" "video" "input" "scanner" ];
shell = pkgs.nushell;
home = "/home/thegeneralist";
openssh.authorizedKeys.keys = let
inherit (import ../../keys.nix) thegeneralist;
in [ thegeneralist ];
};
home-manager = {
extraSpecialArgs = { inherit inputs; };
users = {
thegeneralist = import (self + /modules/home);
};
};
# Some programs
services.libinput.enable = true;
programs.firefox.enable = true;
programs.zsh.enable = true;
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkb.options in tty.
# };
system.stateVersion = "24.11";
}

View file

@ -0,0 +1,21 @@
lib: inputs: self: lib.nixosSystem {
specialArgs = inputs // { inherit inputs; inherit self; };
modules = [
./configuration.nix
({ pkgs, ... }: let
inherit (lib) filter hasSuffix;
modules = lib.filesystem.listFilesRecursive ../../modules/linux |> filter (hasSuffix ".nix");
in {
imports = modules;
})
({ pkgs, lib, ... }: let
inherit (lib) attrValues hasAttrByPath getAttrFromPath filter;
packagePath = [ "overlays" "default" ];
overlays = (attrValues inputs)
|> filter (hasAttrByPath packagePath)
|> map (getAttrFromPath packagePath);
in {
nixpkgs.overlays = overlays;
})
];
}

View file

@ -0,0 +1,43 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
# Wi-Fi stuff
nixpkgs.config.allowUnfree = true;
hardware.enableAllFirmware = true;
boot.kernelModules = [ "kvm-intel" "rtw_8822bu" ];
fileSystems."/" =
{
device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [{
device = "/dev/disk/by-label/swap";
}];
# 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.enp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f0u5.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

Binary file not shown.