mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-30 12:10:43 -06:00
Compare commits
1 commit
d4b77becb8
...
062e01f4a2
Author | SHA1 | Date | |
---|---|---|---|
|
062e01f4a2 |
29 changed files with 240 additions and 263 deletions
112
flake.lock
112
flake.lock
|
@ -18,6 +18,7 @@
|
|||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"inputs",
|
||||
"nix-eval-jobs",
|
||||
"nixpkgs"
|
||||
]
|
||||
|
@ -41,11 +42,11 @@
|
|||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709126324,
|
||||
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
|
||||
"lastModified": 1705309234,
|
||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
|
||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -59,6 +60,7 @@
|
|||
"hyprland-protocols": "hyprland-protocols",
|
||||
"hyprlang": "hyprlang",
|
||||
"nixpkgs": [
|
||||
"inputs",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems",
|
||||
|
@ -66,11 +68,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709425896,
|
||||
"narHash": "sha256-r/Tsr+BfgaiJIWTwWrrxHzTmNGEIi8HzYDGO3kFJmx8=",
|
||||
"lastModified": 1708817736,
|
||||
"narHash": "sha256-GZEoru+4uNIGEZ8j1TPaxZwM+ApIngHU/iX3sIGgUO4=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "2a08f2ba84ead47bd13aae5797d0d71b2e11b612",
|
||||
"rev": "f534ac3fc462d8af923d2a1ab8ef58f62639a1ea",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -83,15 +85,16 @@
|
|||
"hyprland-contrib": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"inputs",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709391291,
|
||||
"narHash": "sha256-NJwAgXRKLVuO3YLkGxXIanLvTKN+cJsYwbLoWOa7ODk=",
|
||||
"lastModified": 1706198673,
|
||||
"narHash": "sha256-bHlxFd+3QHy6eXtTzzhwVNcyxBSOxTvBuJGNUzI4C4M=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "contrib",
|
||||
"rev": "2d4ece4a008feefddc194bde785b1d39f987b5a7",
|
||||
"rev": "16884001b26e6955ff4b88b4dfe4c8986e20f153",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -103,10 +106,12 @@
|
|||
"hyprland-protocols": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"inputs",
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"inputs",
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
|
@ -128,20 +133,22 @@
|
|||
"hyprlang": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"inputs",
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"inputs",
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1708787654,
|
||||
"narHash": "sha256-7ACgM3ZuAhPqurXHUvR2nWMRcnmzGGPjLK6q4DSTelI=",
|
||||
"lastModified": 1708681732,
|
||||
"narHash": "sha256-ULZZLZ9C33G13IaXLuAc4oTzHUvnATI8Fj2u6gzMfT0=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlang",
|
||||
"rev": "0fce791ba2334aca183f2ed42399518947550d0d",
|
||||
"rev": "f4466367ef0a92a6425d482050dc2b8840c0e644",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -150,17 +157,43 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"inputs": {
|
||||
"inputs": {
|
||||
"hyprland": "hyprland",
|
||||
"hyprland-contrib": "hyprland-contrib",
|
||||
"nix-eval-jobs": "nix-eval-jobs",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-wayland": "nixpkgs-wayland",
|
||||
"pinix": "pinix"
|
||||
},
|
||||
"locked": {
|
||||
"dir": "inputs",
|
||||
"lastModified": 1708725426,
|
||||
"narHash": "sha256-5WfwF55pJ7n2LDhTCcOdvd+vvA22tTsj/X7Jh4pErG4=",
|
||||
"owner": "daylinmorgan",
|
||||
"repo": "oizys",
|
||||
"rev": "d4d1113722eac0f7f9edd7788a81fbdaacf13d0b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "inputs",
|
||||
"owner": "daylinmorgan",
|
||||
"repo": "oizys",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lib-aggregate": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709208631,
|
||||
"narHash": "sha256-n+SCii/GQR3zjaZzjhGAjrQQlF+xjaGEjWdpDb4wJ3U=",
|
||||
"lastModified": 1708258113,
|
||||
"narHash": "sha256-SYqkbLHSe4UxgcNwUHrMPnRmX/oJFzRILrpyn5dsJVE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "lib-aggregate",
|
||||
"rev": "1f03ac8dc3a54f68f55d36b5e7fc65afc302a3d7",
|
||||
"rev": "42e4c0c8b04cecec07e796ce8efcb5378e93a319",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -174,6 +207,7 @@
|
|||
"flake-parts": "flake-parts",
|
||||
"nix-github-actions": "nix-github-actions",
|
||||
"nixpkgs": [
|
||||
"inputs",
|
||||
"nixpkgs"
|
||||
],
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
|
@ -195,6 +229,7 @@
|
|||
"nix-github-actions": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"inputs",
|
||||
"nix-eval-jobs",
|
||||
"nixpkgs"
|
||||
]
|
||||
|
@ -216,15 +251,16 @@
|
|||
"nix-index-database": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"inputs",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1708830466,
|
||||
"narHash": "sha256-nGKe3Y1/jkLR2eh1aRSVBtKadMBNv8kOnB52UXqRy6A=",
|
||||
"lastModified": 1708225687,
|
||||
"narHash": "sha256-NJBDfvknI26beOFmjO2coeJMTTUCCtw2Iu+rvJ1Zb9k=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "f070c7eeec3bde8c8c8baa9c02b6d3d5e114d73b",
|
||||
"rev": "17352eb241a8d158c4ac523b19d8d2a6c8efe127",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -235,11 +271,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1709356872,
|
||||
"narHash": "sha256-mvxCirJbtkP0cZ6ABdwcgTk0u3bgLoIoEFIoYBvD6+4=",
|
||||
"lastModified": 1708751719,
|
||||
"narHash": "sha256-0uWOKSpXJXmXswOvDM5Vk3blB74apFB6rNGWV5IjoN0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "458b097d81f90275b3fdf03796f0563844926708",
|
||||
"rev": "f63ce824cd2f036216eb5f637dfef31e1a03ee89",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -251,11 +287,11 @@
|
|||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1708821942,
|
||||
"narHash": "sha256-jd+E1SD59qty65pwqad2mftzkT6vW5nNFWVuvayh4Zw=",
|
||||
"lastModified": 1708217146,
|
||||
"narHash": "sha256-nGfEv7k78slqIR5E0zzWSx214d/4/ZPKDkObLJqVLVw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "479831ed8b3c9c7b80533999f880c7d0bf6a491b",
|
||||
"rev": "e623008d8a46517470e6365505f1a3ce171fa46a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -269,18 +305,20 @@
|
|||
"flake-compat": "flake-compat",
|
||||
"lib-aggregate": "lib-aggregate",
|
||||
"nix-eval-jobs": [
|
||||
"inputs",
|
||||
"nix-eval-jobs"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"inputs",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709421307,
|
||||
"narHash": "sha256-8jG7XToXTQHYWBaaNRoALxcEPoE+yE5dKHvb2gErjOg=",
|
||||
"lastModified": 1708817881,
|
||||
"narHash": "sha256-5vX0uFCy1y24ylsfUpingkZznm7sQORZLRQiJV5hHEU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs-wayland",
|
||||
"rev": "ea91a1d89e6f237d2369ad0de846785965cbef0b",
|
||||
"rev": "453faa8da5db8d689cf89770347405de1f4f8f68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -292,15 +330,16 @@
|
|||
"pinix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"inputs",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709390347,
|
||||
"narHash": "sha256-C7RDQ1xPktZGf8eSDUeZ2ZKetHtM2VJA0C10z0d8tkw=",
|
||||
"lastModified": 1708267018,
|
||||
"narHash": "sha256-/LA/IKbO7qgd5s/dWckcY2RQwyVZxvLH5gHzDzHXdO8=",
|
||||
"owner": "remi-dupre",
|
||||
"repo": "pinix",
|
||||
"rev": "6f7dc0fccb0e48176629d061b07576d092a5d09c",
|
||||
"rev": "83d58d64ebbb68532a0c23646ecd987d95dc0581",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -311,13 +350,7 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"hyprland": "hyprland",
|
||||
"hyprland-contrib": "hyprland-contrib",
|
||||
"nix-eval-jobs": "nix-eval-jobs",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-wayland": "nixpkgs-wayland",
|
||||
"pinix": "pinix"
|
||||
"inputs": "inputs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
@ -353,6 +386,7 @@
|
|||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"inputs",
|
||||
"nix-eval-jobs",
|
||||
"nixpkgs"
|
||||
]
|
||||
|
@ -393,18 +427,22 @@
|
|||
"xdph": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": [
|
||||
"inputs",
|
||||
"hyprland",
|
||||
"hyprland-protocols"
|
||||
],
|
||||
"hyprlang": [
|
||||
"inputs",
|
||||
"hyprland",
|
||||
"hyprlang"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"inputs",
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"inputs",
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
|
|
48
flake.nix
48
flake.nix
|
@ -1,49 +1,13 @@
|
|||
{
|
||||
description = "nix begat oizys";
|
||||
outputs = inputs @ {self, ...}:
|
||||
inputs.inputs.url = "github:daylinmorgan/oizys?dir=inputs";
|
||||
outputs = {
|
||||
inputs,
|
||||
self,
|
||||
}:
|
||||
(import ./lib {
|
||||
inherit inputs;
|
||||
inherit (inputs) inputs;
|
||||
inherit self;
|
||||
})
|
||||
.oizysFlake {};
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
hyprland.url = "github:hyprwm/Hyprland/main";
|
||||
hyprland.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
hyprland-contrib.url = "github:hyprwm/contrib";
|
||||
hyprland-contrib.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nixpkgs-wayland = {
|
||||
url = "github:nix-community/nixpkgs-wayland";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nix-eval-jobs.follows = "nix-eval-jobs";
|
||||
};
|
||||
|
||||
nix-eval-jobs.url = "github:nix-community/nix-eval-jobs";
|
||||
nix-eval-jobs.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
pinix.url = "github:remi-dupre/pinix";
|
||||
pinix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nix-index-database.url = "github:nix-community/nix-index-database";
|
||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
extra-substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nixpkgs-wayland.cachix.org"
|
||||
"https://daylin.cachix.org"
|
||||
"https://cache.garnix.io"
|
||||
];
|
||||
extra-trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
||||
"daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k="
|
||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,10 +8,11 @@
|
|||
restic
|
||||
];
|
||||
|
||||
oizys.languages = [
|
||||
"nim"
|
||||
"python"
|
||||
];
|
||||
languages = {
|
||||
nim = true;
|
||||
python = true;
|
||||
};
|
||||
cli.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
rclone
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{lib, ...}: {
|
||||
users.motd = lib.mkRune {
|
||||
{mkRune, ...}: {
|
||||
users.motd = mkRune {
|
||||
number = "6";
|
||||
rune = "algiz";
|
||||
};
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
nix-ld
|
||||
];
|
||||
|
||||
oizys.desktop.enable = true;
|
||||
|
||||
desktop.enable = true;
|
||||
cli.enable = true;
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
mkRune,
|
||||
...
|
||||
}: {
|
||||
users.motd = lib.mkRune {
|
||||
users.motd = mkRune {
|
||||
number = "2";
|
||||
rune = "mannaz";
|
||||
};
|
||||
|
|
|
@ -10,18 +10,16 @@
|
|||
docker
|
||||
];
|
||||
|
||||
oizys = {
|
||||
desktop.enable = true;
|
||||
vpn.enable = true;
|
||||
languages = [
|
||||
"misc"
|
||||
"python"
|
||||
"nim"
|
||||
"tex"
|
||||
"node"
|
||||
];
|
||||
cli.enable = true;
|
||||
desktop.enable = true;
|
||||
|
||||
languages = {
|
||||
misc = true;
|
||||
python = true;
|
||||
nim = true;
|
||||
tex = true;
|
||||
node = true;
|
||||
};
|
||||
vivaldi.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
zk
|
||||
|
@ -31,6 +29,8 @@
|
|||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
services.vpn.enable = true;
|
||||
|
||||
services.restic.backups.gdrive = {
|
||||
user = "daylin";
|
||||
repository = "rclone:g:archives/othalan";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
mkRune,
|
||||
...
|
||||
}: {
|
||||
networking.networkmanager.enable = true;
|
||||
|
@ -27,7 +27,7 @@
|
|||
pamixer
|
||||
];
|
||||
|
||||
services.getty.greetingLine = lib.mkRune {
|
||||
services.getty.greetingLine = mkRune {
|
||||
rune = "othalan";
|
||||
runeKind = "ascii";
|
||||
};
|
||||
|
|
42
inputs/flake.nix
Normal file
42
inputs/flake.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
description = "oizys inputs";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
hyprland.url = "github:hyprwm/Hyprland/main";
|
||||
hyprland.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
hyprland-contrib.url = "github:hyprwm/contrib";
|
||||
hyprland-contrib.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nixpkgs-wayland = {
|
||||
url = "github:nix-community/nixpkgs-wayland";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nix-eval-jobs.follows = "nix-eval-jobs";
|
||||
};
|
||||
|
||||
nix-eval-jobs.url = "github:nix-community/nix-eval-jobs";
|
||||
nix-eval-jobs.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
pinix.url = "github:remi-dupre/pinix";
|
||||
pinix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nix-index-database.url = "github:nix-community/nix-index-database";
|
||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
extra-substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nixpkgs-wayland.cachix.org"
|
||||
"https://daylin.cachix.org"
|
||||
];
|
||||
extra-trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
||||
"daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k="
|
||||
];
|
||||
};
|
||||
outputs = _: {};
|
||||
}
|
|
@ -3,17 +3,23 @@
|
|||
self,
|
||||
}: let
|
||||
inherit (inputs) nixpkgs;
|
||||
lib = nixpkgs.lib.extend (import ./extended.nix);
|
||||
|
||||
inherit (builtins) concatLists attrValues mapAttrs elemAt match readDir filter listToAttrs;
|
||||
inherit (lib) hasSuffix nixosSystem genAttrs isNixFile;
|
||||
inherit (lib.filesystem) listFilesRecursive;
|
||||
inherit (nixpkgs.lib) hasSuffix nixosSystem genAttrs;
|
||||
inherit (nixpkgs.lib.filesystem) listFilesRecursive;
|
||||
|
||||
#supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
||||
supportedSystems = ["x86_64-linux"];
|
||||
supportedSystems = ["x86_64-linux" ];
|
||||
runes = import ../modules/runes;
|
||||
in rec {
|
||||
forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system});
|
||||
mkRune = {
|
||||
rune,
|
||||
number ? "6",
|
||||
runeKind ? "braille",
|
||||
}:
|
||||
"[1;3${number}m\n" + runes.${rune}.${runeKind} + "\n[0m";
|
||||
|
||||
isNixFile = path: hasSuffix ".nix" path;
|
||||
buildOizys = _:
|
||||
forAllSystems (
|
||||
pkgs: let
|
||||
|
@ -36,9 +42,10 @@ in rec {
|
|||
isNixFile
|
||||
(listFilesRecursive (../. + "/hosts/${hostname}"));
|
||||
|
||||
specialArgs = {inherit inputs lib self;};
|
||||
specialArgs = {inherit inputs mkRune self;};
|
||||
};
|
||||
mapHosts = dir: mapAttrs (name: _: mkSystem name) (readDir dir);
|
||||
buildHosts = _: mapHosts ../hosts;
|
||||
|
||||
findModules = _: listToAttrs (findModulesList ../modules);
|
||||
# https://github.com/balsoft/nixos-config/blob/73cc2c3a8bb62a9c3980a16ae70b2e97af6e1abd/flake.nix#L109-L120
|
||||
|
@ -65,7 +72,7 @@ in rec {
|
|||
|
||||
oizysFlake = _: {
|
||||
nixosModules = findModules {};
|
||||
nixosConfigurations = mapHosts ../hosts;
|
||||
nixosConfigurations = buildHosts {};
|
||||
packages = buildOizys {};
|
||||
formatter = forAllSystems (pkgs: pkgs.alejandra);
|
||||
};
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
final: prev: let
|
||||
inherit (final) hasSuffix;
|
||||
runes = import ../modules/runes;
|
||||
in {
|
||||
|
||||
isNixFile = path: hasSuffix ".nix" path;
|
||||
mkIfIn = name: list: prev.mkIf (builtins.elem name list);
|
||||
mkRune = {
|
||||
rune,
|
||||
number ? "6",
|
||||
runeKind ? "braille",
|
||||
}:
|
||||
"[1;3${number}m\n" + runes.${rune}.${runeKind} + "\n[0m";
|
||||
}
|
|
@ -20,13 +20,15 @@
|
|||
hyprland
|
||||
|
||||
gui
|
||||
|
||||
languages
|
||||
|
||||
# programs
|
||||
vivaldi
|
||||
vscode
|
||||
|
||||
# langs
|
||||
python
|
||||
misc
|
||||
node
|
||||
tex
|
||||
nim
|
||||
];
|
||||
|
||||
options.oizys.desktop.enable = lib.mkEnableOption "is desktop";
|
||||
options.desktop.enable = lib.mkEnableOption "is desktop";
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.oizys.desktop;
|
||||
cfg = config.desktop;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
fonts.fontconfig.enable = true;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.oizys.desktop;
|
||||
cfg = config.desktop;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
@ -19,6 +19,13 @@ in {
|
|||
|
||||
libreoffice-qt
|
||||
hunspell # spell check for libreoffice
|
||||
|
||||
(vivaldi.override {
|
||||
commandLineArgs = [
|
||||
"--force-dark-mode"
|
||||
];
|
||||
proprietaryCodecs = true;
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ in {
|
|||
lock
|
||||
brightnessctl
|
||||
udiskie
|
||||
eww
|
||||
eww-wayland
|
||||
|
||||
# notifications
|
||||
libnotify
|
||||
|
@ -44,7 +44,6 @@ in {
|
|||
|
||||
catppuccin-cursors.mochaDark
|
||||
hyprpaper
|
||||
swww
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
|
|
|
@ -4,15 +4,10 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOption mkIf types;
|
||||
cfg = config.oizys.cli;
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.cli;
|
||||
in {
|
||||
options.oizys.cli.enable = mkOption {
|
||||
default = true;
|
||||
description = "Whether to enable cli.";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
options.cli.enable = mkEnableOption "cli";
|
||||
config = mkIf cfg.enable {
|
||||
programs.direnv.enable = true;
|
||||
environment.sessionVariables = {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.oizys.desktop;
|
||||
cfg = config.desktop;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
17
modules/langs/misc.nix
Normal file
17
modules/langs/misc.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.languages;
|
||||
in {
|
||||
options.languages.misc = mkEnableOption "go + rustup";
|
||||
config = mkIf cfg.misc {
|
||||
environment.systemPackages = with pkgs; [
|
||||
go
|
||||
rustup
|
||||
];
|
||||
};
|
||||
}
|
|
@ -4,10 +4,11 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIfIn;
|
||||
cfg = config.oizys.languages;
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.languages;
|
||||
in {
|
||||
config = mkIfIn "nim" cfg {
|
||||
options.languages.nim = mkEnableOption "nim";
|
||||
config = mkIf cfg.nim {
|
||||
environment.systemPackages = with pkgs; [
|
||||
nim
|
||||
|
|
@ -4,10 +4,11 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIfIn;
|
||||
cfg = config.oizys.languages;
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.languages;
|
||||
in {
|
||||
config = mkIfIn "node" cfg {
|
||||
options.languages.node = mkEnableOption "node";
|
||||
config = mkIf cfg.node {
|
||||
environment.systemPackages = with pkgs; [
|
||||
nodejs
|
||||
nodePackages.pnpm
|
|
@ -4,10 +4,11 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIfIn;
|
||||
cfg = config.oizys.languages;
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.languages;
|
||||
in {
|
||||
config = mkIfIn "python" cfg {
|
||||
options.languages.python = mkEnableOption "python";
|
||||
config = mkIf cfg.python {
|
||||
environment.systemPackages = let
|
||||
python = pkgs.python3.withPackages (ps: with ps; [pip]);
|
||||
in
|
||||
|
@ -23,9 +24,8 @@ in {
|
|||
exec ${python}/bin/python "$@"
|
||||
'')
|
||||
|
||||
(python3.withPackages (ps: with ps; [pip]))
|
||||
# (python3.withPackages (ps: with ps; [pip]))
|
||||
micromamba
|
||||
pixi
|
||||
];
|
||||
};
|
||||
}
|
|
@ -4,10 +4,11 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkIfIn;
|
||||
cfg = config.oizys.languages;
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.languages;
|
||||
in {
|
||||
config = mkIfIn "tex" cfg {
|
||||
options.languages.tex = mkEnableOption "tex";
|
||||
config = mkIf cfg.tex {
|
||||
environment.systemPackages = with pkgs; [
|
||||
texlive.combined.scheme-full
|
||||
];
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOption types literalExpression mdDoc;
|
||||
cfg = config.oizys.languages;
|
||||
in {
|
||||
imports = [./nim.nix ./tex.nix ./misc.nix ./node.nix ./python.nix];
|
||||
options.oizys.languages = mkOption {
|
||||
type = with types; (listOf str);
|
||||
description = lib.mdDoc ''
|
||||
List of programming languages to enable.
|
||||
'';
|
||||
default = [];
|
||||
example = literalExpression ''
|
||||
[
|
||||
"python"
|
||||
"nim"
|
||||
]
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIfIn;
|
||||
cfg = config.oizys.languages;
|
||||
in {
|
||||
config = mkIfIn "misc" cfg {
|
||||
environment.systemPackages = with pkgs; [
|
||||
go
|
||||
rustup
|
||||
];
|
||||
};
|
||||
}
|
|
@ -5,10 +5,10 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.oizys.vpn;
|
||||
cfg = config.services.vpn;
|
||||
in {
|
||||
options.oizys.vpn.enable = mkEnableOption ''
|
||||
Whether to enable openconnect for vpn connection.
|
||||
options.services.vpn.enable = mkEnableOption ''
|
||||
use openconnect vpn
|
||||
'';
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -37,11 +37,11 @@
|
|||
trusted-users = ["@wheel"];
|
||||
accept-flake-config = true;
|
||||
|
||||
# substituters = [
|
||||
# "https://daylin.cachix.org"
|
||||
# ];
|
||||
# trusted-public-keys = [
|
||||
# "daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k="
|
||||
# ];
|
||||
substituters = [
|
||||
"https://daylin.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k="
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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,8 +1,9 @@
|
|||
import std/[os, osproc, parseopt, times, strutils, terminal]
|
||||
import std/[os, osproc, tables, times, strutils, terminal]
|
||||
from std/nativesockets import getHostname
|
||||
|
||||
let summaryFile = getEnv("GITHUB_STEP_SUMMARY")
|
||||
|
||||
|
||||
proc info(args: varargs[string, `$`]) =
|
||||
stdout.styledWriteLine(
|
||||
fgCyan, "oizys", resetStyle, "|",
|
||||
|
@ -17,18 +18,15 @@ proc error(args: varargs[string, `$`]) =
|
|||
args.join("")
|
||||
)
|
||||
|
||||
proc execQuit(cmd: string) =
|
||||
quit (execCmd cmd)
|
||||
|
||||
type
|
||||
OizysContext = object
|
||||
flake, host: string
|
||||
extraArgs: seq[string]
|
||||
cache = "daylin"
|
||||
pinix: bool = true
|
||||
|
||||
proc execQuit(c: OizysContext, args: varargs[string]) =
|
||||
let cmd = (@args & c.extraArgs).join(" ")
|
||||
info "exec: ", cmd
|
||||
quit (execCmd cmd)
|
||||
|
||||
proc newCtx(): OizysContext =
|
||||
result = OizysContext()
|
||||
result.flake = getEnv("FLAKE_PATH", getEnv("HOME") / "oizys")
|
||||
|
@ -50,11 +48,11 @@ proc systemFlakePath(c: OizysContext): string =
|
|||
|
||||
proc build(c: OizysContext) =
|
||||
## build nixos
|
||||
execQuit c, c.cmd, "build", c.systemFlakePath
|
||||
execQuit c.cmd & " build " & c.systemFlakePath
|
||||
|
||||
proc dry(c: OizysContext) =
|
||||
## poor man's nix flake check
|
||||
execQuit c, c.cmd, "build", c.systemFlakePath, "--dry-run"
|
||||
execQuit c.cmd & " build " & c.systemFlakePath & " --dry-run"
|
||||
|
||||
proc cache(c: OizysContext) =
|
||||
let start = now()
|
||||
|
@ -79,7 +77,7 @@ proc cache(c: OizysContext) =
|
|||
|
||||
proc nixosRebuild(c: OizysContext, subcmd: string) =
|
||||
let cmd = if c.pinix: "pixos-rebuild" else: "nixos-rebuild"
|
||||
execQuit c, "sudo", cmd, subcmd, "--flake", c.flake
|
||||
execQuit "sudo " & cmd & " " & subcmd & " " & " --flake " & c.flake
|
||||
|
||||
proc boot(c: OizysContext) =
|
||||
## nixos rebuild boot
|
||||
|
@ -121,7 +119,7 @@ proc runCmd(c: OizysContext, cmd: string) =
|
|||
quit 1
|
||||
|
||||
|
||||
proc parseFlag(c: var OizysContext, kind: CmdLineKind, key, val: string) =
|
||||
proc parseFlag(c: var OizysContext, key, val: string) =
|
||||
case key:
|
||||
of "h", "help":
|
||||
echo usage; quit 0
|
||||
|
@ -131,31 +129,23 @@ proc parseFlag(c: var OizysContext, kind: CmdLineKind, key, val: string) =
|
|||
c.flake = val
|
||||
of "no-pinix":
|
||||
c.pinix = false
|
||||
else:
|
||||
c.extraArgs.add (if kind == cmdLongOption: "--" else: "-") & key
|
||||
c.extraArgs.add val
|
||||
|
||||
when isMainModule:
|
||||
import std/parseopt
|
||||
var
|
||||
c = newCtx()
|
||||
subcmd: string
|
||||
var p = initOptParser(
|
||||
longNoVal = @["no-pinix", "help", ""], shortNoVal = {'h'}
|
||||
)
|
||||
for kind, key, val in p.getopt():
|
||||
for kind, key, val in getopt(longNoVal = @["no-nom"]):
|
||||
case kind
|
||||
of cmdArgument:
|
||||
echo key
|
||||
subcmd = key
|
||||
of cmdLongOption, cmdShortOption:
|
||||
if key == "":
|
||||
break
|
||||
parseFlag c, kind, key, val
|
||||
parseFlag c, key, val
|
||||
of cmdEnd:
|
||||
discard
|
||||
if subcmd == "":
|
||||
echo "please specify a command"
|
||||
echo usage; quit 1
|
||||
c.extraArgs = p.remainingArgs
|
||||
|
||||
check c
|
||||
runCmd c, subcmd
|
||||
|
|
3
todo.md
3
todo.md
|
@ -1,6 +1,5 @@
|
|||
# oizys todo's
|
||||
|
||||
- [ ] add graceful fall back for oizys-cli if pinix isn't installed system-wide yet
|
||||
- [ ] trackdown wezterm bug... (try building from flake?)
|
||||
<!-- nothing :) -->
|
||||
|
||||
<!-- generated with <3 by daylinmorgan/todo -->
|
||||
|
|
Loading…
Reference in a new issue