about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-09-20 16:12:48 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-09-20 16:12:48 +0200
commit00b706095dad2bf169d36bf0fcdb50a8ff1fb5f5 (patch)
treee6caa732552252f2557f36bd24fa07e9b22fbf49
parentdotfiles: swaylock: Change ring and ring-key colors (diff)
downloadnixos-config-00b706095dad2bf169d36bf0fcdb50a8ff1fb5f5.tar.gz
nixos-config-00b706095dad2bf169d36bf0fcdb50a8ff1fb5f5.tar.bz2
nixos-config-00b706095dad2bf169d36bf0fcdb50a8ff1fb5f5.zip
Flake: Remove dotfiles input
Instead we use it directly. This removes a lot of hassle + limitations
with flake inputs from files
-rw-r--r--flake.lock14
-rw-r--r--flake.nix7
-rw-r--r--hosts/configuration.nix4
-rw-r--r--hosts/default.nix4
-rw-r--r--hosts/home.nix28
-rw-r--r--hosts/luna/home.nix6
-rw-r--r--hosts/phobos/home.nix6
7 files changed, 26 insertions, 43 deletions
diff --git a/flake.lock b/flake.lock
index 160758e..6f3bfbc 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,18 +1,5 @@
 {
   "nodes": {
-    "dotfiles": {
-      "flake": false,
-      "locked": {
-        "lastModified": 1,
-        "narHash": "sha256-fIf6VTIvH5dT4yNzT7YIh0ca56M09UgU58PTTRBvzAM=",
-        "path": "./dotfiles",
-        "type": "path"
-      },
-      "original": {
-        "path": "./dotfiles",
-        "type": "path"
-      }
-    },
     "hardware": {
       "locked": {
         "lastModified": 1662714967,
@@ -113,7 +100,6 @@
     },
     "root": {
       "inputs": {
-        "dotfiles": "dotfiles",
         "hardware": "hardware",
         "home-manager": "home-manager",
         "impermanence": "impermanence",
diff --git a/flake.nix b/flake.nix
index 3d8534a..3d61545 100644
--- a/flake.nix
+++ b/flake.nix
@@ -17,11 +17,6 @@
 
     nix-index.url = "github:Mic92/nix-index-database";
 
-    dotfiles = {
-      url = "path:./dotfiles";
-      flake = false;
-    };
-
     wallpapers = {
       url = "github:Baitinq/Wallpapers";
       flake = false;
@@ -39,7 +34,7 @@
     in
     {
       nixosConfigurations = import ./hosts (commonInherits // {
-	isNixOS = true;
+        isNixOS = true;
         isIso = false;
         isHardware = true;
       });
diff --git a/hosts/configuration.nix b/hosts/configuration.nix
index 5bf0cf0..ce2a577 100644
--- a/hosts/configuration.nix
+++ b/hosts/configuration.nix
@@ -1,4 +1,4 @@
-{ secrets, lib, pkgs, config, hostname, inputs, user, timezone, ... }: {
+{ secrets, dotfiles, lib, pkgs, config, hostname, inputs, user, timezone, ... }: {
 
   imports = [
     "${inputs.impermanence}/nixos.nix"
@@ -38,7 +38,7 @@
 
   networking = {
     hostName = hostname; # Define your hostname.
-    extraHosts = builtins.readFile "${inputs.dotfiles}/hosts";
+    extraHosts = builtins.readFile "${dotfiles}/hosts";
     nameservers = [ "9.9.9.9" ];
     firewall = {
       enable = true;
diff --git a/hosts/default.nix b/hosts/default.nix
index 7d1a4f1..157bf1b 100644
--- a/hosts/default.nix
+++ b/hosts/default.nix
@@ -2,6 +2,8 @@
 let
   secrets = import ../secrets;
 
+  dotfiles = ../dotfiles;
+
   hosts = [
     { host = "phobos"; system = "x86_64-linux"; timezone = secrets.main_timezone; location = secrets.main_location; }
     { host = "luna"; system = "x86_64-linux"; timezone = secrets.main_timezone; location = secrets.main_location; }
@@ -27,7 +29,7 @@ let
           (import ../overlays)
         ];
       };
-      extraArgs = { inherit pkgs inputs isIso isHardware user secrets timezone location; hostname = host; };
+      extraArgs = { inherit pkgs inputs isIso isHardware user secrets dotfiles timezone location; hostname = host; };
       extraSpecialModules = extraModules ++ lib.optional isHardware  ../hardware/${hardware} ++ lib.optional isIso "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix";
     in
     if isNixOS
diff --git a/hosts/home.nix b/hosts/home.nix
index 8b75262..dc77595 100644
--- a/hosts/home.nix
+++ b/hosts/home.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, inputs, user, hostname, secrets, location, ... }:
+{ config, lib, pkgs, inputs, user, hostname, secrets, dotfiles, location, ... }:
 {
   imports = [ ];
 
@@ -54,13 +54,13 @@
   xsession.windowManager.xmonad = {
     enable = true;
     enableContribAndExtras = true;
-    config = "${inputs.dotfiles}/xmonad.hs";
+    config = "${dotfiles}/xmonad.hs";
   };
 
   programs = {
     xmobar = {
       enable = true;
-      extraConfig = builtins.readFile "${inputs.dotfiles}/xmobar.hs";
+      extraConfig = builtins.readFile "${dotfiles}/xmobar.hs";
     };
   };
 
@@ -138,7 +138,7 @@
 
         doom-themes
       ];
-      extraConfig = builtins.readFile "${inputs.dotfiles}/.emacs";
+      extraConfig = builtins.readFile "${dotfiles}/.emacs";
     };
 
     firefox = {
@@ -165,8 +165,8 @@
 
     bash = {
       enable = true;
-      bashrcExtra = builtins.readFile "${inputs.dotfiles}/.bashrc";
-      profileExtra = builtins.readFile "${inputs.dotfiles}/.bash_profile";
+      bashrcExtra = builtins.readFile "${dotfiles}/.bashrc";
+      profileExtra = builtins.readFile "${dotfiles}/.bash_profile";
     };
 
     zsh = {
@@ -269,18 +269,18 @@
   };
 
   xdg = {
-    configFile."sway/config".source = "${inputs.dotfiles}/sway_config";
-    configFile."river/".source = "${inputs.dotfiles}/river/";
-    configFile."waybar/".source = "${inputs.dotfiles}/waybar/";
-    configFile."zathura/zathurarc".source = "${inputs.dotfiles}/zathurarc";
-    configFile."dunst/dunstrc".source = "${inputs.dotfiles}/dunstrc";
+    configFile."sway/config".source = "${dotfiles}/sway_config";
+    configFile."river/".source = "${dotfiles}/river/";
+    configFile."waybar/".source = "${dotfiles}/waybar/";
+    configFile."zathura/zathurarc".source = "${dotfiles}/zathurarc";
+    configFile."dunst/dunstrc".source = "${dotfiles}/dunstrc";
   };
 
   home.file = {
-    ".xinitrc".source = "${inputs.dotfiles}/.xinitrc";
-    ".Xresources".source = "${inputs.dotfiles}/.Xresources";
+    ".xinitrc".source = "${dotfiles}/.xinitrc";
+    ".Xresources".source = "${dotfiles}/.Xresources";
 
-    ".scripts/".source = "${inputs.dotfiles}/scripts/";
+    ".scripts/".source = "${dotfiles}/scripts/";
   };
 
   home.file = {
diff --git a/hosts/luna/home.nix b/hosts/luna/home.nix
index e3b135e..666c0c1 100644
--- a/hosts/luna/home.nix
+++ b/hosts/luna/home.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, inputs, user, hostname, location, secrets, ... }:
+{ config, lib, pkgs, inputs, user, hostname, location, secrets, dotfiles, ... }:
 {
   home.packages = with pkgs; [
     xorg.xmodmap
@@ -41,8 +41,8 @@
     '';
 
     "sxhkd/sxhkdrc".text =
-      builtins.readFile "${inputs.dotfiles}/sxhkd/xmonad" +
-      builtins.readFile "${inputs.dotfiles}/sxhkd/base" +
+      builtins.readFile "${dotfiles}/sxhkd/xmonad" +
+      builtins.readFile "${dotfiles}/sxhkd/base" +
       ''
       
         #enter and leave game mode
diff --git a/hosts/phobos/home.nix b/hosts/phobos/home.nix
index b437abc..8b70ddb 100644
--- a/hosts/phobos/home.nix
+++ b/hosts/phobos/home.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, inputs, user, hostname, location, secrets, ... }:
+{ config, lib, pkgs, inputs, user, hostname, location, secrets, dotfiles, ... }:
 {
   home.packages = with pkgs; [
     minecraft
@@ -41,8 +41,8 @@
     '';
 
     "sxhkd/sxhkdrc".text =
-      builtins.readFile "${inputs.dotfiles}/sxhkd/xmonad" +
-      builtins.readFile "${inputs.dotfiles}/sxhkd/base" +
+      builtins.readFile "${dotfiles}/sxhkd/xmonad" +
+      builtins.readFile "${dotfiles}/sxhkd/base" +
       ''
       
         #enter and leave game mode