mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-28 06:40:44 -06:00
Compare commits
24 commits
fa1253baa5
...
94dca60858
Author | SHA1 | Date | |
---|---|---|---|
|
94dca60858 | ||
3ab1df77c6 | |||
f3a5290a80 | |||
60a6311a0d | |||
49b9b107a4 | |||
7b04cf6274 | |||
f69f2839da | |||
f373cc323b | |||
7facf2e749 | |||
55f2e625ec | |||
ff7f8495f6 | |||
4b8b1718a4 | |||
4a8eb8bf0b | |||
cec9ce730f | |||
9f8a1692b5 | |||
4287d698b9 | |||
71cab562fc | |||
a256b441e0 | |||
43d9ab3aec | |||
7f1223222a | |||
5e49f286e6 | |||
13b42e2511 | |||
e0a3123035 | |||
|
270c946b24 |
26 changed files with 414 additions and 372 deletions
85
flake.lock
85
flake.lock
|
@ -68,11 +68,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710091028,
|
"lastModified": 1711035742,
|
||||||
"narHash": "sha256-yFk2kc8J2kVh0RWlwT+PQf0bpfUNcROOcRYcyQJbpk4=",
|
"narHash": "sha256-5vvhCSUGG9TA2G1eIRgokuYizhRnZu0ZbcU1MXfHsUE=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprcursor",
|
"repo": "hyprcursor",
|
||||||
"rev": "05db7dfd7fc261e0195e54f8a6d655d4f370e70f",
|
"rev": "6a92473237f430399a417e1c2da9d7fcd4970086",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -94,11 +94,11 @@
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710344304,
|
"lastModified": 1711232090,
|
||||||
"narHash": "sha256-jE+/UGqRYkKBBpLTTV5ayCtVmD9N1WsSKpufszUPzcA=",
|
"narHash": "sha256-3psLgLXBg4F9UU93E+zmMqoMhcIX6e8HEphXCxlfUOY=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "3e67ee0f5f66c74c0a0bd4f797361fd100c2e2d2",
|
"rev": "c7fbea3368452c34c47a4a634e642de6cd4090cb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -115,11 +115,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710415616,
|
"lastModified": 1711036118,
|
||||||
"narHash": "sha256-1qVByzzCcKoCmP8ReUSAjKU5V9pfTLHQIM4WI1tvQ9E=",
|
"narHash": "sha256-BxWizZAc845ks9BjEXosRjfBv/NMr1WwoORBQuixfII=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "contrib",
|
"repo": "contrib",
|
||||||
"rev": "75420d09f93346d9d23d5a1e26b42699f6b66cd6",
|
"rev": "536f00c5895015da1e7aa85bbee9aa6dcd149e69",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -188,11 +188,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709914708,
|
"lastModified": 1710960526,
|
||||||
"narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=",
|
"narHash": "sha256-tt0UgVKWeLQ+tFzvqrm4uAZbzONwdGshpfiLHAQ1P2c=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprlang",
|
"repo": "hyprlang",
|
||||||
"rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2",
|
"rev": "a2f39421144d42541c057be235154ce21b76c0f6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -207,11 +207,11 @@
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710184940,
|
"lastModified": 1710677371,
|
||||||
"narHash": "sha256-FzYm4td3FJfzOAuEkCXt3KdUgZuA072OAQXqIq+IAMo=",
|
"narHash": "sha256-yqjXunc+Zvqf6rcH7W9wMvhr18jMZhDvIdnretlfj78=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "lib-aggregate",
|
"repo": "lib-aggregate",
|
||||||
"rev": "45b75bf534592c0c1c881a1c447f7fdb37a87eaf",
|
"rev": "f890211817b941d9ed9de48d62ba8553fa2c20f3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -270,11 +270,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710120787,
|
"lastModified": 1710644923,
|
||||||
"narHash": "sha256-tlLuB73OCOKtU2j83bQzSYFyzjJo3rjpITZE5MoofG8=",
|
"narHash": "sha256-0fjbN5GYYDKPyPay0l8gYoH+tFfNqPPwP5sxxBreeA4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-index-database",
|
"repo": "nix-index-database",
|
||||||
"rev": "e76ff2df6bfd2abe06abd8e7b9f217df941c1b07",
|
"rev": "e25efda85e39fcdc845e371971ac4384989c4295",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -285,11 +285,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710377395,
|
"lastModified": 1711200738,
|
||||||
"narHash": "sha256-KMubsUWtVr7L55pXMBibBDBdmk3xrjbBPduc0E8z28c=",
|
"narHash": "sha256-dkJmk/ET/tRV4007O6kU101UEg1svUwiyk/zEEX9Tdg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "db001797591bf76f7b8d4c4ed3b49233391e0c97",
|
"rev": "20bc93ca7b2158ebc99b8cef987a2173a81cde35",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -301,11 +301,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710031547,
|
"lastModified": 1710636348,
|
||||||
"narHash": "sha256-pkUg3hOKuGWMGF9WEMPPN/G4pqqdbNGJQ54yhyQYDVY=",
|
"narHash": "sha256-/kB+ZWSdkZjbZ0FTqm0u84sf2jFS+30ysaEajmBjtoY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "630ebdc047ca96d8126e16bb664c7730dc52f6e6",
|
"rev": "fa827dda806c5aa98f454da4c567991ab8ce422c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -324,11 +324,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710422269,
|
"lastModified": 1711218979,
|
||||||
"narHash": "sha256-aZEM210J8gQ+nHCDXshM9pGwp6Wac51niM8ZdWJJFYQ=",
|
"narHash": "sha256-glCjdonAlkP5vwZpP8FYD1WCaGYALF5FYRv09XsWu5c=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs-wayland",
|
"repo": "nixpkgs-wayland",
|
||||||
"rev": "077f5833cb60efda5375053101b75150a5386e22",
|
"rev": "0d291a959d01bb5d2bd2e20689b78258fa842cca",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -381,16 +381,17 @@
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-wayland": "nixpkgs-wayland",
|
"nixpkgs-wayland": "nixpkgs-wayland",
|
||||||
"pinix": "pinix",
|
"pinix": "pinix",
|
||||||
"stable": "stable"
|
"stable": "stable",
|
||||||
|
"tsm": "tsm"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"stable": {
|
"stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710283656,
|
"lastModified": 1711124224,
|
||||||
"narHash": "sha256-nI+AOy4uK6jLGBi9nsbHjL1EdSIzoo8oa+9oeVhbyFc=",
|
"narHash": "sha256-l0zlN/3CiodvWDtfBOVxeTwYSRz93muVbXWSpaMjXxM=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "51063ed4f2343a59fdeebb279bb81d87d453942b",
|
"rev": "56528ee42526794d413d6f244648aaee4a7b56c0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -467,6 +468,28 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"tsm": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"dir": "nix",
|
||||||
|
"lastModified": 1710955312,
|
||||||
|
"narHash": "sha256-7F88bRcAqU1NPo89pKhR/d6NKRn2JJ2FWcSLITjvzdU=",
|
||||||
|
"owner": "daylinmorgan",
|
||||||
|
"repo": "tsm",
|
||||||
|
"rev": "090dda23ad4ab87a68323a9e1924bc6d8ce6e0a6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"dir": "nix",
|
||||||
|
"owner": "daylinmorgan",
|
||||||
|
"repo": "tsm",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"wlroots": {
|
"wlroots": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
10
flake.nix
10
flake.nix
|
@ -1,16 +1,16 @@
|
||||||
{
|
{
|
||||||
description = "nix begat oizys";
|
description = "nix begat oizys";
|
||||||
|
|
||||||
outputs = inputs @ {self, ...}:
|
outputs = inputs @ {self, ...}:
|
||||||
(import ./lib {
|
(import ./lib {inherit self inputs;}).oizysFlake;
|
||||||
inherit inputs;
|
|
||||||
inherit self;
|
|
||||||
})
|
|
||||||
.oizysFlake {};
|
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||||
|
|
||||||
|
tsm.url = "github:daylinmorgan/tsm?dir=nix";
|
||||||
|
tsm.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
hyprland.url = "github:hyprwm/Hyprland/main";
|
hyprland.url = "github:hyprwm/Hyprland/main";
|
||||||
hyprland.inputs.nixpkgs.follows = "nixpkgs";
|
hyprland.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
hyprland-contrib.url = "github:hyprwm/contrib";
|
hyprland-contrib.url = "github:hyprwm/contrib";
|
||||||
|
|
|
@ -1,22 +1,28 @@
|
||||||
{
|
{
|
||||||
self,
|
self,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
inherit (lib) enabled;
|
||||||
|
in {
|
||||||
imports = with self.nixosModules; [
|
imports = with self.nixosModules; [
|
||||||
docker
|
|
||||||
restic
|
restic
|
||||||
];
|
];
|
||||||
|
|
||||||
oizys.languages = [
|
oizys = {
|
||||||
"nim"
|
languages = [
|
||||||
"python"
|
"nim"
|
||||||
];
|
"node" # for docker langservers
|
||||||
|
"python"
|
||||||
|
];
|
||||||
|
|
||||||
|
docker = enabled;
|
||||||
|
backups = enabled;
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
rclone
|
(writeShellScriptBin "gitea" ''
|
||||||
|
|
||||||
(pkgs.writeShellScriptBin "gitea" ''
|
|
||||||
ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
|
ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,32 +2,34 @@
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [];
|
imports = [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"];
|
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
|
||||||
boot.initrd.kernelModules = [];
|
boot.initrd.kernelModules = [];
|
||||||
boot.kernelModules = [];
|
boot.kernelModules = [];
|
||||||
boot.extraModulePackages = [];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/eb6cbf1e-e4a7-4312-a1af-4f78ad9cf138";
|
device = "/dev/disk/by-uuid/70d6dad3-1778-43bf-8f87-76dd7f54c545";
|
||||||
fsType = "btrfs";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [];
|
swapDevices = [
|
||||||
|
{device = "/dev/disk/by-uuid/a4e4cad9-1844-45dd-9bea-eb77bd71c37b";}
|
||||||
|
];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.ens3.useDHCP = lib.mkDefault true;
|
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
virtualisation.hypervGuest.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,12 @@
|
||||||
{lib, ...}: {
|
{lib, ...}: let
|
||||||
|
inherit (lib) enabled;
|
||||||
|
in {
|
||||||
users.motd = lib.mkRune {
|
users.motd = lib.mkRune {
|
||||||
number = "6";
|
number = "6";
|
||||||
rune = "algiz";
|
rune = "algiz";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
services.resolved = enabled;
|
||||||
{
|
|
||||||
device = "/var/lib/swapfile";
|
|
||||||
size = 2 * 1024;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
services.resolved.enable = true;
|
|
||||||
|
|
||||||
services.fail2ban = {
|
services.fail2ban = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -26,25 +21,22 @@
|
||||||
# networking.nameservers = [ "8.8.8.8"];
|
# networking.nameservers = [ "8.8.8.8"];
|
||||||
|
|
||||||
# allow tcp connections for revsere proxy
|
# allow tcp connections for revsere proxy
|
||||||
networking.firewall = {
|
networking.firewall =
|
||||||
enable = true;
|
enabled
|
||||||
allowedTCPPorts = [80 443];
|
// {
|
||||||
};
|
allowedTCPPorts = [80 443];
|
||||||
|
};
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh =
|
||||||
services.openssh.settings.PasswordAuthentication = false;
|
enabled
|
||||||
|
// {settings.PasswordAuthentication = false;};
|
||||||
|
|
||||||
users.mutableUsers = false;
|
# users.mutableUsers = false;
|
||||||
|
|
||||||
# Use the GRUB 2 boot loader.
|
# Use the GRUB 2 boot loader.
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
|
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# don't delete this you foo bar
|
||||||
# settings for stateful data, like file locations and database versions
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
# 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?
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,18 @@
|
||||||
{self, ...}: {
|
{
|
||||||
|
self,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) enabled;
|
||||||
|
in {
|
||||||
imports = with self.nixosModules; [
|
imports = with self.nixosModules; [
|
||||||
nix-ld
|
nix-ld
|
||||||
];
|
];
|
||||||
|
|
||||||
oizys.desktop.enable = true;
|
oizys = {
|
||||||
|
desktop = enabled;
|
||||||
|
nix-ld = enabled;
|
||||||
|
};
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
inherit (lib) enabled;
|
||||||
|
in {
|
||||||
users.motd = lib.mkRune {
|
users.motd = lib.mkRune {
|
||||||
number = "2";
|
number = "2";
|
||||||
rune = "mannaz";
|
rune = "mannaz";
|
||||||
|
@ -11,7 +13,7 @@
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot = enabled;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -26,27 +28,31 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware.opengl = {
|
hardware.opengl =
|
||||||
enable = true;
|
enabled
|
||||||
driSupport = true;
|
// {
|
||||||
driSupport32Bit = true;
|
driSupport = true;
|
||||||
extraPackages = with pkgs; [
|
driSupport32Bit = true;
|
||||||
libGL
|
extraPackages = with pkgs; [
|
||||||
];
|
libGL
|
||||||
setLdLibraryPath = true;
|
];
|
||||||
};
|
setLdLibraryPath = true;
|
||||||
|
};
|
||||||
# Load nvidia driver for Xorg and Wayland
|
# Load nvidia driver for Xorg and Wayland
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
# Modesetting is required.
|
# Modesetting is required.
|
||||||
modesetting.enable = true;
|
modesetting = enabled;
|
||||||
|
|
||||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||||
powerManagement.enable = false;
|
powerManagement =
|
||||||
# Fine-grained power management. Turns off GPU when not in use.
|
enabled
|
||||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
// {
|
||||||
powerManagement.finegrained = false;
|
# Fine-grained power management. Turns off GPU when not in use.
|
||||||
|
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||||
|
finegrained = false;
|
||||||
|
};
|
||||||
|
|
||||||
# Use the NVidia open source kernel module (not to be confused with the
|
# Use the NVidia open source kernel module (not to be confused with the
|
||||||
# independent third-party "nouveau" open source driver).
|
# independent third-party "nouveau" open source driver).
|
||||||
|
@ -65,8 +71,8 @@
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld = enabled;
|
||||||
services.openssh.enable = true;
|
services.openssh = enabled;
|
||||||
|
|
||||||
networking.hostName = "mannaz";
|
networking.hostName = "mannaz";
|
||||||
# networking.wireless.enable = true;
|
# networking.wireless.enable = true;
|
||||||
|
@ -80,21 +86,6 @@
|
||||||
time.timeZone = "America/Chicago";
|
time.timeZone = "America/Chicago";
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
# don't delete this you foo bar
|
||||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
|
||||||
#
|
|
||||||
# Most users should NEVER change this value after the initial install, for any reason,
|
|
||||||
# even if you've upgraded your system to a new NixOS release.
|
|
||||||
#
|
|
||||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
|
||||||
# so changing it will NOT upgrade your system.
|
|
||||||
#
|
|
||||||
# This value being lower than the current NixOS release does NOT mean your system is
|
|
||||||
# out of date, out of support, or vulnerable.
|
|
||||||
#
|
|
||||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
|
||||||
# and migrated your data accordingly.
|
|
||||||
#
|
|
||||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
self,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
imports = with self.nixosModules; [
|
inherit (lib) enabled;
|
||||||
nix-ld
|
in {
|
||||||
restic
|
|
||||||
docker
|
|
||||||
];
|
|
||||||
|
|
||||||
oizys = {
|
oizys = {
|
||||||
vbox.enable = true;
|
desktop = enabled;
|
||||||
desktop.enable = true;
|
hyprland = enabled;
|
||||||
vpn.enable = true;
|
chrome = enabled;
|
||||||
|
docker = enabled;
|
||||||
|
nix-ld = enabled;
|
||||||
|
vbox = enabled;
|
||||||
|
vpn = enabled;
|
||||||
|
backups = enabled;
|
||||||
languages = [
|
languages = [
|
||||||
"misc"
|
"misc"
|
||||||
"python"
|
"python"
|
||||||
|
@ -21,16 +22,12 @@
|
||||||
"node"
|
"node"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
vivaldi.enable = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
zk
|
zk
|
||||||
rclone
|
|
||||||
quarto
|
quarto
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.hyprland.enable = true;
|
|
||||||
|
|
||||||
services.restic.backups.gdrive = {
|
services.restic.backups.gdrive = {
|
||||||
user = "daylin";
|
user = "daylin";
|
||||||
repository = "rclone:g:archives/othalan";
|
repository = "rclone:g:archives/othalan";
|
||||||
|
|
|
@ -2,26 +2,27 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
networking.networkmanager.enable = true;
|
inherit (lib) enabled;
|
||||||
services.printing.enable = true;
|
in {
|
||||||
services.fwupd.enable = true;
|
networking.networkmanager = enabled;
|
||||||
hardware.bluetooth.enable = true;
|
services.printing = enabled;
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
services.fwupd = enabled;
|
||||||
|
hardware.bluetooth = enabled // {powerOnBoot = true;};
|
||||||
|
|
||||||
# https://github.com/NixOS/nixos-hardware/blob/c478b3d56969006e015e55aaece4931f3600c1b2/lenovo/thinkpad/x1/9th-gen/default.nix
|
# https://github.com/NixOS/nixos-hardware/blob/c478b3d56969006e015e55aaece4931f3600c1b2/lenovo/thinkpad/x1/9th-gen/default.nix
|
||||||
# https://github.com/NixOS/nixos-hardware/blob/c478b3d56969006e015e55aaece4931f3600c1b2/common/pc/ssd/default.nix
|
# https://github.com/NixOS/nixos-hardware/blob/c478b3d56969006e015e55aaece4931f3600c1b2/common/pc/ssd/default.nix
|
||||||
services.fstrim.enable = true;
|
services.fstrim = enabled;
|
||||||
|
|
||||||
# rtkit is optional but recommended
|
# rtkit is optional but recommended
|
||||||
security.rtkit.enable = true;
|
security.rtkit = enabled;
|
||||||
services.pipewire = {
|
services.pipewire =
|
||||||
enable = true;
|
enabled
|
||||||
audio.enable = true;
|
// {
|
||||||
pulse.enable = true;
|
audio = enabled;
|
||||||
alsa.enable = true;
|
pulse = enabled;
|
||||||
alsa.support32Bit = true;
|
alsa = enabled // {support32Bit = true;};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
pamixer
|
pamixer
|
||||||
|
@ -46,21 +47,6 @@
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
# don't delete this you foo bar
|
||||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
|
||||||
#
|
|
||||||
# Most users should NEVER change this value after the initial install, for any reason,
|
|
||||||
# even if you've upgraded your system to a new NixOS release.
|
|
||||||
#
|
|
||||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
|
||||||
# so changing it will NOT upgrade your system.
|
|
||||||
#
|
|
||||||
# This value being lower than the current NixOS release does NOT mean your system is
|
|
||||||
# out of date, out of support, or vulnerable.
|
|
||||||
#
|
|
||||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
|
||||||
# and migrated your data accordingly.
|
|
||||||
#
|
|
||||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,68 +5,53 @@
|
||||||
inherit (inputs) nixpkgs;
|
inherit (inputs) nixpkgs;
|
||||||
lib = nixpkgs.lib.extend (import ./extended.nix);
|
lib = nixpkgs.lib.extend (import ./extended.nix);
|
||||||
|
|
||||||
inherit (builtins) concatLists attrValues mapAttrs elemAt match readDir filter listToAttrs;
|
inherit (builtins) mapAttrs readDir filter listToAttrs;
|
||||||
inherit (lib) nixosSystem genAttrs isNixFile;
|
inherit (lib) nixosSystem genAttrs isNixFile mkDefaultOizysModule mkOizysModule;
|
||||||
inherit (lib.filesystem) listFilesRecursive;
|
inherit (lib.filesystem) listFilesRecursive;
|
||||||
|
|
||||||
|
inherit (import ./find-modules.nix {inherit lib;}) findModulesList;
|
||||||
#supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
#supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
||||||
supportedSystems = ["x86_64-linux"];
|
supportedSystems = ["x86_64-linux"];
|
||||||
in rec {
|
in rec {
|
||||||
forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system});
|
forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system});
|
||||||
|
|
||||||
buildOizys = _:
|
nixosModules = listToAttrs (findModulesList ../modules);
|
||||||
forAllSystems (
|
|
||||||
pkgs: let
|
|
||||||
pkg = pkgs.callPackage ../oizys {};
|
|
||||||
in {
|
|
||||||
oizys = pkg;
|
|
||||||
default = pkg;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
mkSystem = hostname:
|
mkSystem = hostname:
|
||||||
nixosSystem {
|
nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules =
|
modules =
|
||||||
[
|
[
|
||||||
../modules/common.nix
|
../modules/oizys.nix
|
||||||
../overlays
|
../overlays
|
||||||
]
|
]
|
||||||
++ filter
|
++ filter
|
||||||
isNixFile
|
isNixFile
|
||||||
(listFilesRecursive (../. + "/hosts/${hostname}"));
|
(listFilesRecursive (../. + "/hosts/${hostname}"));
|
||||||
|
|
||||||
specialArgs = {inherit inputs lib self;};
|
specialArgs = {inherit inputs lib self mkDefaultOizysModule mkOizysModule;};
|
||||||
};
|
};
|
||||||
mapHosts = dir: mapAttrs (name: _: mkSystem name) (readDir dir);
|
|
||||||
|
|
||||||
findModules = _: listToAttrs (findModulesList ../modules);
|
oizysHosts = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
|
||||||
# https://github.com/balsoft/nixos-config/blob/73cc2c3a8bb62a9c3980a16ae70b2e97af6e1abd/flake.nix#L109-L120
|
oizysPkg = forAllSystems (
|
||||||
findModulesList = dir:
|
pkgs: rec {
|
||||||
concatLists (attrValues (mapAttrs
|
oizys = pkgs.callPackage ../oizys {};
|
||||||
(name: type:
|
default = oizys;
|
||||||
if type == "regular"
|
}
|
||||||
then [
|
);
|
||||||
{
|
devShells = forAllSystems (
|
||||||
name = elemAt (match "(.*)\\.nix" name) 0;
|
pkgs: {
|
||||||
value = dir + "/${name}";
|
default = pkgs.mkShell {
|
||||||
}
|
packages = with pkgs; [git deadnix];
|
||||||
]
|
};
|
||||||
else if
|
}
|
||||||
(readDir (dir + "/${name}"))
|
);
|
||||||
? "default.nix"
|
|
||||||
then [
|
|
||||||
{
|
|
||||||
inherit name;
|
|
||||||
value = dir + "/${name}";
|
|
||||||
}
|
|
||||||
]
|
|
||||||
else findModulesList (dir + "/${name}")) (readDir dir)));
|
|
||||||
|
|
||||||
oizysFlake = _: {
|
oizysFlake = {
|
||||||
nixosModules = findModules {};
|
nixosModules = nixosModules;
|
||||||
nixosConfigurations = mapHosts ../hosts;
|
nixosConfigurations = oizysHosts;
|
||||||
packages = buildOizys {};
|
packages = oizysPkg;
|
||||||
|
devShells = devShells;
|
||||||
formatter = forAllSystems (pkgs: pkgs.alejandra);
|
formatter = forAllSystems (pkgs: pkgs.alejandra);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,25 @@
|
||||||
final: prev: let
|
final: prev: let
|
||||||
inherit (final) hasSuffix;
|
inherit (final) hasSuffix mkEnableOption mkIf mkOption types;
|
||||||
runes = import ../modules/runes;
|
runes = import ../modules/runes;
|
||||||
in {
|
in rec {
|
||||||
|
enabled = {enable = true;};
|
||||||
|
disabled = {enable = false;};
|
||||||
|
|
||||||
|
# ["a" "b"] -> {a.enable = true; b.enable = true;}
|
||||||
|
enableAttrs = attrs:
|
||||||
|
builtins.listToAttrs (map (attr: {
|
||||||
|
name = attr;
|
||||||
|
value = enabled;
|
||||||
|
})
|
||||||
|
attrs);
|
||||||
|
# ["a" "b"] -> {a.enable = false; b.enable = false;}
|
||||||
|
disableAttrs = attrs:
|
||||||
|
builtins.listToAttrs (map (attr: {
|
||||||
|
name = attr;
|
||||||
|
value = disabled;
|
||||||
|
})
|
||||||
|
attrs);
|
||||||
|
|
||||||
isNixFile = path: hasSuffix ".nix" path;
|
isNixFile = path: hasSuffix ".nix" path;
|
||||||
mkIfIn = name: list: prev.mkIf (builtins.elem name list);
|
mkIfIn = name: list: prev.mkIf (builtins.elem name list);
|
||||||
mkRune = {
|
mkRune = {
|
||||||
|
@ -10,4 +28,17 @@ in {
|
||||||
runeKind ? "braille",
|
runeKind ? "braille",
|
||||||
}:
|
}:
|
||||||
"[1;3${number}m\n" + runes.${rune}.${runeKind} + "\n[0m";
|
"[1;3${number}m\n" + runes.${rune}.${runeKind} + "\n[0m";
|
||||||
|
|
||||||
|
mkOizysModule = config: attr: content: {
|
||||||
|
options.oizys.${attr}.enable = mkEnableOption "enable ${attr} support";
|
||||||
|
config = mkIf config.oizys.${attr}.enable content;
|
||||||
|
};
|
||||||
|
mkDefaultOizysModule = config: attr: content: {
|
||||||
|
options.oizys.${attr}.enable = mkOption {
|
||||||
|
default = true;
|
||||||
|
description = "enable ${attr} support";
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
|
config = mkIf config.oizys.${attr}.enable content;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
25
lib/find-modules.nix
Normal file
25
lib/find-modules.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{...}: let
|
||||||
|
inherit (builtins) concatLists attrValues mapAttrs elemAt match readDir;
|
||||||
|
in rec {
|
||||||
|
# https://github.com/balsoft/nixos-config/blob/73cc2c3a8bb62a9c3980a16ae70b2e97af6e1abd/flake.nix#L109-L120
|
||||||
|
findModulesList = dir:
|
||||||
|
concatLists (attrValues (mapAttrs
|
||||||
|
(name: type:
|
||||||
|
if type == "regular"
|
||||||
|
then [
|
||||||
|
{
|
||||||
|
name = elemAt (match "(.*)\\.nix" name) 0;
|
||||||
|
value = dir + "/${name}";
|
||||||
|
}
|
||||||
|
]
|
||||||
|
else if
|
||||||
|
(readDir (dir + "/${name}"))
|
||||||
|
? "default.nix"
|
||||||
|
then [
|
||||||
|
{
|
||||||
|
inherit name;
|
||||||
|
value = dir + "/${name}";
|
||||||
|
}
|
||||||
|
]
|
||||||
|
else findModulesList (dir + "/${name}")) (readDir dir)));
|
||||||
|
}
|
|
@ -5,9 +5,8 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
cfg = config.oizys.desktop;
|
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf config.oizys.desktop.enable {
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
(nerdfonts.override {fonts = ["FiraCode"];})
|
(nerdfonts.override {fonts = ["FiraCode"];})
|
||||||
|
|
|
@ -5,9 +5,8 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
cfg = config.oizys.desktop;
|
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf config.oizys.desktop.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wezterm
|
wezterm
|
||||||
alacritty
|
alacritty
|
||||||
|
|
|
@ -2,12 +2,9 @@
|
||||||
inputs,
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
lib,
|
mkOizysModule,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIf;
|
|
||||||
cfg = config.programs.hyprland;
|
|
||||||
|
|
||||||
lock = pkgs.writeShellApplication {
|
lock = pkgs.writeShellApplication {
|
||||||
name = "lock";
|
name = "lock";
|
||||||
runtimeInputs = with pkgs; [swaylock];
|
runtimeInputs = with pkgs; [swaylock];
|
||||||
|
@ -15,10 +12,10 @@
|
||||||
swaylock -c 1e1e2e
|
swaylock -c 1e1e2e
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
config = mkIf cfg.enable {
|
mkOizysModule config "hyprland" {
|
||||||
|
programs.hyprland.enable = true;
|
||||||
security.pam.services.swaylock = {};
|
security.pam.services.swaylock = {};
|
||||||
# programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.default;
|
|
||||||
# Optional, hint electron apps to use wayland:
|
# Optional, hint electron apps to use wayland:
|
||||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||||
|
|
||||||
|
@ -52,5 +49,4 @@ in {
|
||||||
inputs.nixpkgs-wayland.overlay
|
inputs.nixpkgs-wayland.overlay
|
||||||
inputs.hyprland.overlays.default
|
inputs.hyprland.overlays.default
|
||||||
];
|
];
|
||||||
};
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,37 +1,29 @@
|
||||||
{
|
{
|
||||||
config,
|
inputs,
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
|
config,
|
||||||
|
mkDefaultOizysModule,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
inherit (lib) mkOption mkIf types;
|
mkDefaultOizysModule config "cli" {
|
||||||
cfg = config.oizys.cli;
|
programs.direnv.enable = true;
|
||||||
in {
|
environment.sessionVariables = {
|
||||||
options.oizys.cli.enable = mkOption {
|
DIRENV_LOG_FORMAT = "[2mdirenv: %s[0m";
|
||||||
default = true;
|
|
||||||
description = "Whether to enable cli.";
|
|
||||||
type = types.bool;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
environment.systemPackages = with pkgs; [
|
||||||
programs.direnv.enable = true;
|
chezmoi
|
||||||
environment.sessionVariables = {
|
zoxide
|
||||||
DIRENV_LOG_FORMAT = "[2mdirenv: %s[0m";
|
lsd
|
||||||
};
|
fzf
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
# utils
|
||||||
chezmoi
|
fd
|
||||||
zoxide
|
bat
|
||||||
lsd
|
delta
|
||||||
fzf
|
ripgrep
|
||||||
|
|
||||||
# utils
|
btop
|
||||||
fd
|
inputs.tsm.packages.${pkgs.system}.tsm
|
||||||
bat
|
];
|
||||||
delta
|
|
||||||
ripgrep
|
|
||||||
|
|
||||||
btop
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,9 +5,8 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
cfg = config.oizys.desktop;
|
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf config.oizys.desktop.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# vscode
|
# vscode
|
||||||
vscode-fhs
|
vscode-fhs
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
{
|
{lib, ...}: let
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib) mkOption types literalExpression mdDoc;
|
inherit (lib) mkOption types literalExpression mdDoc;
|
||||||
in {
|
in {
|
||||||
imports = [./nim.nix ./tex.nix ./misc.nix ./node.nix ./python.nix];
|
imports = [./nim.nix ./tex.nix ./misc.nix ./node.nix ./python.nix];
|
||||||
|
|
|
@ -1,17 +1,9 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
|
mkOizysModule,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
inherit (lib) mkEnableOption mkIf;
|
mkOizysModule config "vpn" {
|
||||||
cfg = config.oizys.vpn;
|
environment.systemPackages = [pkgs.openconnect];
|
||||||
in {
|
|
||||||
options.oizys.vpn.enable = mkEnableOption ''
|
|
||||||
Whether to enable openconnect for vpn connection.
|
|
||||||
'';
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
environment.systemPackages = [pkgs.openconnect];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,59 +1,70 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
programs.nix-ld.enable = true;
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkEnableOption mkIf;
|
||||||
|
cfg = config.oizys.nix-ld;
|
||||||
|
in {
|
||||||
|
options.oizys.nix-ld.enable = mkEnableOption "enable nix-ld support";
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
|
|
||||||
# Packages that need at least something in this list:
|
# Packages that need at least something in this list:
|
||||||
# Geneious Prime
|
# Geneious Prime
|
||||||
# https://github.com/Mic92/dotfiles/blob/cb180bdd3805b373e556a93ccb275b7f0f902a3b/nixos/modules/nix-ld.nix#L9C3-L60C5
|
# https://github.com/Mic92/dotfiles/blob/cb180bdd3805b373e556a93ccb275b7f0f902a3b/nixos/modules/nix-ld.nix#L9C3-L60C5
|
||||||
programs.nix-ld.libraries = with pkgs; [
|
programs.nix-ld.libraries = with pkgs; [
|
||||||
alsa-lib
|
alsa-lib
|
||||||
at-spi2-atk
|
at-spi2-atk
|
||||||
at-spi2-core
|
at-spi2-core
|
||||||
atk
|
atk
|
||||||
cairo
|
cairo
|
||||||
cups
|
cups
|
||||||
curl
|
curl
|
||||||
dbus
|
dbus
|
||||||
expat
|
expat
|
||||||
fontconfig
|
fontconfig
|
||||||
freetype
|
freetype
|
||||||
fuse3
|
fuse3
|
||||||
gdk-pixbuf
|
gdk-pixbuf
|
||||||
glib
|
glib
|
||||||
gtk3
|
gtk3
|
||||||
icu
|
icu
|
||||||
libGL
|
libGL
|
||||||
libappindicator-gtk3
|
libappindicator-gtk3
|
||||||
libdrm
|
libdrm
|
||||||
libglvnd
|
libglvnd
|
||||||
libnotify
|
libnotify
|
||||||
libpulseaudio
|
libpulseaudio
|
||||||
libunwind
|
libunwind
|
||||||
libusb1
|
libusb1
|
||||||
libuuid
|
libuuid
|
||||||
libxkbcommon
|
libxkbcommon
|
||||||
mesa
|
mesa
|
||||||
nspr
|
nspr
|
||||||
nss
|
nss
|
||||||
openssl
|
openssl
|
||||||
pango
|
pango
|
||||||
pipewire
|
pipewire
|
||||||
stdenv.cc.cc
|
stdenv.cc.cc
|
||||||
systemd
|
systemd
|
||||||
vulkan-loader
|
vulkan-loader
|
||||||
xorg.libX11
|
xorg.libX11
|
||||||
xorg.libXScrnSaver
|
xorg.libXScrnSaver
|
||||||
xorg.libXcomposite
|
xorg.libXcomposite
|
||||||
xorg.libXcursor
|
xorg.libXcursor
|
||||||
xorg.libXdamage
|
xorg.libXdamage
|
||||||
xorg.libXext
|
xorg.libXext
|
||||||
xorg.libXfixes
|
xorg.libXfixes
|
||||||
xorg.libXi
|
xorg.libXi
|
||||||
xorg.libXrandr
|
xorg.libXrandr
|
||||||
xorg.libXrender
|
xorg.libXrender
|
||||||
xorg.libXtst
|
xorg.libXtst
|
||||||
xorg.libxcb
|
xorg.libxcb
|
||||||
xorg.libxkbfile
|
xorg.libxkbfile
|
||||||
xorg.libxshmfence
|
xorg.libxshmfence
|
||||||
zlib
|
zlib
|
||||||
];
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
lib,
|
lib,
|
||||||
self,
|
self,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
inherit (lib) mkEnableOption;
|
||||||
|
in {
|
||||||
imports = with self.nixosModules; [
|
imports = with self.nixosModules; [
|
||||||
users
|
users
|
||||||
nix
|
nix
|
||||||
|
@ -12,23 +14,25 @@
|
||||||
vpn
|
vpn
|
||||||
gpg
|
gpg
|
||||||
|
|
||||||
# gui
|
|
||||||
fonts
|
|
||||||
|
|
||||||
lock
|
lock
|
||||||
qtile
|
qtile
|
||||||
hyprland
|
hyprland
|
||||||
|
|
||||||
virtualbox
|
virtualbox
|
||||||
|
docker
|
||||||
|
|
||||||
gui
|
gui
|
||||||
|
fonts
|
||||||
|
|
||||||
languages
|
languages
|
||||||
|
|
||||||
# programs
|
# programs
|
||||||
vivaldi
|
chrome
|
||||||
vscode
|
vscode
|
||||||
|
|
||||||
|
nix-ld
|
||||||
|
restic
|
||||||
];
|
];
|
||||||
|
|
||||||
options.oizys.desktop.enable = lib.mkEnableOption "is desktop";
|
options.oizys.desktop.enable = mkEnableOption "is desktop";
|
||||||
}
|
}
|
28
modules/programs/chrome/default.nix
Normal file
28
modules/programs/chrome/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
mkOizysModule,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
mkOizysModule config "chrome" {
|
||||||
|
programs.chromium = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
extensions = [
|
||||||
|
"nngceckbapebfimnlniiiahkandclblb" # bitwarden
|
||||||
|
"gfbliohnnapiefjpjlpjnehglfpaknnc" # surfingkeys
|
||||||
|
"pbmlfaiicoikhdbjagjbglnbfcbcojpj" # simplify gmail
|
||||||
|
"oemmndcbldboiebfnladdacbdfmadadm" # pdf viewer
|
||||||
|
"clngdbkpkpeebahjckkjfobafhncgmne" # stylus
|
||||||
|
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
(google-chrome.override {
|
||||||
|
commandLineArgs = [
|
||||||
|
"--force-dark-mode"
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,33 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib) mkIf mkEnableOption;
|
|
||||||
cfg = config.vivaldi;
|
|
||||||
in {
|
|
||||||
options.vivaldi.enable = mkEnableOption "enable vivaldi + extensions";
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
programs.chromium = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
extensions = [
|
|
||||||
"nngceckbapebfimnlniiiahkandclblb" # bitwarden
|
|
||||||
"gfbliohnnapiefjpjlpjnehglfpaknnc" # surfingkeys
|
|
||||||
"pbmlfaiicoikhdbjagjbglnbfcbcojpj" # simplify gmail
|
|
||||||
"oemmndcbldboiebfnladdacbdfmadadm" # pdf viewer
|
|
||||||
"clngdbkpkpeebahjckkjfobafhncgmne" # stylus
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
(vivaldi.override {
|
|
||||||
commandLineArgs = [
|
|
||||||
"--force-dark-mode"
|
|
||||||
];
|
|
||||||
proprietaryCodecs = true;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,5 +1,16 @@
|
||||||
{...}: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
mkOizysModule,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
mkOizysModule config "backups" {
|
||||||
|
environment.systemPackages = with pkgs; [rclone];
|
||||||
|
|
||||||
services.restic.backups.gdrive = {
|
services.restic.backups.gdrive = {
|
||||||
|
# BUG: if .conda/environments.txt doesn't exist then this won't work
|
||||||
|
# workaround for now `mkdir ~/.conda && touch ~/.conda/environments.txt`
|
||||||
|
|
||||||
extraBackupArgs = [
|
extraBackupArgs = [
|
||||||
"--exclude-file /home/daylin/.config/restic/excludes.txt"
|
"--exclude-file /home/daylin/.config/restic/excludes.txt"
|
||||||
"--exclude-file /home/daylin/.conda/environments.txt"
|
"--exclude-file /home/daylin/.conda/environments.txt"
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
mkOizysModule,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
mkOizysModule config "docker" {
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
lazydocker
|
lazydocker
|
||||||
|
|
|
@ -1,16 +1,11 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
mkOizysModule,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
inherit (lib) mkEnableOption mkIf;
|
mkOizysModule config "vbox" {
|
||||||
cfg = config.oizys.vbox;
|
virtualisation.virtualbox = {
|
||||||
in {
|
host.enable = true;
|
||||||
options.oizys.vbox.enable = mkEnableOption "enable virtualbox host";
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
virtualisation.virtualbox = {
|
|
||||||
host.enable = true;
|
|
||||||
};
|
|
||||||
users.extraGroups.vboxusers.members = ["daylin"];
|
|
||||||
};
|
};
|
||||||
|
users.extraGroups.vboxusers.members = ["daylin"];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue