2022-11-06 20:23:10 +00:00
|
|
|
|
{
|
|
|
|
|
inputs = {
|
|
|
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
2022-12-23 09:20:17 +00:00
|
|
|
|
agenix = {
|
|
|
|
|
url = "github:ryantm/agenix";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2022-11-06 20:23:10 +00:00
|
|
|
|
};
|
2022-11-14 20:56:23 +00:00
|
|
|
|
|
2022-12-23 07:46:08 +00:00
|
|
|
|
outputs = { self, nixpkgs, agenix, ... }:
|
2022-12-23 01:57:21 +00:00
|
|
|
|
let
|
|
|
|
|
lib = nixpkgs.lib;
|
2022-12-23 07:46:08 +00:00
|
|
|
|
proj_root = ./../..;
|
2022-12-23 09:20:17 +00:00
|
|
|
|
# TODO: Change respectively to the system or make a nix shell to alias `nix run github:ryantm/agenix -- `
|
|
|
|
|
base_modules = [
|
|
|
|
|
agenix.nixosModule
|
|
|
|
|
{
|
2022-12-23 13:04:33 +00:00
|
|
|
|
age.secrets.s3fs = {
|
|
|
|
|
file = ./secrets/s3fs.age;
|
|
|
|
|
# mode = "600"; # owner + group only
|
|
|
|
|
# owner = "hungtr";
|
|
|
|
|
# group = "users";
|
|
|
|
|
};
|
2022-12-24 09:19:24 +00:00
|
|
|
|
age.secrets."s3fs.digital-garden" = {
|
|
|
|
|
file = ./secrets/s3fs.digital-garden.age;
|
|
|
|
|
};
|
2022-12-23 22:51:04 +00:00
|
|
|
|
age.secrets._nhitrl_cred = {
|
|
|
|
|
file = ./secrets/_nhitrl.age;
|
|
|
|
|
};
|
|
|
|
|
environment.systemPackages = [agenix.defaultPackage.x86_64-linux];
|
2022-12-23 09:20:17 +00:00
|
|
|
|
}
|
|
|
|
|
];
|
2022-12-23 01:57:21 +00:00
|
|
|
|
in {
|
2022-11-24 03:48:28 +00:00
|
|
|
|
# Windows with NixOS WSL
|
|
|
|
|
nixosConfigurations.Felia = nixpkgs.lib.nixosSystem {
|
|
|
|
|
system = "x86_64-linux";
|
2022-12-23 01:57:21 +00:00
|
|
|
|
modules = base_modules ++ [
|
2022-11-24 03:48:28 +00:00
|
|
|
|
./wsl-configuration.nix
|
2022-12-22 00:43:20 +00:00
|
|
|
|
{
|
|
|
|
|
system.stateVersion = "22.05";
|
|
|
|
|
}
|
2022-11-24 03:48:28 +00:00
|
|
|
|
];
|
|
|
|
|
specialArgs = {
|
|
|
|
|
# includeHardware = false;
|
|
|
|
|
hostname = "Felia";
|
2022-11-26 05:39:32 +00:00
|
|
|
|
_services.openssh = {
|
2022-11-24 04:25:13 +00:00
|
|
|
|
permitRootLogin = "no";
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
2022-11-14 22:10:46 +00:00
|
|
|
|
};
|
2022-11-24 03:48:28 +00:00
|
|
|
|
};
|
2022-11-30 07:53:52 +00:00
|
|
|
|
nixosConfigurations.lizzi = nixpkgs.lib.nixosSystem {
|
|
|
|
|
system = "x86_64-linux";
|
2022-12-23 01:57:21 +00:00
|
|
|
|
modules = base_modules ++ [
|
2022-11-30 07:53:52 +00:00
|
|
|
|
./configuration.nix
|
2022-12-22 00:43:20 +00:00
|
|
|
|
{
|
|
|
|
|
system.stateVersion = "22.05";
|
|
|
|
|
}
|
2022-11-30 07:53:52 +00:00
|
|
|
|
];
|
|
|
|
|
specialArgs = {
|
|
|
|
|
hostname = "lizzi";
|
|
|
|
|
_networking = {
|
|
|
|
|
interfaces.eth1.ipv4.addresses = [{
|
|
|
|
|
address = "71.0.0.1";
|
|
|
|
|
prefixLength = 24;
|
|
|
|
|
}];
|
|
|
|
|
firewall = {
|
2022-11-30 11:32:24 +00:00
|
|
|
|
enable = true;
|
2022-11-30 07:53:52 +00:00
|
|
|
|
allowedTCPPorts = [ 80 443 22 ];
|
|
|
|
|
};
|
|
|
|
|
useDHCP = false;
|
2022-11-30 11:32:24 +00:00
|
|
|
|
# required so that we get IP address from linode
|
2022-11-30 07:53:52 +00:00
|
|
|
|
interfaces.eth0.useDHCP = true;
|
|
|
|
|
};
|
|
|
|
|
_boot.loader.grub.enable = true;
|
|
|
|
|
_boot.loader.grub.version = 2;
|
|
|
|
|
_services.openssh = {
|
|
|
|
|
permitRootLogin = "no";
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
|
|
|
|
_services.gitea = {
|
|
|
|
|
enable = true;
|
|
|
|
|
stateDir = "/gitea";
|
|
|
|
|
rootUrl = "https://git.pegasust.com";
|
|
|
|
|
settings = {
|
|
|
|
|
repository = {
|
|
|
|
|
"ENABLE_PUSH_CREATE_USER" = true;
|
|
|
|
|
"ENABLE_PUSH_CREATE_ORG" = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-11-30 11:32:24 +00:00
|
|
|
|
# Highly suspect that thanks to nginx, ipv6 is disabled?
|
2022-11-30 07:53:52 +00:00
|
|
|
|
_services.nginx = {
|
|
|
|
|
enable = true;
|
|
|
|
|
clientMaxBodySize = "100m"; # Allow big file transfers over git :^)
|
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
|
virtualHosts."git.pegasust.com" = {
|
|
|
|
|
# Gitea hostname
|
|
|
|
|
sslCertificate = "/var/lib/acme/git.pegasust.com/fullchain.pem";
|
|
|
|
|
sslCertificateKey = "/var/lib/acme/git.pegasust.com/key.pem";
|
|
|
|
|
forceSSL = true; # Runs on port 80 and 443
|
|
|
|
|
locations."/".proxyPass = "http://localhost:3000/"; # Proxy to Gitea
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-11-24 03:48:28 +00:00
|
|
|
|
# Generic machine
|
2022-11-30 02:25:21 +00:00
|
|
|
|
nixosConfigurations.pixi = nixpkgs.lib.nixosSystem {
|
2022-11-24 03:48:28 +00:00
|
|
|
|
system = "x86_64-linux";
|
2022-12-23 01:57:21 +00:00
|
|
|
|
modules = base_modules ++ [
|
2022-11-24 03:48:28 +00:00
|
|
|
|
./configuration.nix
|
2022-12-22 00:43:20 +00:00
|
|
|
|
{
|
|
|
|
|
system.stateVersion = "22.05";
|
|
|
|
|
}
|
2022-11-24 03:48:28 +00:00
|
|
|
|
];
|
|
|
|
|
specialArgs = {
|
2022-11-30 02:25:21 +00:00
|
|
|
|
hostname = "pixi";
|
2022-11-26 05:39:32 +00:00
|
|
|
|
_networking = {
|
2022-11-30 03:02:18 +00:00
|
|
|
|
# interfaces.eth1.ipv4.addresses = [{
|
|
|
|
|
# address = "71.0.0.1";
|
|
|
|
|
# prefixLength = 24;
|
|
|
|
|
# }];
|
2022-11-26 03:09:01 +00:00
|
|
|
|
firewall = {
|
2022-11-26 03:37:25 +00:00
|
|
|
|
enable = false;
|
2022-11-30 03:02:18 +00:00
|
|
|
|
allowedTCPPorts = [ 80 443 22 ];
|
2022-11-26 03:09:01 +00:00
|
|
|
|
};
|
2022-11-24 03:48:28 +00:00
|
|
|
|
useDHCP = false;
|
2022-11-30 11:32:24 +00:00
|
|
|
|
# interfaces.eth0.useDHCP = true;
|
2022-11-28 01:30:29 +00:00
|
|
|
|
};
|
|
|
|
|
_boot.loader.grub.enable = true;
|
|
|
|
|
_boot.loader.grub.version = 2;
|
|
|
|
|
_services.openssh = {
|
|
|
|
|
permitRootLogin = "no";
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
|
|
|
|
_services.gitea = {
|
|
|
|
|
enable = true;
|
|
|
|
|
stateDir = "/gitea";
|
|
|
|
|
rootUrl = "https://git.pegasust.com";
|
|
|
|
|
settings = {
|
|
|
|
|
repository = {
|
|
|
|
|
"ENABLE_PUSH_CREATE_USER" = true;
|
|
|
|
|
"ENABLE_PUSH_CREATE_ORG" = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
_services.nginx = {
|
|
|
|
|
enable = true;
|
|
|
|
|
clientMaxBodySize = "100m"; # Allow big file transfers over git :^)
|
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
|
virtualHosts."git.pegasust.com" = {
|
|
|
|
|
# Gitea hostname
|
|
|
|
|
sslCertificate = "/var/lib/acme/git.pegasust.com/fullchain.pem";
|
|
|
|
|
sslCertificateKey = "/var/lib/acme/git.pegasust.com/key.pem";
|
|
|
|
|
forceSSL = true; # Runs on port 80 and 443
|
|
|
|
|
locations."/".proxyPass = "http://localhost:3000/"; # Proxy to Gitea
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-11-24 03:48:28 +00:00
|
|
|
|
nixosConfigurations.nyx = nixpkgs.lib.nixosSystem {
|
|
|
|
|
system = "x86_64-linux";
|
2022-12-23 01:57:21 +00:00
|
|
|
|
modules = base_modules ++ [
|
2022-11-24 03:48:28 +00:00
|
|
|
|
./configuration.nix
|
2022-12-22 00:43:20 +00:00
|
|
|
|
{
|
|
|
|
|
system.stateVersion = "22.05";
|
|
|
|
|
}
|
2022-11-24 03:48:28 +00:00
|
|
|
|
];
|
|
|
|
|
specialArgs = {
|
|
|
|
|
hostname = "nyx";
|
2022-11-26 05:39:32 +00:00
|
|
|
|
_networking = {
|
2022-11-30 11:32:24 +00:00
|
|
|
|
enableIPv6 = false;
|
2022-11-24 03:48:28 +00:00
|
|
|
|
interfaces.eth1.ipv4.addresses = [{
|
|
|
|
|
address = "71.0.0.2";
|
|
|
|
|
prefixLength = 24;
|
|
|
|
|
}];
|
|
|
|
|
firewall.enable = true;
|
|
|
|
|
useDHCP = false;
|
|
|
|
|
interfaces.eth0.useDHCP = true;
|
|
|
|
|
};
|
2022-11-26 05:39:32 +00:00
|
|
|
|
_boot.loader.grub.enable = true;
|
|
|
|
|
_boot.loader.grub.version = 2;
|
|
|
|
|
_services.openssh = {
|
2022-11-24 03:48:28 +00:00
|
|
|
|
permitRootLogin = "no";
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
2022-11-14 22:10:46 +00:00
|
|
|
|
};
|
2022-11-14 20:56:23 +00:00
|
|
|
|
};
|
2022-11-24 03:48:28 +00:00
|
|
|
|
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
|
|
|
|
system = "x86_64-linux";
|
2022-12-23 01:57:21 +00:00
|
|
|
|
modules = base_modules ++ [
|
2022-11-24 03:48:28 +00:00
|
|
|
|
./configuration.nix
|
2022-12-22 00:43:20 +00:00
|
|
|
|
{
|
|
|
|
|
system.stateVersion = "22.05";
|
|
|
|
|
}
|
2022-11-24 03:48:28 +00:00
|
|
|
|
];
|
|
|
|
|
specialArgs = {
|
|
|
|
|
hostname = "nixos";
|
|
|
|
|
};
|
2022-11-14 20:56:23 +00:00
|
|
|
|
};
|
2022-12-21 10:37:03 +00:00
|
|
|
|
nixosConfigurations.bao = nixpkgs.lib.nixosSystem {
|
|
|
|
|
system = "x86_64-linux";
|
2022-12-22 00:43:20 +00:00
|
|
|
|
specialArgs.hostname = "bao";
|
2022-12-23 01:57:21 +00:00
|
|
|
|
modules = base_modules ++ [
|
2022-12-21 10:37:03 +00:00
|
|
|
|
./configuration.nix
|
2022-12-22 23:04:04 +00:00
|
|
|
|
# automount using s3fs
|
|
|
|
|
({config, pkgs, lib, ...}: {
|
2022-12-23 22:51:04 +00:00
|
|
|
|
environment.systemPackages = [pkgs.s3fs pkgs.cifs-utils]; # s3fs-fuse
|
2022-12-23 01:57:21 +00:00
|
|
|
|
# Sadly, autofs uses systemd, so we can't put it in home-manager
|
2022-12-23 00:40:35 +00:00
|
|
|
|
# HACK: need to store secret somewhere so that root can access this
|
2022-12-23 01:57:21 +00:00
|
|
|
|
# because autofs may run as root for now, we enforce putting the secret in this monorepo
|
2022-12-23 13:04:33 +00:00
|
|
|
|
# services.rpcbind.enable = true;
|
2022-12-23 00:40:35 +00:00
|
|
|
|
services.autofs = let
|
2022-12-23 22:51:04 +00:00
|
|
|
|
# confToBackendArg {lol="what"; empty=""; name_only=null;} -> "lol=what,empty=,name_only"
|
|
|
|
|
# TODO: change null -> true/false. This allows overriding & better self-documentation
|
|
|
|
|
confToBackendArg = conf: (lib.concatStringsSep ","
|
|
|
|
|
(lib.mapAttrsToList (name: value: "${name}${lib.optionalString (value != null) "=${value}"}") conf));
|
|
|
|
|
|
2022-12-23 01:57:21 +00:00
|
|
|
|
# mount_dest: path ("wow")
|
|
|
|
|
# backend_args: nix attrs representing the arguments to be passed to s3fs
|
|
|
|
|
# ({"-fstype" = "fuse"; "use_cache" = "/tmp";})
|
|
|
|
|
# bucket: bucket name (hungtr-hot)
|
|
|
|
|
# NOTE: s3 custom provider will be provided inside
|
|
|
|
|
# backend_args, so just put the bucket name here
|
|
|
|
|
#
|
|
|
|
|
#-> "${mount_dest} ${formatted_args} ${s3fs-bin}#${bucket}"
|
|
|
|
|
autofs-s3fs_entry = {
|
|
|
|
|
mount_dest,
|
|
|
|
|
backend_args? {"-fstype" = "fuse";},
|
|
|
|
|
bucket
|
|
|
|
|
}@inputs: let
|
|
|
|
|
s3fs-exec = "${pkgs.s3fs}/bin/s3fs";
|
2022-12-23 13:04:33 +00:00
|
|
|
|
in "${mount_dest} ${confToBackendArg backend_args} :${s3fs-exec}\#${bucket}";
|
2022-12-23 00:40:35 +00:00
|
|
|
|
personalStorage = [
|
2022-12-24 09:19:24 +00:00
|
|
|
|
# hungtr-hot @ phoenix is broken :)
|
|
|
|
|
# (autofs-s3fs_entry {
|
|
|
|
|
# mount_dest = "hot";
|
|
|
|
|
# backend_args = {
|
|
|
|
|
# "-fstype" = "fuse";
|
|
|
|
|
# use_cache = "/tmp";
|
|
|
|
|
# del_cache = null;
|
|
|
|
|
# allow_other = null;
|
|
|
|
|
# url = ''"https://f5i0.ph.idrivee2-32.com"'';
|
|
|
|
|
# # TODO: builtins.readFile requires a Git-controlled file
|
|
|
|
|
# passwd_file = config.age.secrets.s3fs.path;
|
|
|
|
|
# dbglevel = "debug"; # enable this for better debugging info in journalctl
|
|
|
|
|
# uid = "1000"; # default user
|
|
|
|
|
# gid = "100"; # users
|
|
|
|
|
# umask="003"; # others read only, fully shared for users group
|
|
|
|
|
# # _netdev = null; # ignored by s3fs (https://github.com/s3fs-fuse/s3fs-fuse/blob/master/src/s3fs.cpp#L4910)
|
|
|
|
|
# };
|
|
|
|
|
# bucket = "hungtr-hot";
|
|
|
|
|
# })
|
2022-12-23 10:28:19 +00:00
|
|
|
|
(autofs-s3fs_entry {
|
2022-12-24 09:19:24 +00:00
|
|
|
|
mount_dest = "garden";
|
2022-12-23 10:28:19 +00:00
|
|
|
|
backend_args = {
|
|
|
|
|
"-fstype" = "fuse";
|
|
|
|
|
use_cache = "/tmp";
|
|
|
|
|
del_cache = null;
|
|
|
|
|
allow_other = null;
|
2022-12-24 09:19:24 +00:00
|
|
|
|
url = "https://v5h5.la11.idrivee2-14.com";
|
|
|
|
|
passwd_file = config.age.secrets."s3fs.digital-garden".path;
|
|
|
|
|
dbglevel = "debug"; # enable this for better debugging info in journalctl
|
|
|
|
|
uid = "1000"; # default user
|
|
|
|
|
gid = "100"; # users
|
|
|
|
|
umask="003"; # others read only, fully shared for users group
|
2022-12-23 10:28:19 +00:00
|
|
|
|
};
|
2022-12-24 09:19:24 +00:00
|
|
|
|
bucket = "digital-garden";
|
2022-12-23 10:28:19 +00:00
|
|
|
|
})
|
2022-12-23 22:51:04 +00:00
|
|
|
|
(let args = {
|
|
|
|
|
"-fstype" = "cifs";
|
|
|
|
|
credentials = config.age.secrets._nhitrl_cred.path;
|
|
|
|
|
user = null;
|
|
|
|
|
uid = "1001";
|
|
|
|
|
gid = "100";
|
|
|
|
|
dir_mode = "0777";
|
|
|
|
|
file_mode = "0777";
|
|
|
|
|
};
|
|
|
|
|
in "felia_d ${confToBackendArg args} ://felia.coati-celsius.ts.net/d")
|
|
|
|
|
(let args = {
|
|
|
|
|
"-fstype" = "cifs";
|
|
|
|
|
credentials = config.age.secrets._nhitrl_cred.path;
|
|
|
|
|
user = null;
|
|
|
|
|
uid = "1001";
|
|
|
|
|
gid = "100";
|
|
|
|
|
dir_mode = "0777";
|
|
|
|
|
file_mode = "0777";
|
|
|
|
|
};
|
|
|
|
|
in "felia_f ${confToBackendArg args} ://felia.coati-celsius.ts.net/f")
|
2022-12-23 00:40:35 +00:00
|
|
|
|
];
|
2022-12-23 13:04:33 +00:00
|
|
|
|
persoConf = pkgs.writeText "auto.personal" (builtins.concatStringsSep "\n" personalStorage);
|
2022-12-23 00:40:35 +00:00
|
|
|
|
in {
|
|
|
|
|
enable = true;
|
|
|
|
|
# Creates /perso directory with every subdirectory declared by ${personalStorage}
|
|
|
|
|
# as of now (might be stale), /perso/hot is the only mount accessible
|
|
|
|
|
# that is also managed by s3fs
|
|
|
|
|
autoMaster = ''
|
|
|
|
|
/perso file:${persoConf}
|
|
|
|
|
'';
|
2022-12-24 09:19:24 +00:00
|
|
|
|
timeout = 30; # default: 600, 600 seconds (10 mins) of inactivity => unmount
|
2022-12-23 13:04:33 +00:00
|
|
|
|
# debug = true; # writes to more to journalctl
|
2022-12-23 00:40:35 +00:00
|
|
|
|
};
|
2022-12-22 23:04:04 +00:00
|
|
|
|
})
|
|
|
|
|
# GPU, sound, networking stuffs
|
2022-12-21 10:37:03 +00:00
|
|
|
|
({ config, pkgs, lib, ... }:
|
|
|
|
|
let
|
2022-12-24 04:11:56 +00:00
|
|
|
|
gpu_pkgs = [ pkgs.clinfo pkgs.lshw pkgs.glxinfo pkgs.pciutils pkgs.vulkan-tools ];
|
2022-12-21 10:37:03 +00:00
|
|
|
|
gpu_conf = {
|
|
|
|
|
# openCL
|
|
|
|
|
hardware.opengl = {
|
|
|
|
|
enable = true;
|
|
|
|
|
extraPackages = let
|
2022-12-22 09:18:11 +00:00
|
|
|
|
inherit (pkgs) rocm-opencl-icd rocm-opencl-runtime;
|
|
|
|
|
in [rocm-opencl-icd rocm-opencl-runtime];
|
2022-12-21 10:37:03 +00:00
|
|
|
|
# Vulkan
|
|
|
|
|
driSupport = true;
|
|
|
|
|
driSupport32Bit = true;
|
|
|
|
|
package = pkgs.mesa.drivers;
|
|
|
|
|
package32 = pkgs.pkgsi686Linux.mesa.drivers;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
amd_rx470 = {
|
|
|
|
|
# early amd gpu usage
|
|
|
|
|
# boot.initrd.kernelModules = ["amdgpu"];
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
services.xserver.videoDrivers = ["amdgpu"];
|
|
|
|
|
};
|
|
|
|
|
nv_rtx3060 = {
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
services.xserver.videoDrivers = ["nvidia"];
|
|
|
|
|
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
|
|
|
};
|
|
|
|
|
systemPackages = [] ++ gpu_pkgs;
|
|
|
|
|
in
|
2022-12-22 00:43:20 +00:00
|
|
|
|
lib.recursiveUpdate gpu_conf (lib.recursiveUpdate nv_rtx3060 {
|
2022-12-21 10:37:03 +00:00
|
|
|
|
# Use UEFI
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
|
|
|
|
|
networking.hostName = "bao"; # Define your hostname.
|
|
|
|
|
# Pick only one of the below networking options.
|
|
|
|
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
|
|
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
|
|
|
|
|
|
|
|
|
# Enable the X11 windowing system.
|
|
|
|
|
services.xserver.enable = true;
|
2022-12-22 09:18:11 +00:00
|
|
|
|
# KDE & Plasma 5
|
2022-12-21 10:37:03 +00:00
|
|
|
|
services.xserver.displayManager.sddm.enable = true;
|
2022-12-24 09:19:24 +00:00
|
|
|
|
services.xserver.desktopManager.plasma5 = {
|
|
|
|
|
enable = true;
|
2022-12-24 09:50:56 +00:00
|
|
|
|
excludePackages = let plasma5 = pkgs.libsForQt5; in [
|
|
|
|
|
plasma5.elisa # audio viewer
|
|
|
|
|
plasma5.konsole # I use alacritty instaed
|
|
|
|
|
plasma5.plasma-browser-integration
|
|
|
|
|
plasma5.print-manager # will enable if I need
|
|
|
|
|
plasma5.khelpcenter # why not just write manpages instead :(
|
|
|
|
|
# plasma5.ksshaskpass # pls just put prompts on my dear terminal
|
2022-12-24 09:19:24 +00:00
|
|
|
|
];
|
|
|
|
|
};
|
2022-12-24 09:50:56 +00:00
|
|
|
|
|
|
|
|
|
# disables KDE's setting of askpassword
|
|
|
|
|
programs.ssh.askPassword = "";
|
|
|
|
|
programs.ssh.enableAskPassword = false;
|
2022-12-21 10:37:03 +00:00
|
|
|
|
|
2022-12-22 00:43:20 +00:00
|
|
|
|
time.timeZone = "America/Phoenix";
|
2022-12-21 10:37:03 +00:00
|
|
|
|
# Configure keymap in X11
|
|
|
|
|
services.xserver.layout = "us";
|
|
|
|
|
# services.xserver.xkbOptions = {
|
|
|
|
|
# "eurosign:e";
|
|
|
|
|
# "caps:escape" # map caps to escape.
|
|
|
|
|
# };
|
|
|
|
|
|
|
|
|
|
# Enable CUPS to print documents.
|
|
|
|
|
# services.printing.enable = true;
|
|
|
|
|
|
2022-12-22 09:18:11 +00:00
|
|
|
|
# Enable sound. (pulse audio)
|
2022-12-21 10:37:03 +00:00
|
|
|
|
sound.enable = true;
|
2022-12-22 09:18:11 +00:00
|
|
|
|
programs.dconf.enable = true;
|
2022-12-21 10:37:03 +00:00
|
|
|
|
hardware.pulseaudio.enable = true;
|
2022-12-22 09:18:11 +00:00
|
|
|
|
hardware.pulseaudio.support32Bit = true;
|
|
|
|
|
nixpkgs.config.pulseaudio = true;
|
|
|
|
|
hardware.pulseaudio.extraConfig = "load-module module-combine-sink";
|
|
|
|
|
|
|
|
|
|
# Sound: pipewire
|
|
|
|
|
# sound.enable = false;
|
|
|
|
|
# hardware.pulseaudio.enable = false;
|
|
|
|
|
# services.pipewire = {
|
|
|
|
|
# enable = true;
|
|
|
|
|
# alsa.enable = true;
|
|
|
|
|
# alsa.support32Bit = true;
|
|
|
|
|
# pulse.enable = true;
|
|
|
|
|
# # Might want to use JACK in the future
|
|
|
|
|
# jack.enable = true;
|
|
|
|
|
# };
|
|
|
|
|
#
|
|
|
|
|
# security.rtkit.enable = true;
|
|
|
|
|
|
2022-12-21 10:37:03 +00:00
|
|
|
|
|
|
|
|
|
# Enable touchpad support (enabled default in most desktopManager).
|
|
|
|
|
# services.xserver.libinput.enable = true;
|
|
|
|
|
|
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
|
|
|
# users.users.alice = {
|
|
|
|
|
# isNormalUser = true;
|
|
|
|
|
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
|
|
|
# packages = with pkgs; [
|
|
|
|
|
# firefox
|
|
|
|
|
# thunderbird
|
|
|
|
|
# ];
|
|
|
|
|
# };
|
|
|
|
|
# Just an initial user to get this started lol
|
|
|
|
|
users.users.user = {
|
|
|
|
|
initialPassword = "pw123";
|
2022-12-22 09:18:11 +00:00
|
|
|
|
extraGroups = [ "wheel" "networkmanager" "audio"];
|
2022-12-21 10:37:03 +00:00
|
|
|
|
isNormalUser = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
|
|
|
# $ nix search wget
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
neovim
|
|
|
|
|
wget
|
|
|
|
|
] ++ systemPackages;
|
|
|
|
|
|
|
|
|
|
# Some programs need SUID wrappers, can be configured further or are
|
|
|
|
|
# started in user sessions.
|
|
|
|
|
# programs.mtr.enable = true;
|
|
|
|
|
# programs.gnupg.agent = {
|
|
|
|
|
# enable = true;
|
|
|
|
|
# enableSSHSupport = true;
|
|
|
|
|
# };
|
|
|
|
|
|
|
|
|
|
# List services that you want to enable:
|
|
|
|
|
|
|
|
|
|
# Enable the OpenSSH daemon.
|
|
|
|
|
services.openssh.enable = true;
|
|
|
|
|
|
|
|
|
|
# Open ports in the firewall.
|
|
|
|
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
|
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
|
|
|
# Or disable the firewall altogether.
|
|
|
|
|
# networking.firewall.enable = false;
|
|
|
|
|
|
|
|
|
|
# Copy the NixOS configuration file and link it from the resulting system
|
|
|
|
|
# (/run/current-system/configuration.nix). This is useful in case you
|
|
|
|
|
# accidentally delete configuration.nix.
|
|
|
|
|
# system.copySystemConfiguration = true;
|
|
|
|
|
|
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
|
system.stateVersion = "22.11"; # Did you read the comment?
|
|
|
|
|
}))
|
|
|
|
|
];
|
|
|
|
|
};
|
2022-11-06 20:23:10 +00:00
|
|
|
|
};
|
|
|
|
|
}
|