| {
|
| description = "basic flake config";
|
|
|
| inputs = {
|
| nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
| home-manager.url = "github:nix-community/home-manager";
|
| home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
| sops-nix = {
|
| url = "github:Mic92/sops-nix";
|
| inputs.nixpkgs.follows = "nixpkgs";
|
| };
|
|
|
| advcpmv-patch-src = {
|
| url = "github:jarun/advcpmv";
|
| flake = false;
|
| };
|
|
|
| niri = {
|
| url = "github:sodiboo/niri-flake";
|
| inputs.nixpkgs.follows = "nixpkgs";
|
| };
|
|
|
| nixcord.url = "github:kaylorben/nixcord";
|
| nixvim = {
|
| url = "github:nix-community/nixvim";
|
| inputs.nixpkgs.follows = "nixpkgs";
|
| };
|
|
|
| tomu-nix.url = "github:shtts/tomu-nix";
|
|
|
| zen-browser = {
|
| url = "github:0xc000022070/zen-browser-flake";
|
| inputs = {
|
| nixpkgs.follows = "nixpkgs";
|
| home-manager.follows = "home-manager";
|
| };
|
| };
|
|
|
| nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
| mangowc = {
|
| url = "github:DreamMaoMao/mangowc";
|
| inputs.nixpkgs.follows = "nixpkgs";
|
| };
|
| noctalia = {
|
| url = "github:noctalia-dev/noctalia-shell";
|
| inputs.nixpkgs.follows = "nixpkgs";
|
| };
|
| };
|
|
|
| outputs =
|
| inputs@{
|
| self,
|
| nixpkgs,
|
| home-manager,
|
| sops-nix,
|
| niri,
|
| advcpmv-patch-src,
|
| mangowc,
|
| ...
|
| }:
|
| let
|
| system = "x86_64-linux";
|
|
|
| # The self-contained logic for advcpmv
|
| advcp-overlay = (
|
| final: prev: {
|
| advcpmv = (prev.coreutils.override { singleBinary = false; }).overrideAttrs (old: rec {
|
| pname = "advcpmv";
|
| version = "9.5"; # Pinned to 9.5 as 9.8 patch doesn't exist yet
|
|
|
| src = prev.fetchurl {
|
| url = "mirror://gnu/coreutils/coreutils-${version}.tar.xz";
|
| hash = "sha256-zTKO3qyS9qZl3p8yPJO3Eq8YWLwuDYjz9xAEaUcKG4o=";
|
| };
|
|
|
| patches = (old.patches or [ ]) ++ [
|
| "${advcpmv-patch-src}/advcpmv-0.9-${version}.patch"
|
| ];
|
|
|
| configureFlags = (old.configureFlags or [ ]) ++ [ "--program-prefix=adv" ];
|
|
|
| postInstall = (old.postInstall or "") + ''
|
| pushd $out/bin
|
| ln -s advcp cpg
|
| ln -s advmv mvg
|
| popd
|
| '';
|
|
|
| __intentionallyOverridingVersion = true;
|
| });
|
|
|
| # Helper shortcuts
|
| advcp = final.runCommand "advcp" { } ''
|
| mkdir -p $out/bin
|
| ln -s ${final.advcpmv}/bin/advcp $out/bin/advcp
|
| ln -s ${final.advcpmv}/bin/cpg $out/bin/cpg
|
| '';
|
|
|
| advmv = final.runCommand "advmv" { } ''
|
| mkdir -p $out/bin
|
| ln -s ${final.advcpmv}/bin/advmv $out/bin/advmv
|
| ln -s ${final.advcpmv}/bin/mvg $out/bin/mvg
|
| '';
|
| }
|
| );
|
| in
|
| {
|
| nixosConfigurations.tomtom = nixpkgs.lib.nixosSystem {
|
| specialArgs = { inherit inputs self; };
|
| modules = [
|
| {
|
| nixpkgs.overlays = [
|
| advcp-overlay
|
| inputs.niri.overlays.niri
|
| ];
|
| }
|
| niri.nixosModules.niri
|
| ./configuration.nix
|
| sops-nix.nixosModules.sops
|
| home-manager.nixosModules.home-manager
|
| {
|
| home-manager.useGlobalPkgs = true;
|
| home-manager.useUserPackages = true;
|
| home-manager.users.zoomer = ./home.nix;
|
| home-manager.backupFileExtension = "backup";
|
| home-manager.extraSpecialArgs = { inherit inputs; };
|
| home-manager.sharedModules = [ inputs.nixcord.homeModules.nixcord ];
|
| }
|
| ./NIXOSmodules/noctalia.nix
|
| mangowc.nixosModules.mango
|
| ];
|
| };
|
| };
|
| }
|