def get_keys(self): keys = MachineState.get_keys(self) # Ugly: we have to add the generated keys because they're not # there in the first evaluation (though they are present in # the final nix-build). for k, v in self.block_device_mapping.items(): if v.get('encrypt', False) and v.get('passphrase', "") == "" and v.get('generatedKey', "") != "": keys["luks-" + _sd_to_xvd(k).replace('/dev/', '')] = v['generatedKey'] return keys
def get_keys(self): keys = MachineState.get_keys(self) # Ugly: we have to add the generated keys because they're not # there in the first evaluation (though they are present in # the final nix-build). for k, v in self.block_device_mapping.items(): if v.get('encrypt', False) and v.get('passphrase', "") == "" and v.get('generatedKey', "") != "": keys["luks-" + (v['disk_name'] or v['disk'])] = { 'text': v['generatedKey'], 'group': 'root', 'permissions': '0600', 'user': '******'} return keys
def get_keys(self): keys = MachineState.get_keys(self) # Ugly: we have to add the generated keys because they're not # there in the first evaluation (though they are present in # the final nix-build). for k, v in self.block_device_mapping.items(): if v.get('encrypt', False) and v.get('passphrase', "") == "" and v.get('generatedKey', "") != "": keys["luks-" + (v['disk_name'] or v['disk'])] = v['generatedKey'] return keys
def get_keys(self): keys = MachineState.get_keys(self) # Ugly: we have to add the generated keys because they're not # there in the first evaluation (though they are present in # the final nix-build). for k, v in self.block_device_mapping.items(): if v.get('encrypt', False) and v.get('passphrase', "") == "" and v.get('generatedKey', "") != "": key_name = "luks-" + (v['disk_name'] or v['disk']) keys[key_name] = { 'text': v['generatedKey'], 'keyFile': '/run/keys' + key_name, 'destDir': '/run/keys', 'group': 'root', 'permissions': '0600', 'user': '******'} return keys
def get_keys(self): keys = MachineState.get_keys(self) # Ugly: we have to add the generated keys because they're not # there in the first evaluation (though they are present in # the final nix-build). for k, v in self.block_device_mapping.items(): if v.get("encrypt", False) and v.get("passphrase", "") == "" and v.get("generatedKey", "") != "": keys["luks-" + (v["disk_name"] or v["disk"])] = { "text": v["generatedKey"], "group": "root", "permissions": "0600", "user": "******", } return keys