mirror of
https://github.com/eRgo35/nix-config.git
synced 2026-02-04 05:36:11 +01:00
BREAKING-CHANGE: modified structure, hm is now standalone
This commit is contained in:
@@ -1,82 +0,0 @@
|
||||
{hostname, ...}: {
|
||||
imports =
|
||||
if hostname == "zion"
|
||||
then [
|
||||
./zion.nix
|
||||
|
||||
./modules/adb.nix
|
||||
./modules/ananicy.nix
|
||||
# ./modules/bluetooth.nix
|
||||
./modules/boot.nix
|
||||
./modules/configuration.nix
|
||||
./modules/development.nix
|
||||
./modules/fstrim.nix
|
||||
./modules/gaming.nix
|
||||
# ./modules/greetd.nix
|
||||
./modules/gsettings.nix
|
||||
# ./modules/kde.nix
|
||||
# ./modules/lanzaboot.nix
|
||||
./modules/network.nix
|
||||
./modules/nh.nix
|
||||
./modules/nvidia.nix
|
||||
./modules/ollama.nix
|
||||
./modules/packages.nix
|
||||
./modules/pipewire.nix
|
||||
./modules/printing.nix
|
||||
./modules/remote-builder.nix
|
||||
./modules/security.nix
|
||||
./modules/ssh.nix
|
||||
./modules/steam.nix
|
||||
./modules/users.nix
|
||||
./modules/vm.nix
|
||||
./modules/xserver.nix
|
||||
]
|
||||
else if hostname == "thor"
|
||||
then [
|
||||
./thor.nix
|
||||
|
||||
./modules/adb.nix
|
||||
./modules/ananicy.nix
|
||||
./modules/bluetooth.nix
|
||||
./modules/boot.nix
|
||||
./modules/configuration.nix
|
||||
./modules/development.nix
|
||||
./modules/distributed-builds.nix
|
||||
./modules/fstrim.nix
|
||||
./modules/gaming.nix
|
||||
./modules/greetd.nix
|
||||
./modules/gsettings.nix
|
||||
# ./modules/kde.nix
|
||||
# ./modules/lanzaboot.nix
|
||||
./modules/network.nix
|
||||
./modules/nh.nix
|
||||
# ./modules/nvidia.nix
|
||||
./modules/ollama.nix
|
||||
./modules/packages.nix
|
||||
./modules/pipewire.nix
|
||||
./modules/printing.nix
|
||||
./modules/security.nix
|
||||
./modules/ssh.nix
|
||||
./modules/tlp.nix
|
||||
./modules/users.nix
|
||||
./modules/vm.nix
|
||||
]
|
||||
else if hostname == "server"
|
||||
then [
|
||||
./server.nix
|
||||
|
||||
./modules/nh.nix
|
||||
./modules/tlp.nix
|
||||
./modules/ssh.nix
|
||||
./modules/boot.nix
|
||||
./modules/users.nix
|
||||
./modules/nvidia.nix
|
||||
./modules/ollama.nix
|
||||
./modules/fstrim.nix
|
||||
./modules/system.nix
|
||||
./modules/network.nix
|
||||
./modules/configuration.nix
|
||||
#./modules/lanzaboot.nix
|
||||
]
|
||||
else [];
|
||||
}
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
@@ -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
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{username, ...}: {
|
||||
{
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
flake = "/home/${username}/.files";
|
||||
flake = "/home/mike/.files";
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
|
||||
@@ -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}";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
}
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}: {
|
||||
users.users.${username}.extraGroups = ["libvirtd"];
|
||||
{pkgs, ...}: {
|
||||
boot.kernel.sysctl = {"vm.max_map_count" = 2147483642;};
|
||||
|
||||
# Install necessary packages
|
||||
|
||||
43
hosts/server/configuration.nix
Normal file
43
hosts/server/configuration.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
# This is your system's configuration file.
|
||||
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# You can import other NixOS modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/nixos):
|
||||
# outputs.nixosModules.example
|
||||
|
||||
# Or modules from other flakes (such as nixos-hardware):
|
||||
# inputs.hardware.nixosModules.common-cpu-amd
|
||||
# inputs.hardware.nixosModules.common-ssd
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
# ./users.nix
|
||||
|
||||
# Import your generated (nixos-generate-config) hardware configuration
|
||||
./hardware-configuration.nix
|
||||
|
||||
../modules/common.nix
|
||||
|
||||
../modules/nh.nix
|
||||
../modules/tlp.nix
|
||||
../modules/ssh.nix
|
||||
../modules/boot.nix
|
||||
../modules/users.nix
|
||||
../modules/nvidia.nix
|
||||
../modules/ollama.nix
|
||||
../modules/fstrim.nix
|
||||
../modules/system.nix
|
||||
../modules/network.nix
|
||||
../modules/configuration.nix
|
||||
#../modules/lanzaboot.nix
|
||||
];
|
||||
|
||||
networking.hostName = "server";
|
||||
}
|
||||
56
hosts/thor/configuration.nix
Normal file
56
hosts/thor/configuration.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
# This is your system's configuration file.
|
||||
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# You can import other NixOS modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/nixos):
|
||||
# outputs.nixosModules.example
|
||||
|
||||
# Or modules from other flakes (such as nixos-hardware):
|
||||
# inputs.hardware.nixosModules.common-cpu-amd
|
||||
# inputs.hardware.nixosModules.common-ssd
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
# ./users.nix
|
||||
|
||||
# Import your generated (nixos-generate-config) hardware configuration
|
||||
./hardware-configuration.nix
|
||||
|
||||
../modules/common.nix
|
||||
|
||||
../modules/adb.nix
|
||||
../modules/ananicy.nix
|
||||
../modules/bluetooth.nix
|
||||
../modules/boot.nix
|
||||
../modules/configuration.nix
|
||||
../modules/development.nix
|
||||
../modules/distributed-builds.nix
|
||||
../modules/fstrim.nix
|
||||
../modules/gaming.nix
|
||||
../modules/greetd.nix
|
||||
../modules/gsettings.nix
|
||||
# ../modules/kde.nix
|
||||
# ../modules/lanzaboot.nix
|
||||
../modules/network.nix
|
||||
../modules/nh.nix
|
||||
# ../modules/nvidia.nix
|
||||
../modules/ollama.nix
|
||||
../modules/packages.nix
|
||||
../modules/pipewire.nix
|
||||
../modules/printing.nix
|
||||
../modules/security.nix
|
||||
../modules/ssh.nix
|
||||
../modules/tlp.nix
|
||||
../modules/users.nix
|
||||
../modules/vm.nix
|
||||
];
|
||||
|
||||
networking.hostName = "thor";
|
||||
}
|
||||
57
hosts/zion/configuration.nix
Normal file
57
hosts/zion/configuration.nix
Normal file
@@ -0,0 +1,57 @@
|
||||
# This is your system's configuration file.
|
||||
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# You can import other NixOS modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/nixos):
|
||||
# outputs.nixosModules.example
|
||||
|
||||
# Or modules from other flakes (such as nixos-hardware):
|
||||
# inputs.hardware.nixosModules.common-cpu-amd
|
||||
# inputs.hardware.nixosModules.common-ssd
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
# ./users.nix
|
||||
|
||||
# Import your generated (nixos-generate-config) hardware configuration
|
||||
./hardware-configuration.nix
|
||||
|
||||
../modules/common.nix
|
||||
|
||||
../modules/adb.nix
|
||||
../modules/ananicy.nix
|
||||
# ../modules/bluetooth.nix
|
||||
../modules/boot.nix
|
||||
../modules/common.nix
|
||||
../modules/development.nix
|
||||
../modules/fstrim.nix
|
||||
../modules/gaming.nix
|
||||
# ../modules/greetd.nix
|
||||
../modules/gsettings.nix
|
||||
# ../modules/kde.nix
|
||||
# ../modules/lanzaboot.nix
|
||||
../modules/network.nix
|
||||
../modules/nh.nix
|
||||
../modules/nvidia.nix
|
||||
../modules/ollama.nix
|
||||
../modules/packages.nix
|
||||
../modules/pipewire.nix
|
||||
../modules/printing.nix
|
||||
../modules/remote-builder.nix
|
||||
../modules/security.nix
|
||||
../modules/ssh.nix
|
||||
../modules/steam.nix
|
||||
../modules/users.nix
|
||||
../modules/vm.nix
|
||||
../modules/xserver.nix
|
||||
];
|
||||
|
||||
networking.hostName = "zion";
|
||||
}
|
||||
Reference in New Issue
Block a user