mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 12:29:19 -08:00
Compare commits
3 commits
cb7eb46ee7
...
6bb963d9ad
| Author | SHA1 | Date | |
|---|---|---|---|
| 6bb963d9ad | |||
| e16019c75b | |||
| 2189d0592f |
11 changed files with 77 additions and 87 deletions
|
|
@ -8,7 +8,6 @@
|
||||||
interval = 30 * 60;
|
interval = 30 * 60;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
tags = [
|
tags = [
|
||||||
"rating:s"
|
|
||||||
"score:>=100"
|
"score:>=100"
|
||||||
"width:>=1500"
|
"width:>=1500"
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
{
|
{
|
||||||
name,
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.modules) mkIf mkOptionDefault mkDefault;
|
inherit (lib.modules) mkOptionDefault mkDefault;
|
||||||
in {
|
in {
|
||||||
options = let
|
options = let
|
||||||
inherit (lib.types) nullOr;
|
inherit (lib.types) nullOr;
|
||||||
|
|
@ -23,22 +22,5 @@ in {
|
||||||
"all"
|
"all"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
deploy = let
|
|
||||||
nixos = config.built;
|
|
||||||
in {
|
|
||||||
sshUser = mkOptionDefault "deploy";
|
|
||||||
user = mkOptionDefault "root";
|
|
||||||
sshOpts = mkIf (config.type == "NixOS") (
|
|
||||||
mkOptionDefault ["-p" "${builtins.toString (builtins.head nixos.config.services.openssh.ports)}"]
|
|
||||||
);
|
|
||||||
autoRollback = mkOptionDefault true;
|
|
||||||
magicRollback = mkOptionDefault true;
|
|
||||||
fastConnection = mkOptionDefault false;
|
|
||||||
hostname = mkOptionDefault "${name}.devices.inskip.me";
|
|
||||||
profiles.system = {
|
|
||||||
user = "root";
|
|
||||||
path = inputs.deploy-rs.lib.${config.system}.activate.nixos inputs.self.nixosConfigurations.${name};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
28
nixos/profiles/graphical/distributed.nix
Normal file
28
nixos/profiles/graphical/distributed.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{config, ...}: {
|
||||||
|
programs.ssh.extraConfig = ''
|
||||||
|
Host daiyousei-build
|
||||||
|
HostName daiyousei.inskip.me
|
||||||
|
User root
|
||||||
|
IdentityAgent /run/user/${toString config.users.users.kat.uid}/gnupg/S.gpg-agent.ssh
|
||||||
|
ControlMaster auto
|
||||||
|
ControlPath ${config.users.users.kat.home}/.ssh/master-%r@%n:%p
|
||||||
|
ControlPersist 10m
|
||||||
|
'';
|
||||||
|
nix = {
|
||||||
|
buildMachines = [
|
||||||
|
{
|
||||||
|
hostName = "daiyousei-build";
|
||||||
|
system = "aarch64-linux";
|
||||||
|
protocol = "ssh-ng";
|
||||||
|
maxJobs = 100;
|
||||||
|
speedFactor = 1;
|
||||||
|
supportedFeatures = ["benchmark" "big-parallel" "kvm"];
|
||||||
|
mandatoryFeatures = [];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
distributedBuilds = true;
|
||||||
|
extraOptions = ''
|
||||||
|
builders-use-substitutes = true
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
7
nixos/profiles/performance/scx.nix
Normal file
7
nixos/profiles/performance/scx.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
services.scx = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.scx_git.full;
|
||||||
|
scheduler = "scx_lavd";
|
||||||
|
};
|
||||||
|
}
|
||||||
3
nixos/profiles/performance/zram.nix
Normal file
3
nixos/profiles/performance/zram.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
_: {
|
||||||
|
zramSwap.enable = true;
|
||||||
|
}
|
||||||
3
nixos/profiles/server/fqdn.nix
Normal file
3
nixos/profiles/server/fqdn.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
_: {
|
||||||
|
networking.domain = "inskip.me";
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
_: {
|
{config, ...}: {
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
|
|
@ -6,5 +6,32 @@ _: {
|
||||||
recommendedGzipSettings = true;
|
recommendedGzipSettings = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
statusPage = true;
|
statusPage = true;
|
||||||
|
virtualHosts = let
|
||||||
|
vHost = {
|
||||||
|
extraConfig = ''
|
||||||
|
add_header Content-Type text/plain;
|
||||||
|
return 200 "meep?";
|
||||||
|
'';
|
||||||
|
/*
|
||||||
|
locations = {
|
||||||
|
"/" = {
|
||||||
|
extraConfig = ''
|
||||||
|
add_header Content-Type text/plain;
|
||||||
|
return 200 "meep?";
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
"${config.networking.fqdn}" =
|
||||||
|
vHost
|
||||||
|
// {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
"localhost" = vHost;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
_: let
|
_: let
|
||||||
hostConfig = {
|
hostConfig = {
|
||||||
|
pkgs,
|
||||||
tree,
|
tree,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
|
|
@ -28,6 +29,10 @@ _: let
|
||||||
web
|
web
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.numix-icon-theme
|
||||||
|
];
|
||||||
|
|
||||||
# TODO: Add config.microvm.stateDir to backup schedule?
|
# TODO: Add config.microvm.stateDir to backup schedule?
|
||||||
# TODO: figure out updateFlake?
|
# TODO: figure out updateFlake?
|
||||||
#microvm = {
|
#microvm = {
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ _: let
|
||||||
quiet-boot
|
quiet-boot
|
||||||
wireless
|
wireless
|
||||||
gaming
|
gaming
|
||||||
|
performance
|
||||||
dev
|
dev
|
||||||
])
|
])
|
||||||
++ (with tree.nixos.environments; [
|
++ (with tree.nixos.environments; [
|
||||||
|
|
@ -172,30 +173,6 @@ _: let
|
||||||
|
|
||||||
networking.hostId = "c3b94e85";
|
networking.hostId = "c3b94e85";
|
||||||
|
|
||||||
programs.ssh.extraConfig = ''
|
|
||||||
Host daiyousei-build
|
|
||||||
HostName 140.238.156.121
|
|
||||||
User root
|
|
||||||
IdentityAgent /run/user/1000/gnupg/S.gpg-agent.ssh
|
|
||||||
'';
|
|
||||||
nix = {
|
|
||||||
buildMachines = [
|
|
||||||
{
|
|
||||||
hostName = "daiyousei-build";
|
|
||||||
system = "aarch64-linux";
|
|
||||||
protocol = "ssh-ng";
|
|
||||||
maxJobs = 100;
|
|
||||||
speedFactor = 1;
|
|
||||||
supportedFeatures = ["benchmark" "big-parallel" "kvm"];
|
|
||||||
mandatoryFeatures = [];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
distributedBuilds = true;
|
|
||||||
extraOptions = ''
|
|
||||||
builders-use-substitutes = true
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
|
|
@ -206,14 +183,6 @@ _: let
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.scx = {
|
|
||||||
enable = false;
|
|
||||||
package = pkgs.scx_git.full;
|
|
||||||
scheduler = "scx_lavd";
|
|
||||||
};
|
|
||||||
|
|
||||||
zramSwap.enable = true;
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
zfs.requestEncryptionCredentials = true;
|
zfs.requestEncryptionCredentials = true;
|
||||||
loader = {
|
loader = {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
_: let
|
_: let
|
||||||
hostConfig = {
|
hostConfig = {
|
||||||
tree,
|
tree,
|
||||||
pkgs,
|
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
|
|
@ -53,6 +52,7 @@ _: let
|
||||||
wireless
|
wireless
|
||||||
laptop
|
laptop
|
||||||
gaming
|
gaming
|
||||||
|
performance
|
||||||
])
|
])
|
||||||
++ (with tree.nixos.environments; [
|
++ (with tree.nixos.environments; [
|
||||||
niri
|
niri
|
||||||
|
|
@ -106,39 +106,6 @@ _: let
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.scx = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.scx_git.full;
|
|
||||||
scheduler = "scx_lavd";
|
|
||||||
};
|
|
||||||
|
|
||||||
zramSwap.enable = true;
|
|
||||||
|
|
||||||
programs.ssh.extraConfig = ''
|
|
||||||
Host daiyousei-build
|
|
||||||
HostName 140.238.156.121
|
|
||||||
User root
|
|
||||||
IdentityAgent /run/user/1000/gnupg/S.gpg-agent.ssh
|
|
||||||
'';
|
|
||||||
|
|
||||||
nix = {
|
|
||||||
buildMachines = [
|
|
||||||
{
|
|
||||||
hostName = "daiyousei-build";
|
|
||||||
system = "aarch64-linux";
|
|
||||||
protocol = "ssh-ng";
|
|
||||||
maxJobs = 100;
|
|
||||||
speedFactor = 1;
|
|
||||||
supportedFeatures = ["benchmark" "big-parallel" "kvm"];
|
|
||||||
mandatoryFeatures = [];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
distributedBuilds = true;
|
|
||||||
extraOptions = ''
|
|
||||||
builders-use-substitutes = true
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# optional, useful when the builder has a faster internet connection than yours
|
# optional, useful when the builder has a faster internet connection than yours
|
||||||
services = {
|
services = {
|
||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue