From 7db6eb7179215f1e4bc756c7b20e7328f7823655 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Thu, 24 Jun 2021 11:41:17 +0300 Subject: [PATCH] Split modules and profiles --- flake.nix | 101 ++++++++++-------- machines/AMD-Workstation/default.nix | 6 +- machines/RasPi-Server/default.nix | 2 +- machines/T420-Laptop/default.nix | 2 +- machines/T490s-Laptop/default.nix | 2 +- machines/X2100-Laptop/default.nix | 2 +- machines/iso-image/default.nix | 2 +- modules/default.nix | 17 --- {modules => profiles}/applications-setup.nix | 0 .../applications/alacritty.nix | 0 .../applications/emacs/default.nix | 0 .../applications/emacs/init.el | 0 .../applications/emacs/org-gcal-config.el | 0 .../applications/firefox.nix | 0 {modules => profiles}/applications/geary.nix | 0 {modules => profiles}/applications/github.nix | 0 .../applications/himalaya.nix | 0 {modules => profiles}/applications/nheko.nix | 0 {modules => profiles}/applications/okular.nix | 0 .../applications/packages.nix | 0 .../applications/sylpheed.nix | 0 .../applications/yt-utilities.nix | 0 {modules => profiles}/boot.nix | 0 {modules => profiles}/hardware.nix | 0 {modules => profiles}/network.nix | 0 {modules => profiles}/nix/default.nix | 0 {modules => profiles}/nix/nix.patch | 0 {modules => profiles}/overlay.nix | 0 {modules => profiles}/security.nix | 0 {modules => profiles}/servers/gitea.nix | 0 .../servers/home-assistant.nix | 0 {modules => profiles}/servers/jitsi.nix | 0 {modules => profiles}/servers/mailserver.nix | 0 {modules => profiles}/servers/mastodon.nix | 0 .../servers/matrix-synapse.nix | 0 {modules => profiles}/servers/minidlna.nix | 0 {modules => profiles}/servers/nextcloud.nix | 0 {modules => profiles}/servers/nginx.nix | 0 {modules => profiles}/servers/vsftpd.nix | 0 {modules => profiles}/virtualisation.nix | 0 {modules => profiles}/workspace/autoRun.nix | 0 {modules => profiles}/workspace/aws.nix | 0 {modules => profiles}/workspace/cage.nix | 0 {modules => profiles}/workspace/cursor.nix | 0 {modules => profiles}/workspace/direnv.nix | 0 {modules => profiles}/workspace/fonts.nix | 0 {modules => profiles}/workspace/git.nix | 0 .../workspace/gnome3/accounts.conf | 0 .../workspace/gnome3/default.nix | 0 .../gnome3/gnome-keyring-template.conf | 0 .../workspace/gnome3/nextcloud.source | 0 {modules => profiles}/workspace/gpg.nix | 0 {modules => profiles}/workspace/gtk.nix | 0 .../workspace/i3blocks/default.nix | 0 .../workspace/i3blocks/scripts/battery.nix | 0 .../workspace/i3blocks/scripts/bluetooth.nix | 0 .../i3blocks/scripts/bluetooth_battery.py | 0 .../workspace/i3blocks/scripts/brightness.nix | 0 .../i3blocks/scripts/connections.nix | 0 .../workspace/i3blocks/scripts/default.nix | 0 .../workspace/i3blocks/scripts/emacs.nix | 0 .../workspace/i3blocks/scripts/email.nix | 0 .../workspace/i3blocks/scripts/free.hs | 0 .../workspace/i3blocks/scripts/free.nix | 0 .../i3blocks/scripts/hydra-status.nix | 0 .../workspace/i3blocks/scripts/music.nix | 0 .../workspace/i3blocks/scripts/network.hs | 0 .../workspace/i3blocks/scripts/sound.nix | 0 .../workspace/i3blocks/scripts/temperature.hs | 0 .../i3blocks/scripts/temperature.nix | 0 .../workspace/i3blocks/scripts/weather.nix | 0 .../i3blocks/scripts/youtrack-wage.nix | 0 {modules => profiles}/workspace/kanshi.nix | 0 .../workspace/kde/default.nix | 0 {modules => profiles}/workspace/light.nix | 0 {modules => profiles}/workspace/locale.nix | 0 {modules => profiles}/workspace/mako.nix | 0 {modules => profiles}/workspace/misc.nix | 0 .../print-scan/Brother_HL-3170CDW_series.ppd | 0 .../workspace/print-scan/default.nix | 0 .../workspace/simple-osd-daemons.nix | 0 {modules => profiles}/workspace/ssh.nix | 0 .../workspace/sway/default.nix | 0 {modules => profiles}/workspace/xdg.nix | 0 {modules => profiles}/workspace/zsh.nix | 0 {profiles => roles}/base.nix | 9 +- {profiles => roles}/default.nix | 0 {profiles => roles}/desktop.nix | 12 ++- {profiles => roles}/server.nix | 0 89 files changed, 81 insertions(+), 74 deletions(-) delete mode 100755 modules/default.nix rename {modules => profiles}/applications-setup.nix (100%) rename {modules => profiles}/applications/alacritty.nix (100%) rename {modules => profiles}/applications/emacs/default.nix (100%) rename {modules => profiles}/applications/emacs/init.el (100%) rename {modules => profiles}/applications/emacs/org-gcal-config.el (100%) rename {modules => profiles}/applications/firefox.nix (100%) rename {modules => profiles}/applications/geary.nix (100%) rename {modules => profiles}/applications/github.nix (100%) rename {modules => profiles}/applications/himalaya.nix (100%) rename {modules => profiles}/applications/nheko.nix (100%) rename {modules => profiles}/applications/okular.nix (100%) rename {modules => profiles}/applications/packages.nix (100%) rename {modules => profiles}/applications/sylpheed.nix (100%) rename {modules => profiles}/applications/yt-utilities.nix (100%) rename {modules => profiles}/boot.nix (100%) rename {modules => profiles}/hardware.nix (100%) rename {modules => profiles}/network.nix (100%) rename {modules => profiles}/nix/default.nix (100%) rename {modules => profiles}/nix/nix.patch (100%) rename {modules => profiles}/overlay.nix (100%) rename {modules => profiles}/security.nix (100%) rename {modules => profiles}/servers/gitea.nix (100%) rename {modules => profiles}/servers/home-assistant.nix (100%) rename {modules => profiles}/servers/jitsi.nix (100%) rename {modules => profiles}/servers/mailserver.nix (100%) rename {modules => profiles}/servers/mastodon.nix (100%) rename {modules => profiles}/servers/matrix-synapse.nix (100%) rename {modules => profiles}/servers/minidlna.nix (100%) rename {modules => profiles}/servers/nextcloud.nix (100%) rename {modules => profiles}/servers/nginx.nix (100%) rename {modules => profiles}/servers/vsftpd.nix (100%) rename {modules => profiles}/virtualisation.nix (100%) rename {modules => profiles}/workspace/autoRun.nix (100%) rename {modules => profiles}/workspace/aws.nix (100%) rename {modules => profiles}/workspace/cage.nix (100%) rename {modules => profiles}/workspace/cursor.nix (100%) rename {modules => profiles}/workspace/direnv.nix (100%) rename {modules => profiles}/workspace/fonts.nix (100%) rename {modules => profiles}/workspace/git.nix (100%) rename {modules => profiles}/workspace/gnome3/accounts.conf (100%) rename {modules => profiles}/workspace/gnome3/default.nix (100%) rename {modules => profiles}/workspace/gnome3/gnome-keyring-template.conf (100%) rename {modules => profiles}/workspace/gnome3/nextcloud.source (100%) rename {modules => profiles}/workspace/gpg.nix (100%) rename {modules => profiles}/workspace/gtk.nix (100%) rename {modules => profiles}/workspace/i3blocks/default.nix (100%) rename {modules => profiles}/workspace/i3blocks/scripts/battery.nix (100%) rename {modules => profiles}/workspace/i3blocks/scripts/bluetooth.nix (100%) rename {modules => profiles}/workspace/i3blocks/scripts/bluetooth_battery.py (100%) rename {modules => profiles}/workspace/i3blocks/scripts/brightness.nix (100%) rename {modules => profiles}/workspace/i3blocks/scripts/connections.nix (100%) rename {modules => profiles}/workspace/i3blocks/scripts/default.nix (100%) rename {modules => profiles}/workspace/i3blocks/scripts/emacs.nix (100%) rename {modules => profiles}/workspace/i3blocks/scripts/email.nix (100%) rename {modules => profiles}/workspace/i3blocks/scripts/free.hs (100%) rename {modules => profiles}/workspace/i3blocks/scripts/free.nix (100%) rename {modules => profiles}/workspace/i3blocks/scripts/hydra-status.nix (100%) rename {modules => profiles}/workspace/i3blocks/scripts/music.nix (100%) rename {modules => profiles}/workspace/i3blocks/scripts/network.hs (100%) rename {modules => profiles}/workspace/i3blocks/scripts/sound.nix (100%) rename {modules => profiles}/workspace/i3blocks/scripts/temperature.hs (100%) rename {modules => profiles}/workspace/i3blocks/scripts/temperature.nix (100%) rename {modules => profiles}/workspace/i3blocks/scripts/weather.nix (100%) rename {modules => profiles}/workspace/i3blocks/scripts/youtrack-wage.nix (100%) rename {modules => profiles}/workspace/kanshi.nix (100%) rename {modules => profiles}/workspace/kde/default.nix (100%) rename {modules => profiles}/workspace/light.nix (100%) rename {modules => profiles}/workspace/locale.nix (100%) rename {modules => profiles}/workspace/mako.nix (100%) rename {modules => profiles}/workspace/misc.nix (100%) rename {modules => profiles}/workspace/print-scan/Brother_HL-3170CDW_series.ppd (100%) rename {modules => profiles}/workspace/print-scan/default.nix (100%) rename {modules => profiles}/workspace/simple-osd-daemons.nix (100%) rename {modules => profiles}/workspace/ssh.nix (100%) rename {modules => profiles}/workspace/sway/default.nix (100%) rename {modules => profiles}/workspace/xdg.nix (100%) rename {modules => profiles}/workspace/zsh.nix (100%) rename {profiles => roles}/base.nix (72%) rename {profiles => roles}/default.nix (100%) rename {profiles => roles}/desktop.nix (76%) rename {profiles => roles}/server.nix (100%) diff --git a/flake.nix b/flake.nix index 3cd4f98..1ee50e8 100644 --- a/flake.nix +++ b/flake.nix @@ -59,9 +59,7 @@ flake = false; }; - nix-direnv = { - url = "github:nix-community/nix-direnv"; - }; + nix-direnv = { url = "github:nix-community/nix-direnv"; }; nheko = { url = "github:balsoft/nheko/allow-edits-of-pending-messages"; @@ -69,53 +67,72 @@ }; }; - outputs = { nixpkgs, nix, self, deploy-rs, ... }@inputs: { - nixosModules = import ./modules; + outputs = { nixpkgs, nix, self, deploy-rs, ... }@inputs: + 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); - nixosConfigurations = with nixpkgs.lib; - let - hosts = builtins.attrNames (builtins.readDir ./machines); - mkHost = name: - nixosSystem { - system = builtins.readFile (./machines + "/${name}/system"); - modules = [ (import (./machines + "/${name}")) { device = name; } ]; - specialArgs = { inherit inputs; }; - }; - in genAttrs hosts mkHost; + nixosRoles = import ./roles; - legacyPackages.x86_64-linux = - (builtins.head (builtins.attrValues self.nixosConfigurations)).pkgs; + nixosConfigurations = with nixpkgs.lib; + let + hosts = builtins.attrNames (builtins.readDir ./machines); + mkHost = name: + nixosSystem { + system = builtins.readFile (./machines + "/${name}/system"); + modules = + [ (import (./machines + "/${name}")) { device = name; } ]; + specialArgs = { inherit inputs; }; + }; + in genAttrs hosts mkHost; - defaultApp = deploy-rs.defaultApp; + legacyPackages.x86_64-linux = + (builtins.head (builtins.attrValues self.nixosConfigurations)).pkgs; - devShell.x86_64-linux = with nixpkgs.legacyPackages.x86_64-linux; - mkShell { - buildInputs = [ - nix.defaultPackage.x86_64-linux - deploy-rs.defaultPackage.x86_64-linux - nixfmt - ]; - }; + defaultApp = deploy-rs.defaultApp; - deploy = { - user = "root"; - nodes = (builtins.mapAttrs (_: machine: { - hostname = machine.config.networking.hostName; - profiles.system = { - user = "balsoft"; - path = deploy-rs.lib.x86_64-linux.activate.noop - machine.config.system.build.toplevel; + devShell.x86_64-linux = with nixpkgs.legacyPackages.x86_64-linux; + mkShell { + buildInputs = [ + nix.defaultPackage.x86_64-linux + deploy-rs.defaultPackage.x86_64-linux + nixfmt + ]; }; - }) self.nixosConfigurations) // { - T420-Laptop = { - hostname = - self.nixosConfigurations.T420-Laptop.config.networking.hostName; - profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos - self.nixosConfigurations.T420-Laptop; + + deploy = { + user = "root"; + nodes = (builtins.mapAttrs (_: machine: { + hostname = machine.config.networking.hostName; + profiles.system = { + user = "balsoft"; + path = deploy-rs.lib.x86_64-linux.activate.noop + machine.config.system.build.toplevel; + }; + }) self.nixosConfigurations) // { + T420-Laptop = { + hostname = + self.nixosConfigurations.T420-Laptop.config.networking.hostName; + profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos + self.nixosConfigurations.T420-Laptop; + }; }; }; }; - }; } diff --git a/machines/AMD-Workstation/default.nix b/machines/AMD-Workstation/default.nix index c8b1228..5e9b758 100644 --- a/machines/AMD-Workstation/default.nix +++ b/machines/AMD-Workstation/default.nix @@ -1,9 +1,9 @@ { config, inputs, ... }: { imports = [ ./hardware-configuration.nix - inputs.self.nixosProfiles.desktop - inputs.self.nixosModules.print-scan - inputs.self.nixosModules.aws + inputs.self.nixosRoles.desktop + inputs.self.nixosProfiles.print-scan + inputs.self.nixosProfiles.aws ]; deviceSpecific.devInfo = { cpu = { diff --git a/machines/RasPi-Server/default.nix b/machines/RasPi-Server/default.nix index 14c3053..cd31b03 100644 --- a/machines/RasPi-Server/default.nix +++ b/machines/RasPi-Server/default.nix @@ -1,7 +1,7 @@ { inputs, ... }: { imports = with inputs.self.nixosModules; [ ./hardware-configuration.nix - inputs.self.nixosProfiles.server + inputs.self.nixosRoles.server mailserver ]; diff --git a/machines/T420-Laptop/default.nix b/machines/T420-Laptop/default.nix index 1036dce..9e89037 100644 --- a/machines/T420-Laptop/default.nix +++ b/machines/T420-Laptop/default.nix @@ -1,7 +1,7 @@ { inputs, ... }: { imports = with inputs.self.nixosModules; [ ./hardware-configuration.nix - inputs.self.nixosProfiles.base + inputs.self.nixosRoles.base gitea # jitsi mailserver diff --git a/machines/T490s-Laptop/default.nix b/machines/T490s-Laptop/default.nix index afcf46c..4ba8b95 100644 --- a/machines/T490s-Laptop/default.nix +++ b/machines/T490s-Laptop/default.nix @@ -1,5 +1,5 @@ { inputs, ... }: { - imports = [ ./hardware-configuration.nix inputs.self.nixosProfiles.desktop ]; + imports = [ ./hardware-configuration.nix inputs.self.nixosRoles.desktop ]; deviceSpecific.devInfo = { cpu = { vendor = "intel"; diff --git a/machines/X2100-Laptop/default.nix b/machines/X2100-Laptop/default.nix index 0dc271a..7806f48 100644 --- a/machines/X2100-Laptop/default.nix +++ b/machines/X2100-Laptop/default.nix @@ -1,7 +1,7 @@ { inputs, lib, config, pkgs, ... }: { imports = [ ./hardware-configuration.nix - inputs.self.nixosProfiles.desktop + inputs.self.nixosRoles.desktop ]; deviceSpecific.devInfo = { cpu = { diff --git a/machines/iso-image/default.nix b/machines/iso-image/default.nix index 2f410ac..4f703c0 100644 --- a/machines/iso-image/default.nix +++ b/machines/iso-image/default.nix @@ -1,7 +1,7 @@ { modulesPath, lib, inputs, pkgs, ... }: { imports = with inputs.self.nixosModules; [ "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" - inputs.self.nixosProfiles.base + inputs.self.nixosRoles.base themes fonts cage diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100755 index ee1cbfe..0000000 --- a/modules/default.nix +++ /dev/null @@ -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 ./.) diff --git a/modules/applications-setup.nix b/profiles/applications-setup.nix similarity index 100% rename from modules/applications-setup.nix rename to profiles/applications-setup.nix diff --git a/modules/applications/alacritty.nix b/profiles/applications/alacritty.nix similarity index 100% rename from modules/applications/alacritty.nix rename to profiles/applications/alacritty.nix diff --git a/modules/applications/emacs/default.nix b/profiles/applications/emacs/default.nix similarity index 100% rename from modules/applications/emacs/default.nix rename to profiles/applications/emacs/default.nix diff --git a/modules/applications/emacs/init.el b/profiles/applications/emacs/init.el similarity index 100% rename from modules/applications/emacs/init.el rename to profiles/applications/emacs/init.el diff --git a/modules/applications/emacs/org-gcal-config.el b/profiles/applications/emacs/org-gcal-config.el similarity index 100% rename from modules/applications/emacs/org-gcal-config.el rename to profiles/applications/emacs/org-gcal-config.el diff --git a/modules/applications/firefox.nix b/profiles/applications/firefox.nix similarity index 100% rename from modules/applications/firefox.nix rename to profiles/applications/firefox.nix diff --git a/modules/applications/geary.nix b/profiles/applications/geary.nix similarity index 100% rename from modules/applications/geary.nix rename to profiles/applications/geary.nix diff --git a/modules/applications/github.nix b/profiles/applications/github.nix similarity index 100% rename from modules/applications/github.nix rename to profiles/applications/github.nix diff --git a/modules/applications/himalaya.nix b/profiles/applications/himalaya.nix similarity index 100% rename from modules/applications/himalaya.nix rename to profiles/applications/himalaya.nix diff --git a/modules/applications/nheko.nix b/profiles/applications/nheko.nix similarity index 100% rename from modules/applications/nheko.nix rename to profiles/applications/nheko.nix diff --git a/modules/applications/okular.nix b/profiles/applications/okular.nix similarity index 100% rename from modules/applications/okular.nix rename to profiles/applications/okular.nix diff --git a/modules/applications/packages.nix b/profiles/applications/packages.nix similarity index 100% rename from modules/applications/packages.nix rename to profiles/applications/packages.nix diff --git a/modules/applications/sylpheed.nix b/profiles/applications/sylpheed.nix similarity index 100% rename from modules/applications/sylpheed.nix rename to profiles/applications/sylpheed.nix diff --git a/modules/applications/yt-utilities.nix b/profiles/applications/yt-utilities.nix similarity index 100% rename from modules/applications/yt-utilities.nix rename to profiles/applications/yt-utilities.nix diff --git a/modules/boot.nix b/profiles/boot.nix similarity index 100% rename from modules/boot.nix rename to profiles/boot.nix diff --git a/modules/hardware.nix b/profiles/hardware.nix similarity index 100% rename from modules/hardware.nix rename to profiles/hardware.nix diff --git a/modules/network.nix b/profiles/network.nix similarity index 100% rename from modules/network.nix rename to profiles/network.nix diff --git a/modules/nix/default.nix b/profiles/nix/default.nix similarity index 100% rename from modules/nix/default.nix rename to profiles/nix/default.nix diff --git a/modules/nix/nix.patch b/profiles/nix/nix.patch similarity index 100% rename from modules/nix/nix.patch rename to profiles/nix/nix.patch diff --git a/modules/overlay.nix b/profiles/overlay.nix similarity index 100% rename from modules/overlay.nix rename to profiles/overlay.nix diff --git a/modules/security.nix b/profiles/security.nix similarity index 100% rename from modules/security.nix rename to profiles/security.nix diff --git a/modules/servers/gitea.nix b/profiles/servers/gitea.nix similarity index 100% rename from modules/servers/gitea.nix rename to profiles/servers/gitea.nix diff --git a/modules/servers/home-assistant.nix b/profiles/servers/home-assistant.nix similarity index 100% rename from modules/servers/home-assistant.nix rename to profiles/servers/home-assistant.nix diff --git a/modules/servers/jitsi.nix b/profiles/servers/jitsi.nix similarity index 100% rename from modules/servers/jitsi.nix rename to profiles/servers/jitsi.nix diff --git a/modules/servers/mailserver.nix b/profiles/servers/mailserver.nix similarity index 100% rename from modules/servers/mailserver.nix rename to profiles/servers/mailserver.nix diff --git a/modules/servers/mastodon.nix b/profiles/servers/mastodon.nix similarity index 100% rename from modules/servers/mastodon.nix rename to profiles/servers/mastodon.nix diff --git a/modules/servers/matrix-synapse.nix b/profiles/servers/matrix-synapse.nix similarity index 100% rename from modules/servers/matrix-synapse.nix rename to profiles/servers/matrix-synapse.nix diff --git a/modules/servers/minidlna.nix b/profiles/servers/minidlna.nix similarity index 100% rename from modules/servers/minidlna.nix rename to profiles/servers/minidlna.nix diff --git a/modules/servers/nextcloud.nix b/profiles/servers/nextcloud.nix similarity index 100% rename from modules/servers/nextcloud.nix rename to profiles/servers/nextcloud.nix diff --git a/modules/servers/nginx.nix b/profiles/servers/nginx.nix similarity index 100% rename from modules/servers/nginx.nix rename to profiles/servers/nginx.nix diff --git a/modules/servers/vsftpd.nix b/profiles/servers/vsftpd.nix similarity index 100% rename from modules/servers/vsftpd.nix rename to profiles/servers/vsftpd.nix diff --git a/modules/virtualisation.nix b/profiles/virtualisation.nix similarity index 100% rename from modules/virtualisation.nix rename to profiles/virtualisation.nix diff --git a/modules/workspace/autoRun.nix b/profiles/workspace/autoRun.nix similarity index 100% rename from modules/workspace/autoRun.nix rename to profiles/workspace/autoRun.nix diff --git a/modules/workspace/aws.nix b/profiles/workspace/aws.nix similarity index 100% rename from modules/workspace/aws.nix rename to profiles/workspace/aws.nix diff --git a/modules/workspace/cage.nix b/profiles/workspace/cage.nix similarity index 100% rename from modules/workspace/cage.nix rename to profiles/workspace/cage.nix diff --git a/modules/workspace/cursor.nix b/profiles/workspace/cursor.nix similarity index 100% rename from modules/workspace/cursor.nix rename to profiles/workspace/cursor.nix diff --git a/modules/workspace/direnv.nix b/profiles/workspace/direnv.nix similarity index 100% rename from modules/workspace/direnv.nix rename to profiles/workspace/direnv.nix diff --git a/modules/workspace/fonts.nix b/profiles/workspace/fonts.nix similarity index 100% rename from modules/workspace/fonts.nix rename to profiles/workspace/fonts.nix diff --git a/modules/workspace/git.nix b/profiles/workspace/git.nix similarity index 100% rename from modules/workspace/git.nix rename to profiles/workspace/git.nix diff --git a/modules/workspace/gnome3/accounts.conf b/profiles/workspace/gnome3/accounts.conf similarity index 100% rename from modules/workspace/gnome3/accounts.conf rename to profiles/workspace/gnome3/accounts.conf diff --git a/modules/workspace/gnome3/default.nix b/profiles/workspace/gnome3/default.nix similarity index 100% rename from modules/workspace/gnome3/default.nix rename to profiles/workspace/gnome3/default.nix diff --git a/modules/workspace/gnome3/gnome-keyring-template.conf b/profiles/workspace/gnome3/gnome-keyring-template.conf similarity index 100% rename from modules/workspace/gnome3/gnome-keyring-template.conf rename to profiles/workspace/gnome3/gnome-keyring-template.conf diff --git a/modules/workspace/gnome3/nextcloud.source b/profiles/workspace/gnome3/nextcloud.source similarity index 100% rename from modules/workspace/gnome3/nextcloud.source rename to profiles/workspace/gnome3/nextcloud.source diff --git a/modules/workspace/gpg.nix b/profiles/workspace/gpg.nix similarity index 100% rename from modules/workspace/gpg.nix rename to profiles/workspace/gpg.nix diff --git a/modules/workspace/gtk.nix b/profiles/workspace/gtk.nix similarity index 100% rename from modules/workspace/gtk.nix rename to profiles/workspace/gtk.nix diff --git a/modules/workspace/i3blocks/default.nix b/profiles/workspace/i3blocks/default.nix similarity index 100% rename from modules/workspace/i3blocks/default.nix rename to profiles/workspace/i3blocks/default.nix diff --git a/modules/workspace/i3blocks/scripts/battery.nix b/profiles/workspace/i3blocks/scripts/battery.nix similarity index 100% rename from modules/workspace/i3blocks/scripts/battery.nix rename to profiles/workspace/i3blocks/scripts/battery.nix diff --git a/modules/workspace/i3blocks/scripts/bluetooth.nix b/profiles/workspace/i3blocks/scripts/bluetooth.nix similarity index 100% rename from modules/workspace/i3blocks/scripts/bluetooth.nix rename to profiles/workspace/i3blocks/scripts/bluetooth.nix diff --git a/modules/workspace/i3blocks/scripts/bluetooth_battery.py b/profiles/workspace/i3blocks/scripts/bluetooth_battery.py similarity index 100% rename from modules/workspace/i3blocks/scripts/bluetooth_battery.py rename to profiles/workspace/i3blocks/scripts/bluetooth_battery.py diff --git a/modules/workspace/i3blocks/scripts/brightness.nix b/profiles/workspace/i3blocks/scripts/brightness.nix similarity index 100% rename from modules/workspace/i3blocks/scripts/brightness.nix rename to profiles/workspace/i3blocks/scripts/brightness.nix diff --git a/modules/workspace/i3blocks/scripts/connections.nix b/profiles/workspace/i3blocks/scripts/connections.nix similarity index 100% rename from modules/workspace/i3blocks/scripts/connections.nix rename to profiles/workspace/i3blocks/scripts/connections.nix diff --git a/modules/workspace/i3blocks/scripts/default.nix b/profiles/workspace/i3blocks/scripts/default.nix similarity index 100% rename from modules/workspace/i3blocks/scripts/default.nix rename to profiles/workspace/i3blocks/scripts/default.nix diff --git a/modules/workspace/i3blocks/scripts/emacs.nix b/profiles/workspace/i3blocks/scripts/emacs.nix similarity index 100% rename from modules/workspace/i3blocks/scripts/emacs.nix rename to profiles/workspace/i3blocks/scripts/emacs.nix diff --git a/modules/workspace/i3blocks/scripts/email.nix b/profiles/workspace/i3blocks/scripts/email.nix similarity index 100% rename from modules/workspace/i3blocks/scripts/email.nix rename to profiles/workspace/i3blocks/scripts/email.nix diff --git a/modules/workspace/i3blocks/scripts/free.hs b/profiles/workspace/i3blocks/scripts/free.hs similarity index 100% rename from modules/workspace/i3blocks/scripts/free.hs rename to profiles/workspace/i3blocks/scripts/free.hs diff --git a/modules/workspace/i3blocks/scripts/free.nix b/profiles/workspace/i3blocks/scripts/free.nix similarity index 100% rename from modules/workspace/i3blocks/scripts/free.nix rename to profiles/workspace/i3blocks/scripts/free.nix diff --git a/modules/workspace/i3blocks/scripts/hydra-status.nix b/profiles/workspace/i3blocks/scripts/hydra-status.nix similarity index 100% rename from modules/workspace/i3blocks/scripts/hydra-status.nix rename to profiles/workspace/i3blocks/scripts/hydra-status.nix diff --git a/modules/workspace/i3blocks/scripts/music.nix b/profiles/workspace/i3blocks/scripts/music.nix similarity index 100% rename from modules/workspace/i3blocks/scripts/music.nix rename to profiles/workspace/i3blocks/scripts/music.nix diff --git a/modules/workspace/i3blocks/scripts/network.hs b/profiles/workspace/i3blocks/scripts/network.hs similarity index 100% rename from modules/workspace/i3blocks/scripts/network.hs rename to profiles/workspace/i3blocks/scripts/network.hs diff --git a/modules/workspace/i3blocks/scripts/sound.nix b/profiles/workspace/i3blocks/scripts/sound.nix similarity index 100% rename from modules/workspace/i3blocks/scripts/sound.nix rename to profiles/workspace/i3blocks/scripts/sound.nix diff --git a/modules/workspace/i3blocks/scripts/temperature.hs b/profiles/workspace/i3blocks/scripts/temperature.hs similarity index 100% rename from modules/workspace/i3blocks/scripts/temperature.hs rename to profiles/workspace/i3blocks/scripts/temperature.hs diff --git a/modules/workspace/i3blocks/scripts/temperature.nix b/profiles/workspace/i3blocks/scripts/temperature.nix similarity index 100% rename from modules/workspace/i3blocks/scripts/temperature.nix rename to profiles/workspace/i3blocks/scripts/temperature.nix diff --git a/modules/workspace/i3blocks/scripts/weather.nix b/profiles/workspace/i3blocks/scripts/weather.nix similarity index 100% rename from modules/workspace/i3blocks/scripts/weather.nix rename to profiles/workspace/i3blocks/scripts/weather.nix diff --git a/modules/workspace/i3blocks/scripts/youtrack-wage.nix b/profiles/workspace/i3blocks/scripts/youtrack-wage.nix similarity index 100% rename from modules/workspace/i3blocks/scripts/youtrack-wage.nix rename to profiles/workspace/i3blocks/scripts/youtrack-wage.nix diff --git a/modules/workspace/kanshi.nix b/profiles/workspace/kanshi.nix similarity index 100% rename from modules/workspace/kanshi.nix rename to profiles/workspace/kanshi.nix diff --git a/modules/workspace/kde/default.nix b/profiles/workspace/kde/default.nix similarity index 100% rename from modules/workspace/kde/default.nix rename to profiles/workspace/kde/default.nix diff --git a/modules/workspace/light.nix b/profiles/workspace/light.nix similarity index 100% rename from modules/workspace/light.nix rename to profiles/workspace/light.nix diff --git a/modules/workspace/locale.nix b/profiles/workspace/locale.nix similarity index 100% rename from modules/workspace/locale.nix rename to profiles/workspace/locale.nix diff --git a/modules/workspace/mako.nix b/profiles/workspace/mako.nix similarity index 100% rename from modules/workspace/mako.nix rename to profiles/workspace/mako.nix diff --git a/modules/workspace/misc.nix b/profiles/workspace/misc.nix similarity index 100% rename from modules/workspace/misc.nix rename to profiles/workspace/misc.nix diff --git a/modules/workspace/print-scan/Brother_HL-3170CDW_series.ppd b/profiles/workspace/print-scan/Brother_HL-3170CDW_series.ppd similarity index 100% rename from modules/workspace/print-scan/Brother_HL-3170CDW_series.ppd rename to profiles/workspace/print-scan/Brother_HL-3170CDW_series.ppd diff --git a/modules/workspace/print-scan/default.nix b/profiles/workspace/print-scan/default.nix similarity index 100% rename from modules/workspace/print-scan/default.nix rename to profiles/workspace/print-scan/default.nix diff --git a/modules/workspace/simple-osd-daemons.nix b/profiles/workspace/simple-osd-daemons.nix similarity index 100% rename from modules/workspace/simple-osd-daemons.nix rename to profiles/workspace/simple-osd-daemons.nix diff --git a/modules/workspace/ssh.nix b/profiles/workspace/ssh.nix similarity index 100% rename from modules/workspace/ssh.nix rename to profiles/workspace/ssh.nix diff --git a/modules/workspace/sway/default.nix b/profiles/workspace/sway/default.nix similarity index 100% rename from modules/workspace/sway/default.nix rename to profiles/workspace/sway/default.nix diff --git a/modules/workspace/xdg.nix b/profiles/workspace/xdg.nix similarity index 100% rename from modules/workspace/xdg.nix rename to profiles/workspace/xdg.nix diff --git a/modules/workspace/zsh.nix b/profiles/workspace/zsh.nix similarity index 100% rename from modules/workspace/zsh.nix rename to profiles/workspace/zsh.nix diff --git a/profiles/base.nix b/roles/base.nix similarity index 72% rename from profiles/base.nix rename to roles/base.nix index b1a5ac4..d7f0beb 100644 --- a/profiles/base.nix +++ b/roles/base.nix @@ -1,15 +1,19 @@ { inputs, ... }: { - imports = with inputs.self.nixosModules; [ + imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [ inputs.home-manager.nixosModules.home-manager + # MODULES applications - boot secrets secrets-envsubst + persist + + # PROFILES autoRun xdg + boot devices git gpg @@ -18,7 +22,6 @@ network nix overlay - persist security ssh zsh diff --git a/profiles/default.nix b/roles/default.nix similarity index 100% rename from profiles/default.nix rename to roles/default.nix diff --git a/profiles/desktop.nix b/roles/desktop.nix similarity index 76% rename from profiles/desktop.nix rename to roles/desktop.nix index 20ed2ec..59ac404 100644 --- a/profiles/desktop.nix +++ b/roles/desktop.nix @@ -1,11 +1,15 @@ { inputs, ... }: { - imports = with inputs.self.nixosModules; [ + imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [ ./base.nix - applications-setup - ezwg - hardware + # MODULES themes + ezwg + + + # PROFILES + applications-setup + hardware virtualisation alacritty diff --git a/profiles/server.nix b/roles/server.nix similarity index 100% rename from profiles/server.nix rename to roles/server.nix