mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-05 10:13:14 -06:00
honor --no-pinix flag
This commit is contained in:
parent
2e630e6d6c
commit
3bed7b455b
1 changed files with 5 additions and 5 deletions
|
@ -9,8 +9,8 @@ host: []const u8,
|
||||||
cache_name: []const u8,
|
cache_name: []const u8,
|
||||||
output: []const u8,
|
output: []const u8,
|
||||||
cmd: OizysCmd,
|
cmd: OizysCmd,
|
||||||
|
no_pinix: bool,
|
||||||
debug: bool = false,
|
debug: bool = false,
|
||||||
no_pinix: bool = false,
|
|
||||||
|
|
||||||
pub const OizysCmd = enum {
|
pub const OizysCmd = enum {
|
||||||
dry,
|
dry,
|
||||||
|
@ -26,7 +26,6 @@ pub fn init(allocator: std.mem.Allocator, matches: *const ArgMatches) !Oizys {
|
||||||
const flags = matches.subcommandMatches(cmd).?;
|
const flags = matches.subcommandMatches(cmd).?;
|
||||||
const host = flags.getSingleValue("host") orelse try Oizys.getDefaultHostName(allocator);
|
const host = flags.getSingleValue("host") orelse try Oizys.getDefaultHostName(allocator);
|
||||||
const flake = flags.getSingleValue("flake") orelse try Oizys.getDefaultFlake(allocator);
|
const flake = flags.getSingleValue("flake") orelse try Oizys.getDefaultFlake(allocator);
|
||||||
const cache_name = flags.getSingleValue("cache") orelse "daylin";
|
|
||||||
|
|
||||||
return Oizys{
|
return Oizys{
|
||||||
.allocator = allocator,
|
.allocator = allocator,
|
||||||
|
@ -34,7 +33,8 @@ pub fn init(allocator: std.mem.Allocator, matches: *const ArgMatches) !Oizys {
|
||||||
.flake = flake,
|
.flake = flake,
|
||||||
.output = try std.fmt.allocPrint(allocator, "{s}#nixosConfigurations.{s}.config.system.build.toplevel", .{ flake, host }),
|
.output = try std.fmt.allocPrint(allocator, "{s}#nixosConfigurations.{s}.config.system.build.toplevel", .{ flake, host }),
|
||||||
.cmd = std.meta.stringToEnum(OizysCmd, cmd).?,
|
.cmd = std.meta.stringToEnum(OizysCmd, cmd).?,
|
||||||
.cache_name = cache_name,
|
.cache_name = flags.getSingleValue("cache") orelse "daylin",
|
||||||
|
.no_pinix = flags.containsArg("no-pinix"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue