File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 46
46
] ;
47
47
ansible_default = default ++ [
48
48
nix-unify . nixosModules . ansible
49
+ from_ansible
49
50
] ;
50
51
unify_default = ansible_default ++ [
51
52
nix-unify . nixosModules . unify
71
72
imports = self . nixosModules . onlypath_default ;
72
73
nixpkgs . hostPlatform = system ;
73
74
} ) . config . system . build . toplevel ;
75
+
76
+ # check if our ansible set evaluates without any ansible stuff set
77
+ # (this allows better ci testing)
78
+ ansible = ( import "${ nixpkgs } /nixos/lib/eval-config.nix" {
79
+ modules = [
80
+ {
81
+ imports = self . nixosModules . ansible_default ;
82
+ nixpkgs . hostPlatform = system ;
83
+ nixpkgs . overlays = [ self . overlays . default ] ;
84
+ fileSystems . "/" = { device = "/dev/sda1" ; fsType = "ext4" ; } ;
85
+ boot . loader . systemd-boot . enable = true ;
86
+ users . allowNoPasswordLogin = true ;
87
+ }
88
+ ] ;
89
+
90
+ # this needs to be set via pkgs.nixos,
91
+ # but there's no way to do that
92
+ specialArgs = {
93
+ inherit inputs ;
94
+ } ;
95
+
96
+ system = null ;
97
+ } ) . config . system . build . toplevel ;
74
98
}
75
99
) ;
76
100
} ;
Original file line number Diff line number Diff line change
1
+ { config , lib , ... } :
2
+
3
+ with lib ;
4
+
5
+ {
6
+ users . users . root . openssh . authorizedKeys . keys =
7
+ mkIf ( config . ansible . hostvars ? "base_ssh_root_keys" )
8
+ config . ansible . hostvars . base_ssh_root_keys ;
9
+
10
+ services . openssh . settings . AllowUsers =
11
+ mkIf ( config . ansible . hostvars ? "base_ssh_allow_users" )
12
+ ( lib . concatStringsSep " " config . ansible . hostvars . base_ssh_allow_users ) ;
13
+ }
You can’t perform that action at this time.
0 commit comments