Compare commits

..

1 commit

Author SHA1 Message Date
6d1f571ad4 flake.lock: Update
Flake lock file updates:

• Updated input 'hyprland':
    'git+https://github.com/hyprwm/Hyprland/?ref=refs/heads/main&rev=8b37e81374928856d8fd859b95a62c8bf4211901' (2024-08-09)
  → 'git+https://github.com/hyprwm/Hyprland/?ref=refs/heads/main&rev=4fdc0d55e4b44bb5300679025d2378fb6de0cae4' (2024-08-09)
• Updated input 'lix':
    '346e340cbf.tar.gz?narHash=sha256-XbtSx3sxE6rf/D31fBX9d28CuXnokkbHW6tzOEMVfxw%3D' (2024-08-09)
  → 'c7d97802e4.tar.gz?narHash=sha256-xfvFAMmR7bc2RaD1ehaT0hBE4Kka/wuqxMeW6L8x3MM%3D' (2024-08-09)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/f9b6659b7a856ad5c470ce224a0d69696c6f8c73' (2024-08-09)
  → 'github:nix-community/nixpkgs-wayland/cece0e097e27f583e61ff54f26916c29af7be7af' (2024-08-09)
• Updated input 'roc':
    'github:roc-lang/roc/698bbc3cf1c279baf76b6015754aab58d5ffeffb' (2024-08-07)
  → 'github:roc-lang/roc/0bffd6001c7b27794222db76ba0eb48506935871' (2024-08-09)
• Updated input 'zig-overlay':
    'github:mitchellh/zig-overlay/f4d2e3b5855a66a763e49d8030edbb6b852c4b1a' (2024-08-09)
  → 'github:mitchellh/zig-overlay/d15f6040f95938da639fa7287821799f76dcaef3' (2024-08-10)
2024-08-10 00:33:36 +00:00
19 changed files with 217 additions and 248 deletions

View file

@ -28,7 +28,6 @@ jobs:
with: with:
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux
extra-conf: | extra-conf: |
experimental-features = pipe-operator
accept-flake-config = true accept-flake-config = true
- uses: cachix/cachix-action@v15 - uses: cachix/cachix-action@v15
@ -82,7 +81,6 @@ jobs:
with: with:
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux
extra-conf: | extra-conf: |
experimental-features = pipe-operator
accept-flake-config = true accept-flake-config = true
- uses: ./.github/actions/clean-disk - uses: ./.github/actions/clean-disk

View file

@ -20,11 +20,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1723405438, "lastModified": 1722347739,
"narHash": "sha256-bpmC2m7OhlDvqgQZdZ2jBLyeIkq/Jld3X4bqRAxBSp8=", "narHash": "sha256-rAoh+K6KG+b1DwSWtqRVocdojnH6nGk6q07mNltoUSM=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "aquamarine", "repo": "aquamarine",
"rev": "9312aa28271c91e5d67ecb9def527b2bbcff0e66", "rev": "7c3565f9bedc7cb601cc0baa14792247e4dc1d5a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -125,11 +125,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1722555600, "lastModified": 1719994518,
"narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "8471fe90ad337a8074e957b69ca4d0089218391d", "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -298,11 +298,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1722623071, "lastModified": 1721330371,
"narHash": "sha256-sLADpVgebpCBFXkA1FlCXtvEPu1tdEsTfqK1hfeHySE=", "narHash": "sha256-aYlHTWylczLt6ERJyg6E66Y/XSCbVL7leVcRuJmVbpI=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprcursor", "repo": "hyprcursor",
"rev": "912d56025f03d41b1ad29510c423757b4379eb1c", "rev": "4493a972b48f9c3014befbbf381ed5fff91a65dc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -323,11 +323,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1723488592, "lastModified": 1723241066,
"narHash": "sha256-nPYQrQD8rldLIhrz6px0YHGB4WwIaWLdmBtWsMgLLNI=", "narHash": "sha256-et+BwLETF5e/9jBHK2GnVh6WGjRztRBThtllMezCvcM=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "77cf651825c2afac69e3a827ff910a62c73e1218", "rev": "4fdc0d55e4b44bb5300679025d2378fb6de0cae4",
"revCount": 5083, "revCount": 5074,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland/" "url": "https://github.com/hyprwm/Hyprland/"
@ -444,11 +444,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1722869141, "lastModified": 1722098849,
"narHash": "sha256-0KU4qhyMp441qfwbirNg3+wbm489KnEjXOz2I/RbeFs=", "narHash": "sha256-D3wIZlBNh7LuZ0NaoCpY/Pvu+xHxIVtSN+KkWZYvvVs=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprutils", "repo": "hyprutils",
"rev": "0252fd13e78e60fb0da512a212e56007515a49f7", "rev": "5dcbbc1e3de40b2cecfd2007434d86e924468f1f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -500,11 +500,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1723378259, "lastModified": 1722773431,
"narHash": "sha256-8JZVHJAoDgbAk9nn7blBB+wnQbgCq1lIxBsyT7qgeI8=", "narHash": "sha256-puSEio9yjWojIBDBts4BSGZ43rv1LzIevdYOKmW/Mjg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "lib-aggregate", "repo": "lib-aggregate",
"rev": "8834c9b308bf4d9d448dd73be5f9782f4635d4ca", "rev": "04a4b4d84e02590715e753da3d35fb03cddc6425",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -516,11 +516,11 @@
"lix": { "lix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1723511168, "lastModified": 1723233557,
"narHash": "sha256-XDcqLVPcsMhORerIPuQ1XNALtDvG6QRA2dKyNrccXyg=", "narHash": "sha256-xfvFAMmR7bc2RaD1ehaT0hBE4Kka/wuqxMeW6L8x3MM=",
"rev": "f9a3bf6ccccf8ac6b1604c1a2980e3a565ae4f44", "rev": "c7d97802e4f59b8621e67cf62275d6a7fde8fe62",
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/f9a3bf6ccccf8ac6b1604c1a2980e3a565ae4f44.tar.gz?rev=f9a3bf6ccccf8ac6b1604c1a2980e3a565ae4f44" "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/c7d97802e4f59b8621e67cf62275d6a7fde8fe62.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -539,11 +539,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1723511483, "lastModified": 1722485024,
"narHash": "sha256-rT/OkVXKkns2YvyF1nFvl+8Gc3sld1c1sXPtGkbqaDY=", "narHash": "sha256-+7RReWaFQUO8MfAhJYNm4FkALuM3rPGy2AlXXv9Jmc8=",
"rev": "cecf70b77539c1a593f60ec9d0305b5e537ab6a9", "rev": "e350380d72f94035c309e19fda2fd550f6ab7376",
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/cecf70b77539c1a593f60ec9d0305b5e537ab6a9.tar.gz?rev=cecf70b77539c1a593f60ec9d0305b5e537ab6a9" "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/e350380d72f94035c309e19fda2fd550f6ab7376.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -558,11 +558,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1723372011, "lastModified": 1721505437,
"narHash": "sha256-zqenoufFiPfobw74idorZMG8AXG3DnFzbHplt/Nkvrg=", "narHash": "sha256-sZpyyf9EiRVyEA9vUVWNxu8yI9MU0nhlEuPBL3hvC60=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-eval-jobs", "repo": "nix-eval-jobs",
"rev": "8802412b8747633e9d80639897e4d58fa6290909", "rev": "2e522fb78d7613cecaf683875ab27b6c90e8a84f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -600,11 +600,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1723352546, "lastModified": 1722740924,
"narHash": "sha256-WTIrvp0yV8ODd6lxAq4F7EbrPQv0gscBnyfn559c3k8=", "narHash": "sha256-UQPgA5d8azLZuDHZMPmvDszhuKF1Ek89SrTRtqsQ4Ss=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "ec78079a904d7d55e81a0468d764d0fffb50ac06", "rev": "97ca0a0fca0391de835f57e44f369a283e37890f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -660,11 +660,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1723175592, "lastModified": 1722185531,
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=", "narHash": "sha256-veKR07psFoJjINLC8RK4DiLniGGMgF3QMlS4tb74S6k=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b", "rev": "52ec9ac3b12395ad677e8b62106f0b98c1f8569d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -676,11 +676,11 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1723337705, "lastModified": 1722732880,
"narHash": "sha256-znSU0DeNDPt7+LMAfFkvKloMaeQ6yl/U5SqV/ktl1vA=", "narHash": "sha256-do2Mfm3T6SR7a5A804RhjQ+JTsF5hk4JTPGjCTRM/m8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "ace7856d327b618d3777e31b1f224b3ab57ed71a", "rev": "8bebd4c74f368aacb047f0141db09ec6b339733c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -697,11 +697,11 @@
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1723504763, "lastModified": 1723234766,
"narHash": "sha256-q+Leb6hrkfc5cwysvYcGVslr6tBtSC9ggIjqpV9wmy0=", "narHash": "sha256-p7VFHo/YlNcdlQCpcTq/ygmgnzZmgeaAgEx88dKHnfQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs-wayland", "repo": "nixpkgs-wayland",
"rev": "e551336e36b8e275cdbdfc08ea6d1182239263b3", "rev": "cece0e097e27f583e61ff54f26916c29af7be7af",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -744,11 +744,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1723221148, "lastModified": 1723151389,
"narHash": "sha256-7pjpeQlZUNQ4eeVntytU3jkw9dFK3k1Htgk2iuXjaD8=", "narHash": "sha256-9AVY0ReCmSGXHrlx78+1RrqcDgVSRhHUKDVV1LLBy28=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "154bcb95ad51bc257c2ce4043a725de6ca700ef6", "rev": "13fe00cb6c75461901f072ae62b5805baef9f8b2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -760,11 +760,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1723221148, "lastModified": 1720781449,
"narHash": "sha256-7pjpeQlZUNQ4eeVntytU3jkw9dFK3k1Htgk2iuXjaD8=", "narHash": "sha256-po3TZO9kcZwzvkyMJKb0WCzzDtiHWD34XeRaX1lWXp0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "154bcb95ad51bc257c2ce4043a725de6ca700ef6", "rev": "8b5a3d5a1d951344d683b442c0739010b80039db",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -776,11 +776,11 @@
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1723175592, "lastModified": 1722813957,
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=", "narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b", "rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -839,11 +839,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1723447286, "lastModified": 1723239681,
"narHash": "sha256-P3YvswRWaPlBr6YOkeNOVs4P/IcjPC24FfN8gUM7VkY=", "narHash": "sha256-1UPtz+CsXFr4LbM2AijSqnzSZLBuZtfURE4ZPtlS3NI=",
"owner": "roc-lang", "owner": "roc-lang",
"repo": "roc", "repo": "roc",
"rev": "3ebff4348ff8a361e59b9ca3997c41ac8076a201", "rev": "0bffd6001c7b27794222db76ba0eb48506935871",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1027,11 +1027,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1723303070, "lastModified": 1720930114,
"narHash": "sha256-krGNVA30yptyRonohQ+i9cnK+CfCpedg6z3qzqVJcTs=", "narHash": "sha256-VZK73b5hG5bSeAn97TTcnPjXUXtV7j/AtS4KN8ggCS0=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "14c092e0326de759e16b37535161b3cb9770cea3", "rev": "b92afa1501ac73f1d745526adc4f89b527595f14",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1101,11 +1101,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1723508807, "lastModified": 1723249552,
"narHash": "sha256-2j6u7X2ziCjpUgeZbP1h4/MNG6glc4sO2DzDXgw43o0=", "narHash": "sha256-4nQBvZQOOiI3kr+Ch0XH9ZIhajpLooqGbrcUNMI1Hmw=",
"owner": "mitchellh", "owner": "mitchellh",
"repo": "zig-overlay", "repo": "zig-overlay",
"rev": "4dbfd05d2d1382eaf40ff1ebab854abe7e30702f", "rev": "d15f6040f95938da639fa7287821799f76dcaef3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1127,11 +1127,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1723396350, "lastModified": 1722987529,
"narHash": "sha256-f5RTadUCYeGPDI6Y7xDYa6sJsdKFCdtD4WipGxuof3A=", "narHash": "sha256-r7tnq70psZQXfLlDj+XzidBj352vfQFrICC7hfKHw7M=",
"owner": "zigtools", "owner": "zigtools",
"repo": "zls", "repo": "zls",
"rev": "3ec8ad16337e5fc391fbdfb394f68f155b2a7a69", "rev": "d8084a342f40b444addf772fdef36a589299ebe6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,14 +1,17 @@
{ { enabled, ... }:
enabled,
enableAttrs,
listify,
...
}:
{ {
oizys = { oizys = {
languages = [
"nim"
"node" # for docker langservers
"python"
"nushell"
];
rune.motd = enabled; rune.motd = enabled;
languages = "nim|node|python|nushell" |> listify; docker = enabled;
} // ("docker|backups|nix-ld" |> listify |> enableAttrs); backups = enabled;
nix-ld = enabled;
};
services.restic.backups.gdrive = { services.restic.backups.gdrive = {
# directories created by gitea and soft-serve aren't world readable # directories created by gitea and soft-serve aren't world readable
@ -24,6 +27,15 @@
]; ];
}; };
# git user handles the forgjo ssh authentication security.sudo.wheelNeedsPassword = false;
users.users.git.isNormalUser = true;
users.users = {
daylin = {
extraGroups = [ "docker" ];
};
git = {
isNormalUser = true;
};
};
} }

View file

@ -1,10 +1,9 @@
{ enabled, ... }: { enabled, ... }:
{ {
security.sudo.wheelNeedsPassword = false;
services.resolved = enabled; services.resolved = enabled;
services.fail2ban = enabled // { services.fail2ban = {
enable = true;
maxretry = 5; maxretry = 5;
bantime = "24h"; bantime = "24h";
}; };
@ -27,9 +26,8 @@
# users.mutableUsers = false; # users.mutableUsers = false;
# Use the GRUB 2 boot loader. # Use the GRUB 2 boot loader.
boot.loader.grub = enabled // { boot.loader.grub.enable = true;
device = "/dev/sda"; # or "nodev" for efi only boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
};
# don't delete this you foo bar # don't delete this you foo bar
system.stateVersion = "23.11"; # Did you read the comment? system.stateVersion = "23.11"; # Did you read the comment?

View file

@ -4,13 +4,14 @@
desktop = enabled; desktop = enabled;
nix-ld = enabled; nix-ld = enabled;
rune.motd = enabled; rune.motd = enabled;
docker = enabled;
}; };
# Enable the X11 windowing system. # Enable the X11 windowing system.
services.xserver = enabled // { services.xserver = {
displayManager.startx = enabled; enable = true;
windowManager.qtile = enabled; displayManager.startx.enable = true;
windowManager.qtile.enable = true;
}; };
users.users.daylin.extraGroups = [ "docker" ];
} }

View file

@ -1,26 +1,39 @@
{ enabled, config, ... }:
{ {
lib, oizys = {
config, vpn = enabled;
enabled, desktop = enabled;
enableAttrs, hyprland = enabled;
listify, chrome = enabled;
... docker = enabled;
}: nix-ld = enabled // {
{ overkill = enabled;
oizys = };
{ vbox = enabled;
nix-ld = enabled // { backups = enabled;
overkill = enabled; hp-scanner = enabled;
}; languages = [
languages = "misc|nim|node|nushell|python|roc|tex|zig" |> listify; "misc"
} "nim"
// ( "node"
'' "nushell"
vpn|desktop|hyprland|chrome "python"
docker|vbox|backups|hp-scanner|llm "roc"
'' "tex"
|> listify "zig"
|> enableAttrs ];
); llm = enabled;
};
services.restic.backups.gdrive = {
user = "daylin";
repository = "rclone:g:archives/othalan";
passwordFile = "/home/daylin/.config/restic/othalan-pass";
paths = [
"/home/daylin/stuff/"
"/home/daylin/dev/"
];
};
users.users.${config.oizys.user}.extraGroups = [ "audio" ];
} }

View file

@ -3,16 +3,6 @@ let
notes-git = ''${pkgs.git}/bin/git -C /home/daylin/stuff/notes''; notes-git = ''${pkgs.git}/bin/git -C /home/daylin/stuff/notes'';
in in
{ {
services.restic.backups.gdrive = {
user = "daylin";
repository = "rclone:g:archives/othalan";
passwordFile = "/home/daylin/.config/restic/othalan-pass";
paths = [
"/home/daylin/stuff/"
"/home/daylin/dev/"
];
};
systemd.services.notes-bot = { systemd.services.notes-bot = {
description = "auto commit changes to notes"; description = "auto commit changes to notes";
serviceConfig = { serviceConfig = {

View file

@ -1,9 +1,4 @@
{ { pkgs, enabled, ... }:
config,
pkgs,
enabled,
...
}:
{ {
networking.networkmanager = enabled; networking.networkmanager = enabled;
services.fwupd = enabled; services.fwupd = enabled;
@ -26,7 +21,7 @@
support32Bit = true; support32Bit = true;
}; };
}; };
users.users.${config.oizys.user}.extraGroups = [ "audio" ];
environment.systemPackages = with pkgs; [ pamixer ]; environment.systemPackages = with pkgs; [ pamixer ];
# catppuccin/tty move to "module" # catppuccin/tty move to "module"

View file

@ -24,7 +24,7 @@ let
# TODO: start using pipes once support lands in nixd # TODO: start using pipes once support lands in nixd
# selfPackages = self.packages.${pkgs.system} |> attrValues; # selfPackages = self.packages.${pkgs.system} |> attrValues;
selfPackages = attrValues self.packages.${pkgs.system}; selfPackages = (attrValues self.packages.${pkgs.system});
in in
{ {
makePackages = makePackages =
@ -34,7 +34,7 @@ in
# packages from overlays # packages from overlays
(with pkgs; [ (with pkgs; [
swww swww
nixVersions.git # nixVersions.git
]) ])
++ [ ++ [
(flake.pkgs "roc").full (flake.pkgs "roc").full

View file

@ -1,11 +1,6 @@
inputs: final: prev: inputs: final: prev:
let let
inherit (builtins) inherit (builtins) listToAttrs substring filter;
listToAttrs
substring
filter
replaceStrings
;
inherit (final) inherit (final)
concatStringsSep concatStringsSep
hasSuffix hasSuffix
@ -13,13 +8,10 @@ let
mkIf mkIf
mkOption mkOption
types types
splitString
trim
; ;
inherit (final.filesystem) listFilesRecursive; inherit (final.filesystem) listFilesRecursive;
in in
let let
enabled = { enabled = {
enable = true; enable = true;
}; };
@ -27,20 +19,6 @@ let
enable = false; enable = false;
}; };
# split a string on newlines and pipes to generate list
# "opt1|opt2" |> listify -> ["opt1" "opt2"]
# ''
# opt1
# opt2|opt3
# '' |> listify ["opt1" "opt2" "opt3"]
listify =
s:
s
|> replaceStrings [ "\n" ] [ "|" ]
|> splitString "|"
|> filter (s': s' != "")
|> map (s': trim s');
# ["a" "b"] -> {a.enable = true; b.enable = true;} # ["a" "b"] -> {a.enable = true; b.enable = true;}
enableAttrs = enableAttrs =
attrs: attrs:
@ -88,12 +66,10 @@ let
flakeVer = flakeVer =
flake: "${flake.shortRev or flake.dirtyShortRev}-${mkDate (toString flake.lastModifiedDate)}"; flake: "${flake.shortRev or flake.dirtyShortRev}-${mkDate (toString flake.lastModifiedDate)}";
isNixFile = p: p |> hasSuffix ".nix"; isNixFile = p: hasSuffix ".nix" p;
isDefaultNixFile = p: p |> hasSuffix "default.nix"; isDefaultNixFile = p: hasSuffix "default.nix" p;
# filterNotDefaultNixFile = paths: filter (p: !(isDefaultNixFile p) && (isNixFile p)) paths; filterNotDefaultNixFile = paths: filter (p: !(isDefaultNixFile p) && (isNixFile p)) paths;
filterNotDefaultNixFile = paths: paths |> filter (p: !(isDefaultNixFile p) && (isNixFile p)); listNixFilesRecursive = dir: filterNotDefaultNixFile (listFilesRecursive dir);
# listNixFilesRecursive = dir: filterNotDefaultNixFile (listFilesRecursive dir);
listNixFilesRecursive = dir: dir |> listFilesRecursive |> filterNotDefaultNixFile;
# defaultLinuxPackage = flake: flake.packages.x86_64-linux.default; # defaultLinuxPackage = flake: flake.packages.x86_64-linux.default;
# defaultPackageGeneric = system: flake: "${flake}.packages.${system}.default"; # defaultPackageGeneric = system: flake: "${flake}.packages.${system}.default";
@ -105,7 +81,6 @@ let
pkgs = pkgsFromSystem system; pkgs = pkgsFromSystem system;
pkg = pkgFromSystem system; pkg = pkgFromSystem system;
}; };
in in
{ {
inherit inherit
@ -124,6 +99,5 @@ in
pkgFromSystem pkgFromSystem
overlayFrom overlayFrom
flakeFromSystem flakeFromSystem
listify
; ;
} }

View file

@ -14,34 +14,37 @@ let
enableAttrs enableAttrs
isNixFile isNixFile
flakeFromSystem flakeFromSystem
listify
; ;
inherit (lib.filesystem) listFilesRecursive; inherit (lib.filesystem) listFilesRecursive;
# pkgFrom = pkgFromSystem "x86_64-linux";
# pkgsFrom = pkgsFromSystem "x86_64-linux";
flake = flakeFromSystem "x86_64-linux"; flake = flakeFromSystem "x86_64-linux";
hostPath = host: ../. + "/hosts/${host}"; hostPath = host: ../. + "/hosts/${host}";
# all nix files not including pkgs.nix # all nix files not including pkgs.nix
# hostFiles = host: filter isNixFile (listFilesRecursive (hostPath host)); hostFiles = host: filter isNixFile (listFilesRecursive (hostPath host));
hostFiles = host: host |> hostPath |> listFilesRecursive |> filter isNixFile;
commonSpecialArgs = {
inherit
self
inputs
lib
enabled
;
};
mkIso = nixosSystem { mkIso = nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
inputs.lix-module.nixosModules.default
self.nixosModules.nix self.nixosModules.nix
self.nixosModules.essentials self.nixosModules.essentials
self.nixosModules.iso (
{ pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];
environment.systemPackages = (with pkgs; [ neovim ]) ++ [ (flake.pkg "self") ];
}
)
]; ];
specialArgs = commonSpecialArgs; specialArgs = {
inherit
inputs
lib
self
enabled
;
};
}; };
mkSystem = mkSystem =
@ -55,11 +58,14 @@ let
inputs.hyprland.nixosModules.default inputs.hyprland.nixosModules.default
] ++ (hostFiles hostName); ] ++ (hostFiles hostName);
specialArgs = commonSpecialArgs // { specialArgs = {
inherit inherit
inputs
lib
self
mkDefaultOizysModule mkDefaultOizysModule
mkOizysModule mkOizysModule
listify enabled
enableAttrs enableAttrs
hostName hostName
flake flake

View file

@ -1,5 +0,0 @@
{ pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];
environment.systemPackages = (with pkgs; [ neovim ]);
}

View file

@ -11,24 +11,13 @@ mkOizysModule config "vpn" {
]; ];
services.openvpn.servers = { services.openvpn.servers = {
# subscription expired express-ny = {
# express-ny = {
# config = ''
# config /home/daylin/.config/openvpn/express-ny/config.ovpn
# auth-user-pass /home/daylin/.config/openvpn/express-ny/credentials
# '';
# autoStart = false;
# updateResolvConf = true;
# };
#
mullvad-chi = {
config = '' config = ''
config /home/daylin/.config/openvpn/mullvad-chi/mullvad_us_chi.conf config /home/${config.oizys.user}/.config/openvpn/express-ny/config.ovpn
auth-user-pass /home/${config.oizys.user}/.config/openvpn/express-ny/credentials
''; '';
autoStart = false; autoStart = false;
updateResolvConf = true; updateResolvConf = true;
}; };
}; };
} }

View file

@ -16,11 +16,7 @@ in
# nix.package = pkgs.nixVersions.latest; # nix.package = pkgs.nixVersions.latest;
nix = { nix = {
settings = { settings = {
experimental-features = [ experimental-features = [ "nix-command" "flakes" "pipe-operator"];
"nix-command"
"flakes"
"pipe-operator"
];
use-xdg-base-directories = true; use-xdg-base-directories = true;
}; };

View file

@ -1,15 +1,17 @@
{ ... }: { ... }:
(final: prev: { (final: prev: {
nimble = prev.nimble.overrideNimAttrs rec { nimble = prev.nimble.overrideNimAttrs {
version = "0.16.0"; version = "0.14.2-5e7901760e89108476a4e21976a0ef783403e8fe";
requiredNimVersion = 2; requiredNimVersion = 2;
buildInputs = [ prev.pkgs.openssl ]; buildInputs = [ prev.pkgs.openssl ];
src = final.fetchFromGitHub { src = final.fetchFromGitHub {
owner = "nim-lang"; owner = "nim-lang";
repo = "nimble"; repo = "nimble";
rev = "v${version}";
hash = "sha256-nsQAUe+soRkWAFPYP5LftBCvQdkC1SpiIORscDsPQB4="; # most recent commit 2024-03-11
rev = "5e7901760e89108476a4e21976a0ef783403e8fe";
hash = "sha256-8b5yKvEl7c7wA/8cpdaN2CSvawQJzuRce6mULj3z/mI=";
}; };
}; };
}) })

View file

@ -0,0 +1,12 @@
{ ... }:
(final: prev: {
nimlsp = prev.nimlsp.overrideNimAttrs {
requiredNimVersion = 2;
nimFlags = [
"--threads:on"
""
"-d:explicitSourcePath=${final.srcOnly final.pkgs.nim-unwrapped-2}"
"-d:tempDir=/tmp"
];
};
})

View file

@ -1,21 +0,0 @@
ld-library-path
builder.pl
profile
system-path
nixos-help
nixos-install
nixos-version
nixos-manual-html
nixos-rebuild
nixos-configuration-reference-manpage
nixos-generate-config
nixos-enter
nixos-container
nixos-build-vms
nixos-wsl-version
nixos-wsl-welcome-message
nixos-wsl-welcome
restic-gdrive
gitea
lock
code

View file

@ -255,12 +255,6 @@ func splitDrv(drv string) (string, string) {
return drvName, hash return drvName, hash
} }
const tableTmpl = `# Building Derivations
| derivation | hash |
|---|---|
%s
`
func writeDervationsToStepSummary(drvs []string) { func writeDervationsToStepSummary(drvs []string) {
tableRows := make([]string, len(drvs)) tableRows := make([]string, len(drvs))
for i, drv := range drvs { for i, drv := range drvs {
@ -270,7 +264,16 @@ func writeDervationsToStepSummary(drvs []string) {
name, hash, name, hash,
) )
} }
o.writeToGithubStepSummary(fmt.Sprintf(tableTmpl, strings.Join(tableRows, "\n")))
o.writeToGithubStepSummary(
fmt.Sprintf(`# Building Derivations
| derivation | hash |
|---|---|
%s
`,
strings.Join(tableRows, "\n"),
),
)
} }
func NixBuild(minimal bool, rest ...string) { func NixBuild(minimal bool, rest ...string) {

View file

@ -1,7 +1,6 @@
package oizys package oizys
import ( import (
_ "embed"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
@ -13,21 +12,22 @@ import (
"github.com/charmbracelet/log" "github.com/charmbracelet/log"
) )
//go:embed ignored.txt var ignoredMap = stringSliceToMap(
var ignoredList string []string{
var ignoredMap = stringToMap(ignoredList) // nix
"ld-library-path", "builder.pl", "profile", "system-path",
func stringToMap(s string) map[string]struct{} { // nixos
return stringSliceToMap(strings.Split(s, "\n")) "nixos-help",
} "nixos-install", "nixos-version",
"nixos-manual-html", "nixos-rebuild",
func stringSliceToMap(slice []string) map[string]struct{} { "nixos-configuration-reference-manpage",
hashMap := make(map[string]struct{}, len(slice)) "nixos-generate-config", "nixos-enter",
for _, s := range slice { "nixos-container", "nixos-build-vms",
hashMap[s] = struct{}{} "nixos-wsl-version", "nixos-wsl-welcome-message", "nixos-wsl-welcome",
} // trivial packages
return hashMap "restic-gdrive", "gitea", "lock", "code",
} },
)
type Derivation struct { type Derivation struct {
InputDrvs map[string]interface{} InputDrvs map[string]interface{}
@ -72,7 +72,13 @@ func drvNotIgnored(drv string) bool {
return !ok return !ok
} }
func stringSliceToMap(slice []string) map[string]struct{} {
hashMap := make(map[string]struct{}, len(slice))
for _, s := range slice {
hashMap[s] = struct{}{}
}
return hashMap
}
func drvsToInputs(derivation map[string]Derivation) []string { func drvsToInputs(derivation map[string]Derivation) []string {
var drvs []string var drvs []string