-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3314cc2
commit a64df59
Showing
12 changed files
with
181 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
shadow-client = ./shadow-client.nix; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ ... }: | ||
|
||
{ | ||
programs = { | ||
awscli = { | ||
enable = true; | ||
settings = { | ||
default = { | ||
output = "json"; | ||
region = "eu-west-3"; | ||
}; | ||
}; | ||
credentials = { iam = { credential_process = "pass show aws"; }; }; | ||
}; | ||
}; | ||
|
||
test.stubs.awscli2 = { }; | ||
|
||
nmt.script = '' | ||
assertFileExists home-files/.aws/config | ||
assertFileContent home-files/.aws/config \ | ||
${./aws-config.conf} | ||
assertFileExists home-files/.aws/credentials | ||
assertFileContent home-files/.aws/credentials \ | ||
${./aws-credentials.conf} | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ config, lib, ... }: | ||
|
||
let | ||
dmcfg = config.services.xserver.displayManager; | ||
cfg = config.test-support.displayManager.auto; | ||
in | ||
{ | ||
|
||
###### interface | ||
|
||
options = { | ||
test-support.displayManager.auto = { | ||
enable = lib.mkOption { | ||
default = false; | ||
description = lib.mdDoc '' | ||
Whether to enable the fake "auto" display manager, which | ||
automatically logs in the user specified in the | ||
{option}`user` option. This is mostly useful for | ||
automated tests. | ||
''; | ||
}; | ||
|
||
user = lib.mkOption { | ||
default = "root"; | ||
description = lib.mdDoc "The user account to login automatically."; | ||
}; | ||
}; | ||
}; | ||
|
||
###### implementation | ||
|
||
config = lib.mkIf cfg.enable { | ||
services.xserver.displayManager = { | ||
lightdm.enable = true; | ||
autoLogin = { | ||
enable = true; | ||
user = cfg.user; | ||
}; | ||
}; | ||
|
||
# lightdm by default doesn't allow auto login for root, which is | ||
# required by some nixos tests. Override it here. | ||
security.pam.services.lightdm-autologin.text = lib.mkForce '' | ||
auth requisite pam_nologin.so | ||
auth required pam_succeed_if.so quiet | ||
auth required pam_permit.so | ||
account include lightdm | ||
password include lightdm | ||
session include lightdm | ||
''; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ lib, ... }: | ||
|
||
{ | ||
imports = [ | ||
./auto.nix | ||
]; | ||
|
||
services.xserver.enable = true; | ||
|
||
# Automatically log in. | ||
test-support.displayManager.auto.enable = true; | ||
|
||
# Use IceWM as the window manager. | ||
# Don't use a desktop manager. | ||
services.xserver.displayManager.defaultSession = lib.mkDefault "none+icewm"; | ||
services.xserver.windowManager.icewm.enable = true; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters