mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 10:10:45 -06:00
deadnix/formatting
This commit is contained in:
parent
4287d698b9
commit
9f8a1692b5
9 changed files with 57 additions and 54 deletions
|
@ -3,20 +3,20 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let inherit (lib) enabled;
|
inherit (lib) enabled;
|
||||||
in {
|
in {
|
||||||
imports = with self.nixosModules; [
|
imports = with self.nixosModules; [
|
||||||
restic
|
restic
|
||||||
];
|
];
|
||||||
|
|
||||||
oizys = {languages = [
|
oizys = {
|
||||||
"nim"
|
languages = [
|
||||||
"python"
|
"nim"
|
||||||
];
|
"python"
|
||||||
docker = enabled;
|
];
|
||||||
|
docker = enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
rclone
|
rclone
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
# 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,
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{self, lib, ...}: let inherit (lib) enabled; in {
|
{
|
||||||
|
self,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) enabled;
|
||||||
|
in {
|
||||||
imports = with self.nixosModules; [
|
imports = with self.nixosModules; [
|
||||||
nix-ld
|
nix-ld
|
||||||
];
|
];
|
||||||
|
@ -6,7 +12,7 @@
|
||||||
oizys = {
|
oizys = {
|
||||||
desktop = enabled;
|
desktop = enabled;
|
||||||
nix-ld = enabled;
|
nix-ld = enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
|
|
|
@ -4,36 +4,30 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) enabled enableAttrs;
|
inherit (lib) enableAttrs;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
imports = with self.nixosModules; [
|
imports = with self.nixosModules; [
|
||||||
restic
|
restic
|
||||||
];
|
];
|
||||||
|
|
||||||
oizys = {
|
oizys =
|
||||||
languages = [
|
{
|
||||||
"misc"
|
languages = [
|
||||||
"python"
|
"misc"
|
||||||
"nim"
|
"python"
|
||||||
"tex"
|
"nim"
|
||||||
"node"
|
"tex"
|
||||||
|
"node"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
// enableAttrs [
|
||||||
|
"chrome"
|
||||||
|
"desktop"
|
||||||
|
"docker"
|
||||||
|
"nix-ld"
|
||||||
|
"vbox"
|
||||||
|
"vpn"
|
||||||
];
|
];
|
||||||
} // enableAttrs [
|
|
||||||
"chrome"
|
|
||||||
"desktop"
|
|
||||||
"docker"
|
|
||||||
"nix-ld"
|
|
||||||
"vbox"
|
|
||||||
"vpn"
|
|
||||||
];
|
|
||||||
# nix-ld = enabled;
|
|
||||||
# docker = enabled;
|
|
||||||
# vbox = enabled;
|
|
||||||
# desktop = enabled;
|
|
||||||
# vpn = enabled;
|
|
||||||
# chrome = enabled;
|
|
||||||
# };
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
zk
|
zk
|
||||||
|
|
|
@ -4,11 +4,21 @@ final: prev: let
|
||||||
in rec {
|
in rec {
|
||||||
enabled = {enable = true;};
|
enabled = {enable = true;};
|
||||||
disabled = {enable = false;};
|
disabled = {enable = false;};
|
||||||
|
|
||||||
# ["a" "b"] -> {a.enable = true; b.enable = true;}
|
# ["a" "b"] -> {a.enable = true; b.enable = true;}
|
||||||
enableAttrs = attrs: builtins.listToAttrs (map (attr: {name = attr; value = enabled; }) attrs);
|
enableAttrs = attrs:
|
||||||
|
builtins.listToAttrs (map (attr: {
|
||||||
|
name = attr;
|
||||||
|
value = enabled;
|
||||||
|
})
|
||||||
|
attrs);
|
||||||
# ["a" "b"] -> {a.enable = false; b.enable = false;}
|
# ["a" "b"] -> {a.enable = false; b.enable = false;}
|
||||||
disableAttrs = attrs: builtins.listToAttrs (map (attr: {name = attr; value = disabled; }) attrs);
|
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);
|
||||||
|
|
|
@ -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];
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
services.restic.backups.gdrive = {
|
services.restic.backups.gdrive = {
|
||||||
# BUG: if .conda/environments.txt doesn't exist then this won't work
|
# BUG: if .conda/environments.txt doesn't exist then this won't work
|
||||||
# workaround for now `mkdir ~/.conda && touch ~/.conda/environments.txt`
|
# 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,5 @@
|
||||||
{pkgs,
|
{
|
||||||
|
pkgs,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
|
@ -9,10 +10,9 @@ in {
|
||||||
options.oizys.docker.enable = mkEnableOption "enable docker support";
|
options.oizys.docker.enable = mkEnableOption "enable docker support";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
virtualisation.docker.enable = true;
|
environment.systemPackages = with pkgs; [
|
||||||
environment.systemPackages = with pkgs; [
|
lazydocker
|
||||||
lazydocker
|
];
|
||||||
];
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@ in {
|
||||||
options.oizys.vbox.enable = mkEnableOption "enable virtualbox host";
|
options.oizys.vbox.enable = mkEnableOption "enable virtualbox host";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
virtualisation.virtualbox = {
|
virtualisation.virtualbox = {
|
||||||
host.enable = true;
|
host.enable = true;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue