1&2 lass: move userconfig to base.nix

This commit is contained in:
lassulus 2015-07-21 18:57:58 +02:00
parent 1edc8c249d
commit 2eb1002f7a
3 changed files with 34 additions and 40 deletions

View File

@ -168,21 +168,6 @@
''; '';
}; };
users.extraUsers = {
#main user
mainUser = {
uid = 1337;
name = "lass";
#isNormalUser = true;
group = "users";
createHome = true;
home = "/home/lass";
useDefaultShell = true;
isSystemUser = false;
extraGroups = [ "wheel" "audio" ];
};
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
]; ];

View File

@ -1,5 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
with builtins;
{ {
imports = [ imports = [
../../2configs/lass/desktop-base.nix ../../2configs/lass/desktop-base.nix
@ -30,6 +31,15 @@
enable = true; enable = true;
}; };
} }
{
users.extraUsers = {
root = {
openssh.authorizedKeys.keys = map readFile [
../../Zpubkeys/uriel.ssh.pub
];
};
};
}
]; ];
networking.hostName = "uriel"; networking.hostName = "uriel";
@ -87,29 +97,6 @@
''; '';
}; };
users.extraUsers = {
root = {
openssh.authorizedKeys.keys = [
config.sshKeys.lass.pub
];
};
mainUser = {
uid = 1337;
name = "lass";
#isNormalUser = true;
group = "users";
createHome = true;
home = "/home/lass";
useDefaultShell = true;
isSystemUser = false;
description = "lassulus";
extraGroups = [ "wheel" "audio" ];
openssh.authorizedKeys.keys = [
config.sshKeys.lass.pub
];
};
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
]; ];

View File

@ -3,14 +3,36 @@
with lib; with lib;
{ {
imports = [ imports = [
./sshkeys.nix
../../3modules/lass/iptables.nix ../../3modules/lass/iptables.nix
{ {
users.extraUsers = users.extraUsers =
mapAttrs (_: h: { hashedPassword = h; }) mapAttrs (_: h: { hashedPassword = h; })
(import /root/src/secrets/hashedPasswords.nix); (import /root/src/secrets/hashedPasswords.nix);
} }
{
users.extraUsers = {
root = {
openssh.authorizedKeys.keys = map readFile [
../../Zpubkeys/lass.ssh.pub
];
};
mainUser = {
name = "lass";
uid = 1337;
home = "/home/lass";
group = "users";
createHome = true;
useDefaultShell = true;
extraGroups = [
"audio"
"wheel"
];
openssh.authorizedKeys.keys = map readFile [
../../Zpubkeys/lass.ssh.pub
];
};
};
}
]; ];
nix.useChroot = true; nix.useChroot = true;