finally system boots with new config

need to add all my stuff btw
This commit is contained in:
2026-07-11 23:14:30 -05:00
parent bbdb6339b0
commit c5209b0d90
17 changed files with 578 additions and 252 deletions
+103
View File
@@ -0,0 +1,103 @@
{
config,
pkgs,
shared,
...
}:
let
cfg = config.workstation.core;
allowRootSSH = if cfg.ssh.permitRootLogin then "yes" else "no";
in
{
config = {
networking.hostName = cfg.hostname;
boot = {
kernelPackages = shared.kernelOptions.${cfg.kernel};
loader = {
systemd-boot = {
enable = true;
editor = true;
};
efi.canTouchEfiVariables = true;
};
};
time.timeZone = "America/Chicago";
programs.${cfg.user.shell}.enable = true;
users.users.${cfg.user.name} = with cfg.user; {
isNormalUser = true;
description = fullName;
extraGroups = [
"wheel"
"networkmanager"
"input"
];
shell = pkgs.${shell};
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
gitFull
neovim
git-credential-manager
gnupg
];
nix = {
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
settings = {
trusted-users = [
"root"
cfg.user.name
];
experimental-features = [
"nix-command"
"flakes"
];
auto-optimise-store = true;
};
};
programs.nix-ld.enable = true;
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
};
security.rtkit.enable = true;
services = {
xserver.xkb = {
layout = "us";
variant = "";
};
openssh = {
enable = true;
settings.PermitRootLogin = allowRootSSH;
};
};
system.stateVersion = "26.11";
};
}
+7 -101
View File
@@ -1,107 +1,13 @@
{ pkgs, inputs, ... }:
{ pkgs, ... }:
let
system = pkgs.stdenv.hostPlatform.system;
shared = import ./shared.nix { inherit pkgs; };
in
{
boot.kernelPackages = pkgs.linuxPackages_latest;
time.timeZone = "America/Chicago";
programs.fish.enable = true;
users.users.river = {
isNormalUser = true;
description = "Maaz Khokhar";
extraGroups = [
"wheel"
"networkmanager"
"input"
];
shell = pkgs.fish;
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
gitFull
neovim
btop
unzip
mpv
wl-clipboard
wireplumber
brightnessctl
pulseaudio
pavucontrol
ghostty
git-credential-manager
gnupg
yazi
jujutsu
glow
inputs.silicate.packages.${system}.default
inputs.herdr.packages.${system}.default
imports = [
./options.nix
./config.nix
];
nix = {
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
settings = {
trusted-users = [
"root"
"river"
];
experimental-features = [
"nix-command"
"flakes"
];
auto-optimise-store = true;
};
};
programs.nix-ld.enable = true;
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
};
security.rtkit.enable = true;
services = {
xserver.xkb = {
layout = "us";
variant = "";
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
openssh = {
enable = true;
settings.PermitRootLogin = "no";
};
printing.enable = true;
};
_module.args.shared = shared;
}
+48
View File
@@ -0,0 +1,48 @@
{
lib,
shared,
...
}:
{
options.workstation.core = {
hostname = lib.mkOption {
type = lib.types.str;
default = "nixos";
description = "Hostname of the machine";
};
kernel = lib.mkOption {
type = with lib.types; enum (builtins.attrNames shared.kernelOptions);
default = "lts";
description = "The kernel of the machine";
};
user = {
name = lib.mkOption {
type = lib.types.str;
default = "river";
description = "The username of the primary user";
};
fullName = lib.mkOption {
type = lib.types.str;
default = "Maaz Khokhar";
description = "The full name of the user";
};
shell = lib.mkOption {
type = lib.types.str;
default = "fish";
description = "The shell the primary user uses";
};
};
allowUnfree = lib.mkEnableOption "unfree packages" // {
default = true;
};
ssh = {
permitRootLogin = lib.mkEnableOption "root SSH login";
};
};
}
+9
View File
@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
kernelOptions = {
stable = pkgs.linuxPackages;
lts = pkgs.linuxPackages_6_12;
latest = pkgs.linuxPackages_latest;
};
}