🚚 [shared] Added shared config that shared desktop config inherits from
This commit is contained in:
@ -93,7 +93,6 @@
|
|||||||
wayland.enable = false;
|
wayland.enable = false;
|
||||||
ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIARDv5nRlfPDXdV+Db4FaqeSJZ3/3MO0frYGzuVeqYAl";
|
ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIARDv5nRlfPDXdV+Db4FaqeSJZ3/3MO0frYGzuVeqYAl";
|
||||||
}
|
}
|
||||||
# TODO Homelab config
|
|
||||||
];
|
];
|
||||||
|
|
||||||
defaultAttrs = {
|
defaultAttrs = {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(lib.custom.relativeToRoot "shared/modules")
|
(lib.custom.relativeToDesktop "modules")
|
||||||
./bluetooth.nix
|
./bluetooth.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(lib.custom.relativeToRoot "shared/home-manager")
|
(lib.custom.relativeToDesktop "home-manager")
|
||||||
./hyprpaper.nix
|
./hyprpaper.nix
|
||||||
./settings.nix
|
./settings.nix
|
||||||
];
|
];
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = with lib.custom; [
|
imports = with lib.custom; [
|
||||||
(relativeToRoot "shared/modules/nix-helper.nix")
|
(relativeToRoot "shared/desktop/modules/nix-helper.nix")
|
||||||
(relativeToRoot "shared/modules/nixos.nix")
|
(relativeToRoot "shared/desktop/modules/nixos.nix")
|
||||||
(relativeToRoot "shared/modules/shell.nix")
|
(relativeToRoot "shared/desktop/modules/shell.nix")
|
||||||
(relativeToRoot "shared/modules/security/sops.nix")
|
(relativeToRoot "shared/desktop/modules/security/sops.nix")
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./development.nix
|
./development.nix
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
|
@ -9,14 +9,14 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.catppuccin.homeModules.catppuccin
|
inputs.catppuccin.homeModules.catppuccin
|
||||||
(lib.custom.relativeToRoot "shared/home-manager/development/git.nix")
|
(lib.custom.relativeToRoot "shared/desktop/home-manager/development/git.nix")
|
||||||
(lib.custom.relativeToRoot "shared/home-manager/development/helix.nix")
|
(lib.custom.relativeToRoot "shared/desktop/home-manager/development/helix.nix")
|
||||||
(lib.custom.relativeToRoot "shared/home-manager/shell/btop.nix")
|
(lib.custom.relativeToRoot "shared/desktop/home-manager/shell/btop.nix")
|
||||||
(lib.custom.relativeToRoot "shared/home-manager/shell/eza.nix")
|
(lib.custom.relativeToRoot "shared/desktop/home-manager/shell/eza.nix")
|
||||||
(lib.custom.relativeToRoot "shared/home-manager/shell/fastfetch.nix")
|
(lib.custom.relativeToRoot "shared/desktop/home-manager/shell/fastfetch.nix")
|
||||||
(lib.custom.relativeToRoot "shared/home-manager/shell/fish.nix")
|
(lib.custom.relativeToRoot "shared/desktop/home-manager/shell/fish.nix")
|
||||||
(lib.custom.relativeToRoot "shared/home-manager/shell/zoxide.nix")
|
(lib.custom.relativeToRoot "shared/desktop/home-manager/shell/zoxide.nix")
|
||||||
(lib.custom.relativeToRoot "shared/home-manager/gpg.nix")
|
(lib.custom.relativeToRoot "shared/desktop/home-manager/gpg.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
home.stateVersion = systemConfig.version;
|
home.stateVersion = systemConfig.version;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(lib.custom.relativeToRoot "shared/modules")
|
(lib.custom.relativeToDesktop "modules")
|
||||||
./battery.nix
|
./battery.nix
|
||||||
./bluetooth.nix
|
./bluetooth.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(lib.custom.relativeToRoot "shared/home-manager")
|
(lib.custom.relativeToDesktop "home-manager")
|
||||||
./hyprland
|
./hyprland
|
||||||
./zen
|
./zen
|
||||||
];
|
];
|
||||||
|
@ -1,16 +1,19 @@
|
|||||||
# FIXME(lib.custom): Add some stuff from hmajid2301/dotfiles/lib/module/default.nix, as simplifies option declaration
|
# FIXME(lib.custom): Add some stuff from hmajid2301/dotfiles/lib/module/default.nix, as simplifies option declaration
|
||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
|
with builtins;
|
||||||
|
|
||||||
{
|
{
|
||||||
getSecret = with lib.strings; filePath: trim (removeSuffix "\n" (builtins.readFile filePath));
|
getSecret = with lib.strings; filePath: trim (removeSuffix "\n" (readFile filePath));
|
||||||
|
|
||||||
# use path relative to the root of the project
|
# use path relative to the root of the project
|
||||||
relativeToRoot = lib.path.append ../.;
|
relativeToRoot = lib.path.append ../.;
|
||||||
|
relativeToBase = lib.path.append ../shared/base;
|
||||||
|
relativeToDesktop = lib.path.append ../shared/desktop;
|
||||||
|
|
||||||
scanPaths =
|
scanPaths =
|
||||||
path:
|
path:
|
||||||
builtins.map (f: (path + "/${f}")) (
|
map (f: (path + "/${f}")) (
|
||||||
builtins.attrNames (
|
attrNames (
|
||||||
lib.attrsets.filterAttrs (
|
lib.attrsets.filterAttrs (
|
||||||
path: _type:
|
path: _type:
|
||||||
(_type == "directory") # include directories
|
(_type == "directory") # include directories
|
||||||
@ -18,7 +21,7 @@
|
|||||||
(path != "default.nix") # ignore default.nix
|
(path != "default.nix") # ignore default.nix
|
||||||
&& (lib.strings.hasSuffix ".nix" path) # include .nix files
|
&& (lib.strings.hasSuffix ".nix" path) # include .nix files
|
||||||
)
|
)
|
||||||
) (builtins.readDir path)
|
) (readDir path)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
3
shared/base/home-manager/default.nix
Normal file
3
shared/base/home-manager/default.nix
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
imports = [ ./ssh.nix ];
|
||||||
|
}
|
@ -1,5 +1,10 @@
|
|||||||
# ~/.ssh/config
|
# ~/.ssh/config
|
||||||
{ systemConfig, ... }:
|
{
|
||||||
|
systemConfig,
|
||||||
|
systems,
|
||||||
|
common,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
@ -9,7 +14,7 @@
|
|||||||
block = hostname: {
|
block = hostname: {
|
||||||
port = 22;
|
port = 22;
|
||||||
user = systemConfig.username;
|
user = systemConfig.username;
|
||||||
hostname = "${hostname}.dns.martials.no";
|
hostname = "${hostname}.dns.${common.domain}";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
3
shared/base/modules/default.nix
Normal file
3
shared/base/modules/default.nix
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
imports = [ ./networking.nix ];
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
outputs,
|
outputs,
|
||||||
|
lib,
|
||||||
common,
|
common,
|
||||||
systemConfig,
|
systemConfig,
|
||||||
...
|
...
|
||||||
@ -10,6 +11,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
(lib.custom.relativeToBase "home-manager")
|
||||||
inputs.catppuccin.homeModules.catppuccin
|
inputs.catppuccin.homeModules.catppuccin
|
||||||
./cursors.nix
|
./cursors.nix
|
||||||
./default-applications.nix
|
./default-applications.nix
|
||||||
@ -25,7 +27,6 @@ in
|
|||||||
./shell
|
./shell
|
||||||
./sioyek.nix
|
./sioyek.nix
|
||||||
./spicetify.nix
|
./spicetify.nix
|
||||||
./ssh.nix
|
|
||||||
./zen
|
./zen
|
||||||
];
|
];
|
||||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
@ -1,5 +1,8 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
(lib.custom.relativeToBase "modules")
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./development
|
./development
|
||||||
./electron.nix
|
./electron.nix
|
||||||
@ -11,7 +14,6 @@
|
|||||||
./locale.nix
|
./locale.nix
|
||||||
./mail.nix
|
./mail.nix
|
||||||
./media.nix
|
./media.nix
|
||||||
./networking.nix
|
|
||||||
./nixos.nix
|
./nixos.nix
|
||||||
./nix-helper.nix
|
./nix-helper.nix
|
||||||
./office.nix
|
./office.nix
|
Reference in New Issue
Block a user