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 ? 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?
}
})

View file

@ -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 \