BREAKING-CHANGE: modified structure, hm is now standalone

This commit is contained in:
2025-01-05 19:49:53 +01:00
parent e0d676b63d
commit 4aab349158
23 changed files with 586 additions and 322 deletions

View File

@@ -1,14 +1,8 @@
{
pkgs,
hostname,
inputs,
...
}: {
imports =
if hostname == "zion"
then [inputs.chaotic.nixosModules.default]
else [];
boot = {
tmp.cleanOnBoot = true;
@@ -22,13 +16,6 @@
};
};
kernelPackages =
if hostname == "zion"
then pkgs.linuxPackages_zen #linuxPackages_zen #linuxPackages #linuxPackages_latest #linuxPackages_xanmod_latest
else if hostname == "thor"
then pkgs.linuxPackages
else if hostname == "server"
then pkgs.linuxPackages
else pkgs.linuxPackages_zen;
kernelPackages = pkgs.linuxPackages_zen;
};
}

View File

@@ -1,7 +1,9 @@
{
hostname,
lib,
inputs,
outputs,
pkgs,
config,
...
}: {
time.timeZone = "Europe/Warsaw";
@@ -33,10 +35,10 @@
libinput = {
enable = true;
mouse = {
accelProfile = "flat";
accelSpeed = "0.0";
};
# mouse = {
# accelProfile = "flat";
# accelSpeed = "0.0";
# };
};
};
@@ -58,6 +60,24 @@
};
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
config = {
# I'm sorry Richard Stallman
allowUnfree = true;
@@ -73,19 +93,27 @@
nixos.enable = true;
};
nix = {
nix = let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in {
daemonCPUSchedPolicy = "batch";
channel.enable = false;
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
# nixPath = ["nixpkgs=${inputs.nixpkgs}"];
optimise = {
automatic = true;
dates = ["daily"];
};
# Opinionated: make flake registry and nix path match flake inputs
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
settings = {
auto-optimise-store = true;
experimental-features = ["nix-command" "flakes"];
flake-registry = "";
nix-path = config.nix.nixPath;
substituters = [
"https://cache.nixos.org"

View File

@@ -4,7 +4,7 @@
rust-overlay,
...
}: {
environment.systemPackages = with pkgs; [
environment.systemPackages = with pkgs.unstable; [
# general
docker
docker-compose
@@ -33,6 +33,7 @@
# # python
# python311
# python311Packages.pip
uv
# python311Packages.venvShellHook
# cpp

View File

@@ -1,9 +1,5 @@
{
pkgs,
username,
...
}: {
users.users.${username}.packages = with pkgs; [heroic];
{pkgs, ...}: {
users.users.mike.packages = with pkgs; [heroic];
hardware.steam-hardware.enable = true;
programs = {

View File

@@ -1,9 +1,8 @@
{hostname, ...}: {
{
boot.initrd.systemd.network.wait-online.enable = false;
systemd.services.NetworkManager-wait-online.enable = false;
networking = {
hostName = "${hostname}";
firewall.enable = true;
stevenblack = {

View File

@@ -1,7 +1,7 @@
{username, ...}: {
{
programs.nh = {
enable = true;
flake = "/home/${username}/.files";
flake = "/home/mike/.files";
clean = {
enable = true;
dates = "weekly";

View File

@@ -1,17 +1,15 @@
{
inputs,
username,
hostname,
pkgs,
...
}: {
imports = [inputs.home-manager.nixosModules.home-manager];
# imports = [inputs.home-manager.nixosModules.home-manager];
users.defaultUserShell = pkgs.zsh;
users.users.${username} = {
users.users.mike = {
isNormalUser = true;
description = "${username}";
description = "mike";
extraGroups = [
"networkmanager"
"wheel"
@@ -22,19 +20,19 @@
];
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {inherit inputs username hostname;};
users.${username} = {
imports = [../../home-manager/home.nix];
programs.home-manager.enable = true;
home = {
stateVersion = "24.05";
username = "${username}";
homeDirectory = "/home/${username}";
};
};
};
# home-manager = {
# useGlobalPkgs = true;
# useUserPackages = true;
# extraSpecialArgs = {inherit inputs username hostname;};
#
# users.${username} = {
# imports = [../../home-manager/home.nix];
# programs.home-manager.enable = true;
# home = {
# stateVersion = "24.05";
# username = "${username}";
# homeDirectory = "/home/${username}";
# };
# };
# };
}

View File

@@ -1,9 +1,4 @@
{
pkgs,
username,
...
}: {
users.users.${username}.extraGroups = ["libvirtd"];
{pkgs, ...}: {
boot.kernel.sysctl = {"vm.max_map_count" = 2147483642;};
# Install necessary packages