mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-28 19:00:44 -06:00
Compare commits
22 commits
062e01f4a2
...
d4b77becb8
Author | SHA1 | Date | |
---|---|---|---|
|
d4b77becb8 | ||
c35e695654 | |||
5ac6dfbe6d | |||
a9627da325 | |||
3fc0eb9608 | |||
1d2d7f9f47 | |||
f95fef1321 | |||
69556880f9 | |||
8766668a1c | |||
b63bd12d6a | |||
60a1c20747 | |||
57d0d2a9fb | |||
9ae0260cc0 | |||
d20a337174 | |||
da8331d9ec | |||
65d59dba9e | |||
c0b2603a31 | |||
280e475edc | |||
6e3aa008df | |||
1da7e1ff0b | |||
dbd4159002 | |||
|
d1dff8a600 |
29 changed files with 274 additions and 265 deletions
148
flake.lock
148
flake.lock
|
@ -18,7 +18,6 @@
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"inputs",
|
|
||||||
"nix-eval-jobs",
|
"nix-eval-jobs",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
|
@ -42,11 +41,11 @@
|
||||||
"systems": "systems_2"
|
"systems": "systems_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1709126324,
|
||||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -60,7 +59,6 @@
|
||||||
"hyprland-protocols": "hyprland-protocols",
|
"hyprland-protocols": "hyprland-protocols",
|
||||||
"hyprlang": "hyprlang",
|
"hyprlang": "hyprlang",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"inputs",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"systems": "systems",
|
"systems": "systems",
|
||||||
|
@ -68,11 +66,11 @@
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708723504,
|
"lastModified": 1709425896,
|
||||||
"narHash": "sha256-m6kU6+bfUpwPPdo7+tglg65OXkQ3Q5cyT6ojCue3uaw=",
|
"narHash": "sha256-r/Tsr+BfgaiJIWTwWrrxHzTmNGEIi8HzYDGO3kFJmx8=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "bdbd8d965d4f1a13129c72505bb556445ce0bc90",
|
"rev": "2a08f2ba84ead47bd13aae5797d0d71b2e11b612",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -85,16 +83,15 @@
|
||||||
"hyprland-contrib": {
|
"hyprland-contrib": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"inputs",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1706198673,
|
"lastModified": 1709391291,
|
||||||
"narHash": "sha256-bHlxFd+3QHy6eXtTzzhwVNcyxBSOxTvBuJGNUzI4C4M=",
|
"narHash": "sha256-NJwAgXRKLVuO3YLkGxXIanLvTKN+cJsYwbLoWOa7ODk=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "contrib",
|
"repo": "contrib",
|
||||||
"rev": "16884001b26e6955ff4b88b4dfe4c8986e20f153",
|
"rev": "2d4ece4a008feefddc194bde785b1d39f987b5a7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -106,12 +103,10 @@
|
||||||
"hyprland-protocols": {
|
"hyprland-protocols": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"inputs",
|
|
||||||
"hyprland",
|
"hyprland",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"systems": [
|
"systems": [
|
||||||
"inputs",
|
|
||||||
"hyprland",
|
"hyprland",
|
||||||
"systems"
|
"systems"
|
||||||
]
|
]
|
||||||
|
@ -133,17 +128,20 @@
|
||||||
"hyprlang": {
|
"hyprlang": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"inputs",
|
|
||||||
"hyprland",
|
"hyprland",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland",
|
||||||
|
"systems"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708005943,
|
"lastModified": 1708787654,
|
||||||
"narHash": "sha256-9TT3xk++LI5/SPYgjYX34xZ4ebR93c1uerIq+SE/ues=",
|
"narHash": "sha256-7ACgM3ZuAhPqurXHUvR2nWMRcnmzGGPjLK6q4DSTelI=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprlang",
|
"repo": "hyprlang",
|
||||||
"rev": "aeb3e012adc7b3235335c540b214b82267c2b983",
|
"rev": "0fce791ba2334aca183f2ed42399518947550d0d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -152,66 +150,17 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hyprlang_2": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"inputs",
|
|
||||||
"hyprland",
|
|
||||||
"xdph",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1704287638,
|
|
||||||
"narHash": "sha256-TuRXJGwtK440AXQNl5eiqmQqY4LZ/9+z/R7xC0ie3iA=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprlang",
|
|
||||||
"rev": "6624f2bb66d4d27975766e81f77174adbe58ec97",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprlang",
|
|
||||||
"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": 1708630766,
|
|
||||||
"narHash": "sha256-JSISiI8tWuOxh3RHPJyILkXRIh7tIHkrSOfZQ9zuGd8=",
|
|
||||||
"owner": "daylinmorgan",
|
|
||||||
"repo": "oizys",
|
|
||||||
"rev": "8df8d8ffc7ab0b23e9287b0a74f952ec3337b250",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"dir": "inputs",
|
|
||||||
"owner": "daylinmorgan",
|
|
||||||
"repo": "oizys",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lib-aggregate": {
|
"lib-aggregate": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708258113,
|
"lastModified": 1709208631,
|
||||||
"narHash": "sha256-SYqkbLHSe4UxgcNwUHrMPnRmX/oJFzRILrpyn5dsJVE=",
|
"narHash": "sha256-n+SCii/GQR3zjaZzjhGAjrQQlF+xjaGEjWdpDb4wJ3U=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "lib-aggregate",
|
"repo": "lib-aggregate",
|
||||||
"rev": "42e4c0c8b04cecec07e796ce8efcb5378e93a319",
|
"rev": "1f03ac8dc3a54f68f55d36b5e7fc65afc302a3d7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -225,7 +174,6 @@
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"nix-github-actions": "nix-github-actions",
|
"nix-github-actions": "nix-github-actions",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"inputs",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
|
@ -247,7 +195,6 @@
|
||||||
"nix-github-actions": {
|
"nix-github-actions": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"inputs",
|
|
||||||
"nix-eval-jobs",
|
"nix-eval-jobs",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
|
@ -269,16 +216,15 @@
|
||||||
"nix-index-database": {
|
"nix-index-database": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"inputs",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708225687,
|
"lastModified": 1708830466,
|
||||||
"narHash": "sha256-NJBDfvknI26beOFmjO2coeJMTTUCCtw2Iu+rvJ1Zb9k=",
|
"narHash": "sha256-nGKe3Y1/jkLR2eh1aRSVBtKadMBNv8kOnB52UXqRy6A=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-index-database",
|
"repo": "nix-index-database",
|
||||||
"rev": "17352eb241a8d158c4ac523b19d8d2a6c8efe127",
|
"rev": "f070c7eeec3bde8c8c8baa9c02b6d3d5e114d73b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -289,11 +235,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708655239,
|
"lastModified": 1709356872,
|
||||||
"narHash": "sha256-ZrP/yACUvDB+zbqYJsln4iwotbH6CTZiTkANJ0AgDv4=",
|
"narHash": "sha256-mvxCirJbtkP0cZ6ABdwcgTk0u3bgLoIoEFIoYBvD6+4=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "cbc4211f0afffe6dfd2478a62615dd5175a13f9a",
|
"rev": "458b097d81f90275b3fdf03796f0563844926708",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -305,11 +251,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708217146,
|
"lastModified": 1708821942,
|
||||||
"narHash": "sha256-nGfEv7k78slqIR5E0zzWSx214d/4/ZPKDkObLJqVLVw=",
|
"narHash": "sha256-jd+E1SD59qty65pwqad2mftzkT6vW5nNFWVuvayh4Zw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "e623008d8a46517470e6365505f1a3ce171fa46a",
|
"rev": "479831ed8b3c9c7b80533999f880c7d0bf6a491b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -323,20 +269,18 @@
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"lib-aggregate": "lib-aggregate",
|
"lib-aggregate": "lib-aggregate",
|
||||||
"nix-eval-jobs": [
|
"nix-eval-jobs": [
|
||||||
"inputs",
|
|
||||||
"nix-eval-jobs"
|
"nix-eval-jobs"
|
||||||
],
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"inputs",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708457584,
|
"lastModified": 1709421307,
|
||||||
"narHash": "sha256-bcu7zHORoF+xtkmiRZR/Ipu9ZMR8CBg0m/gQmDEYcW8=",
|
"narHash": "sha256-8jG7XToXTQHYWBaaNRoALxcEPoE+yE5dKHvb2gErjOg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs-wayland",
|
"repo": "nixpkgs-wayland",
|
||||||
"rev": "119087e7a51a320b699d97463f837b75dd5768fc",
|
"rev": "ea91a1d89e6f237d2369ad0de846785965cbef0b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -348,16 +292,15 @@
|
||||||
"pinix": {
|
"pinix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"inputs",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708267018,
|
"lastModified": 1709390347,
|
||||||
"narHash": "sha256-/LA/IKbO7qgd5s/dWckcY2RQwyVZxvLH5gHzDzHXdO8=",
|
"narHash": "sha256-C7RDQ1xPktZGf8eSDUeZ2ZKetHtM2VJA0C10z0d8tkw=",
|
||||||
"owner": "remi-dupre",
|
"owner": "remi-dupre",
|
||||||
"repo": "pinix",
|
"repo": "pinix",
|
||||||
"rev": "83d58d64ebbb68532a0c23646ecd987d95dc0581",
|
"rev": "6f7dc0fccb0e48176629d061b07576d092a5d09c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -368,7 +311,13 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"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"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
@ -404,7 +353,6 @@
|
||||||
"treefmt-nix": {
|
"treefmt-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"inputs",
|
|
||||||
"nix-eval-jobs",
|
"nix-eval-jobs",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
|
@ -445,28 +393,28 @@
|
||||||
"xdph": {
|
"xdph": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"hyprland-protocols": [
|
"hyprland-protocols": [
|
||||||
"inputs",
|
|
||||||
"hyprland",
|
"hyprland",
|
||||||
"hyprland-protocols"
|
"hyprland-protocols"
|
||||||
],
|
],
|
||||||
"hyprlang": "hyprlang_2",
|
"hyprlang": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprlang"
|
||||||
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"inputs",
|
|
||||||
"hyprland",
|
"hyprland",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"systems": [
|
"systems": [
|
||||||
"inputs",
|
|
||||||
"hyprland",
|
"hyprland",
|
||||||
"systems"
|
"systems"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1706521509,
|
"lastModified": 1708696469,
|
||||||
"narHash": "sha256-AInZ50acOJ3wzUwGzNr1TmxGTMx+8j6oSTzz4E7Vbp8=",
|
"narHash": "sha256-shh5wmpeYy3MmsBfkm4f76yPsBDGk6OLYRVG+ARy2F0=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "xdg-desktop-portal-hyprland",
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
"rev": "c06fd88b3da492b8f9067be021b9184f7012b5a8",
|
"rev": "1b713911c2f12b96c2574474686e4027ac4bf826",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
48
flake.nix
48
flake.nix
|
@ -1,13 +1,49 @@
|
||||||
{
|
{
|
||||||
description = "nix begat oizys";
|
description = "nix begat oizys";
|
||||||
inputs.inputs.url = "github:daylinmorgan/oizys?dir=inputs";
|
outputs = inputs @ {self, ...}:
|
||||||
outputs = {
|
|
||||||
inputs,
|
|
||||||
self,
|
|
||||||
}:
|
|
||||||
(import ./lib {
|
(import ./lib {
|
||||||
inherit (inputs) inputs;
|
inherit inputs;
|
||||||
inherit self;
|
inherit self;
|
||||||
})
|
})
|
||||||
.oizysFlake {};
|
.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,11 +8,10 @@
|
||||||
restic
|
restic
|
||||||
];
|
];
|
||||||
|
|
||||||
languages = {
|
oizys.languages = [
|
||||||
nim = true;
|
"nim"
|
||||||
python = true;
|
"python"
|
||||||
};
|
];
|
||||||
cli.enable = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
rclone
|
rclone
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{mkRune, ...}: {
|
{lib, ...}: {
|
||||||
users.motd = mkRune {
|
users.motd = lib.mkRune {
|
||||||
number = "6";
|
number = "6";
|
||||||
rune = "algiz";
|
rune = "algiz";
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
nix-ld
|
nix-ld
|
||||||
];
|
];
|
||||||
|
|
||||||
desktop.enable = true;
|
oizys.desktop.enable = true;
|
||||||
cli.enable = true;
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
mkRune,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
users.motd = mkRune {
|
users.motd = lib.mkRune {
|
||||||
number = "2";
|
number = "2";
|
||||||
rune = "mannaz";
|
rune = "mannaz";
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,16 +10,18 @@
|
||||||
docker
|
docker
|
||||||
];
|
];
|
||||||
|
|
||||||
cli.enable = true;
|
oizys = {
|
||||||
desktop.enable = true;
|
desktop.enable = true;
|
||||||
|
vpn.enable = true;
|
||||||
languages = {
|
languages = [
|
||||||
misc = true;
|
"misc"
|
||||||
python = true;
|
"python"
|
||||||
nim = true;
|
"nim"
|
||||||
tex = true;
|
"tex"
|
||||||
node = true;
|
"node"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
vivaldi.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
zk
|
zk
|
||||||
|
@ -29,8 +31,6 @@
|
||||||
|
|
||||||
programs.hyprland.enable = true;
|
programs.hyprland.enable = true;
|
||||||
|
|
||||||
services.vpn.enable = true;
|
|
||||||
|
|
||||||
services.restic.backups.gdrive = {
|
services.restic.backups.gdrive = {
|
||||||
user = "daylin";
|
user = "daylin";
|
||||||
repository = "rclone:g:archives/othalan";
|
repository = "rclone:g:archives/othalan";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
mkRune,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
pamixer
|
pamixer
|
||||||
];
|
];
|
||||||
|
|
||||||
services.getty.greetingLine = mkRune {
|
services.getty.greetingLine = lib.mkRune {
|
||||||
rune = "othalan";
|
rune = "othalan";
|
||||||
runeKind = "ascii";
|
runeKind = "ascii";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
{
|
|
||||||
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,23 +3,17 @@
|
||||||
self,
|
self,
|
||||||
}: let
|
}: let
|
||||||
inherit (inputs) nixpkgs;
|
inherit (inputs) nixpkgs;
|
||||||
|
lib = nixpkgs.lib.extend (import ./extended.nix);
|
||||||
|
|
||||||
inherit (builtins) concatLists attrValues mapAttrs elemAt match readDir filter listToAttrs;
|
inherit (builtins) concatLists attrValues mapAttrs elemAt match readDir filter listToAttrs;
|
||||||
inherit (nixpkgs.lib) hasSuffix nixosSystem genAttrs;
|
inherit (lib) hasSuffix nixosSystem genAttrs isNixFile;
|
||||||
inherit (nixpkgs.lib.filesystem) listFilesRecursive;
|
inherit (lib.filesystem) listFilesRecursive;
|
||||||
|
|
||||||
#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"];
|
||||||
runes = import ../modules/runes;
|
|
||||||
in rec {
|
in rec {
|
||||||
forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system});
|
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 = _:
|
buildOizys = _:
|
||||||
forAllSystems (
|
forAllSystems (
|
||||||
pkgs: let
|
pkgs: let
|
||||||
|
@ -42,10 +36,9 @@ in rec {
|
||||||
isNixFile
|
isNixFile
|
||||||
(listFilesRecursive (../. + "/hosts/${hostname}"));
|
(listFilesRecursive (../. + "/hosts/${hostname}"));
|
||||||
|
|
||||||
specialArgs = {inherit inputs mkRune self;};
|
specialArgs = {inherit inputs lib self;};
|
||||||
};
|
};
|
||||||
mapHosts = dir: mapAttrs (name: _: mkSystem name) (readDir dir);
|
mapHosts = dir: mapAttrs (name: _: mkSystem name) (readDir dir);
|
||||||
buildHosts = _: mapHosts ../hosts;
|
|
||||||
|
|
||||||
findModules = _: listToAttrs (findModulesList ../modules);
|
findModules = _: listToAttrs (findModulesList ../modules);
|
||||||
# https://github.com/balsoft/nixos-config/blob/73cc2c3a8bb62a9c3980a16ae70b2e97af6e1abd/flake.nix#L109-L120
|
# https://github.com/balsoft/nixos-config/blob/73cc2c3a8bb62a9c3980a16ae70b2e97af6e1abd/flake.nix#L109-L120
|
||||||
|
@ -72,7 +65,7 @@ in rec {
|
||||||
|
|
||||||
oizysFlake = _: {
|
oizysFlake = _: {
|
||||||
nixosModules = findModules {};
|
nixosModules = findModules {};
|
||||||
nixosConfigurations = buildHosts {};
|
nixosConfigurations = mapHosts ../hosts;
|
||||||
packages = buildOizys {};
|
packages = buildOizys {};
|
||||||
formatter = forAllSystems (pkgs: pkgs.alejandra);
|
formatter = forAllSystems (pkgs: pkgs.alejandra);
|
||||||
};
|
};
|
||||||
|
|
14
lib/extended.nix
Normal file
14
lib/extended.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
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,15 +20,13 @@
|
||||||
hyprland
|
hyprland
|
||||||
|
|
||||||
gui
|
gui
|
||||||
vscode
|
|
||||||
|
|
||||||
# langs
|
languages
|
||||||
python
|
|
||||||
misc
|
# programs
|
||||||
node
|
vivaldi
|
||||||
tex
|
vscode
|
||||||
nim
|
|
||||||
];
|
];
|
||||||
|
|
||||||
options.desktop.enable = lib.mkEnableOption "is desktop";
|
options.oizys.desktop.enable = lib.mkEnableOption "is desktop";
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
cfg = config.desktop;
|
cfg = config.oizys.desktop;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
cfg = config.desktop;
|
cfg = config.oizys.desktop;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
@ -19,13 +19,6 @@ in {
|
||||||
|
|
||||||
libreoffice-qt
|
libreoffice-qt
|
||||||
hunspell # spell check for libreoffice
|
hunspell # spell check for libreoffice
|
||||||
|
|
||||||
(vivaldi.override {
|
|
||||||
commandLineArgs = [
|
|
||||||
"--force-dark-mode"
|
|
||||||
];
|
|
||||||
proprietaryCodecs = true;
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ in {
|
||||||
lock
|
lock
|
||||||
brightnessctl
|
brightnessctl
|
||||||
udiskie
|
udiskie
|
||||||
eww-wayland
|
eww
|
||||||
|
|
||||||
# notifications
|
# notifications
|
||||||
libnotify
|
libnotify
|
||||||
|
@ -44,6 +44,7 @@ in {
|
||||||
|
|
||||||
catppuccin-cursors.mochaDark
|
catppuccin-cursors.mochaDark
|
||||||
hyprpaper
|
hyprpaper
|
||||||
|
swww
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
|
|
|
@ -4,10 +4,15 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkOption mkIf types;
|
||||||
cfg = config.cli;
|
cfg = config.oizys.cli;
|
||||||
in {
|
in {
|
||||||
options.cli.enable = mkEnableOption "cli";
|
options.oizys.cli.enable = mkOption {
|
||||||
|
default = true;
|
||||||
|
description = "Whether to enable cli.";
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.direnv.enable = true;
|
programs.direnv.enable = true;
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
cfg = config.desktop;
|
cfg = config.oizys.desktop;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
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
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
24
modules/languages/default.nix
Normal file
24
modules/languages/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
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"
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
16
modules/languages/misc.nix
Normal file
16
modules/languages/misc.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIfIn;
|
||||||
|
cfg = config.oizys.languages;
|
||||||
|
in {
|
||||||
|
config = mkIfIn "misc" cfg {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
go
|
||||||
|
rustup
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -4,11 +4,10 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkIfIn;
|
||||||
cfg = config.languages;
|
cfg = config.oizys.languages;
|
||||||
in {
|
in {
|
||||||
options.languages.nim = mkEnableOption "nim";
|
config = mkIfIn "nim" cfg {
|
||||||
config = mkIf cfg.nim {
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
nim
|
nim
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkIfIn;
|
||||||
cfg = config.languages;
|
cfg = config.oizys.languages;
|
||||||
in {
|
in {
|
||||||
options.languages.node = mkEnableOption "node";
|
config = mkIfIn "node" cfg {
|
||||||
config = mkIf cfg.node {
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
nodejs
|
nodejs
|
||||||
nodePackages.pnpm
|
nodePackages.pnpm
|
|
@ -4,11 +4,10 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkIfIn;
|
||||||
cfg = config.languages;
|
cfg = config.oizys.languages;
|
||||||
in {
|
in {
|
||||||
options.languages.python = mkEnableOption "python";
|
config = mkIfIn "python" cfg {
|
||||||
config = mkIf cfg.python {
|
|
||||||
environment.systemPackages = let
|
environment.systemPackages = let
|
||||||
python = pkgs.python3.withPackages (ps: with ps; [pip]);
|
python = pkgs.python3.withPackages (ps: with ps; [pip]);
|
||||||
in
|
in
|
||||||
|
@ -24,8 +23,9 @@ in {
|
||||||
exec ${python}/bin/python "$@"
|
exec ${python}/bin/python "$@"
|
||||||
'')
|
'')
|
||||||
|
|
||||||
# (python3.withPackages (ps: with ps; [pip]))
|
(python3.withPackages (ps: with ps; [pip]))
|
||||||
micromamba
|
micromamba
|
||||||
|
pixi
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -4,11 +4,10 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkIf mkIfIn;
|
||||||
cfg = config.languages;
|
cfg = config.oizys.languages;
|
||||||
in {
|
in {
|
||||||
options.languages.tex = mkEnableOption "tex";
|
config = mkIfIn "tex" cfg {
|
||||||
config = mkIf cfg.tex {
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
texlive.combined.scheme-full
|
texlive.combined.scheme-full
|
||||||
];
|
];
|
|
@ -5,10 +5,10 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
cfg = config.services.vpn;
|
cfg = config.oizys.vpn;
|
||||||
in {
|
in {
|
||||||
options.services.vpn.enable = mkEnableOption ''
|
options.oizys.vpn.enable = mkEnableOption ''
|
||||||
use openconnect vpn
|
Whether to enable openconnect for vpn connection.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -37,11 +37,11 @@
|
||||||
trusted-users = ["@wheel"];
|
trusted-users = ["@wheel"];
|
||||||
accept-flake-config = true;
|
accept-flake-config = true;
|
||||||
|
|
||||||
substituters = [
|
# substituters = [
|
||||||
"https://daylin.cachix.org"
|
# "https://daylin.cachix.org"
|
||||||
];
|
# ];
|
||||||
trusted-public-keys = [
|
# trusted-public-keys = [
|
||||||
"daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k="
|
# "daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k="
|
||||||
];
|
# ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
33
modules/programs/vivaldi.nix
Normal file
33
modules/programs/vivaldi.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
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,9 +1,8 @@
|
||||||
import std/[os, osproc, tables, times, strutils, terminal]
|
import std/[os, osproc, parseopt, times, strutils, terminal]
|
||||||
from std/nativesockets import getHostname
|
from std/nativesockets import getHostname
|
||||||
|
|
||||||
let summaryFile = getEnv("GITHUB_STEP_SUMMARY")
|
let summaryFile = getEnv("GITHUB_STEP_SUMMARY")
|
||||||
|
|
||||||
|
|
||||||
proc info(args: varargs[string, `$`]) =
|
proc info(args: varargs[string, `$`]) =
|
||||||
stdout.styledWriteLine(
|
stdout.styledWriteLine(
|
||||||
fgCyan, "oizys", resetStyle, "|",
|
fgCyan, "oizys", resetStyle, "|",
|
||||||
|
@ -18,15 +17,18 @@ proc error(args: varargs[string, `$`]) =
|
||||||
args.join("")
|
args.join("")
|
||||||
)
|
)
|
||||||
|
|
||||||
proc execQuit(cmd: string) =
|
|
||||||
quit (execCmd cmd)
|
|
||||||
|
|
||||||
type
|
type
|
||||||
OizysContext = object
|
OizysContext = object
|
||||||
flake, host: string
|
flake, host: string
|
||||||
|
extraArgs: seq[string]
|
||||||
cache = "daylin"
|
cache = "daylin"
|
||||||
pinix: bool = true
|
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 =
|
proc newCtx(): OizysContext =
|
||||||
result = OizysContext()
|
result = OizysContext()
|
||||||
result.flake = getEnv("FLAKE_PATH", getEnv("HOME") / "oizys")
|
result.flake = getEnv("FLAKE_PATH", getEnv("HOME") / "oizys")
|
||||||
|
@ -48,11 +50,11 @@ proc systemFlakePath(c: OizysContext): string =
|
||||||
|
|
||||||
proc build(c: OizysContext) =
|
proc build(c: OizysContext) =
|
||||||
## build nixos
|
## build nixos
|
||||||
execQuit c.cmd & " build " & c.systemFlakePath
|
execQuit c, c.cmd, "build", c.systemFlakePath
|
||||||
|
|
||||||
proc dry(c: OizysContext) =
|
proc dry(c: OizysContext) =
|
||||||
## poor man's nix flake check
|
## poor man's nix flake check
|
||||||
execQuit c.cmd & " build " & c.systemFlakePath & " --dry-run"
|
execQuit c, c.cmd, "build", c.systemFlakePath, "--dry-run"
|
||||||
|
|
||||||
proc cache(c: OizysContext) =
|
proc cache(c: OizysContext) =
|
||||||
let start = now()
|
let start = now()
|
||||||
|
@ -77,7 +79,7 @@ proc cache(c: OizysContext) =
|
||||||
|
|
||||||
proc nixosRebuild(c: OizysContext, subcmd: string) =
|
proc nixosRebuild(c: OizysContext, subcmd: string) =
|
||||||
let cmd = if c.pinix: "pixos-rebuild" else: "nixos-rebuild"
|
let cmd = if c.pinix: "pixos-rebuild" else: "nixos-rebuild"
|
||||||
execQuit "sudo " & cmd & " " & subcmd & " " & " --flake " & c.flake
|
execQuit c, "sudo", cmd, subcmd, "--flake", c.flake
|
||||||
|
|
||||||
proc boot(c: OizysContext) =
|
proc boot(c: OizysContext) =
|
||||||
## nixos rebuild boot
|
## nixos rebuild boot
|
||||||
|
@ -119,7 +121,7 @@ proc runCmd(c: OizysContext, cmd: string) =
|
||||||
quit 1
|
quit 1
|
||||||
|
|
||||||
|
|
||||||
proc parseFlag(c: var OizysContext, key, val: string) =
|
proc parseFlag(c: var OizysContext, kind: CmdLineKind, key, val: string) =
|
||||||
case key:
|
case key:
|
||||||
of "h", "help":
|
of "h", "help":
|
||||||
echo usage; quit 0
|
echo usage; quit 0
|
||||||
|
@ -129,23 +131,31 @@ proc parseFlag(c: var OizysContext, key, val: string) =
|
||||||
c.flake = val
|
c.flake = val
|
||||||
of "no-pinix":
|
of "no-pinix":
|
||||||
c.pinix = false
|
c.pinix = false
|
||||||
|
else:
|
||||||
|
c.extraArgs.add (if kind == cmdLongOption: "--" else: "-") & key
|
||||||
|
c.extraArgs.add val
|
||||||
|
|
||||||
when isMainModule:
|
when isMainModule:
|
||||||
import std/parseopt
|
|
||||||
var
|
var
|
||||||
c = newCtx()
|
c = newCtx()
|
||||||
subcmd: string
|
subcmd: string
|
||||||
for kind, key, val in getopt(longNoVal = @["no-nom"]):
|
var p = initOptParser(
|
||||||
|
longNoVal = @["no-pinix", "help", ""], shortNoVal = {'h'}
|
||||||
|
)
|
||||||
|
for kind, key, val in p.getopt():
|
||||||
case kind
|
case kind
|
||||||
of cmdArgument:
|
of cmdArgument:
|
||||||
|
echo key
|
||||||
subcmd = key
|
subcmd = key
|
||||||
of cmdLongOption, cmdShortOption:
|
of cmdLongOption, cmdShortOption:
|
||||||
parseFlag c, key, val
|
if key == "":
|
||||||
|
break
|
||||||
|
parseFlag c, kind, key, val
|
||||||
of cmdEnd:
|
of cmdEnd:
|
||||||
discard
|
discard
|
||||||
if subcmd == "":
|
if subcmd == "":
|
||||||
echo "please specify a command"
|
echo "please specify a command"
|
||||||
echo usage; quit 1
|
echo usage; quit 1
|
||||||
|
c.extraArgs = p.remainingArgs
|
||||||
check c
|
check c
|
||||||
runCmd c, subcmd
|
runCmd c, subcmd
|
||||||
|
|
3
todo.md
3
todo.md
|
@ -1,5 +1,6 @@
|
||||||
# oizys todo's
|
# oizys todo's
|
||||||
|
|
||||||
<!-- nothing :) -->
|
- [ ] add graceful fall back for oizys-cli if pinix isn't installed system-wide yet
|
||||||
|
- [ ] trackdown wezterm bug... (try building from flake?)
|
||||||
|
|
||||||
<!-- generated with <3 by daylinmorgan/todo -->
|
<!-- generated with <3 by daylinmorgan/todo -->
|
||||||
|
|
Loading…
Reference in a new issue