about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--flake.lock14
-rw-r--r--flake.nix5
-rw-r--r--hosts/configuration.nix2
-rw-r--r--hosts/home.nix23
-rw-r--r--hosts/luna/home.nix7
-rw-r--r--hosts/phobos/home.nix7
-rw-r--r--hosts/vm/home.nix7
7 files changed, 36 insertions, 29 deletions
diff --git a/flake.lock b/flake.lock
index 2b61d65..1907aa4 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,5 +1,18 @@
 {
   "nodes": {
+    "dotfiles": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1,
+        "narHash": "sha256-BXCMSsmYMNSRiZX+Bbu4JK0O+/sHWlK1G464+f2n1NI=",
+        "path": "./dotfiles",
+        "type": "path"
+      },
+      "original": {
+        "path": "./dotfiles",
+        "type": "path"
+      }
+    },
     "hardware": {
       "locked": {
         "lastModified": 1660407119,
@@ -100,6 +113,7 @@
     },
     "root": {
       "inputs": {
+        "dotfiles": "dotfiles",
         "hardware": "hardware",
         "home-manager": "home-manager",
         "impermanence": "impermanence",
diff --git a/flake.nix b/flake.nix
index a5414df..e5435fd 100644
--- a/flake.nix
+++ b/flake.nix
@@ -17,6 +17,11 @@
 
     nix-index.url = "github:Mic92/nix-index-database";
 
+    dotfiles = {
+      url = "path:./dotfiles";
+      flake = false;
+    };
+
     wallpapers = {
       url = "github:Baitinq/Wallpapers";
       flake = false;
diff --git a/hosts/configuration.nix b/hosts/configuration.nix
index 82af20b..d9215d9 100644
--- a/hosts/configuration.nix
+++ b/hosts/configuration.nix
@@ -38,7 +38,7 @@
 
   networking = {
     hostName = hostname; # Define your hostname.
-    extraHosts = builtins.readFile ../dotfiles/hosts;
+    extraHosts = builtins.readFile "${inputs.dotfiles}/hosts";
     nameservers = [ "9.9.9.9" ];
     firewall = {
       enable = true;
diff --git a/hosts/home.nix b/hosts/home.nix
index b2181d6..afe9cc6 100644
--- a/hosts/home.nix
+++ b/hosts/home.nix
@@ -1,7 +1,4 @@
 { config, lib, pkgs, inputs, user, hostname, secrets, location, ... }:
-let
-  dotfiles = ../dotfiles;
-in
 {
   imports = [ ];
 
@@ -45,12 +42,12 @@ in
   xsession.windowManager.xmonad = {
     enable = true;
     enableContribAndExtras = true;
-    config = dotfiles + "/xmonad.hs";
+    config = "${inputs.dotfiles}/xmonad.hs";
   };
 
   programs.xmobar = {
     enable = true;
-    extraConfig = builtins.readFile (dotfiles + "/xmobar.hs");
+    extraConfig = builtins.readFile "${inputs.dotfiles}/xmobar.hs";
   };
 
   home.sessionVariables = {
@@ -127,7 +124,7 @@ in
 
         doom-themes
       ];
-      extraConfig = builtins.readFile (dotfiles + "/.emacs");
+      extraConfig = builtins.readFile "${inputs.dotfiles}/.emacs";
     };
 
     firefox = {
@@ -154,8 +151,8 @@ in
 
     bash = {
       enable = true;
-      bashrcExtra = builtins.readFile (dotfiles + "/.bashrc");
-      profileExtra = builtins.readFile (dotfiles + "/.bash_profile");
+      bashrcExtra = builtins.readFile "${inputs.dotfiles}/.bashrc";
+      profileExtra = builtins.readFile "${inputs.dotfiles}/.bash_profile";
     };
 
     zsh = {
@@ -258,15 +255,15 @@ in
   };
 
   xdg = {
-    configFile."zathura/zathurarc".source = dotfiles + "/zathurarc";
-    configFile."dunst/dunstrc".source = dotfiles + "/dunstrc";
+    configFile."zathura/zathurarc".source = "${inputs.dotfiles}/zathurarc";
+    configFile."dunst/dunstrc".source = "${inputs.dotfiles}/dunstrc";
   };
 
   home.file = {
-    ".xinitrc".source = dotfiles + "/.xinitrc";
-    ".Xresources".source = dotfiles + "/.Xresources/";
+    ".xinitrc".source = "${inputs.dotfiles}/.xinitrc";
+    ".Xresources".source = "${inputs.dotfiles}/.Xresources";
 
-    ".scripts/".source = dotfiles + "/scripts/";
+    ".scripts/".source = "${inputs.dotfiles}/scripts/";
   };
 
   home.file = {
diff --git a/hosts/luna/home.nix b/hosts/luna/home.nix
index cd7440f..4f01335 100644
--- a/hosts/luna/home.nix
+++ b/hosts/luna/home.nix
@@ -1,7 +1,4 @@
 { config, lib, pkgs, inputs, user, hostname, location, secrets, ... }:
-let
-  dotfiles = ../../dotfiles;
-in
 {
   home.packages = with pkgs; [
     xorg.xmodmap
@@ -46,8 +43,8 @@ in
     '';
 
     "sxhkd/sxhkdrc".text =
-      builtins.readFile (dotfiles + "/sxhkd/xmonad") +
-      builtins.readFile (dotfiles + "/sxhkd/base") +
+      builtins.readFile "${inputs.dotfiles}/sxhkd/xmonad" +
+      builtins.readFile "${inputs.dotfiles}/sxhkd/base" +
       ''
       
         #enter and leave game mode
diff --git a/hosts/phobos/home.nix b/hosts/phobos/home.nix
index e01d941..364af84 100644
--- a/hosts/phobos/home.nix
+++ b/hosts/phobos/home.nix
@@ -1,7 +1,4 @@
 { config, lib, pkgs, inputs, user, hostname, location, secrets, ... }:
-let
-  dotfiles = ../../dotfiles;
-in
 {
   home.packages = with pkgs; [
     minecraft
@@ -47,8 +44,8 @@ in
     '';
 
     "sxhkd/sxhkdrc".text =
-      builtins.readFile (dotfiles + "/sxhkd/xmonad") +
-      builtins.readFile (dotfiles + "/sxhkd/base") +
+      builtins.readFile "${inputs.dotfiles}/sxhkd/xmonad" +
+      builtins.readFile "${inputs.dotfiles}/sxhkd/base" +
       ''
       
         #enter and leave game mode
diff --git a/hosts/vm/home.nix b/hosts/vm/home.nix
index 6f8380a..3a1137f 100644
--- a/hosts/vm/home.nix
+++ b/hosts/vm/home.nix
@@ -1,7 +1,4 @@
 { config, lib, pkgs, inputs, user, hostname, location, secrets, ... }:
-let
-  dotfiles = ../../dotfiles;
-in
 {
   home.packages = with pkgs; [
     trackma
@@ -35,8 +32,8 @@ in
     '';
 
     "sxhkd/sxhkdrc".text =
-      builtins.readFile (dotfiles + "/sxhkd/xmonad") +
-      builtins.readFile (dotfiles + "/sxhkd/base") +
+      builtins.readFile "${inputs.dotfiles}/sxhkd/xmonad" +
+      builtins.readFile "${inputs.dotfiles}/sxhkd/base" +
       ''
 
         #enter and leave game mode