Compare commits

..

1 commit

Author SHA1 Message Date
github-actions[bot]
062e01f4a2 flake.lock: Update
Flake lock file updates:

• Updated input 'inputs':
    'github:daylinmorgan/oizys/8df8d8ffc7ab0b23e9287b0a74f952ec3337b250?dir=inputs' (2024-02-22)
  → 'github:daylinmorgan/oizys/d4d1113722eac0f7f9edd7788a81fbdaacf13d0b?dir=inputs' (2024-02-23)
• Updated input 'inputs/hyprland':
    'github:hyprwm/Hyprland/bdbd8d965d4f1a13129c72505bb556445ce0bc90' (2024-02-23)
  → 'github:hyprwm/Hyprland/f534ac3fc462d8af923d2a1ab8ef58f62639a1ea' (2024-02-24)
• Updated input 'inputs/hyprland/hyprlang':
    'github:hyprwm/hyprlang/aeb3e012adc7b3235335c540b214b82267c2b983' (2024-02-15)
  → 'github:hyprwm/hyprlang/f4466367ef0a92a6425d482050dc2b8840c0e644' (2024-02-23)
• Added input 'inputs/hyprland/hyprlang/systems':
    follows 'inputs/hyprland/systems'
• Updated input 'inputs/hyprland/xdph':
    'github:hyprwm/xdg-desktop-portal-hyprland/c06fd88b3da492b8f9067be021b9184f7012b5a8' (2024-01-29)
  → 'github:hyprwm/xdg-desktop-portal-hyprland/1b713911c2f12b96c2574474686e4027ac4bf826' (2024-02-23)
• Updated input 'inputs/hyprland/xdph/hyprlang':
    'github:hyprwm/hyprlang/6624f2bb66d4d27975766e81f77174adbe58ec97' (2024-01-03)
  → follows 'inputs/hyprland/hyprlang'
• Removed input 'inputs/hyprland/xdph/hyprlang/nixpkgs'
• Updated input 'inputs/nixpkgs':
    'github:nixos/nixpkgs/cbc4211f0afffe6dfd2478a62615dd5175a13f9a' (2024-02-23)
  → 'github:nixos/nixpkgs/f63ce824cd2f036216eb5f637dfef31e1a03ee89' (2024-02-24)
• Updated input 'inputs/nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/119087e7a51a320b699d97463f837b75dd5768fc' (2024-02-20)
  → 'github:nix-community/nixpkgs-wayland/453faa8da5db8d689cf89770347405de1f4f8f68' (2024-02-24)
2024-02-25 00:38:14 +00:00
29 changed files with 240 additions and 263 deletions

View file

@ -18,6 +18,7 @@
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"inputs",
"nix-eval-jobs", "nix-eval-jobs",
"nixpkgs" "nixpkgs"
] ]
@ -41,11 +42,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1709126324, "lastModified": 1705309234,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "d465f4819400de7c8d874d50b982301f28a84605", "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -59,6 +60,7 @@
"hyprland-protocols": "hyprland-protocols", "hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang", "hyprlang": "hyprlang",
"nixpkgs": [ "nixpkgs": [
"inputs",
"nixpkgs" "nixpkgs"
], ],
"systems": "systems", "systems": "systems",
@ -66,11 +68,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1709425896, "lastModified": 1708817736,
"narHash": "sha256-r/Tsr+BfgaiJIWTwWrrxHzTmNGEIi8HzYDGO3kFJmx8=", "narHash": "sha256-GZEoru+4uNIGEZ8j1TPaxZwM+ApIngHU/iX3sIGgUO4=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "2a08f2ba84ead47bd13aae5797d0d71b2e11b612", "rev": "f534ac3fc462d8af923d2a1ab8ef58f62639a1ea",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -83,15 +85,16 @@
"hyprland-contrib": { "hyprland-contrib": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"inputs",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1709391291, "lastModified": 1706198673,
"narHash": "sha256-NJwAgXRKLVuO3YLkGxXIanLvTKN+cJsYwbLoWOa7ODk=", "narHash": "sha256-bHlxFd+3QHy6eXtTzzhwVNcyxBSOxTvBuJGNUzI4C4M=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "contrib", "repo": "contrib",
"rev": "2d4ece4a008feefddc194bde785b1d39f987b5a7", "rev": "16884001b26e6955ff4b88b4dfe4c8986e20f153",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -103,10 +106,12 @@
"hyprland-protocols": { "hyprland-protocols": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"inputs",
"hyprland", "hyprland",
"nixpkgs" "nixpkgs"
], ],
"systems": [ "systems": [
"inputs",
"hyprland", "hyprland",
"systems" "systems"
] ]
@ -128,20 +133,22 @@
"hyprlang": { "hyprlang": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"inputs",
"hyprland", "hyprland",
"nixpkgs" "nixpkgs"
], ],
"systems": [ "systems": [
"inputs",
"hyprland", "hyprland",
"systems" "systems"
] ]
}, },
"locked": { "locked": {
"lastModified": 1708787654, "lastModified": 1708681732,
"narHash": "sha256-7ACgM3ZuAhPqurXHUvR2nWMRcnmzGGPjLK6q4DSTelI=", "narHash": "sha256-ULZZLZ9C33G13IaXLuAc4oTzHUvnATI8Fj2u6gzMfT0=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlang", "repo": "hyprlang",
"rev": "0fce791ba2334aca183f2ed42399518947550d0d", "rev": "f4466367ef0a92a6425d482050dc2b8840c0e644",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -150,17 +157,43 @@
"type": "github" "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": { "lib-aggregate": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1709208631, "lastModified": 1708258113,
"narHash": "sha256-n+SCii/GQR3zjaZzjhGAjrQQlF+xjaGEjWdpDb4wJ3U=", "narHash": "sha256-SYqkbLHSe4UxgcNwUHrMPnRmX/oJFzRILrpyn5dsJVE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "lib-aggregate", "repo": "lib-aggregate",
"rev": "1f03ac8dc3a54f68f55d36b5e7fc65afc302a3d7", "rev": "42e4c0c8b04cecec07e796ce8efcb5378e93a319",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -174,6 +207,7 @@
"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"
@ -195,6 +229,7 @@
"nix-github-actions": { "nix-github-actions": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"inputs",
"nix-eval-jobs", "nix-eval-jobs",
"nixpkgs" "nixpkgs"
] ]
@ -216,15 +251,16 @@
"nix-index-database": { "nix-index-database": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"inputs",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1708830466, "lastModified": 1708225687,
"narHash": "sha256-nGKe3Y1/jkLR2eh1aRSVBtKadMBNv8kOnB52UXqRy6A=", "narHash": "sha256-NJBDfvknI26beOFmjO2coeJMTTUCCtw2Iu+rvJ1Zb9k=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "f070c7eeec3bde8c8c8baa9c02b6d3d5e114d73b", "rev": "17352eb241a8d158c4ac523b19d8d2a6c8efe127",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -235,11 +271,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1709356872, "lastModified": 1708751719,
"narHash": "sha256-mvxCirJbtkP0cZ6ABdwcgTk0u3bgLoIoEFIoYBvD6+4=", "narHash": "sha256-0uWOKSpXJXmXswOvDM5Vk3blB74apFB6rNGWV5IjoN0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "458b097d81f90275b3fdf03796f0563844926708", "rev": "f63ce824cd2f036216eb5f637dfef31e1a03ee89",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -251,11 +287,11 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1708821942, "lastModified": 1708217146,
"narHash": "sha256-jd+E1SD59qty65pwqad2mftzkT6vW5nNFWVuvayh4Zw=", "narHash": "sha256-nGfEv7k78slqIR5E0zzWSx214d/4/ZPKDkObLJqVLVw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "479831ed8b3c9c7b80533999f880c7d0bf6a491b", "rev": "e623008d8a46517470e6365505f1a3ce171fa46a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -269,18 +305,20 @@
"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": 1709421307, "lastModified": 1708817881,
"narHash": "sha256-8jG7XToXTQHYWBaaNRoALxcEPoE+yE5dKHvb2gErjOg=", "narHash": "sha256-5vX0uFCy1y24ylsfUpingkZznm7sQORZLRQiJV5hHEU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs-wayland", "repo": "nixpkgs-wayland",
"rev": "ea91a1d89e6f237d2369ad0de846785965cbef0b", "rev": "453faa8da5db8d689cf89770347405de1f4f8f68",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -292,15 +330,16 @@
"pinix": { "pinix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"inputs",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1709390347, "lastModified": 1708267018,
"narHash": "sha256-C7RDQ1xPktZGf8eSDUeZ2ZKetHtM2VJA0C10z0d8tkw=", "narHash": "sha256-/LA/IKbO7qgd5s/dWckcY2RQwyVZxvLH5gHzDzHXdO8=",
"owner": "remi-dupre", "owner": "remi-dupre",
"repo": "pinix", "repo": "pinix",
"rev": "6f7dc0fccb0e48176629d061b07576d092a5d09c", "rev": "83d58d64ebbb68532a0c23646ecd987d95dc0581",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -311,13 +350,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"hyprland": "hyprland", "inputs": "inputs"
"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": {
@ -353,6 +386,7 @@
"treefmt-nix": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"inputs",
"nix-eval-jobs", "nix-eval-jobs",
"nixpkgs" "nixpkgs"
] ]
@ -393,18 +427,22 @@
"xdph": { "xdph": {
"inputs": { "inputs": {
"hyprland-protocols": [ "hyprland-protocols": [
"inputs",
"hyprland", "hyprland",
"hyprland-protocols" "hyprland-protocols"
], ],
"hyprlang": [ "hyprlang": [
"inputs",
"hyprland", "hyprland",
"hyprlang" "hyprlang"
], ],
"nixpkgs": [ "nixpkgs": [
"inputs",
"hyprland", "hyprland",
"nixpkgs" "nixpkgs"
], ],
"systems": [ "systems": [
"inputs",
"hyprland", "hyprland",
"systems" "systems"
] ]

View file

@ -1,49 +1,13 @@
{ {
description = "nix begat oizys"; description = "nix begat oizys";
outputs = inputs @ {self, ...}: inputs.inputs.url = "github:daylinmorgan/oizys?dir=inputs";
outputs = {
inputs,
self,
}:
(import ./lib { (import ./lib {
inherit inputs; inherit (inputs) 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="
];
};
} }

View file

@ -8,10 +8,11 @@
restic restic
]; ];
oizys.languages = [ languages = {
"nim" nim = true;
"python" python = true;
]; };
cli.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
rclone rclone

View file

@ -1,5 +1,5 @@
{lib, ...}: { {mkRune, ...}: {
users.motd = lib.mkRune { users.motd = mkRune {
number = "6"; number = "6";
rune = "algiz"; rune = "algiz";
}; };

View file

@ -3,8 +3,8 @@
nix-ld nix-ld
]; ];
oizys.desktop.enable = true; desktop.enable = true;
cli.enable = true;
# Enable the X11 windowing system. # Enable the X11 windowing system.
services.xserver = { services.xserver = {
enable = true; enable = true;

View file

@ -1,10 +1,10 @@
{ {
config, config,
pkgs, pkgs,
lib, mkRune,
... ...
}: { }: {
users.motd = lib.mkRune { users.motd = mkRune {
number = "2"; number = "2";
rune = "mannaz"; rune = "mannaz";
}; };

View file

@ -10,18 +10,16 @@
docker docker
]; ];
oizys = { cli.enable = true;
desktop.enable = true; desktop.enable = true;
vpn.enable = true;
languages = [ languages = {
"misc" misc = true;
"python" python = true;
"nim" nim = true;
"tex" tex = true;
"node" node = true;
];
}; };
vivaldi.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
zk zk
@ -31,6 +29,8 @@
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";

View file

@ -1,6 +1,6 @@
{ {
pkgs, pkgs,
lib, mkRune,
... ...
}: { }: {
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -27,7 +27,7 @@
pamixer pamixer
]; ];
services.getty.greetingLine = lib.mkRune { services.getty.greetingLine = mkRune {
rune = "othalan"; rune = "othalan";
runeKind = "ascii"; runeKind = "ascii";
}; };

42
inputs/flake.nix Normal file
View 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 = _: {};
}

View file

@ -3,17 +3,23 @@
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 (lib) hasSuffix nixosSystem genAttrs isNixFile; inherit (nixpkgs.lib) hasSuffix nixosSystem genAttrs;
inherit (lib.filesystem) listFilesRecursive; inherit (nixpkgs.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";
isNixFile = path: hasSuffix ".nix" path;
buildOizys = _: buildOizys = _:
forAllSystems ( forAllSystems (
pkgs: let pkgs: let
@ -36,9 +42,10 @@ in rec {
isNixFile isNixFile
(listFilesRecursive (../. + "/hosts/${hostname}")); (listFilesRecursive (../. + "/hosts/${hostname}"));
specialArgs = {inherit inputs lib self;}; specialArgs = {inherit inputs mkRune 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
@ -65,7 +72,7 @@ in rec {
oizysFlake = _: { oizysFlake = _: {
nixosModules = findModules {}; nixosModules = findModules {};
nixosConfigurations = mapHosts ../hosts; nixosConfigurations = buildHosts {};
packages = buildOizys {}; packages = buildOizys {};
formatter = forAllSystems (pkgs: pkgs.alejandra); formatter = forAllSystems (pkgs: pkgs.alejandra);
}; };

View file

@ -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";
}

View file

@ -20,13 +20,15 @@
hyprland hyprland
gui gui
languages
# programs
vivaldi
vscode vscode
# langs
python
misc
node
tex
nim
]; ];
options.oizys.desktop.enable = lib.mkEnableOption "is desktop"; options.desktop.enable = lib.mkEnableOption "is desktop";
} }

View file

@ -5,7 +5,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
cfg = config.oizys.desktop; cfg = config.desktop;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;

View file

@ -5,7 +5,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
cfg = config.oizys.desktop; cfg = config.desktop;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -19,6 +19,13 @@ in {
libreoffice-qt libreoffice-qt
hunspell # spell check for libreoffice hunspell # spell check for libreoffice
(vivaldi.override {
commandLineArgs = [
"--force-dark-mode"
];
proprietaryCodecs = true;
})
]; ];
}; };
} }

View file

@ -30,7 +30,7 @@ in {
lock lock
brightnessctl brightnessctl
udiskie udiskie
eww eww-wayland
# notifications # notifications
libnotify libnotify
@ -44,7 +44,6 @@ in {
catppuccin-cursors.mochaDark catppuccin-cursors.mochaDark
hyprpaper hyprpaper
swww
]; ];
nixpkgs.overlays = [ nixpkgs.overlays = [

View file

@ -4,15 +4,10 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (lib) mkOption mkIf types; inherit (lib) mkEnableOption mkIf;
cfg = config.oizys.cli; cfg = config.cli;
in { in {
options.oizys.cli.enable = mkOption { options.cli.enable = mkEnableOption "cli";
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 = {

View file

@ -5,7 +5,7 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
cfg = config.oizys.desktop; cfg = config.desktop;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

17
modules/langs/misc.nix Normal file
View 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
];
};
}

View file

@ -4,10 +4,11 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (lib) mkIfIn; inherit (lib) mkEnableOption mkIf;
cfg = config.oizys.languages; cfg = config.languages;
in { in {
config = mkIfIn "nim" cfg { options.languages.nim = mkEnableOption "nim";
config = mkIf cfg.nim {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
nim nim

View file

@ -4,10 +4,11 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (lib) mkIfIn; inherit (lib) mkEnableOption mkIf;
cfg = config.oizys.languages; cfg = config.languages;
in { in {
config = mkIfIn "node" cfg { options.languages.node = mkEnableOption "node";
config = mkIf cfg.node {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
nodejs nodejs
nodePackages.pnpm nodePackages.pnpm

View file

@ -4,10 +4,11 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (lib) mkIfIn; inherit (lib) mkEnableOption mkIf;
cfg = config.oizys.languages; cfg = config.languages;
in { in {
config = mkIfIn "python" cfg { options.languages.python = mkEnableOption "python";
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
@ -23,9 +24,8 @@ in {
exec ${python}/bin/python "$@" exec ${python}/bin/python "$@"
'') '')
(python3.withPackages (ps: with ps; [pip])) # (python3.withPackages (ps: with ps; [pip]))
micromamba micromamba
pixi
]; ];
}; };
} }

View file

@ -4,10 +4,11 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (lib) mkIf mkIfIn; inherit (lib) mkEnableOption mkIf;
cfg = config.oizys.languages; cfg = config.languages;
in { in {
config = mkIfIn "tex" cfg { options.languages.tex = mkEnableOption "tex";
config = mkIf cfg.tex {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
texlive.combined.scheme-full texlive.combined.scheme-full
]; ];

View file

@ -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"
]
'';
};
}

View file

@ -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
];
};
}

View file

@ -5,10 +5,10 @@
... ...
}: let }: let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
cfg = config.oizys.vpn; cfg = config.services.vpn;
in { in {
options.oizys.vpn.enable = mkEnableOption '' options.services.vpn.enable = mkEnableOption ''
Whether to enable openconnect for vpn connection. use openconnect vpn
''; '';
config = mkIf cfg.enable { config = mkIf cfg.enable {

View file

@ -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="
# ]; ];
}; };
} }

View file

@ -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;
})
];
};
}

View file

@ -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 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, "|",
@ -17,18 +18,15 @@ 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")
@ -50,11 +48,11 @@ proc systemFlakePath(c: OizysContext): string =
proc build(c: OizysContext) = proc build(c: OizysContext) =
## build nixos ## build nixos
execQuit c, c.cmd, "build", c.systemFlakePath execQuit 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, c.cmd, "build", c.systemFlakePath, "--dry-run" execQuit c.cmd & " build " & c.systemFlakePath & " --dry-run"
proc cache(c: OizysContext) = proc cache(c: OizysContext) =
let start = now() let start = now()
@ -79,7 +77,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 c, "sudo", cmd, subcmd, "--flake", c.flake execQuit "sudo " & cmd & " " & subcmd & " " & " --flake " & c.flake
proc boot(c: OizysContext) = proc boot(c: OizysContext) =
## nixos rebuild boot ## nixos rebuild boot
@ -121,7 +119,7 @@ proc runCmd(c: OizysContext, cmd: string) =
quit 1 quit 1
proc parseFlag(c: var OizysContext, kind: CmdLineKind, key, val: string) = proc parseFlag(c: var OizysContext, key, val: string) =
case key: case key:
of "h", "help": of "h", "help":
echo usage; quit 0 echo usage; quit 0
@ -131,31 +129,23 @@ proc parseFlag(c: var OizysContext, kind: CmdLineKind, 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
var p = initOptParser( for kind, key, val in getopt(longNoVal = @["no-nom"]):
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:
if key == "": parseFlag c, key, val
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

View file

@ -1,6 +1,5 @@
# oizys todo's # oizys todo's
- [ ] add graceful fall back for oizys-cli if pinix isn't installed system-wide yet <!-- nothing :) -->
- [ ] trackdown wezterm bug... (try building from flake?)
<!-- generated with <3 by daylinmorgan/todo --> <!-- generated with <3 by daylinmorgan/todo -->