Nest configuration beneath socrates directory

Create a socrates directory to store configuration for socrates.
This commit is contained in:
William Carroll 2020-02-23 22:28:02 +00:00
parent 6a076e8329
commit fd720fbe4d
3 changed files with 5 additions and 10 deletions

View file

@ -1,13 +1,9 @@
{ { pkgs, briefcase, ... }:
pkgs ? import <nixpkgs> {},
briefcase ? import <briefcase> {},
...
}:
let let
trimNewline = x: pkgs.lib.removeSuffix "\n" x; trimNewline = x: pkgs.lib.removeSuffix "\n" x;
readSecret = x: trimNewline (builtins.readFile ("/etc/secrets/" + x)); readSecret = x: trimNewline (builtins.readFile ("/etc/secrets/" + x));
in { in pkgs.lib.fix(self: {
imports = [ ./hardware.nix ]; imports = [ ./hardware.nix ];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
@ -68,7 +64,6 @@ in {
"nixpkgs=/home/wpcarro/nixpkgs" "nixpkgs=/home/wpcarro/nixpkgs"
]; ];
# Allow wpcarro to call nixos-rebuild
trustedUsers = [ "root" "wpcarro" ]; trustedUsers = [ "root" "wpcarro" ];
}; };
@ -153,4 +148,4 @@ in {
}; };
system.stateVersion = "20.09"; # Did you read the comment? system.stateVersion = "20.09"; # Did you read the comment?
} })

View file

@ -1,9 +1,9 @@
{ pkgs ? import <nixpkgs> {}, ... }: { pkgs, ... }:
pkgs.writeShellScriptBin "rebuild" '' pkgs.writeShellScriptBin "rebuild" ''
set -ue set -ue
sudo nixos-rebuild \ 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 nixpkgs=/home/wpcarro/nixpkgs \
-I depot=/home/wpcarro/depot \ -I depot=/home/wpcarro/depot \
-I briefcase=/home/wpcarro/briefcase \ -I briefcase=/home/wpcarro/briefcase \