Compare commits
12 Commits
5424bfc493
...
243d7f3fc3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
243d7f3fc3 | ||
|
|
3f1b2d8789 | ||
|
|
0658c5d898 | ||
|
|
8b79f4e825 | ||
|
|
7fa3c698ed | ||
|
|
d3b6e8ed47 | ||
|
|
55a87d3d02 | ||
|
|
4c9b42ecc7 | ||
|
|
446ff7b960 | ||
|
|
0f2367c4b5 | ||
|
|
b174863576 | ||
|
|
cf25c67849 |
16
flake.nix
16
flake.nix
@@ -67,6 +67,7 @@
|
|||||||
impermanence.nixosModules.impermanence
|
impermanence.nixosModules.impermanence
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
nixos-mailserver.nixosModule
|
nixos-mailserver.nixosModule
|
||||||
|
noshell.nixosModules.default
|
||||||
phoenix.nixosModules.default
|
phoenix.nixosModules.default
|
||||||
nix-zulip'.nixosModules.zulip
|
nix-zulip'.nixosModules.zulip
|
||||||
{
|
{
|
||||||
@@ -76,18 +77,8 @@
|
|||||||
nix-zulip'.overlays.default
|
nix-zulip'.overlays.default
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
(
|
]
|
||||||
if machine.hostname != "109-199-104-83"
|
++ machine.modules;
|
||||||
then
|
|
||||||
{config, ...}: {
|
|
||||||
imports = [
|
|
||||||
./machines/${machine.hostname}/configuration.nix
|
|
||||||
];
|
|
||||||
networking.domain = config.networking.hostName; # temporary fix
|
|
||||||
}
|
|
||||||
else {imports = machine.modules;}
|
|
||||||
)
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
configurationWithHomeManager = machine: (configuration machine
|
configurationWithHomeManager = machine: (configuration machine
|
||||||
[
|
[
|
||||||
@@ -113,7 +104,6 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
noshell.nixosModules.default
|
|
||||||
]);
|
]);
|
||||||
in {
|
in {
|
||||||
nixosConfigurations =
|
nixosConfigurations =
|
||||||
|
|||||||
33
machines.nix
33
machines.nix
@@ -2,11 +2,33 @@
|
|||||||
lenovo = {
|
lenovo = {
|
||||||
hostname = "lenovo";
|
hostname = "lenovo";
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
users = [
|
users = ["andromeda"];
|
||||||
"andromeda"
|
|
||||||
"mtgmonkey"
|
|
||||||
];
|
|
||||||
modules = [
|
modules = [
|
||||||
|
# impermanence
|
||||||
|
./modules/nixos/impermanence.nix
|
||||||
|
|
||||||
|
# hardware configuration
|
||||||
|
# includes `system.stateVersion`
|
||||||
|
./machines/lenovo.nix
|
||||||
|
|
||||||
|
# boot process
|
||||||
|
# systemd-boot
|
||||||
|
./modules/nixos/boot/lenovo.nix
|
||||||
|
|
||||||
|
# networking
|
||||||
|
./modules/nixos/laptop.nix
|
||||||
|
|
||||||
|
# boilerplate settings
|
||||||
|
./modules/nixos/common.nix
|
||||||
|
|
||||||
|
# ly display manager
|
||||||
|
./modules/nixos/ly.nix
|
||||||
|
|
||||||
|
# sway window manager
|
||||||
|
./modules/nixos/sway.nix
|
||||||
|
|
||||||
|
# apps
|
||||||
|
./modules/nixos/steam.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"109-199-104-83" = {
|
"109-199-104-83" = {
|
||||||
@@ -14,6 +36,9 @@
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
users = [];
|
users = [];
|
||||||
modules = [
|
modules = [
|
||||||
|
# impermanence
|
||||||
|
./modules/nixos/impermanence.nix
|
||||||
|
|
||||||
# hardware configuration
|
# hardware configuration
|
||||||
# verbatim as `nixos-generate-config` AND `system.stateVersion`
|
# verbatim as `nixos-generate-config` AND `system.stateVersion`
|
||||||
./machines/109-199-104-83.nix
|
./machines/109-199-104-83.nix
|
||||||
|
|||||||
@@ -1,66 +1,17 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
machine,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||||
./impermanence.nix
|
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
boot.loader = {
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
systemd-boot.enable = true;
|
|
||||||
};
|
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
powerOnBoot = true;
|
|
||||||
};
|
|
||||||
i18n.defaultLocale = "de_DE.UTF-8";
|
|
||||||
networking = {
|
|
||||||
dhcpcd.enable = true;
|
|
||||||
firewall.enable = true;
|
|
||||||
hostName = machine.hostname;
|
|
||||||
networkmanager.enable = true;
|
|
||||||
};
|
|
||||||
nix.settings.experimental-features = [
|
|
||||||
"nix-command"
|
|
||||||
"flakes"
|
|
||||||
];
|
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
|
||||||
builtins.elem (lib.getName pkg) [
|
|
||||||
"steam"
|
|
||||||
"steam-original"
|
|
||||||
"steam-unwrapped"
|
|
||||||
"steam-run"
|
|
||||||
];
|
|
||||||
programs = {
|
|
||||||
noshell.enable = true;
|
|
||||||
steam.enable = true;
|
|
||||||
sway.enable = true;
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
blueman.enable = true;
|
|
||||||
displayManager = {
|
|
||||||
enable = true;
|
|
||||||
ly.enable = true;
|
|
||||||
};
|
|
||||||
libinput.enable = true;
|
|
||||||
openssh.enable = true;
|
|
||||||
printing.enable = true;
|
|
||||||
};
|
|
||||||
system.stateVersion = "26.05";
|
|
||||||
time.timeZone = "Europe/Berlin";
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "sdhci_pci"];
|
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "sdhci_pci"];
|
||||||
boot.initrd.kernelModules = [];
|
boot.initrd.kernelModules = [];
|
||||||
boot.kernelModules = ["kvm-intel"];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
boot.extraModulePackages = [];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
#device = "none";
|
|
||||||
#fsType = "tmpfs";
|
|
||||||
#options = ["defaults" "size=60%" "mode=755"];
|
|
||||||
device = "/dev/disk/by-uuid/5455cfb4-0efd-4f55-b496-d2cab3f419b7";
|
device = "/dev/disk/by-uuid/5455cfb4-0efd-4f55-b496-d2cab3f419b7";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = ["subvol=root"];
|
options = ["subvol=root"];
|
||||||
@@ -88,12 +39,12 @@
|
|||||||
done
|
done
|
||||||
|
|
||||||
btrfs subvolume create /btrfs_tmp/root
|
btrfs subvolume create /btrfs_tmp/root
|
||||||
mkdir /btrfs_tmp/root/nix
|
mkdir /btrfs_tmp/root/persist
|
||||||
mkdir /btrfs_tmp/root/etc
|
mkdir /btrfs_tmp/root/etc
|
||||||
mount ${config.fileSystems."/nix".device} /btrfs_tmp/root/nix
|
mount ${config.fileSystems."/persist".device} /btrfs_tmp/root/persist -o subvol=persist
|
||||||
cp /btrfs_tmp/root/nix/persist/etc/ssh /btrfs_tmp/root/etc/ssh -r
|
cp /btrfs_tmp/root/persist/etc/ssh /btrfs_tmp/root/etc/ssh -r
|
||||||
umount /btrfs_tmp/root/nix
|
umount /btrfs_tmp/root/persist
|
||||||
rm -r /btrfs_tmp/root/nix
|
rm -r /btrfs_tmp/root/persist
|
||||||
umount /btrfs_tmp
|
umount /btrfs_tmp
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@@ -102,6 +53,12 @@
|
|||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/persist" = {
|
||||||
|
device = "/dev/disk/by-uuid/5455cfb4-0efd-4f55-b496-d2cab3f419b7";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = ["subvol=persist"];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-uuid/F425-55BA";
|
device = "/dev/disk/by-uuid/F425-55BA";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
@@ -112,4 +69,5 @@
|
|||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
system.stateVersion = "26.05";
|
||||||
}
|
}
|
||||||
6
modules/nixos/boot/lenovo.nix
Normal file
6
modules/nixos/boot/lenovo.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
boot.loader = {
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -17,4 +17,7 @@
|
|||||||
boot.tmp.cleanOnBoot = true;
|
boot.tmp.cleanOnBoot = true;
|
||||||
|
|
||||||
networking.domain = lib.mkDefault config.networking.hostName;
|
networking.domain = lib.mkDefault config.networking.hostName;
|
||||||
|
|
||||||
|
# disable lecture
|
||||||
|
security.sudo.extraConfig = ''Defaults lecture="never"'';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,15 @@
|
|||||||
{
|
{
|
||||||
environment.persistence."/nix/persist" = {
|
fileSystems."/persist".neededForBoot = true;
|
||||||
|
environment.persistence."/persist" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
directories = [
|
directories = [
|
||||||
"/var/log"
|
"/var/log"
|
||||||
"/var/lib/bluetooth"
|
|
||||||
"/var/lib/nixos"
|
"/var/lib/nixos"
|
||||||
"/var/lib/systemd/coredump"
|
"/var/lib/systemd/coredump"
|
||||||
"/etc/NetworkManager/system-connections"
|
|
||||||
"/etc/ssh"
|
|
||||||
"/etc/ly/custom-sessions"
|
|
||||||
];
|
];
|
||||||
files = [
|
files = [
|
||||||
"/etc/machine-id"
|
"/etc/machine-id"
|
||||||
"/etc/ly/save.txt"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
39
modules/nixos/laptop.nix
Normal file
39
modules/nixos/laptop.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
# bluetooth
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
};
|
||||||
|
services.blueman.enable = true;
|
||||||
|
|
||||||
|
# locale
|
||||||
|
i18n.defaultLocale = "de_DE.UTF-8";
|
||||||
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
|
# networking
|
||||||
|
networking = {
|
||||||
|
firewall.enable = true;
|
||||||
|
networkmanager.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# misc
|
||||||
|
services = {
|
||||||
|
printing.enable = true;
|
||||||
|
|
||||||
|
# trackpad
|
||||||
|
libinput.enable = true;
|
||||||
|
|
||||||
|
# ssh
|
||||||
|
openssh.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# impermanence
|
||||||
|
environment.persistence."/persist".directories = [
|
||||||
|
# bluetooth
|
||||||
|
"/var/lib/bluetooth"
|
||||||
|
# wifi connections
|
||||||
|
"/etc/NetworkManager/system-connections"
|
||||||
|
# machine ssh keys
|
||||||
|
"/etc/ssh"
|
||||||
|
];
|
||||||
|
}
|
||||||
11
modules/nixos/ly.nix
Normal file
11
modules/nixos/ly.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
services.displayManager = {
|
||||||
|
enable = true;
|
||||||
|
ly.enable = true;
|
||||||
|
};
|
||||||
|
# TODO needs to be manually updated when new users added
|
||||||
|
environment.persistence."/persist" = {
|
||||||
|
directories = ["/etc/ly/custom-sessions"];
|
||||||
|
files = ["/etc/ly/save.txt"];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
};
|
};
|
||||||
"admin@${config.networking.domain}" = {
|
"admin@${config.networking.domain}" = {
|
||||||
hashedPasswordFile = builtins.toString config.age.secrets.mailserver-acc-admin-pw.path;
|
hashedPasswordFile = builtins.toString config.age.secrets.mailserver-acc-admin-pw.path;
|
||||||
|
aliases = ["@${config.networking.domain}"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
10
modules/nixos/steam.nix
Normal file
10
modules/nixos/steam.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{lib, ...}: {
|
||||||
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||||
|
builtins.elem (lib.getName pkg) [
|
||||||
|
"steam"
|
||||||
|
"steam-original"
|
||||||
|
"steam-unwrapped"
|
||||||
|
"steam-run"
|
||||||
|
];
|
||||||
|
programs.steam.enable = true;
|
||||||
|
}
|
||||||
3
modules/nixos/sway.nix
Normal file
3
modules/nixos/sway.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
programs.sway.enable = true;
|
||||||
|
}
|
||||||
@@ -1,24 +1,32 @@
|
|||||||
{config, ...}: {
|
{config, ...}: {
|
||||||
imports = [
|
|
||||||
./mailserver.nix
|
|
||||||
];
|
|
||||||
services.zulip = {
|
services.zulip = {
|
||||||
enable = true;
|
enable = true;
|
||||||
host = "zulip.${config.networking.domain}";
|
|
||||||
|
# lets it set up my postgresql for me
|
||||||
|
enablePostgresqlLocally = true;
|
||||||
|
|
||||||
|
# host domain
|
||||||
|
host = "chat.${config.networking.domain}";
|
||||||
|
|
||||||
|
# secrets
|
||||||
camoKeyFile = builtins.toString config.age.secrets.zulip-camoKey.path;
|
camoKeyFile = builtins.toString config.age.secrets.zulip-camoKey.path;
|
||||||
rabbitmqPasswordFile = builtins.toString config.age.secrets.zulip-rabbitmqPassword.path;
|
rabbitmqPasswordFile = builtins.toString config.age.secrets.zulip-rabbitmqPassword.path;
|
||||||
secretKeyFile = builtins.toString config.age.secrets.zulip-secretKey.path;
|
secretKeyFile = builtins.toString config.age.secrets.zulip-secretKey.path;
|
||||||
sharedSecretKeyFile = builtins.toString config.age.secrets.zulip-sharedSecretKey.path;
|
sharedSecretKeyFile = builtins.toString config.age.secrets.zulip-sharedSecretKey.path;
|
||||||
avatarSaltKeyFile = builtins.toString config.age.secrets.zulip-avatarSaltKey.path;
|
avatarSaltKeyFile = builtins.toString config.age.secrets.zulip-avatarSaltKey.path;
|
||||||
zulipSettings = {
|
extraSecrets = {
|
||||||
ZULIP_ADMINISTRATOR = "admin+zulip@${config.networking.domain}";
|
email_password = builtins.toString config.age.secrets.zulip-extraSecrets-email_password.path;
|
||||||
EXTERNAL_HOST = "chat.${config.networking.domain}";
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
services.postgresql.enable = true;
|
# settings
|
||||||
mailserver.loginAccounts = {
|
zulipSettings = rec {
|
||||||
"zulip+admin@${config.networking.domain}" = {
|
EMAIL_USE_TLS = true;
|
||||||
hashedPasswordFile = builtins.toString config.age.secrets."mailserver-acc-zulip+admin-pw".path;
|
EMAIL_PORT = 587;
|
||||||
|
ADD_TOKENS_TO_NOREPLY_ADDRESS = false;
|
||||||
|
NOREPLY_EMAIL_ADDRESS = ZULIP_ADMINISTRATOR;
|
||||||
|
OPEN_REALM_CREATION = true;
|
||||||
|
EXTERNAL_HOST = config.services.zulip.host;
|
||||||
|
ZULIP_ADMINISTRATOR = "admin@${config.networking.domain}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"mailserver-acc-zulip+admin-pw".file = ./secrets + "/mailserver-acc-zulip+admin-pw.age";
|
"mailserver-acc-zulip+admin-pw".file = ./secrets + "/mailserver-acc-zulip+admin-pw.age";
|
||||||
zulip-avatarSaltKey.file = ./secrets/zulip-avatarSaltKey.age;
|
zulip-avatarSaltKey.file = ./secrets/zulip-avatarSaltKey.age;
|
||||||
zulip-camoKey.file = ./secrets/zulip-camoKey.age;
|
zulip-camoKey.file = ./secrets/zulip-camoKey.age;
|
||||||
|
zulip-extraSecrets-email_password.file = ./secrets/zulip-extraSecrets-email_password.age;
|
||||||
zulip-rabbitmqPassword.file = ./secrets/zulip-rabbitmqPassword.age;
|
zulip-rabbitmqPassword.file = ./secrets/zulip-rabbitmqPassword.age;
|
||||||
zulip-secretKey.file = ./secrets/zulip-secretKey.age;
|
zulip-secretKey.file = ./secrets/zulip-secretKey.age;
|
||||||
zulip-sharedSecretKey.file = ./secrets/zulip-sharedSecretKey.age;
|
zulip-sharedSecretKey.file = ./secrets/zulip-sharedSecretKey.age;
|
||||||
|
|||||||
Binary file not shown.
@@ -4,14 +4,22 @@ let
|
|||||||
lenovo = pub-keys.ssh.lenovo;
|
lenovo = pub-keys.ssh.lenovo;
|
||||||
_109-199-104-83 = pub-keys.ssh._109-199-104-83;
|
_109-199-104-83 = pub-keys.ssh._109-199-104-83;
|
||||||
in {
|
in {
|
||||||
|
# user passwords
|
||||||
"andromeda-pw.age".publicKeys = [andromeda lenovo];
|
"andromeda-pw.age".publicKeys = [andromeda lenovo];
|
||||||
"mtgmonkey-pw.age".publicKeys = [andromeda lenovo];
|
"mtgmonkey-pw.age".publicKeys = [andromeda lenovo];
|
||||||
|
|
||||||
|
# mail account passwords
|
||||||
"mailserver-acc-test-pw.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
"mailserver-acc-test-pw.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
||||||
"mailserver-acc-admin-pw.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
"mailserver-acc-admin-pw.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
||||||
"mailserver-acc-zulip+admin-pw.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
"mailserver-acc-zulip+admin-pw.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
||||||
|
|
||||||
|
# zulip keys
|
||||||
"zulip-avatarSaltKey.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
"zulip-avatarSaltKey.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
||||||
"zulip-camoKey.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
"zulip-camoKey.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
||||||
"zulip-rabbitmqPassword.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
"zulip-rabbitmqPassword.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
||||||
"zulip-secretKey.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
"zulip-secretKey.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
||||||
"zulip-sharedSecretKey.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
"zulip-sharedSecretKey.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
||||||
|
|
||||||
|
# zulip-secrets.conf values
|
||||||
|
"zulip-extraSecrets-email_password.age".publicKeys = [andromeda lenovo _109-199-104-83];
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
secrets/zulip-extraSecrets-email_password.age
Normal file
BIN
secrets/zulip-extraSecrets-email_password.age
Normal file
Binary file not shown.
12
users.nix
12
users.nix
@@ -36,7 +36,7 @@ in {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
environment.persistence."/nix/persist".users = lib.mkIf config.environment.persistence."/nix/persist".enable (
|
environment.persistence."/persist".users = lib.mkIf config.environment.persistence."/persist".enable (
|
||||||
builtins.mapAttrs
|
builtins.mapAttrs
|
||||||
(name: value: lib.mkIf (builtins.elem name machine.users) value)
|
(name: value: lib.mkIf (builtins.elem name machine.users) value)
|
||||||
{
|
{
|
||||||
@@ -56,16 +56,6 @@ in {
|
|||||||
".brush_history"
|
".brush_history"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"mtgmonkey" = {
|
|
||||||
directories = [
|
|
||||||
".local/share/zoxide"
|
|
||||||
".ssh"
|
|
||||||
];
|
|
||||||
files = [
|
|
||||||
".bash_history"
|
|
||||||
".brush_history"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,82 +16,6 @@
|
|||||||
"${config.home.homeDirectory}/${background-path}"
|
"${config.home.homeDirectory}/${background-path}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
sway_config' = builtins.toFile "sway_config" ''
|
|
||||||
set $mod Mod4
|
|
||||||
set $left h
|
|
||||||
set $down j
|
|
||||||
set $up k
|
|
||||||
set $right l
|
|
||||||
set $term alacritty
|
|
||||||
set $menu wmenu-run
|
|
||||||
set $screenshot grim -g "$(slurp)"
|
|
||||||
floating_modifier $mod normal
|
|
||||||
|
|
||||||
workspace_layout stacking
|
|
||||||
output * bg ${config.home.homeDirectory}/${background-path} fill
|
|
||||||
|
|
||||||
# launch programs
|
|
||||||
bindsym $mod+Shift+Return exec $term
|
|
||||||
bindsym $mod+Shift+d exec $menu
|
|
||||||
bindsym $mod+Shift+a exec anki
|
|
||||||
bindsym $mod+Shift+q exec librewolf
|
|
||||||
bindsym $mod+Shift+s exec $screenshot
|
|
||||||
|
|
||||||
bindsym $mod+Shift+c kill
|
|
||||||
|
|
||||||
bindsym $mod+Shift+r reload
|
|
||||||
|
|
||||||
bindsym $mod+Shift+Alt+q exit
|
|
||||||
|
|
||||||
bindsym $mod+$left focus left
|
|
||||||
bindsym $mod+$down focus down
|
|
||||||
bindsym $mod+$up focus up
|
|
||||||
bindsym $mod+$right focus right
|
|
||||||
|
|
||||||
bindsym $mod+Shift+$left move left
|
|
||||||
bindsym $mod+Shift+$down move down
|
|
||||||
bindsym $mod+Shift+$up move up
|
|
||||||
bindsym $mod+Shift+$right move right
|
|
||||||
|
|
||||||
bindsym $mod+1 workspace number 1
|
|
||||||
bindsym $mod+2 workspace number 2
|
|
||||||
bindsym $mod+3 workspace number 3
|
|
||||||
bindsym $mod+4 workspace number 4
|
|
||||||
bindsym $mod+5 workspace number 5
|
|
||||||
bindsym $mod+6 workspace number 6
|
|
||||||
bindsym $mod+7 workspace number 7
|
|
||||||
bindsym $mod+8 workspace number 8
|
|
||||||
bindsym $mod+9 workspace number 9
|
|
||||||
bindsym $mod+0 workspace number 0
|
|
||||||
|
|
||||||
bindsym $mod+Shift+1 move container to workspace number 1
|
|
||||||
bindsym $mod+Shift+2 move container to workspace number 2
|
|
||||||
bindsym $mod+Shift+3 move container to workspace number 3
|
|
||||||
bindsym $mod+Shift+4 move container to workspace number 4
|
|
||||||
bindsym $mod+Shift+5 move container to workspace number 5
|
|
||||||
bindsym $mod+Shift+6 move container to workspace number 6
|
|
||||||
bindsym $mod+Shift+7 move container to workspace number 7
|
|
||||||
bindsym $mod+Shift+8 move container to workspace number 8
|
|
||||||
bindsym $mod+Shift+9 move container to workspace number 9
|
|
||||||
bindsym $mod+Shift+0 move container to workspace number 0
|
|
||||||
|
|
||||||
bindsym $mod+f fullscreen
|
|
||||||
bindsym $mod+Shift+space floating toggle
|
|
||||||
bindsym $mod+Shift+minus move scratchpad
|
|
||||||
bindsym $mod+minus scratchpad show
|
|
||||||
|
|
||||||
bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle
|
|
||||||
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5%
|
|
||||||
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5%
|
|
||||||
bindsym --locked XF86AudioMicMute exec pact set-source-mute \@DEFAULT_SOURCE@ toggle
|
|
||||||
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
|
|
||||||
bindsym --locked XF86MonbrightnessUp exec brightnessctl set 5%+
|
|
||||||
|
|
||||||
default_border none
|
|
||||||
font pango:monospace 0.001
|
|
||||||
titlebar_border_thickness 0
|
|
||||||
titlebar_padding 0
|
|
||||||
'';
|
|
||||||
in {
|
in {
|
||||||
imports = [./stylix.nix];
|
imports = [./stylix.nix];
|
||||||
xdg.configFile."shell".source = lib.getExe pkgs.brush;
|
xdg.configFile."shell".source = lib.getExe pkgs.brush;
|
||||||
|
|||||||
@@ -1,172 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
machine,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [./stylix.nix];
|
|
||||||
xdg.configFile."shell".source = lib.getExe pkgs.brush;
|
|
||||||
home = {
|
|
||||||
username = "mtgmonkey";
|
|
||||||
homeDirectory = "/home/${config.home.username}";
|
|
||||||
stateVersion = "26.05";
|
|
||||||
packages = [
|
|
||||||
pkgs.acpi
|
|
||||||
pkgs.brightnessctl
|
|
||||||
pkgs.brush
|
|
||||||
pkgs.dust
|
|
||||||
pkgs.fzf
|
|
||||||
pkgs.glow
|
|
||||||
pkgs.jmtpfs
|
|
||||||
pkgs.nix-output-monitor
|
|
||||||
pkgs.ranger
|
|
||||||
pkgs.rip2
|
|
||||||
pkgs.ripgrep
|
|
||||||
pkgs.tree
|
|
||||||
pkgs.zoxide
|
|
||||||
];
|
|
||||||
};
|
|
||||||
programs = {
|
|
||||||
bash = {
|
|
||||||
enable = true;
|
|
||||||
shellAliases = {
|
|
||||||
neofetch = "fastfetch";
|
|
||||||
ls = lib.mkForce "lsd";
|
|
||||||
ll = lib.mkForce "lsd -l";
|
|
||||||
l = "lsd -la";
|
|
||||||
cd = "z";
|
|
||||||
gg = "git log --oneline --abbrev-commit --all --graph --decorate --color";
|
|
||||||
md = "glow";
|
|
||||||
};
|
|
||||||
bashrcExtra = ''
|
|
||||||
PS1="\u@\h:\w$"
|
|
||||||
eval "$(zoxide init bash)"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
btop = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
theme_background = false;
|
|
||||||
vim_keys = true;
|
|
||||||
rounded_corners = false;
|
|
||||||
graph_symbol = "braille";
|
|
||||||
update_ms = 150;
|
|
||||||
proc_sorting = "cpu lazy";
|
|
||||||
proc_gradient = false;
|
|
||||||
proc_left = true;
|
|
||||||
cpu_single_graph = true;
|
|
||||||
cpu_bottom = true;
|
|
||||||
clock_format = "/user@/host:/uptime@%H:%M";
|
|
||||||
background_update = true;
|
|
||||||
mem_graphs = false;
|
|
||||||
mem_below_net = true;
|
|
||||||
show_swap = false;
|
|
||||||
only_physical = true;
|
|
||||||
show_io_stat = true;
|
|
||||||
io_mode = false;
|
|
||||||
io_graph_combined = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
fastfetch.enable = true;
|
|
||||||
git = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
user = {
|
|
||||||
name = config.home.username;
|
|
||||||
email = "${config.home.username}@${machine.hostname}";
|
|
||||||
};
|
|
||||||
init.defaultBranch = "master";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
gh.enable = true;
|
|
||||||
home-manager.enable = true;
|
|
||||||
lsd.enable = true;
|
|
||||||
nvf = {
|
|
||||||
enable = true;
|
|
||||||
settings.vim = {
|
|
||||||
autocomplete.nvim-cmp.enable = false;
|
|
||||||
formatter.conform-nvim = {
|
|
||||||
enable = true;
|
|
||||||
setupOpts.format_on_save = {
|
|
||||||
lsp_format = "fallback";
|
|
||||||
timeout_ms = 5000;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
lsp.otter-nvim.enable = true;
|
|
||||||
git.enable = true;
|
|
||||||
keymaps = [
|
|
||||||
{
|
|
||||||
key = "<Down>";
|
|
||||||
mode = ["i" "n" "v" "c"];
|
|
||||||
action = "<NOP>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<Up>";
|
|
||||||
mode = ["i" "n" "v" "c"];
|
|
||||||
action = "<NOP>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<Left>";
|
|
||||||
mode = ["i" "n" "v" "c"];
|
|
||||||
action = "<NOP>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<Right>";
|
|
||||||
mode = ["i" "n" "v" "c"];
|
|
||||||
action = "<NOP>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "jj";
|
|
||||||
mode = ["i"];
|
|
||||||
action = "<Esc>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "kk";
|
|
||||||
mode = ["i"];
|
|
||||||
action = "<Esc>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "jk";
|
|
||||||
mode = ["i"];
|
|
||||||
action = "<Esc>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "kj";
|
|
||||||
mode = ["i"];
|
|
||||||
action = "<Esc>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<Esc>";
|
|
||||||
mode = ["i"];
|
|
||||||
action = "<Nop>";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
languages = {
|
|
||||||
nix = {
|
|
||||||
enable = true;
|
|
||||||
format.enable = true;
|
|
||||||
lsp.enable = true;
|
|
||||||
};
|
|
||||||
haskell = {
|
|
||||||
enable = true;
|
|
||||||
lsp.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
lineNumberMode = "relative";
|
|
||||||
options = {
|
|
||||||
tabstop = 2;
|
|
||||||
shiftwidth = 2;
|
|
||||||
expandtab = true;
|
|
||||||
smarttab = true;
|
|
||||||
foldmethod = "indent";
|
|
||||||
number = true;
|
|
||||||
colorcolumn = "80";
|
|
||||||
};
|
|
||||||
statusline.lualine.enable = true;
|
|
||||||
syntaxHighlighting = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
ssh.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
stylix = {
|
|
||||||
enable = true;
|
|
||||||
# rebecca has lavener bkg
|
|
||||||
# tube has dark gray bkg
|
|
||||||
# silk-light is light theme
|
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-hard.yaml";
|
|
||||||
polarity = "dark";
|
|
||||||
fonts = {
|
|
||||||
monospace = {
|
|
||||||
package = pkgs.miracode;
|
|
||||||
name = "Miracode";
|
|
||||||
};
|
|
||||||
serif = config.stylix.fonts.sansSerif;
|
|
||||||
emoji = {
|
|
||||||
package = pkgs.noto-fonts-color-emoji;
|
|
||||||
name = "Noto Color Emoji";
|
|
||||||
};
|
|
||||||
sizes = {
|
|
||||||
applications = 12;
|
|
||||||
terminal = 10;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user