passiword
This commit is contained in:
parent
2693402afd
commit
5634e20d49
|
@ -1,9 +1,8 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, inputs
|
||||||
inputs,
|
, modulesPath
|
||||||
modulesPath,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/profiles/qemu-guest.nix") # Temporary
|
(modulesPath + "/profiles/qemu-guest.nix") # Temporary
|
||||||
|
@ -19,14 +18,19 @@
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
# boot.zfs.extraPools = [ "zraid" ];
|
||||||
|
|
||||||
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
|
boot.zfs.forceImportRoot = false;
|
||||||
|
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
options = "--delete-older-than 30d";
|
options = "--delete-older-than 30d";
|
||||||
};
|
};
|
||||||
nix.optimise = {
|
nix.optimise = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = ["05:00"];
|
dates = [ "05:00" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.hostName = "enis";
|
networking.hostName = "enis";
|
||||||
|
@ -34,12 +38,12 @@
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [];
|
allowedTCPPorts = [ ];
|
||||||
allowedUDPPorts = [];
|
allowedUDPPorts = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {inherit inputs;};
|
extraSpecialArgs = { inherit inputs; };
|
||||||
users = {
|
users = {
|
||||||
"enis" = import ./home.nix;
|
"enis" = import ./home.nix;
|
||||||
};
|
};
|
||||||
|
@ -47,8 +51,7 @@
|
||||||
|
|
||||||
users.users."enis" = {
|
users.users."enis" = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
# hashedPasswordFile = "./password";
|
hashedPassword = import ./password.nix;
|
||||||
initialPassword = "1234";
|
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"audio"
|
"audio"
|
||||||
|
@ -58,6 +61,18 @@
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
users.users."nixos" =
|
||||||
|
{
|
||||||
|
isNormalUser = true;
|
||||||
|
initialPassword = "1234";
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.root =
|
||||||
|
{
|
||||||
|
initialPassword = "1234";
|
||||||
|
};
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableGlobalCompInit = true;
|
enableGlobalCompInit = true;
|
||||||
|
@ -71,6 +86,8 @@
|
||||||
curl
|
curl
|
||||||
git
|
git
|
||||||
vim
|
vim
|
||||||
|
|
||||||
|
zfs
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
|
@ -89,14 +106,15 @@
|
||||||
programs.mtr.enable = true;
|
programs.mtr.enable = true;
|
||||||
programs.gnupg.agent.enable = true;
|
programs.gnupg.agent.enable = true;
|
||||||
|
|
||||||
|
services.udev.enable = true;
|
||||||
services.thermald.enable = true;
|
services.thermald.enable = true;
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = true;
|
||||||
KbdInteractiveAuthentication = false;
|
KbdInteractiveAuthentication = true;
|
||||||
AllowUsers = ["enis"];
|
AllowUsers = null;
|
||||||
PermitRootLogin = "no";
|
PermitRootLogin = "no";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
24
disko.nix
24
disko.nix
|
@ -7,7 +7,7 @@
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk =
|
disk =
|
||||||
{
|
{
|
||||||
root = {
|
main = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = root-disk;
|
device = root-disk;
|
||||||
content = {
|
content = {
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
}
|
}
|
||||||
// lib.attrsets.genAttrs raid-disks (name: {
|
// lib.attrsets.genAttrs raid-disks (name: {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = "/dev" + name;
|
device = "/dev/" + name;
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
size = "100%";
|
size = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "zfs";
|
type = "zfs";
|
||||||
pool = "zraid";
|
pool = "storage";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -73,23 +73,21 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
zpool = lib.mkIf (builtins.length raid-disks > 0) {
|
zpool = lib.mkIf (builtins.length raid-disks > 0) {
|
||||||
zraid = {
|
storage = {
|
||||||
type = "zpool";
|
type = "zpool";
|
||||||
mode = "raidz";
|
mode = "raidz";
|
||||||
# TODO: Cache-ing
|
# TODO: Cache-ing
|
||||||
rootFsOptions = {
|
# rootFsOptions = {
|
||||||
compression = "zstd";
|
# compression = "zstd";
|
||||||
"com.sun:auto-snapshot" = "false";
|
# "com.sun:auto-snapshot" = "false";
|
||||||
};
|
# };
|
||||||
|
|
||||||
|
mountpoint = "/storage";
|
||||||
|
|
||||||
datasets = {
|
datasets = {
|
||||||
var = {
|
var = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
mountpoint = "/var";
|
mountpoint = "/storage/var";
|
||||||
};
|
|
||||||
home = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
mountpoint = "/home";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
1
passwd
1
passwd
|
@ -1 +0,0 @@
|
||||||
$y$j9T$rflI.YoiFDa7wg2F2rmgy1$uCLInRwRKmUIUYlhdHFUwBf0yhnRUK9eTVMvX8UjCz3
|
|
1
password.nix
Normal file
1
password.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
"$y$j9T$rflI.YoiFDa7wg2F2rmgy1$uCLInRwRKmUIUYlhdHFUwBf0yhnRUK9eTVMvX8UjCz3"
|
Loading…
Reference in a new issue