trying to unmodularize my setup
This commit is contained in:
parent
195383e6d9
commit
2f5ed1481c
9 changed files with 56 additions and 20 deletions
|
@ -13,7 +13,7 @@
|
||||||
greynix = nixpkgs.lib.nixosSystem {
|
greynix = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./base.nix
|
./nixosModules/base.nix
|
||||||
./hosts/greynix/configuration.nix
|
./hosts/greynix/configuration.nix
|
||||||
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
|
@ -32,8 +32,9 @@
|
||||||
bluenix = nixpkgs.lib.nixosSystem {
|
bluenix = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./base.nix
|
./nixosModules/base.nix
|
||||||
./hosts/bluenix/configuration.nix
|
./hosts/bluenix/configuration.nix
|
||||||
|
./nixosModules/docker.nix
|
||||||
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
|
@ -52,7 +53,7 @@
|
||||||
aspirenix = nixpkgs.lib.nixosSystem {
|
aspirenix = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./base.nix
|
./nixosModules/base.nix
|
||||||
./hosts/aspirenix/configuration.nix
|
./hosts/aspirenix/configuration.nix
|
||||||
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
|
|
|
@ -10,8 +10,13 @@
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
../../nixosModules/base.nix
|
||||||
|
../../nixosModules/modules.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Enable/Disable Modules
|
||||||
|
dockerModule.enable = true;
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-880424d4-ac69-44cf-aa3b-99a224128551".device = "/dev/disk/by-uuid/880424d4-ac69-44cf-aa3b-99a224128551";
|
boot.initrd.luks.devices."luks-880424d4-ac69-44cf-aa3b-99a224128551".device = "/dev/disk/by-uuid/880424d4-ac69-44cf-aa3b-99a224128551";
|
||||||
networking.hostName = "greynix"; # Define your hostname.
|
networking.hostName = "greynix"; # Define your hostname.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ pkgs, config, lib ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # I do imports in flakes
|
[
|
||||||
./gnome.nix
|
./gnome.nix
|
||||||
./systemd.nix
|
./systemd.nix
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
#module test
|
./systemd.nix
|
||||||
./nixosModules/docker.nix
|
./fonts.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# DELETE LATER
|
||||||
# Enable/Disable Modules
|
# Enable/Disable Modules
|
||||||
dockerModule.enable = true;
|
#dockerModule.enable = true;
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
|
@ -1,24 +1,12 @@
|
||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
# enable docker
|
# enable docker
|
||||||
# not all systems need this
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
options = {
|
|
||||||
dockerModule.enable =
|
|
||||||
lib.mkEnableOption "enables Docker Module";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.dockerModule.enable {
|
|
||||||
|
|
||||||
# Enable Docker
|
# Enable Docker
|
||||||
virtualisation.docker = {
|
virtualisation.docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoPrune = {
|
autoPrune = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
24
nixosModules/module-docker.nix
Normal file
24
nixosModules/module-docker.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
# enable docker
|
||||||
|
# not all systems need this
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
options = {
|
||||||
|
dockerModule.enable =
|
||||||
|
lib.mkEnableOption "enables Docker Module";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.dockerModule.enable {
|
||||||
|
|
||||||
|
# Enable Docker
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
autoPrune = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
17
nixosModules/module-modules.nix
Normal file
17
nixosModules/module-modules.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
|
# nix file for all modules
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./docker.nix
|
||||||
|
#./systemd.nix
|
||||||
|
#./gnome.nix
|
||||||
|
#./fonts.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# all modules default to true
|
||||||
|
dockerModule.enable = lib.mkDefault false;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue