Split modules and profiles
This commit is contained in:
parent
7efadcdd7f
commit
7db6eb7179
flake.nix
machines
AMD-Workstation
RasPi-Server
T420-Laptop
T490s-Laptop
X2100-Laptop
iso-image
modules
profiles
applications-setup.nix
applications
alacritty.nix
boot.nixhardware.nixnetwork.nixemacs
firefox.nixgeary.nixgithub.nixhimalaya.nixnheko.nixokular.nixpackages.nixsylpheed.nixyt-utilities.nixnix
overlay.nixsecurity.nixservers
gitea.nixhome-assistant.nixjitsi.nixmailserver.nixmastodon.nixmatrix-synapse.nixminidlna.nixnextcloud.nixnginx.nixvsftpd.nix
virtualisation.nixworkspace
roles
31
flake.nix
31
flake.nix
@ -59,9 +59,7 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-direnv = {
|
nix-direnv = { url = "github:nix-community/nix-direnv"; };
|
||||||
url = "github:nix-community/nix-direnv";
|
|
||||||
};
|
|
||||||
|
|
||||||
nheko = {
|
nheko = {
|
||||||
url = "github:balsoft/nheko/allow-edits-of-pending-messages";
|
url = "github:balsoft/nheko/allow-edits-of-pending-messages";
|
||||||
@ -69,10 +67,28 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, nix, self, deploy-rs, ... }@inputs: {
|
outputs = { nixpkgs, nix, self, deploy-rs, ... }@inputs:
|
||||||
nixosModules = import ./modules;
|
let
|
||||||
|
findModules = dir:
|
||||||
|
builtins.concatLists (builtins.attrValues (builtins.mapAttrs
|
||||||
|
(name: type:
|
||||||
|
if type == "regular" then
|
||||||
|
[{
|
||||||
|
name = builtins.elemAt (builtins.match "(.*)\\.nix" name) 0;
|
||||||
|
value = dir + "/${name}";
|
||||||
|
}]
|
||||||
|
else if (builtins.readDir (dir + "/${name}"))
|
||||||
|
? "default.nix" then [{
|
||||||
|
inherit name;
|
||||||
|
value = dir + "/${name}";
|
||||||
|
}] else
|
||||||
|
findModules (dir + "/${name}")) (builtins.readDir dir)));
|
||||||
|
in {
|
||||||
|
nixosModules = builtins.listToAttrs (findModules ./modules);
|
||||||
|
|
||||||
nixosProfiles = import ./profiles;
|
nixosProfiles = builtins.listToAttrs (findModules ./profiles);
|
||||||
|
|
||||||
|
nixosRoles = import ./roles;
|
||||||
|
|
||||||
nixosConfigurations = with nixpkgs.lib;
|
nixosConfigurations = with nixpkgs.lib;
|
||||||
let
|
let
|
||||||
@ -80,7 +96,8 @@
|
|||||||
mkHost = name:
|
mkHost = name:
|
||||||
nixosSystem {
|
nixosSystem {
|
||||||
system = builtins.readFile (./machines + "/${name}/system");
|
system = builtins.readFile (./machines + "/${name}/system");
|
||||||
modules = [ (import (./machines + "/${name}")) { device = name; } ];
|
modules =
|
||||||
|
[ (import (./machines + "/${name}")) { device = name; } ];
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
};
|
};
|
||||||
in genAttrs hosts mkHost;
|
in genAttrs hosts mkHost;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{ config, inputs, ... }: {
|
{ config, inputs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
inputs.self.nixosProfiles.desktop
|
inputs.self.nixosRoles.desktop
|
||||||
inputs.self.nixosModules.print-scan
|
inputs.self.nixosProfiles.print-scan
|
||||||
inputs.self.nixosModules.aws
|
inputs.self.nixosProfiles.aws
|
||||||
];
|
];
|
||||||
deviceSpecific.devInfo = {
|
deviceSpecific.devInfo = {
|
||||||
cpu = {
|
cpu = {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
imports = with inputs.self.nixosModules; [
|
imports = with inputs.self.nixosModules; [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
inputs.self.nixosProfiles.server
|
inputs.self.nixosRoles.server
|
||||||
mailserver
|
mailserver
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
imports = with inputs.self.nixosModules; [
|
imports = with inputs.self.nixosModules; [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
inputs.self.nixosProfiles.base
|
inputs.self.nixosRoles.base
|
||||||
gitea
|
gitea
|
||||||
# jitsi
|
# jitsi
|
||||||
mailserver
|
mailserver
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
imports = [ ./hardware-configuration.nix inputs.self.nixosProfiles.desktop ];
|
imports = [ ./hardware-configuration.nix inputs.self.nixosRoles.desktop ];
|
||||||
deviceSpecific.devInfo = {
|
deviceSpecific.devInfo = {
|
||||||
cpu = {
|
cpu = {
|
||||||
vendor = "intel";
|
vendor = "intel";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ inputs, lib, config, pkgs, ... }: {
|
{ inputs, lib, config, pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
inputs.self.nixosProfiles.desktop
|
inputs.self.nixosRoles.desktop
|
||||||
];
|
];
|
||||||
deviceSpecific.devInfo = {
|
deviceSpecific.devInfo = {
|
||||||
cpu = {
|
cpu = {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ modulesPath, lib, inputs, pkgs, ... }: {
|
{ modulesPath, lib, inputs, pkgs, ... }: {
|
||||||
imports = with inputs.self.nixosModules; [
|
imports = with inputs.self.nixosModules; [
|
||||||
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
||||||
inputs.self.nixosProfiles.base
|
inputs.self.nixosRoles.base
|
||||||
themes
|
themes
|
||||||
fonts
|
fonts
|
||||||
cage
|
cage
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
let
|
|
||||||
findModules = dir:
|
|
||||||
builtins.concatLists (builtins.attrValues (builtins.mapAttrs (name: type:
|
|
||||||
if type == "regular" then
|
|
||||||
(if name == "default.nix" then
|
|
||||||
[ ]
|
|
||||||
else [{
|
|
||||||
name = builtins.elemAt (builtins.match "(.*)\\.nix" name) 0;
|
|
||||||
value = dir + "/${name}";
|
|
||||||
}])
|
|
||||||
else if (builtins.readDir (dir + "/${name}")) ? "default.nix" then [{
|
|
||||||
inherit name;
|
|
||||||
value = dir + "/${name}";
|
|
||||||
}] else
|
|
||||||
findModules (dir + "/${name}")) (builtins.readDir dir)));
|
|
||||||
|
|
||||||
in builtins.listToAttrs (findModules ./.)
|
|
0
modules/workspace/i3blocks/scripts/bluetooth.nix → profiles/workspace/i3blocks/scripts/bluetooth.nix
0
modules/workspace/i3blocks/scripts/bluetooth.nix → profiles/workspace/i3blocks/scripts/bluetooth.nix
@ -1,15 +1,19 @@
|
|||||||
{ inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
imports = with inputs.self.nixosModules; [
|
imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
|
||||||
|
# MODULES
|
||||||
applications
|
applications
|
||||||
boot
|
|
||||||
secrets
|
secrets
|
||||||
secrets-envsubst
|
secrets-envsubst
|
||||||
|
persist
|
||||||
|
|
||||||
|
|
||||||
|
# PROFILES
|
||||||
autoRun
|
autoRun
|
||||||
xdg
|
xdg
|
||||||
|
|
||||||
|
boot
|
||||||
devices
|
devices
|
||||||
git
|
git
|
||||||
gpg
|
gpg
|
||||||
@ -18,7 +22,6 @@
|
|||||||
network
|
network
|
||||||
nix
|
nix
|
||||||
overlay
|
overlay
|
||||||
persist
|
|
||||||
security
|
security
|
||||||
ssh
|
ssh
|
||||||
zsh
|
zsh
|
@ -1,11 +1,15 @@
|
|||||||
{ inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
imports = with inputs.self.nixosModules; [
|
imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [
|
||||||
./base.nix
|
./base.nix
|
||||||
|
|
||||||
applications-setup
|
# MODULES
|
||||||
ezwg
|
|
||||||
hardware
|
|
||||||
themes
|
themes
|
||||||
|
ezwg
|
||||||
|
|
||||||
|
|
||||||
|
# PROFILES
|
||||||
|
applications-setup
|
||||||
|
hardware
|
||||||
virtualisation
|
virtualisation
|
||||||
|
|
||||||
alacritty
|
alacritty
|
Loading…
x
Reference in New Issue
Block a user