diff --git a/system/etc.nix b/etc/default.nix similarity index 86% rename from system/etc.nix rename to etc/default.nix index 756450ebe23..d95a3fc3d12 100644 --- a/system/etc.nix +++ b/etc/default.nix @@ -28,28 +28,28 @@ import ../helpers/make-etc.nix { } { # Hostname-to-IP mappings. - source = ./etc/hosts; + source = ./hosts; target = "hosts"; } { # Name Service Switch configuration file. Required by the C library. - source = ./etc/nsswitch.conf; + source = ./nsswitch.conf; target = "nsswitch.conf"; } { # Configuration file for the system logging daemon. - source = ./etc/syslog.conf; + source = ./syslog.conf; target = "syslog.conf"; } { # Friendly greeting on the virtual consoles. - source = ./etc/issue; + source = ./issue; target = "issue"; } { # Configuration for pwdutils (login, passwd, useradd, etc.). # You cannot login without it! - source = ./etc/login.defs; + source = ./login.defs; target = "login.defs"; } @@ -60,13 +60,13 @@ import ../helpers/make-etc.nix { { # Configuration for passwd and friends (e.g., hash algorithm # for /etc/passwd). - source = ./etc/default/passwd; + source = ./default/passwd; target = "default/passwd"; } { # Configuration for useradd. source = pkgs.substituteAll { - src = ./etc/default/useradd; + src = ./default/useradd; inherit defaultShell; }; target = "default/useradd"; @@ -74,7 +74,7 @@ import ../helpers/make-etc.nix { { # Dhclient hooks for emitting ip-up/ip-down events. source = pkgs.substituteAll { - src = ./etc/dhclient-exit-hooks; + src = ./dhclient-exit-hooks; inherit (pkgs) upstart glibc; }; target = "dhclient-exit-hooks"; @@ -82,7 +82,7 @@ import ../helpers/make-etc.nix { { # Script executed when the shell starts. source = pkgs.substituteAll { - src = ./etc/profile.sh; + src = ./profile.sh; inherit systemPath wrapperDir; inherit (pkgs) kernel glibc; timeZone = config.get ["time" "timeZone"]; @@ -97,12 +97,12 @@ import ../helpers/make-etc.nix { ++ (optional ["fonts" "enableFontConfig"] { source = pkgs.runCommand "fonts.conf" { - fontDirectories = import ./fonts.nix {inherit pkgs;}; + fontDirectories = import ../system/fonts.nix {inherit pkgs;}; buildInputs = [pkgs.libxslt]; inherit (pkgs) fontconfig; } "xsltproc --stringparam fontDirectories \"$fontDirectories\" \\ - ${./etc/fonts/make-fonts-conf.xsl} $fontconfig/etc/fonts/fonts.conf \\ + ${./fonts/make-fonts-conf.xsl} $fontconfig/etc/fonts/fonts.conf \\ > $out "; target = "fonts/fonts.conf"; @@ -121,7 +121,7 @@ import ../helpers/make-etc.nix { ++ (map (program: { source = pkgs.substituteAll { - src = ./etc/pam.d + ("/" + program); + src = ./pam.d + ("/" + program); inherit (pkgs) pam_unix2; pam_ldap = if config.get ["users" "ldap" "enable"] diff --git a/system/etc/default/passwd b/etc/default/passwd similarity index 100% rename from system/etc/default/passwd rename to etc/default/passwd diff --git a/system/etc/default/useradd b/etc/default/useradd similarity index 100% rename from system/etc/default/useradd rename to etc/default/useradd diff --git a/system/etc/dhclient-exit-hooks b/etc/dhclient-exit-hooks similarity index 100% rename from system/etc/dhclient-exit-hooks rename to etc/dhclient-exit-hooks diff --git a/system/etc/fonts/make-fonts-conf.xsl b/etc/fonts/make-fonts-conf.xsl similarity index 100% rename from system/etc/fonts/make-fonts-conf.xsl rename to etc/fonts/make-fonts-conf.xsl diff --git a/system/etc/hosts b/etc/hosts similarity index 100% rename from system/etc/hosts rename to etc/hosts diff --git a/system/etc/issue b/etc/issue similarity index 100% rename from system/etc/issue rename to etc/issue diff --git a/system/etc/ldap.conf.nix b/etc/ldap.conf.nix similarity index 100% rename from system/etc/ldap.conf.nix rename to etc/ldap.conf.nix diff --git a/system/etc/login.defs b/etc/login.defs similarity index 100% rename from system/etc/login.defs rename to etc/login.defs diff --git a/system/etc/nsswitch.conf b/etc/nsswitch.conf similarity index 100% rename from system/etc/nsswitch.conf rename to etc/nsswitch.conf diff --git a/system/etc/pam.d/chsh b/etc/pam.d/chsh similarity index 100% rename from system/etc/pam.d/chsh rename to etc/pam.d/chsh diff --git a/system/etc/pam.d/common b/etc/pam.d/common similarity index 100% rename from system/etc/pam.d/common rename to etc/pam.d/common diff --git a/system/etc/pam.d/login b/etc/pam.d/login similarity index 100% rename from system/etc/pam.d/login rename to etc/pam.d/login diff --git a/system/etc/pam.d/other b/etc/pam.d/other similarity index 100% rename from system/etc/pam.d/other rename to etc/pam.d/other diff --git a/system/etc/pam.d/passwd b/etc/pam.d/passwd similarity index 100% rename from system/etc/pam.d/passwd rename to etc/pam.d/passwd diff --git a/system/etc/pam.d/shadow b/etc/pam.d/shadow similarity index 100% rename from system/etc/pam.d/shadow rename to etc/pam.d/shadow diff --git a/system/etc/pam.d/sshd b/etc/pam.d/sshd similarity index 100% rename from system/etc/pam.d/sshd rename to etc/pam.d/sshd diff --git a/system/etc/pam.d/su b/etc/pam.d/su similarity index 100% rename from system/etc/pam.d/su rename to etc/pam.d/su diff --git a/system/etc/pam.d/useradd b/etc/pam.d/useradd similarity index 100% rename from system/etc/pam.d/useradd rename to etc/pam.d/useradd diff --git a/system/etc/profile.sh b/etc/profile.sh similarity index 100% rename from system/etc/profile.sh rename to etc/profile.sh diff --git a/system/etc/syslog.conf b/etc/syslog.conf similarity index 100% rename from system/etc/syslog.conf rename to etc/syslog.conf diff --git a/system/system.nix b/system/system.nix index 83d92958b16..d2eba92af6e 100644 --- a/system/system.nix +++ b/system/system.nix @@ -141,13 +141,13 @@ rec { # The services (Upstart) configuration for the system. - upstartJobs = import ./upstart.nix { + upstartJobs = import ../upstart-jobs/default.nix { inherit config pkgs nix modprobe nssModulesPath; }; # The static parts of /etc. - etc = import ./etc.nix { + etc = import ../etc/default.nix { inherit config pkgs upstartJobs systemPath wrapperDir defaultShell; extraEtc = pkgs.lib.concatLists (map (job: job.extraEtc) upstartJobs.jobs); }; diff --git a/system/upstart.nix b/upstart-jobs/default.nix similarity index 98% rename from system/upstart.nix rename to upstart-jobs/default.nix index 6e4b9797d70..f844c1d6d7b 100644 --- a/system/upstart.nix +++ b/upstart-jobs/default.nix @@ -135,7 +135,7 @@ import ../upstart-jobs/gather.nix { inherit config; inherit (pkgs) stdenv writeText lib xterm slim xorg mesa gnome compiz feh kdebase kdelibs xkeyboard_config; - fontDirectories = import ./fonts.nix {inherit pkgs;}; + fontDirectories = import ../system/fonts.nix {inherit pkgs;}; }) # Apache httpd.