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