{"id":23989554,"url":"https://github.com/andreijiroh-dev/nixops-config","last_synced_at":"2025-02-25T03:40:18.185Z","repository":{"id":270251288,"uuid":"909637244","full_name":"andreijiroh-dev/nixops-config","owner":"andreijiroh-dev","description":"@ajhalili2006's nixpkgs + NixOS configurations, exported from the dotfiles repo.","archived":false,"fork":false,"pushed_at":"2025-02-17T04:46:59.000Z","size":138,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T05:28:50.705Z","etag":null,"topics":["home-manager","nix-flake","nixos-configuration","nixpkgs"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreijiroh-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-29T10:36:31.000Z","updated_at":"2025-02-17T04:47:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"1a3b29c5-a932-42b9-be4b-3c9370deaabf","html_url":"https://github.com/andreijiroh-dev/nixops-config","commit_stats":null,"previous_names":["andreijiroh-dev/nixops-config"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreijiroh-dev%2Fnixops-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreijiroh-dev%2Fnixops-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreijiroh-dev%2Fnixops-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreijiroh-dev%2Fnixops-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreijiroh-dev","download_url":"https://codeload.github.com/andreijiroh-dev/nixops-config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240599184,"owners_count":19826959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["home-manager","nix-flake","nixos-configuration","nixpkgs"],"created_at":"2025-01-07T17:21:13.306Z","updated_at":"2025-02-25T03:40:18.180Z","avatar_url":"https://github.com/andreijiroh-dev.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@andreijiroh-dev/nixops-config`\n\nThis is @ajhalili2006's NixOS + Home Manager configuration for his laptop and homelabs, in sync with the\n[nixpkgs-specific dotfiles repository]. Also planned to be used in Hack Club Nest soon.\n\n[nixpkgs-specific dotfiles repository]: https://github.com/andreijiroh-dev/dotfiles/tree/nixpkgs\n\n## CI Status\n\n| Workflow Name and Type | CI Platform | Badge/Link |\n| --- | --- | --- |\n| Nix Flake Builds (push) | GitHub Actions | [![Nix Flake Builds](https://github.com/andreijiroh-dev/nixops-config/actions/workflows/update-flakes.yml/badge.svg)](https://github.com/andreijiroh-dev/nixops-config/actions/workflows/update-flakes.yml) |\n| Nix Flake Builds (schedule, every 06:30 UTC Saturday) | GitHub Actions | [![Nix Flake Builds](https://github.com/andreijiroh-dev/nixops-config/actions/workflows/update-flakes.yml/badge.svg?event=schedule)](https://github.com/andreijiroh-dev/nixops-config/actions/workflows/update-flakes.yml) |\n\n## Usage\n\n### Installing NixOS\n\nIt is recommended to install NixOS using either the Calamares-based graphical\ninstaller or manually through the `nixos-install` utility, especially\nwhen you have consider partitioning on your drive to ensure that you can roll back\nsafely in case things go wrong.\n\nAfter installation, copy the generated NixOS configuration files from `/etc/nixos`\ninto a new directory named `hosts/\u003chost-name\u003e`. Note that on the rest of\nthe README, the placeholder `\u003chost-name\u003e` is used to denote the hostname of a new\nor existing machine under Nix flake-based setup.\n\n```bash\ncp -rv /etc/nixos/ hosts/\u003chost-name\u003e/\n```\n\nOn the `flake.nix` file, under the `nixosConfigurations` block, add the new host using the template below\n\n```nix\n\u003chost-name\u003e = nixpkgs.lib.nixosSystem {\n  system = \"x86_64-linux\";\n  modules = [\n    ./hosts/\u003chost-name\u003e/configuration.nix\n\n    # load Determinate Nix and the rest\n    determinate.nixosModules.default\n    home-manager.nixosModules.home-manager\n    vscode-server.nixosModules.default\n    nix-ld.nixosModules.nix-ld\n\n    # one-liners?\n    { programs.nix-ld.dev.enable = true; }\n  ];\n};\n```\n\nThen on your `hosts/\u003chost-name\u003e/configuration.nix`, add the needed imports\nas needed:\n\n```nix\nimports = [\n  ./hardware-configuration.nix\n  ../../shared/gnupg.nix\n  ../../shared/meta-configs.nix\n  ../../shared/server/ssh.nix\n  ../../shared/server/tailscale.nix\n  ../../shared/systemd.nix\n  ../../shared/yubikey.nix\n  # add more imports here\n]\n```\n\nAdjust as needed before running a `nixos-rebuild switch` into the new configuration.\n\n### Updating configuration or upgrading NixOS system\n\n```bash\nEDITOR=\"nano\" # or code if you do\n$EDITOR \u003cpath/to/nixfile.nix\u003e\ngit stage \u003cpath/to/nixfile.nix\u003e\ngit commit --signoff\n\n# update the flake.lock file manually\nnix flake update\n\n# on the another machine...\n# change {hostname} to something like stellapent-cier\nsudo nixos-rebuild --flake github:andreijiroh-dev/nixops-config#{hostname} \u003cswitch|boot|build\u003e\n```\n\n**From a local copy**:\n\n```bash\n# update the flake.lock file manually\nnix flake update\n\n# change {hostname} to something like stellapent-cier\nsudo nixos-rebuild --flake .#{hostname} \u003cswitch|boot|build\u003e\n```\n\n### As an external flake module\n\nYou can easily use this flake as an external module in your own flake-based NixOS configuration\nif you want to reuse some of my configurations.\n\n```nix\n{\n  description = \"My NixOS configuration\";\n  inputs.nixpkgs.url = \"github:NixOS/nixpkgs/24.11\";\n  inputs.andreijiroh-dev.url = \"github:andreijiroh-dev/nixops-config\";\n  # needed if you use stable instead of unstable\n  inputs.andreijiroh-dev.inputs.nixpkgs.follows = \"nixpkgs\";\n\n  outputs = { self, andreijiroh-dev, nixpkgs }: {\n    let\n      # change {hostname} to something like stellapent-cier\n      # if you like to reuse my configs\n      system = nixops-config.nixosConfigurations.{hostname};\n    in\n    {\n      nixosConfigurations.{hostname} = system {\n        # your customizations here\n      };\n\n      nixosConfigurations.your-mom = nixpkgs.lib.nixosSystem {\n         system = \"x86_64-linux\";\n         modules = [\n          andreijiroh-dev.nixosModules.networking # or any other modules\n         ];\n      };\n    };\n}\n```\n\n### Building a minimial ISO for recovery\n\nCurrently available as `amd64` (`x86-64`) Linux ISO only for now, but you can copy\nthe `recoverykit-amd64` NixOS configuration and change `system` to any supported CPU\narchitectures by NixOS.\n\n```bash\n# Build using the sources as remote\nnix build github:andreijiroh-dev/nixops-config/main#nixosConfigurations.recoverykit-amd64.config.system.build.isoImage\n\n# ...or via a local clone\nnix build .#nixosConfigurations.recoverykit-amd64.config.system.build.isoImage\n```\n\n## Availabled shared configs\n\n- [`flatpak.nix`](./shared/flatpak.nix): NixOS for enabling Flatpaks\n- [`gnupg.nix`](./shared/gnupg.nix): GnuPG configuration\n- [`locale.nix`](./shared/locale.nix): Locale configuration\n- [`meta-configs.nix`](./shared/meta-configs.nix): Meta configurations for the system, mostly related to Nix and nixpkgs.\n- [`networking.nix`](./shared/networking.nix): Networking configuration, currently DNS resolver settings for `systemd-resolved`\n- [`ssh-keys.nix`](./shared/ssh-keys.nix): SSH keys configuration as NixOS module, intended to be in sync with my keys on git forges\n- [`server/devenv.nix`](./shared/server/devenv.nix): Development environment configuration, plus Docker and VM configurations.\n- [`server/ssh.nix`](./shared/server/ssh.nix): SSH server configuration\n\n## License\n\nMPL-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreijiroh-dev%2Fnixops-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreijiroh-dev%2Fnixops-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreijiroh-dev%2Fnixops-config/lists"}