about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-02-23T22·28+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-03-01T22·32+0000
commitfd720fbe4d284d0562ab32e7bb6a3f7171992c21 (patch)
tree802bf6ceaf6bd50a91397a154582f972ed7784a4 /nixos
parent6a076e8329a8befdaec817eda775b40c6ed34d56 (diff)
Nest configuration beneath socrates directory
Create a socrates directory to store configuration for socrates.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/socrates/default.nix (renamed from nixos/configuration.nix)11
-rw-r--r--nixos/socrates/hardware.nix (renamed from nixos/hardware.nix)0
-rw-r--r--nixos/socrates/rebuild.nix (renamed from nixos/rebuild.nix)4
3 files changed, 5 insertions, 10 deletions
diff --git a/nixos/configuration.nix b/nixos/socrates/default.nix
index 54fd8f3ea2a5..1692ac356ec2 100644
--- a/nixos/configuration.nix
+++ b/nixos/socrates/default.nix
@@ -1,13 +1,9 @@
-{
-  pkgs ? import <nixpkgs> {},
-  briefcase ? import <briefcase> {},
-  ...
-}:
+{ pkgs, briefcase, ... }:
 
 let
   trimNewline = x: pkgs.lib.removeSuffix "\n" x;
   readSecret = x: trimNewline (builtins.readFile ("/etc/secrets/" + x));
-in {
+in pkgs.lib.fix(self: {
   imports = [ ./hardware.nix ];
 
   # Use the systemd-boot EFI boot loader.
@@ -68,7 +64,6 @@ in {
       "nixpkgs=/home/wpcarro/nixpkgs"
     ];
 
-    # Allow wpcarro to call nixos-rebuild
     trustedUsers = [ "root" "wpcarro" ];
   };
 
@@ -153,4 +148,4 @@ in {
   };
 
   system.stateVersion = "20.09"; # Did you read the comment?
-}
+})
diff --git a/nixos/hardware.nix b/nixos/socrates/hardware.nix
index dde14eb1e627..dde14eb1e627 100644
--- a/nixos/hardware.nix
+++ b/nixos/socrates/hardware.nix
diff --git a/nixos/rebuild.nix b/nixos/socrates/rebuild.nix
index 57c3e71f912b..e6d885f975ca 100644
--- a/nixos/rebuild.nix
+++ b/nixos/socrates/rebuild.nix
@@ -1,9 +1,9 @@
-{ pkgs ? import <nixpkgs> {}, ... }:
+{ pkgs, ... }:
 
 pkgs.writeShellScriptBin "rebuild" ''
   set -ue
   sudo nixos-rebuild \
-    -I nixos-config=/home/wpcarro/briefcase/nixos/configuration.nix \
+    -I nixos-config=/home/wpcarro/briefcase/nixos/socrates/default.nix \
     -I nixpkgs=/home/wpcarro/nixpkgs \
     -I depot=/home/wpcarro/depot \
     -I briefcase=/home/wpcarro/briefcase \